Skip to content

Commit

Permalink
Site: Add i18n friendly footer
Browse files Browse the repository at this point in the history
- Falls back to English for the Web Standards site for non-French pages
- Added additional translations to i18n JSON files
  • Loading branch information
nschonni committed Nov 28, 2013
1 parent 76db969 commit 95df1f3
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 57 deletions.
3 changes: 3 additions & 0 deletions site/data/i18n/en.json
Expand Up @@ -16,6 +16,8 @@
"site.title": "Web Experience Toolkit",
"space" : " ",
"tmpl-abbr": "Abbreviation",
"tmpl-about": "About",
"tmpl-about-anchor": "about",
"tmpl-about-minister": "About the minister",
"tmpl-about-us": "About us",
"tmpl-about-web-standards": "About the Web Standards",
Expand Down Expand Up @@ -132,6 +134,7 @@
"tmpl-wet-project": "WET project",
"tmpl-wet-subline": "Collaborative open source project led by the Government of Canada",
"tmpl-wet-theme": "WET theme",
"tmpl-wet-twitter": "WebExpToolkit",
"tmpl-work-examples": "Working examples",
"you-are-here": "You are here:"
}
3 changes: 3 additions & 0 deletions site/data/i18n/fr.json
Expand Up @@ -15,6 +15,8 @@
"site.title": "Boîte à outils de l'expérience Web",
"space" : " ",
"tmpl-abbr": "Abréviation",
"tmpl-about": "À propos",
"tmpl-about-anchor": "apropos",
"tmpl-about-minister": "Le ministre",
"tmpl-about-us": "À propos de nous",
"tmpl-about-web-standards": "À propos des normes Web",
Expand Down Expand Up @@ -131,6 +133,7 @@
"tmpl-wet-project": "Projet de la BOEW",
"tmpl-wet-subline": "Projet à source ouverte collaboratif dirigé par le Gouvernement du Canada",
"tmpl-wet-theme": "Thème de la BOEW",
"tmpl-wet-twitter": "BoiteExpWeb",
"tmpl-work-examples": "Exemples pratiques",
"you-are-here": "Vous êtes dans :",
"cont-service" : "Services et information"
Expand Down
26 changes: 0 additions & 26 deletions site/includes/footer-en.hbs

This file was deleted.

26 changes: 0 additions & 26 deletions site/includes/footer-fr.hbs

This file was deleted.

31 changes: 26 additions & 5 deletions site/includes/footer.hbs
@@ -1,5 +1,26 @@
{{#startsWith "en" language }}
{{>footer-en}}
{{else}}
{{>footer-fr}}
{{/startsWith}}
<section class="col-sm-3">
<h3>{{#i18n "tmpl-about"}}{{/i18n}}</h3>
<ul class="list-unstyled">
<li><a href="{{rooturl}}/index-{{language}}.html#{{#i18n "tmpl-about-anchor"}}{{/i18n}}">{{#i18n "tmpl-about-wet"}}{{/i18n}}</a></li>
<li><a href="http://www.tbs-sct.gc.ca/ws-nw/index-{{#isnt language "fr"}}eng{{else}}fra{{/isnt}}.asp">{{#i18n "tmpl-about-web-standards"}}{{/i18n}}</a></li>
</ul>
</section>
<section class="col-sm-3">
<h3>{{#i18n "tmpl-contact-us"}}{{/i18n}}</h3>
<ul class="list-unstyled">
<li><a href="https://github.com/wet-boew/wet-boew/issues/new">{{#i18n "tmpl-questions-comments"}}{{/i18n}}</a></li>
</ul>
</section>
<section class="col-sm-3">
<h3>{{#i18n "tmpl-news"}}{{/i18n}}</h3>
<ul class="list-unstyled">
<li><a href="https://github.com/wet-boew/wet-boew/pulse">{{#i18n "tmpl-recent-project-activity"}}{{/i18n}}</a></li>
<li><a href="https://github.com/wet-boew/wet-boew/graphs">{{#i18n "tmpl-project-stats"}}{{/i18n}}</a></li>
</ul>
</section>
<section class="col-sm-3">
<h3>{{#i18n "tmpl-stay-connected"}}{{/i18n}}</h3>
<ul class="list-unstyled">
<li><a href="https://twitter.com/{{#i18n "tmpl-wet-twitter"}}{{/i18n}}">Twitter</a></li>
</ul>
</section>

0 comments on commit 95df1f3

Please sign in to comment.