Skip to content

Commit

Permalink
Content - Translating and linking dependencies in documentation layout (
Browse files Browse the repository at this point in the history
  • Loading branch information
Garneauma authored May 24, 2024
1 parent 9d603cc commit 7297a55
Show file tree
Hide file tree
Showing 19 changed files with 134 additions and 70 deletions.
5 changes: 0 additions & 5 deletions _data/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@
}
]
},
"dependencies": "No dependency.",
"a11yGuidance": "No accessibility guidance.",
"variations": [
{
Expand Down Expand Up @@ -665,7 +664,6 @@
]
},
"a11yGuidance": "no accessibility guidance",
"dependencies": "no dependency",
"variations": [
{
"name": {
Expand Down Expand Up @@ -1031,7 +1029,6 @@
}
]
},
"dependencies": "No dependency.",
"a11yGuidance": "No accessibility guidance.",
"variations": [
{
Expand Down Expand Up @@ -1238,7 +1235,6 @@
}
]
},
"dependencies": "No dependency.",
"a11yGuidance": "No accessibility guidance.",
"variations": [
{
Expand Down Expand Up @@ -1436,7 +1432,6 @@
}
]
},
"dependencies": "No dependency.",
"a11yGuidance": "No accessibility guidance.",
"variations": [
{
Expand Down
12 changes: 8 additions & 4 deletions _data/design-patterns.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
}
]
},
"dependencies": "No dependency.",
"a11yGuidance": "No accessibility guidance.",
"variations": [
{
Expand Down Expand Up @@ -167,9 +166,14 @@
}
]
},
"dependencies": [
"bgimg"
],
"dependencies": {
"en": [
{ "title": "Background image", "url": "https://wet-boew.github.io/wet-boew/docs/ref/bgimg/bgimg-en.html", "component": "bgimg" }
],
"fr": [
{ "title": "Image d'arrière plan", "url": "https://wet-boew.github.io/wet-boew/docs/ref/bgimg/bgimg-fr.html", "component": "bgimg" }
]
},
"a11yGuidance": "No accessibility guidance.",
"variations": [
{
Expand Down
41 changes: 28 additions & 13 deletions _data/sites.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
}
]
},
"dependencies": "no dependency",
"a11yGuidance": "no accessibility guidance",
"variations": [
{
Expand Down Expand Up @@ -498,9 +497,14 @@
}
]
},
"dependencies": [
"Page details"
],
"dependencies": {
"en": [
{ "title": "Page details", "url": "https://wet-boew.github.io/GCWeb/sites/page-details/page-details-docs-en.html", "component": "page-details" }
],
"fr": [
{ "title": "Détails de la page", "url": "https://wet-boew.github.io/GCWeb/sites/page-details/page-details-docs-fr.html", "component": "page-details" }
]
},
"a11yGuidance": "no accessibility guidance",
"variations": [
{
Expand Down Expand Up @@ -713,9 +717,14 @@
}
]
},
"dependencies": [
"Page details"
],
"dependencies": {
"en": [
{ "title": "Page details", "url": "https://wet-boew.github.io/GCWeb/sites/page-details/page-details-docs-en.html", "component": "page-details" }
],
"fr": [
{ "title": "Détails de la page", "url": "https://wet-boew.github.io/GCWeb/sites/page-details/page-details-docs-fr.html", "component": "page-details" }
]
},
"a11yGuidance": "no accessibility guidance",
"variations": [
{
Expand Down Expand Up @@ -2188,7 +2197,6 @@
}
]
},
"dependencies": "No dependency.",
"a11yGuidance": "This component respects all WCAG 2.1 guidelines.",
"variations": [
{
Expand Down Expand Up @@ -2423,11 +2431,18 @@
}
]
},
"dependencies": [
"Page feedback area",
"Share this page",
"Date modified"
],
"dependencies": {
"en": [
{ "title": "Feedback area", "url": "https://wet-boew.github.io/GCWeb/sites/feedback/feedback-docs-en.html", "component": "feedback" },
{ "title": "Share widget", "url": "https://wet-boew.github.io/wet-boew/docs/ref/share/share-en.html", "component": "share" },
{ "title": "Date modified", "url": "https://wet-boew.github.io/GCWeb/sites/date-modified/date-modified-en.html", "component": "date-modified" }
],
"fr": [
{ "title": "Zone de rétroaction", "url": "https://wet-boew.github.io/GCWeb/sites/feedback/feedback-docs-fr.html", "component": "feedback" },
{ "title": "Gadget de partage", "url": "https://wet-boew.github.io/wet-boew/docs/ref/share/share-fr.html", "component": "share" },
{ "title": "Date de modification", "url": "https://wet-boew.github.io/GCWeb/sites/date-modified/date-modified-fr.html", "component": "date-modified" }
]
},
"a11yGuidance": "no accessibility guidance",
"variations": [
{
Expand Down
26 changes: 18 additions & 8 deletions _data/templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,24 @@
}
]
},
"dependencies": [
"Intro block",
"Featured link",
"Most requested",
"Services and information",
"Social media channels",
"Minister or institutional head"
],
"dependencies": {
"en": [
{ "title": "Intro block", "url": "https://wet-boew.github.io/GCWeb/design-patterns/gc-intro/gc-intro-doc-en.html", "component": "gc-intro" },
{ "title": "Featured link", "url": "https://wet-boew.github.io/GCWeb/components/gc-featured-link/gc-featured-link-doc-en.html", "component": "gc-featured-link" },
{ "title": "Most requested", "url": "https://wet-boew.github.io/GCWeb/components/gc-most-requested/gc-most-requested-doc-en.html", "component": "gc-most-requested" },
{ "title": "Services and information", "url": "https://wet-boew.github.io/GCWeb/components/gc-srvinfo/gc-srvinfo-doc-en.html", "component": "gc-srvinfo" },
{ "title": "Social media channels", "url": "https://wet-boew.github.io/GCWeb/components/gc-follow-us/gc-follow-us-doc-en.html", "component": "gc-follow-us" },
{ "title": "Minister or institutional head", "url": "https://wet-boew.github.io/GCWeb/components/gc-minister/gc-minister-doc-en.html", "component": "gc-minister" }
],
"fr": [
{ "title": "Bloc d'introduction", "url": "https://wet-boew.github.io/GCWeb/design-patterns/gc-intro/gc-intro-doc-fr.html", "component": "gc-intro" },
{ "title": "Lien en vedette", "url": "https://wet-boew.github.io/GCWeb/components/gc-featured-link/gc-featured-link-doc-fr.html", "component": "gc-featured-link" },
{ "title": "En demande", "url": "https://wet-boew.github.io/GCWeb/components/gc-most-requested/gc-most-requested-doc-fr.html", "component": "gc-most-requested" },
{ "title": "Services et renseignements", "url": "https://wet-boew.github.io/GCWeb/components/gc-srvinfo/gc-srvinfo-doc-fr.html", "component": "gc-srvinfo" },
{ "title": "Bloc des réseaux de médias sociaux", "url": "https://wet-boew.github.io/GCWeb/components/gc-follow-us/gc-follow-us-doc-fr.html", "component": "gc-follow-us" },
{ "title": "Ministre ou chef d’institution", "url": "https://wet-boew.github.io/GCWeb/components/gc-minister/gc-minister-doc-fr.html", "component": "gc-minister" }
]
},
"a11yGuidance": "No accessibility guidance.",
"variations": [
{
Expand Down
1 change: 0 additions & 1 deletion components/gc-featured-link/index.json-ld
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
}
]
},
"dependencies": "No dependency.",
"a11yGuidance": "No accessibility guidance.",
"variations": [
{
Expand Down
1 change: 0 additions & 1 deletion components/gc-follow-us/index.json-ld
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
]
},
"a11yGuidance": "no accessibility guidance",
"dependencies": "no dependency",
"variations": [
{
"name": {
Expand Down
1 change: 0 additions & 1 deletion components/gc-minister/index.json-ld
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
}
]
},
"dependencies": "No dependency.",
"a11yGuidance": "No accessibility guidance.",
"variations": [
{
Expand Down
1 change: 0 additions & 1 deletion components/gc-most-requested/index.json-ld
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
}
]
},
"dependencies": "No dependency.",
"a11yGuidance": "No accessibility guidance.",
"variations": [
{
Expand Down
1 change: 0 additions & 1 deletion components/gc-srvinfo/index.json-ld
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
}
]
},
"dependencies": "No dependency.",
"a11yGuidance": "No accessibility guidance.",
"variations": [
{
Expand Down
1 change: 0 additions & 1 deletion design-patterns/gc-institution/index.json-ld
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
}
]
},
"dependencies": "No dependency.",
"a11yGuidance": "No accessibility guidance.",
"variations": [
{
Expand Down
11 changes: 8 additions & 3 deletions design-patterns/gc-intro/index.json-ld
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,14 @@
}
]
},
"dependencies": [
"bgimg"
],
"dependencies": {
"en": [
{ "title": "Background image", "url": "https://wet-boew.github.io/wet-boew/docs/ref/bgimg/bgimg-en.html", "component": "bgimg" }
],
"fr": [
{ "title": "Image d'arrière plan", "url": "https://wet-boew.github.io/wet-boew/docs/ref/bgimg/bgimg-fr.html", "component": "bgimg" }
]
},
"a11yGuidance": "No accessibility guidance.",
"variations": [
{
Expand Down
1 change: 0 additions & 1 deletion sites/archived/index.json-ld
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
}
]
},
"dependencies": "no dependency",
"a11yGuidance": "no accessibility guidance",
"variations": [
{
Expand Down
11 changes: 8 additions & 3 deletions sites/date-modified/index.json-ld
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@
}
]
},
"dependencies": [
"Page details"
],
"dependencies": {
"en": [
{ "title": "Page details", "url": "https://wet-boew.github.io/GCWeb/sites/page-details/page-details-docs-en.html", "component": "page-details" }
],
"fr": [
{ "title": "Détails de la page", "url": "https://wet-boew.github.io/GCWeb/sites/page-details/page-details-docs-fr.html", "component": "page-details" }
]
},
"a11yGuidance": "no accessibility guidance",
"variations": [
{
Expand Down
11 changes: 8 additions & 3 deletions sites/feedback/index.json-ld
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,14 @@
}
]
},
"dependencies": [
"Page details"
],
"dependencies": {
"en": [
{ "title": "Page details", "url": "https://wet-boew.github.io/GCWeb/sites/page-details/page-details-docs-en.html", "component": "page-details" }
],
"fr": [
{ "title": "Détails de la page", "url": "https://wet-boew.github.io/GCWeb/sites/page-details/page-details-docs-fr.html", "component": "page-details" }
]
},
"a11yGuidance": "no accessibility guidance",
"variations": [
{
Expand Down
18 changes: 13 additions & 5 deletions sites/layouts/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,14 @@ <h2 id="inc-components">{% if lng == "fr" %}Composants inclus{% else %}Included
{
"template": "[data-yes]",
"test": "fn:isArray",
"value": "/dependencies",
"value": "/dependencies/{{lng}}",
"mapping": [
{
"template": "template",
"value": "/",
"assess": "/dependencies/{{lng}}",
"mapping": [
{ "selector": "li", "value": "/@value" }
{ "selector": "a", "value": "/title" },
{ "selector": "a", "value": "/url", "attr": "href" }
]
}
]
Expand All @@ -112,19 +113,26 @@ <h2 id="inc-components">{% if lng == "fr" %}Composants inclus{% else %}Included
"test": "fn:isLiteral",
"value": "/dependencies",
"mapping": null
},
{
"template": "[data-no]",
"test": "fn:guessType",
"expect": "undefined",
"value": "/dependencies",
"mapping": null
}
]
}
]
}'>
<template data-no>
<p>{% if lng == "fr" %}Ce composant n'a pas de dépendances{% else %}This component has no dependency{% endif %}</p>
<p>{% if lng == "fr" %}Ce composant n'a pas de dépendances{% else %}This component has no dependency{% endif %}.</p>
</template>

<template data-yes>
<ul>
<template>
<li></li>
<li><a href="#">Component</a></li>
</template>
</ul>
</template>
Expand Down
18 changes: 13 additions & 5 deletions sites/layouts/documentation_pattern.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,14 @@ <h2 id="inc-components">{% if lng == "fr" %}Composants inclus{% else %}Included
{
"template": "[data-yes]",
"test": "fn:isArray",
"value": "/dependencies",
"value": "/dependencies/{{lng}}",
"mapping": [
{
"template": "template",
"value": "/",
"assess": "/dependencies/{{lng}}",
"mapping": [
{ "selector": "li", "value": "/@value" }
{ "selector": "a", "value": "/title" },
{ "selector": "a", "value": "/url", "attr": "href" }
]
}
]
Expand All @@ -99,19 +100,26 @@ <h2 id="inc-components">{% if lng == "fr" %}Composants inclus{% else %}Included
"test": "fn:isLiteral",
"value": "/dependencies",
"mapping": null
},
{
"template": "[data-no]",
"test": "fn:guessType",
"expect": "undefined",
"value": "/dependencies",
"mapping": null
}
]
}
]
}'>
<template data-no>
<p>{% if lng == "fr" %}Ce composant n'a pas de dépendances{% else %}This component has no dependency{% endif %}</p>
<p>{% if lng == "fr" %}Ce composant n'a pas de dépendances{% else %}This component has no dependency{% endif %}.</p>
</template>

<template data-yes>
<ul>
<template>
<li></li>
<li><a href="#">Component</a></li>
</template>
</ul>
</template>
Expand Down
1 change: 0 additions & 1 deletion sites/main-page-title/index.json-ld
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
}
]
},
"dependencies": "No dependency.",
"a11yGuidance": "This component respects all WCAG 2.1 guidelines.",
"variations": [
{
Expand Down
Loading

0 comments on commit 7297a55

Please sign in to comment.