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: global:
date: '%Y/%m/%d' 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: global:
date: '%Y/%m/%d' date: '%Y/%m/%d'
monero: Monero 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: global:
date: '%Y/%m/%d' date: '%Y/%m/%d'
monero: Monero 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: global:
date: '%d/%m/%Y' date: '%d/%m/%Y'
monero: Monero 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: global:
date: '%d/%m/%Y' date: '%d/%m/%Y'
monero: Monero 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: global:
date: '%Y/%m/%d' date: '%Y/%m/%d'
monero: Monero 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: global:
date: '%Y/%m/%d' date: '%Y/%m/%d'
monero: Monero 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: global:
date: '%Y/%m/%d' date: '%Y/%m/%d'
monero: Monero 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: global:
date: '%Y/%m/%d' date: '%Y/%m/%d'
monero: Monero 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: global:
date: '%Y/%m/%d' date: '%Y/%m/%d'
monero: Monero 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: global:
date: '%Y/%m/%d' date: '%Y/%m/%d'
monero: Monero 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: global:
date: '%Y/%m/%d' date: '%Y/%m/%d'
monero: Monero 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: global:
date: '%Y/%m/%d' date: '%Y/%m/%d'
monero: 門羅幣 monero: 門羅幣

View File

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