File tree Expand file tree Collapse file tree 7 files changed +39
-81
lines changed Expand file tree Collapse file tree 7 files changed +39
-81
lines changed Original file line number Diff line number Diff line change 991 . Add to ` _data/locales/languages.yml `
10102 . Make sure ` _data/locales/default/xx.json ` is fully translated
11113 . Make sure ` _data/locales/sidebar/xx.yml ` exists
12- 4 . Copy pages and change front matter for ` lang `
12+ 4 . Copy ` index.md ` and change front matter for ` lang `
13+
14+ Note that untranslated pages should not exist. If a page is untranslated the UI will defualt to the english page (unless linked to).
1315
1416#### Making alert box
1517
Original file line number Diff line number Diff line change 1+ <!-- Outdated translatons notice -->
2+ {% if page.ver %}
3+ {% assign enPage=site.pages | where:"stub", page.stub | where:"lang", "en" | first %}
4+ {% if page.ver < enPage .ver %}
5+ < div class ="alert alert-warning " role ="alert ">
6+ < h4 class ="alert-heading "> {{ i18n.warning }}</ h4 >
7+ < p > {{ i18n.outdated-warn-1 }} < a class ="alert-link "
8+ href ="{{ enPage.url | prepend: site.url }} "> {{ i18n.outdated-warn-2 }}</ a >
9+ {{ i18n.outdated-warn-3 }}</ p >
10+ < hr >
11+ < p class ="mb-0 "> < a class ="alert-link "
12+ href ="https://crowdin.com/project/authenticator-docs/ "> {{ i18n.translate-long }}</ a >
13+ </ p >
14+ </ div >
15+ {% endif %}
16+ {% endif %}
17+ <!-- This page is avalible in {{ language }} -->
18+ < div class ="alert alert-primary " id ="lang-change-div " style ="display: none; " role ="alert ">
19+ < a id ="lang-change-a " class ="alert-link "> </ a > < span id ="lang-change-text "> </ span >
20+ </ div >
Original file line number Diff line number Diff line change 1+ < nav class ="navbar navbar-expand-lg navbar-light bg-light ">
2+ < a class ="navbar-brand " href ="/ ">
3+ < img src ="/assets/logo/logo.svg " width ="30 " height ="30 " class ="d-inline-block align-top ">
4+ {{ site.title }}
5+ </ a >
6+ < div class ="navbar-nav ml-auto ">
7+ < a class ="nav-item nav-link " href ="https://github.com/Authenticator-Extension "> GitHub</ a >
8+ </ div >
9+ </ nav >
10+ < br >
Original file line number Diff line number Diff line change 1919</ head >
2020
2121< body >
22- < nav class ="navbar navbar-expand-lg navbar-light bg-light ">
23- < a class ="navbar-brand " href ="/ ">
24- < img src ="/assets/logo/logo.svg " width ="30 " height ="30 " class ="d-inline-block align-top ">
25- {{ site.title }}
26- </ a >
27- < div class ="navbar-nav ml-auto ">
28- < a class ="nav-item nav-link " href ="https://github.com/Authenticator-Extension "> GitHub</ a >
29- </ div >
30- </ nav >
31- < br >
22+ {% include nav.html %}
3223 < div class ="container ">
3324 < div class ="row ">
3425 {% if page.stub %}
6960 < div class ="col-8 ">
7061 < h1 > {{ page.title }}</ h1 >
7162 < hr >
72- <!-- Outdated translatons notice -->
73- {% if page.ver %}
74- {% assign enPage=site.pages | where:"stub", page.stub | where:"lang", "en" | first %}
75- {% if page.ver < enPage .ver %}
76- < div class ="alert alert-warning " role ="alert ">
77- < h4 class ="alert-heading "> {{ i18n.warning }}</ h4 >
78- < p > {{ i18n.outdated-warn-1 }} < a class ="alert-link "
79- href ="{{ enPage.url | prepend: site.url }} "> {{ i18n.outdated-warn-2 }}</ a >
80- {{ i18n.outdated-warn-3 }}</ p >
81- < hr >
82- < p class ="mb-0 "> < a class ="alert-link " href ="https://crowdin.com/project/authenticator-docs/ "> {{ i18n.translate-long }}</ a >
83- </ p >
84- </ div >
85- {% endif %}
86- {% endif %}
87- <!-- This page is avalible in {{ language }} -->
88- < div class ="alert alert-primary " id ="lang-change-div " style ="display: none; " role ="alert ">
89- < a id ="lang-change-a " class ="alert-link "> </ a > < span id ="lang-change-text "> </ span >
90- </ div >
91- <!-- -->
63+ {% include lang-messages.html %}
9264 {{ content }}
9365 < hr >
9466 <!-- Footer -->
Original file line number Diff line number Diff line change 1111</ head >
1212
1313< body >
14- < nav class ="navbar navbar-expand-lg navbar-light bg-light ">
15- < a class ="navbar-brand " href ="/ ">
16- < img src ="/assets/logo/logo.svg " width ="30 " height ="30 " class ="d-inline-block align-top ">
17- {{ site.title }}
18- </ a >
19- < div class ="navbar-nav ml-auto ">
20- < a class ="nav-item nav-link " href ="https://github.com/Authenticator-Extension "> GitHub</ a >
21- </ div >
22- </ nav >
23- < br >
14+ {% include nav.html %}
2415 < div class ="container ">
2516 <!-- BODY -->
2617 {% assign sidebar = site.data.locales.sidebar[page.lang].sections | default: site.data.locales.sidebar.en.sections %}
Original file line number Diff line number Diff line change 1111</ head >
1212
1313< body >
14- < nav class ="navbar navbar-expand-lg navbar-light bg-light ">
15- < a class ="navbar-brand " href ="/ ">
16- < img src ="/assets/logo/logo.svg " width ="30 " height ="30 " class ="d-inline-block align-top ">
17- {{ site.title }}
18- </ a >
19- < div class ="navbar-nav ml-auto ">
20- < a class ="nav-item nav-link " href ="https://github.com/Authenticator-Extension "> GitHub</ a >
21- </ div >
22- </ nav >
23- < br >
14+ {% include nav.html %}
2415 < div class ="container ">
2516 <!-- BODY -->
2617 < h1 > Pick language:</ h1 >
Original file line number Diff line number Diff line change 1919</ head >
2020
2121< body >
22- < nav class ="navbar navbar-expand-lg navbar-light bg-light ">
23- < a class ="navbar-brand " href ="/ ">
24- < img src ="/assets/logo/logo.svg " width ="30 " height ="30 " class ="d-inline-block align-top ">
25- {{ site.title }}
26- </ a >
27- < div class ="navbar-nav ml-auto ">
28- < a class ="nav-item nav-link " href ="https://github.com/Authenticator-Extension "> GitHub</ a >
29- </ div >
30- </ nav >
31- < br >
22+ {% include nav.html %}
3223 < div class ="container ">
3324 < div class ="col ">
3425 < h1 > {{ page.title }}</ h1 >
3526 < hr >
36- <!-- Outdated translatons notice -->
37- {% if page.ver %}
38- {% assign enPage=site.pages | where:"stub", page.stub | where:"lang", "en" | first %}
39- {% if page.ver < enPage .ver %}
40- < div class ="alert alert-warning " role ="alert ">
41- < h4 class ="alert-heading "> {{ i18n.warning }}</ h4 >
42- < p > {{ i18n.outdated-warn-1 }} < a class ="alert-link "
43- href ="{{ enPage.url | prepend: site.url }} "> {{ i18n.outdated-warn-2 }}</ a >
44- {{ i18n.outdated-warn-3 }}</ p >
45- < hr >
46- < p class ="mb-0 "> < a class ="alert-link "
47- href ="https://crowdin.com/project/authenticator-docs/ "> {{ i18n.translate-long }}</ a >
48- </ p >
49- </ div >
50- {% endif %}
51- {% endif %}
52- <!-- This page is avalible in {{ language }} -->
53- < div class ="alert alert-primary " id ="lang-change-div " style ="display: none; " role ="alert ">
54- < a id ="lang-change-a " class ="alert-link "> </ a > < span id ="lang-change-text "> </ span >
55- </ div >
27+ {% include lang-messages.html %}
5628 {{ content }}
5729 {% assign pages=site.pages | where:"stub", page.stub | sort: 'lang' %}
5830 {% if pages.size > 1 %}
You can’t perform that action at this time.
0 commit comments