Remove 'langs' from language files and move them to their own 'languages.yml' file in /_data

See merge request monero-project/monero-site!1212
This commit is contained in:
luigi1111 2020-02-06 03:44:35 +01:00
commit 6926b3093e
15 changed files with 22 additions and 218 deletions

14
_data/languages.yml Normal file
View file

@ -0,0 +1,14 @@
langs:
en: English
es: Español
it: Italiano
pl: Polski
fr: Français
ar: العربية
ru: Русский
de: Deutsch
nl: Nederlands
pt-br: Português do Brasil
tr: Türkçe
zh-cn: 简体中文
zh-tw: 繁體中文 臺灣

View file

@ -1,18 +1,3 @@
langs:
en: English
es: Español
it: Italiano
pl: Polski
fr: Français
ar: Arabic
ru: Русский
de: Deutsch
nl: Nederlands
pt-br: Português do Brasil
tr: Türkçe
zh-cn: 简体中文
zh-tw: 繁體中文 臺灣
global:
date: '%Y/%m/%d'
monero: مونيرو

View file

@ -1,18 +1,3 @@
langs:
en: English
es: Español
it: Italiano
pl: Polski
fr: Français
ar: العربية
ru: Русский
de: Deutsch
nl: Nederlands
pt-br: Português do Brasil
tr: Türkçe
zh-cn: 简体中文
zh-tw: 繁體中文 臺灣
global:
date: '%Y/%m/%d'
monero: Monero

View file

@ -1,18 +1,3 @@
langs:
en: English
es: Español
it: Italiano
pl: Polski
fr: Français
ar: العربية
ru: Русский
de: Deutsch
nl: Nederlands
pt-br: Português do Brasil
tr: Türkçe
zh-cn: 简体中文
zh-tw: 繁體中文 臺灣
global:
date: '%Y/%m/%d'
monero: Monero

View file

@ -1,18 +1,3 @@
langs:
en: English
es: Español
it: Italiano
pl: Polski
fr: Français
ar: العربية
ru: Русский
de: Deutsch
nl: Nederlands
pt-br: Português do Brasil
tr: Türkçe
zh-cn: 简体中文
zh-tw: 繁體中文 臺灣
global:
date: '%d/%m/%Y'
monero: Monero

View file

@ -1,18 +1,3 @@
langs:
en: English
es: Español
it: Italiano
pl: Polski
fr: Français
ar: العربية
ru: Русский
de: Deutsch
nl: Nederlands
pt-br: Português do Brasil
tr: Türkçe
zh-cn: 简体中文
zh-tw: 繁體中文 臺灣
global:
date: '%d/%m/%Y'
monero: Monero

View file

@ -1,18 +1,3 @@
langs:
en: English
es: Español
it: Italiano
pl: Polski
fr: Français
ar: العربية
ru: Русский
de: Deutsch
nl: Nederlands
pt-br: Português do Brasil
tr: Türkçe
zh-cn: 简体中文
zh-tw: 繁體中文 臺灣
global:
date: '%Y/%m/%d'
monero: Monero

View file

@ -1,18 +1,3 @@
langs:
en: English
es: Español
it: Italiano
pl: Polski
fr: Français
ar: العربية
ru: Русский
de: Deutsch
nl: Nederlands
pt-br: Português do Brasil
tr: Türkçe
zh-cn: 简体中文
zh-tw: 繁體中文 臺灣
global:
date: '%Y/%m/%d'
monero: Monero

View file

@ -1,18 +1,3 @@
langs:
en: English
es: Español
it: Italian
pl: Polski
fr: Français
ar: العربية
ru: Русский
de: Deutsch
nl: Nederlands
pt-br: Português do Brasil
tr: Türkçe
zh-cn: 简体中文
zh-tw: 繁體中文 臺灣
global:
date: '%Y/%m/%d'
monero: Monero

View file

@ -1,18 +1,3 @@
langs:
en: English
es: Español
it: Italiano
pl: Polski
fr: Français
ar: العربية
ru: Русский
de: Deutsch
nl: Nederlands
pt-br: Português do Brasil
tr: Türkçe
zh-cn: 简体中文
zh-tw: 繁體中文 臺灣
global:
date: '%Y/%m/%d'
monero: Monero

View file

@ -1,18 +1,3 @@
langs:
en: English
es: Español
it: Italiano
pl: Polski
fr: Français
ar: العربية
ru: Русский
de: Deutsch
nl: Nederlands
pt-br: Português do Brasil
tr: Türkçe
zh-cn: 简体中文
zh-tw: 繁體中文 臺灣
global:
date: '%Y/%m/%d'
monero: Monero

View file

@ -1,18 +1,3 @@
langs:
en: English
es: Español
it: Italiano
pl: Polski
fr: Français
ar: العربية
ru: Русский
de: Deutsch
nl: Nederlands
pt-br: Português do Brasil
tr: Türkçe
zh-cn: 简体中文
zh-tw: 繁體中文 臺灣
global:
date: '%Y/%m/%d'
monero: Monero

View file

@ -1,18 +1,3 @@
langs:
en: English
es: Español
it: Italiano
pl: Polski
fr: Français
ar: العربية
ru: Русский
de: Deutsch
nl: Nederlands
pt-br: Português do Brasil
tr: Türkçe
zh-cn: 简体中文
zh-tw: 繁體中文 臺灣
global:
date: '%Y/%m/%d'
monero: Monero

View file

@ -1,18 +1,3 @@
langs:
en: English
es: Español
it: Italiano
pl: Polski
fr: Français
ar: العربية
ru: Русский
de: Deutsch
nl: Nederlands
pt-br: Português do Brasil
tr: Türkçe
zh-cn: 简体中文
zh-tw: 繁體中文 臺灣
global:
date: '%Y/%m/%d'
monero: 門羅幣

View file

@ -71,22 +71,15 @@
<a href="{{site.baseurl}}/the-monero-project/" class="top-link">The Monero Project</a>
<div href="#" class="dropdown top-link language-change">
<input class="burger-checkdropdown" id="langdrop" type="checkbox">
<label for="langdrop">{% for lang in site.languages %}
{% if lang == site.lang %}
{% t langs.{{ lang }} %}
{%endif%}
{%endfor%}<div class="arrow-down"></div></label>
<label for="langdrop">{{ site.data.languages.langs.[site.lang] }}
<div class="arrow-down"></div></label>
<div class="dropdown-content text-center">
{% for lang in site.languages %}
{% unless site.lang == lang %}
{% if lang == site.default_lang %}
<a href="{{ site.baseurl_root }}{{ page.url }}" >{% t langs.{{ lang }} %}</a>
<a href="{{ site.baseurl_root }}{{ page.url }}" >{{ site.data.languages.langs.[lang] }}</a>
{% else %}
<a href="{{ site.baseurl_root }}/{{ lang }}{{ page.url }}" >{% t langs.{{ lang }} %}</a>
<a href="{{ site.baseurl_root }}/{{ lang }}{{ page.url }}" >{{ site.data.languages.langs.[lang] }}</a>
{% endif %}
{% endunless %}
{% endfor %}
@ -136,21 +129,13 @@
<input class="burger-checkdropdown" id="moblangdrop" type="checkbox">
<label for="moblangdrop"><img src="/img/language.png" alt="Lang" class="icon-language"/><div class="arrow-down"></div></label>
<div class="mob dropdown-content text-center">
<p class="mob-lang-change mob-lang-selected">
{% for lang in site.languages %}
{% if site.lang == lang %}
{% t langs.{{ lang }} %}
{% endif %}
{% endfor %}
</p>
<p class="mob-lang-change mob-lang-selected">{{ site.data.languages.langs.[site.lang] }}</p>
{% for lang in site.languages %}
{% unless site.lang == lang %}
{% if lang == site.default_lang %}
<a class="mob-lang-change" href="{{ site.baseurl_root }}{{ page.url }}" >{% t langs.{{ lang }} %}</a>
<a class="mob-lang-change" href="{{ site.baseurl_root }}{{ page.url }}" >{{ site.data.languages.langs.[lang] }}</a>
{% else %}
<a class="mob-lang-change" href="{{ site.baseurl_root }}/{{ lang }}{{ page.url }}" >{% t langs.{{ lang }} %}</a>
<a class="mob-lang-change" href="{{ site.baseurl_root }}/{{ lang }}{{ page.url }}" >{{ site.data.languages.langs.[lang] }}</a>
{% endif %}
{% endunless %}
{% endfor %}