Skip to content

Commit 93fbc6e

Browse files
Update corrections
1 parent 6d4e469 commit 93fbc6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1031
-1169
lines changed

_includes/localized-title.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% assign resolved_title = include.fallback_title | default: '' %}
2+
{% assign target_locale = include.locale | default: page.locale | default: 'en' %}
3+
{% if include.page_id %}
4+
{% assign candidates = site.pages | where: "page_id", include.page_id %}
5+
{% for candidate in candidates %}
6+
{% if candidate.locale == target_locale and candidate.title %}
7+
{% assign resolved_title = candidate.title %}
8+
{% break %}
9+
{% endif %}
10+
{% endfor %}
11+
{% endif %}
12+
{{ resolved_title }}

_includes/sidebar.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
<div class="sidebar-nav">
44
{% for section in nav %}
55
{% capture section_url %}{% include localized-url.html page_id=section.page_id fallback_url=section.url locale=current_locale %}{% endcapture %}
6+
{% capture section_title %}{% include localized-title.html page_id=section.page_id fallback_title=section.title locale=current_locale %}{% endcapture %}
67
{% assign section_active_prefix = section.page_id | append: '__' %}
78
<div class="sidebar-section">
89
<a href="{{ section_url | strip }}" class="sidebar-section-title{% if page.page_id == section.page_id or page.page_id contains section_active_prefix %} active{% endif %}">
9-
{{ section.title }}
10+
{{ section_title | strip }}
1011
</a>
1112
{% if section.children %}
1213
<ul class="sidebar-items">
1314
{% for item in section.children %}
1415
{% capture item_url %}{% include localized-url.html page_id=item.page_id fallback_url=item.url locale=current_locale %}{% endcapture %}
16+
{% capture item_title %}{% include localized-title.html page_id=item.page_id fallback_title=item.title locale=current_locale %}{% endcapture %}
1517
<li class="sidebar-item">
1618
<a href="{{ item_url | strip }}" class="sidebar-link{% if page.page_id == item.page_id %} active{% endif %}">
17-
{{ item.title }}
19+
{{ item_title | strip }}
1820
</a>
1921
</li>
2022
{% endfor %}

_layouts/default.html

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@
4747
<div class="nav-links" role="navigation">
4848
{% for section in site.nav limit: 5 %}
4949
{% capture section_url %}{% include localized-url.html page_id=section.page_id fallback_url=section.url locale=current_locale %}{% endcapture %}
50+
{% capture section_title %}{% include localized-title.html page_id=section.page_id fallback_title=section.title locale=current_locale %}{% endcapture %}
5051
{% assign section_active_prefix = section.page_id | append: '__' %}
51-
<a href="{{ section_url | strip }}" class="nav-link{% if page.page_id == section.page_id or page.page_id contains section_active_prefix %} active{% endif %}">{{ section.title }}</a>
52+
<a href="{{ section_url | strip }}" class="nav-link{% if page.page_id == section.page_id or page.page_id contains section_active_prefix %} active{% endif %}">{{ section_title | strip }}</a>
5253
{% endfor %}
5354
<a href="https://github.com/johnsamuelwrites/multilingual" class="nav-link nav-link-external" target="_blank" rel="noopener noreferrer">
5455
<svg class="icon-github" viewBox="0 0 24 24" fill="currentColor" width="18" height="18" aria-hidden="true"><path d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"/></svg>
@@ -118,28 +119,37 @@
118119
<h4>Documentation</h4>
119120
<ul>
120121
{% capture footer_getting_started_url %}{% include localized-url.html page_id='getting_started' fallback_url='/en/docs/getting-started/' locale=current_locale %}{% endcapture %}
122+
{% capture footer_getting_started_title %}{% include localized-title.html page_id='getting_started' fallback_title='Getting Started' locale=current_locale %}{% endcapture %}
121123
{% capture footer_language_guide_url %}{% include localized-url.html page_id='language_guide' fallback_url='/en/docs/language-guide/' locale=current_locale %}{% endcapture %}
124+
{% capture footer_language_guide_title %}{% include localized-title.html page_id='language_guide' fallback_title='Language Guide' locale=current_locale %}{% endcapture %}
122125
{% capture footer_reference_url %}{% include localized-url.html page_id='reference' fallback_url='/en/docs/reference/' locale=current_locale %}{% endcapture %}
126+
{% capture footer_reference_title %}{% include localized-title.html page_id='reference' fallback_title='Reference' locale=current_locale %}{% endcapture %}
123127
{% capture footer_wasm_url %}{% include localized-url.html page_id='wasm' fallback_url='/en/docs/wasm/' locale=current_locale %}{% endcapture %}
128+
{% capture footer_wasm_title %}{% include localized-title.html page_id='wasm' fallback_title='WASM Backend' locale=current_locale %}{% endcapture %}
124129
{% capture footer_design_url %}{% include localized-url.html page_id='design' fallback_url='/en/docs/design/' locale=current_locale %}{% endcapture %}
125-
<li><a href="{{ footer_getting_started_url | strip }}">Getting Started</a></li>
126-
<li><a href="{{ footer_language_guide_url | strip }}">Language Guide</a></li>
127-
<li><a href="{{ footer_reference_url | strip }}">Reference</a></li>
128-
<li><a href="{{ footer_wasm_url | strip }}">WASM Backend</a></li>
129-
<li><a href="{{ footer_design_url | strip }}">Design &amp; Architecture</a></li>
130+
{% capture footer_design_title %}{% include localized-title.html page_id='design' fallback_title='Design &amp; Architecture' locale=current_locale %}{% endcapture %}
131+
<li><a href="{{ footer_getting_started_url | strip }}">{{ footer_getting_started_title | strip }}</a></li>
132+
<li><a href="{{ footer_language_guide_url | strip }}">{{ footer_language_guide_title | strip }}</a></li>
133+
<li><a href="{{ footer_reference_url | strip }}">{{ footer_reference_title | strip }}</a></li>
134+
<li><a href="{{ footer_wasm_url | strip }}">{{ footer_wasm_title | strip }}</a></li>
135+
<li><a href="{{ footer_design_url | strip }}">{{ footer_design_title | strip }}</a></li>
130136
</ul>
131137
</div>
132138
<div class="footer-col">
133139
<h4>Languages</h4>
134140
<ul>
135141
{% capture footer_all_languages_url %}{% include localized-url.html page_id='language_guide__all_languages' fallback_url='/en/docs/language-guide/all-languages/' locale=current_locale %}{% endcapture %}
142+
{% capture footer_all_languages_title %}{% include localized-title.html page_id='language_guide__all_languages' fallback_title='All 17 Languages' locale=current_locale %}{% endcapture %}
136143
{% capture footer_keywords_url %}{% include localized-url.html page_id='language_guide__keywords' fallback_url='/en/docs/language-guide/keywords/' locale=current_locale %}{% endcapture %}
144+
{% capture footer_keywords_title %}{% include localized-title.html page_id='language_guide__keywords' fallback_title='Keywords' locale=current_locale %}{% endcapture %}
137145
{% capture footer_extending_url %}{% include localized-url.html page_id='extending' fallback_url='/en/docs/extending/' locale=current_locale %}{% endcapture %}
146+
{% capture footer_extending_title %}{% include localized-title.html page_id='extending' fallback_title='Add a Language' locale=current_locale %}{% endcapture %}
138147
{% capture footer_translation_url %}{% include localized-url.html page_id='extending__translation' fallback_url='/en/docs/extending/translation/' locale=current_locale %}{% endcapture %}
139-
<li><a href="{{ footer_all_languages_url | strip }}">All 17 Languages</a></li>
140-
<li><a href="{{ footer_keywords_url | strip }}">Keywords</a></li>
141-
<li><a href="{{ footer_extending_url | strip }}">Add a Language</a></li>
142-
<li><a href="{{ footer_translation_url | strip }}">Translation Guide</a></li>
148+
{% capture footer_translation_title %}{% include localized-title.html page_id='extending__translation' fallback_title='Translation Guide' locale=current_locale %}{% endcapture %}
149+
<li><a href="{{ footer_all_languages_url | strip }}">{{ footer_all_languages_title | strip }}</a></li>
150+
<li><a href="{{ footer_keywords_url | strip }}">{{ footer_keywords_title | strip }}</a></li>
151+
<li><a href="{{ footer_extending_url | strip }}">{{ footer_extending_title | strip }}</a></li>
152+
<li><a href="{{ footer_translation_url | strip }}">{{ footer_translation_title | strip }}</a></li>
143153
</ul>
144154
</div>
145155
<div class="footer-col">
@@ -148,7 +158,8 @@ <h4>Project</h4>
148158
<li><a href="https://github.com/johnsamuelwrites/multilingual" target="_blank" rel="noopener">GitHub</a></li>
149159
<li><a href="https://github.com/johnsamuelwrites/multilingual/issues" target="_blank" rel="noopener">Issues</a></li>
150160
{% capture footer_related_work_url %}{% include localized-url.html page_id='design__related_work' fallback_url='/en/docs/design/related-work/' locale=current_locale %}{% endcapture %}
151-
<li><a href="{{ footer_related_work_url | strip }}">Related Work</a></li>
161+
{% capture footer_related_work_title %}{% include localized-title.html page_id='design__related_work' fallback_title='Related Work' locale=current_locale %}{% endcapture %}
162+
<li><a href="{{ footer_related_work_url | strip }}">{{ footer_related_work_title | strip }}</a></li>
152163
</ul>
153164
</div>
154165
</div>

_layouts/page.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,22 @@ <h1 class="content-title">{{ page.title }}</h1>
2121
{% if page.description %}
2222
<p class="content-description">{{ page.description }}</p>
2323
{% endif %}
24+
{% if page.locale == 'fr' and page.status and page.status != 'translated' %}
25+
<div class="callout callout-warning">
26+
<div class="callout-content">
27+
<strong>Traduction en cours</strong>
28+
<p>Cette page n'est pas encore entierement validee en francais. Certaines sections peuvent rester en anglais ou etre en cours de mise a jour.</p>
29+
</div>
30+
</div>
31+
{% endif %}
32+
{% if page.locale != 'fr' and page.status and page.status != 'source' and page.status != 'translated' %}
33+
<div class="callout callout-warning">
34+
<div class="callout-content">
35+
<strong>Translation in progress</strong>
36+
<p>This page is not fully validated yet. Some sections may still be untranslated or lag behind the English source.</p>
37+
</div>
38+
</div>
39+
{% endif %}
2440
{% if page.badges %}
2541
<div class="content-badges">
2642
{% for badge in page.badges %}

docs/content/fr/conception/contrats-frontend.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ status: translated
1010
permalink: /fr/docs/conception/contrats-frontend/
1111
---
1212

13-
Chaque frontend doit produire un AST conforme au c?ur, pr?server la s?mantique et maintenir la compatibilit? des diagnostics et du runtime.
13+
Chaque frontend doit produire un AST conforme au cœur, préserver la sémantique et maintenir la compatibilité des diagnostics et du runtime.
1414

1515
{{snippet:design__frontend_contracts__py01}}
1616

docs/content/fr/conception/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ status: translated
99
permalink: /fr/docs/conception/
1010
---
1111

12-
Cette section explique le mod?le en couches, le noyau s?mantique, la normalisation de surface et les contrats frontend.
12+
Cette section explique le modèle en couches, le noyau sémantique, la normalisation de surface et les contrats frontend.
1313

14-
- [Sp?cification du c?ur](/fr/design/core-spec/)
15-
- [Contrats frontend](/fr/design/frontend-contracts/)
16-
- [Normalisation de surface](/fr/design/surface-normalization/)
17-
- [Localisation de la biblioth?que standard](/fr/design/stdlib-localization/)
18-
- [Travaux li?s](/fr/design/related-work/)
14+
- [Spécification du cœur](/fr/docs/conception/specification-coeur/)
15+
- [Contrats frontend](/fr/docs/conception/contrats-frontend/)
16+
- [Normalisation de surface](/fr/docs/conception/normalisation-surface/)
17+
- [Localisation de la bibliothèque standard](/fr/docs/conception/localisation-bibliotheque-standard/)
18+
- [Travaux liés](/fr/docs/conception/travaux-lies/)
1919

2020
{{snippet:design__py01}}
2121

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
page_id: design__stdlib_localization
33
locale: fr
4-
title: Localisation de la biblioth?que standard
4+
title: Localisation de la bibliothèque standard
55
path_segments:
66
- conception
77
- localisation-bibliotheque-standard
@@ -10,6 +10,6 @@ status: translated
1010
permalink: /fr/docs/conception/localisation-bibliotheque-standard/
1111
---
1212

13-
Les alias localis?s sont r?solus vers des builtins canoniques pour garder un runtime homog?ne entre langues.
13+
Les alias localisés sont résolus vers des builtins canoniques afin de garder un runtime homogène entre les langues.
1414

1515
{{snippet:design__stdlib_localization__py01}}

docs/content/fr/conception/specification-coeur.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
page_id: design__core_spec
33
locale: fr
4-
title: Sp?cification du c?ur
4+
title: Spécification du cœur
55
path_segments:
66
- conception
77
- specification-coeur
@@ -10,7 +10,7 @@ status: translated
1010
permalink: /fr/docs/conception/specification-coeur/
1111
---
1212

13-
Le c?ur formel d?finit les concepts, les invariants de parsing/semantic, et les structures interm?diaires utilis?es par tous les frontends linguistiques.
13+
Le cœur formel définit les concepts, les invariants de parsing / sémantique et les structures intermédiaires utilisées par tous les frontends linguistiques.
1414

1515
{{snippet:design__core_spec__py01}}
1616

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
page_id: design__related_work
33
locale: fr
4-
title: Travaux li?s
4+
title: Travaux liés
55
path_segments:
66
- conception
77
- travaux-lies
@@ -10,4 +10,4 @@ status: translated
1010
permalink: /fr/docs/conception/travaux-lies/
1111
---
1212

13-
Comparaison avec les approches CNL, transpilation multi-frontends et compilation orient?e concepts.
13+
Comparaison avec les approches CNL, la transpilation multi-frontends et la compilation orientée concepts.

docs/content/fr/contribution/documentation-multilingue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ status: translated
1010
permalink: /fr/docs/contribution/documentation-multilingue/
1111
---
1212

13-
Convention de nommage, routage localis?, snippets par langue, et validations ? lancer avant publication.
13+
Convention de nommage, routage localisé, snippets par langue et validations à lancer avant publication.

0 commit comments

Comments
 (0)