mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
Handle urls translations automatically in pages
Internal page urls are now all declared once in _config.yml for each language Translators can translate file and anchor urls without needing to manually update all pages
This commit is contained in:
parent
d44bc95a22
commit
21441d310d
56 changed files with 346 additions and 265 deletions
|
@ -1,31 +1,24 @@
|
|||
---
|
||||
lang: en
|
||||
menufor:
|
||||
- text: Individuals
|
||||
url: bitcoin-for-individuals
|
||||
- text: Businesses
|
||||
url: bitcoin-for-businesses
|
||||
- text: Developers
|
||||
url: bitcoin-for-developers
|
||||
- text: Enthusiasts
|
||||
url: bitcoin-for-enthusiasts
|
||||
- text: Press
|
||||
url: bitcoin-for-press
|
||||
bitcoin-for-individuals: Individuals
|
||||
bitcoin-for-businesses: Businesses
|
||||
bitcoin-for-developers: Developers
|
||||
bitcoin-for-enthusiasts: Enthusiasts
|
||||
bitcoin-for-press: Press
|
||||
menu:
|
||||
- text: How it works
|
||||
url: how-it-works
|
||||
- text: Vocabulary
|
||||
url: vocabulary
|
||||
- text: Resources
|
||||
url: resources
|
||||
- text: Community
|
||||
url: community
|
||||
- text: Development
|
||||
url: development
|
||||
- text: Foundation
|
||||
url: foundation
|
||||
- text: About
|
||||
url: about
|
||||
how-it-works: How it works
|
||||
vocabulary: Vocabulary
|
||||
resources: Resources
|
||||
community: Community
|
||||
development: Development
|
||||
foundation: Foundation
|
||||
about: About
|
||||
button:
|
||||
wallet: Choose your wallet
|
||||
know: You need to know
|
||||
support: Support Bitcoin
|
||||
footer: © Bitcoin Project 2009–2013 Released under the <a href="http://creativecommons.org/licenses/MIT/" target="_blank">MIT license</a>
|
||||
---
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="{{ page.lang }}">
|
||||
|
@ -65,13 +58,13 @@ menu:
|
|||
<a id="logo" href="/{{ page.lang }}/"><img src="/img/logotop.svg" alt="Bitcoin"></a>
|
||||
<a href="#" id="menumobile" onclick="mobileshow(event);"></a>
|
||||
<ul id="menufor">
|
||||
{% for link in page.menufor %}{% assign active = nil %}{% capture fullurl %}{{ '/' | append:page.lang | append:'/' | append:link.url | append:'.html' }}{% endcapture %}{% if page.url == fullurl %}{% assign active = 'active' %}{% endif %}
|
||||
<li{% if active %} class="{{ active }}"{% endif %}><a href="/{{ page.lang }}/{{ link.url }}">{{ link.text }}</a></li>
|
||||
{% for link in page.menufor %}{% assign id = link[0]%}{% capture fullurl %}{{ '/' | append:page.lang | append:'/' | append:site.section[id][page.lang] | append:'.html' }}{% endcapture %}
|
||||
<li{% if page.url == fullurl %} class="active"{% endif %}><a href="/{{ page.lang }}/{{ site.section[id][page.lang] }}">{{ link[1] }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<ul id="menu">
|
||||
{% for link in page.menu %}{% assign active = nil %}{% capture fullurl %}{{ '/' | append:page.lang | append:'/' | append:link.url | append:'.html' }}{% endcapture %}{% if page.url == fullurl %}{% assign active = 'active' %}{% endif %}
|
||||
<li{% if active %} class="{{ active }}"{% endif %}><a href="/{{ page.lang }}/{{ link.url }}">{{ link.text }}</a></li>
|
||||
{% for link in page.menu %}{% assign id = link[0]%}{% capture fullurl %}{{ '/' | append:page.lang | append:'/' | append:site.section[id][page.lang] | append:'.html' }}{% endcapture %}
|
||||
<li{% if page.url == fullurl %} class="active"{% endif %}><a href="/{{ page.lang }}/{{ site.section[id][page.lang] }}">{{ link[1] }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div></div>
|
||||
|
@ -81,16 +74,16 @@ menu:
|
|||
</div>
|
||||
<div id="rightbox"{% if page.mode == "wide" %} class="wide"{% endif %}>
|
||||
<div id="choose">
|
||||
<a href="/en/choose-your-wallet"><img src="/img/but_start.svg" alt="Choose your wallet">Choose your wallet</a>
|
||||
<a href="/{{page.lang}}/{{site.section.choose-your-wallet[page.lang]}}"><img src="/img/but_start.svg" alt="{{page.button.wallet}}">{{page.button.wallet}}</a>
|
||||
</div>
|
||||
<div id="before">
|
||||
<a href="/en/you-need-to-know"><img src="/img/but_warn.svg" alt="You need to know">You need to know</a>
|
||||
<a href="/{{page.lang}}/{{site.section.you-need-to-know[page.lang]}}"><img src="/img/but_warn.svg" alt="{{page.button.know}}">{{page.button.know}}</a>
|
||||
</div>
|
||||
<div id="support">
|
||||
<a href="/en/support-bitcoin"><img src="/img/but_involve.svg" alt="Support Bitcoin">Support Bitcoin</a>
|
||||
<a href="/{{page.lang}}/{{site.section.support-bitcoin[page.lang]}}"><img src="/img/but_involve.svg" alt="{{page.button.support}}">{{page.button.support}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer"><a href="http://bitcoin2013.com" class="conferencebanner"><img src="/img/bitcoin2013_banner.png" alt="Bitcoin conference"></a><div>© Bitcoin Project 2009–2013 Released under the <a href="http://creativecommons.org/licenses/MIT/" target="_blank">MIT license</a></div></div>
|
||||
<div id="footer"><div>{{page.footer}}</div></div>
|
||||
</div>
|
||||
<script type="text/javascript">svgfallback();</script>
|
||||
</body>
|
||||
|
|
|
@ -1,29 +1,23 @@
|
|||
---
|
||||
lang: es
|
||||
menufor:
|
||||
- text: Personas
|
||||
url: bitcoin-para-personas
|
||||
- text: Empresas
|
||||
url: bitcoin-para-empresas
|
||||
- text: Desarrolladores
|
||||
url: bitcoin-para-desarrolladores
|
||||
- text: Entusiastas
|
||||
url: bitcoin-para-entusiastas
|
||||
bitcoin-for-individuals: Personas
|
||||
bitcoin-for-businesses: Empresas
|
||||
bitcoin-for-developers: Desarrolladores
|
||||
bitcoin-for-enthusiasts: Entusiastas
|
||||
menu:
|
||||
- text: Como funciona
|
||||
url: como-funciona
|
||||
- text: Vocabulario
|
||||
url: vocabulario
|
||||
- text: Recursos
|
||||
url: recursos
|
||||
- text: Comunidad
|
||||
url: comunidad
|
||||
- text: Desarrollo
|
||||
url: desarrollo
|
||||
- text: Fundación
|
||||
url: fundacion
|
||||
- text: Acerca de
|
||||
url: acerca-de
|
||||
how-it-works: Como funciona
|
||||
vocabulary: Vocabulario
|
||||
resources: Recursos
|
||||
community: Comunidad
|
||||
development: Desarrollo
|
||||
foundation: Fundación
|
||||
about: Acerca de
|
||||
button:
|
||||
wallet: Elige tu monedero
|
||||
know: Debes saber
|
||||
support: Apoya Bitcoin
|
||||
footer: © Bitcoin Project 2009–2013 Publicado bajo la <a href="http://creativecommons.org/licenses/MIT/" target="_blank">licencia MIT</a>
|
||||
---
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="{{ page.lang }}">
|
||||
|
@ -63,13 +57,13 @@ menu:
|
|||
<a id="logo" href="/{{ page.lang }}/"><img src="/img/logotop.svg" alt="Bitcoin"></a>
|
||||
<a href="#" id="menumobile" onclick="mobileshow(event);"></a>
|
||||
<ul id="menufor">
|
||||
{% for link in page.menufor %}{% assign active = nil %}{% capture fullurl %}{{ '/' | append:page.lang | append:'/' | append:link.url | append:'.html' }}{% endcapture %}{% if page.url == fullurl %}{% assign active = 'active' %}{% endif %}
|
||||
<li{% if active %} class="{{ active }}"{% endif %}><a href="/{{ page.lang }}/{{ link.url }}">{{ link.text }}</a></li>
|
||||
{% for link in page.menufor %}{% assign id = link[0]%}{% capture fullurl %}{{ '/' | append:page.lang | append:'/' | append:site.section[id][page.lang] | append:'.html' }}{% endcapture %}
|
||||
<li{% if page.url == fullurl %} class="active"{% endif %}><a href="/{{ page.lang }}/{{ site.section[id][page.lang] }}">{{ link[1] }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<ul id="menu">
|
||||
{% for link in page.menu %}{% assign active = nil %}{% capture fullurl %}{{ '/' | append:page.lang | append:'/' | append:link.url | append:'.html' }}{% endcapture %}{% if page.url == fullurl %}{% assign active = 'active' %}{% endif %}
|
||||
<li{% if active %} class="{{ active }}"{% endif %}><a href="/{{ page.lang }}/{{ link.url }}">{{ link.text }}</a></li>
|
||||
{% for link in page.menu %}{% assign id = link[0]%}{% capture fullurl %}{{ '/' | append:page.lang | append:'/' | append:site.section[id][page.lang] | append:'.html' }}{% endcapture %}
|
||||
<li{% if page.url == fullurl %} class="active"{% endif %}><a href="/{{ page.lang }}/{{ site.section[id][page.lang] }}">{{ link[1] }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div></div>
|
||||
|
@ -79,16 +73,16 @@ menu:
|
|||
</div>
|
||||
<div id="rightbox"{% if page.mode == "wide" %} class="wide"{% endif %}>
|
||||
<div id="choose">
|
||||
<a href="/es/elige-tu-monedero"><img src="/img/but_start.svg" alt="Elige tu monedero">Elige tu monedero</a>
|
||||
<a href="/{{page.lang}}/{{site.section.choose-your-wallet[page.lang]}}"><img src="/img/but_start.svg" alt="{{page.button.wallet}}">{{page.button.wallet}}</a>
|
||||
</div>
|
||||
<div id="before">
|
||||
<a href="/es/debes-saber"><img src="/img/but_warn.svg" alt="Debes saber">Debes saber</a>
|
||||
<a href="/{{page.lang}}/{{site.section.you-need-to-know[page.lang]}}"><img src="/img/but_warn.svg" alt="{{page.button.know}}">{{page.button.know}}</a>
|
||||
</div>
|
||||
<div id="support">
|
||||
<a href="/es/apoya-bitcoin"><img src="/img/but_involve.svg" alt="Apoya Bitcoin">Apoya Bitcoin</a>
|
||||
<a href="/{{page.lang}}/{{site.section.support-bitcoin[page.lang]}}"><img src="/img/but_involve.svg" alt="{{page.button.support}}">{{page.button.support}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer"><div>© Bitcoin Project 2009–2013 Publicado bajo la <a href="http://creativecommons.org/licenses/MIT/" target="_blank">licencia MIT</a></div></div>
|
||||
<div id="footer"><div>{{page.footer}}</div></div>
|
||||
</div>
|
||||
<script type="text/javascript">svgfallback();</script>
|
||||
</body>
|
||||
|
|
|
@ -1,29 +1,23 @@
|
|||
---
|
||||
lang: fr
|
||||
menufor:
|
||||
- text: Particuliers
|
||||
url: bitcoin-pour-particuliers
|
||||
- text: Entreprises
|
||||
url: bitcoin-pour-entreprises
|
||||
- text: Développeurs
|
||||
url: bitcoin-pour-developpeurs
|
||||
- text: Passionnés
|
||||
url: bitcoin-pour-passionnes
|
||||
bitcoin-for-individuals: Particuliers
|
||||
bitcoin-for-businesses: Entreprises
|
||||
bitcoin-for-developers: Développeurs
|
||||
bitcoin-for-enthusiasts: Passionnés
|
||||
menu:
|
||||
- text: Comment ça marche
|
||||
url: comment-ca-marche
|
||||
- text: Vocabulaire
|
||||
url: vocabulaire
|
||||
- text: Ressources
|
||||
url: ressources
|
||||
- text: Communauté
|
||||
url: communaute
|
||||
- text: Développement
|
||||
url: developpement
|
||||
- text: Fondation
|
||||
url: fondation
|
||||
- text: À propos
|
||||
url: a-propos
|
||||
how-it-works: Comment ça marche
|
||||
vocabulary: Vocabulaire
|
||||
resources: Ressources
|
||||
community: Communauté
|
||||
development: Développement
|
||||
foundation: Fondation
|
||||
about: À propos
|
||||
button:
|
||||
wallet: Choisissez votre porte-monnaie
|
||||
know: Vous devez savoir
|
||||
support: Supporter Bitcoin
|
||||
footer: © Bitcoin Project 2009–2013 Publié sous la <a href="http://creativecommons.org/licenses/MIT/" target="_blank">licence MIT</a>
|
||||
---
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="{{ page.lang }}">
|
||||
|
@ -63,13 +57,13 @@ menu:
|
|||
<a id="logo" href="/{{ page.lang }}/"><img src="/img/logotop.svg" alt="Bitcoin"></a>
|
||||
<a href="#" id="menumobile" onclick="mobileshow(event);"></a>
|
||||
<ul id="menufor">
|
||||
{% for link in page.menufor %}{% assign active = nil %}{% capture fullurl %}{{ '/' | append:page.lang | append:'/' | append:link.url | append:'.html' }}{% endcapture %}{% if page.url == fullurl %}{% assign active = 'active' %}{% endif %}
|
||||
<li{% if active %} class="{{ active }}"{% endif %}><a href="/{{ page.lang }}/{{ link.url }}">{{ link.text }}</a></li>
|
||||
{% for link in page.menufor %}{% assign id = link[0]%}{% capture fullurl %}{{ '/' | append:page.lang | append:'/' | append:site.section[id][page.lang] | append:'.html' }}{% endcapture %}
|
||||
<li{% if page.url == fullurl %} class="active"{% endif %}><a href="/{{ page.lang }}/{{ site.section[id][page.lang] }}">{{ link[1] }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<ul id="menu">
|
||||
{% for link in page.menu %}{% assign active = nil %}{% capture fullurl %}{{ '/' | append:page.lang | append:'/' | append:link.url | append:'.html' }}{% endcapture %}{% if page.url == fullurl %}{% assign active = 'active' %}{% endif %}
|
||||
<li{% if active %} class="{{ active }}"{% endif %}><a href="/{{ page.lang }}/{{ link.url }}">{{ link.text }}</a></li>
|
||||
{% for link in page.menu %}{% assign id = link[0]%}{% capture fullurl %}{{ '/' | append:page.lang | append:'/' | append:site.section[id][page.lang] | append:'.html' }}{% endcapture %}
|
||||
<li{% if page.url == fullurl %} class="active"{% endif %}><a href="/{{ page.lang }}/{{ site.section[id][page.lang] }}">{{ link[1] }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div></div>
|
||||
|
@ -79,16 +73,16 @@ menu:
|
|||
</div>
|
||||
<div id="rightbox"{% if page.mode == "wide" %} class="wide"{% endif %}>
|
||||
<div id="choose">
|
||||
<a href="/fr/choisir-votre-porte-monnaie"><img src="/img/but_start.svg" alt="Choisissez votre porte-monnaie">Choisissez votre porte-monnaie</a>
|
||||
<a href="/{{page.lang}}/{{site.section.choose-your-wallet[page.lang]}}"><img src="/img/but_start.svg" alt="{{page.button.wallet}}">{{page.button.wallet}}</a>
|
||||
</div>
|
||||
<div id="before">
|
||||
<a href="/fr/vous-devez-savoir"><img src="/img/but_warn.svg" alt="Vous devez savoir">Vous devez savoir</a>
|
||||
<a href="/{{page.lang}}/{{site.section.you-need-to-know[page.lang]}}"><img src="/img/but_warn.svg" alt="{{page.button.know}}">{{page.button.know}}</a>
|
||||
</div>
|
||||
<div id="support">
|
||||
<a href="/fr/supporter-bitcoin"><img src="/img/but_involve.svg" alt="Supporter Bitcoin">Supporter Bitcoin</a>
|
||||
<a href="/{{page.lang}}/{{site.section.support-bitcoin[page.lang]}}"><img src="/img/but_involve.svg" alt="{{page.button.support}}">{{page.button.support}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer"><div>© Bitcoin Project 2009–2013 Released under the <a href="http://creativecommons.org/licenses/MIT/" target="_blank">MIT license</a></div></div>
|
||||
<div id="footer"><div>{{page.footer}}</div></div>
|
||||
</div>
|
||||
<script type="text/javascript">svgfallback();</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue