Skip to content

Commit ab3b3f8

Browse files
Update JSON files
1 parent 61aad38 commit ab3b3f8

9 files changed

Lines changed: 400 additions & 237 deletions

File tree

app.js

Lines changed: 20 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -64,78 +64,24 @@
6464
}
6565

6666
const translatableElements = {
67-
"brand-eyebrow": {
68-
fr: "Multilingual x Wikidata GraphQL",
69-
en: "Multilingual x Wikidata GraphQL"
70-
},
71-
"brand-title": {
72-
fr: "MotusArtium",
73-
en: "MotusArtium"
74-
},
75-
"brand-subtitle": {
76-
fr: "Observatoire polyglotte de requetes pour suivre mouvements, artistes, oeuvres, lieux et influences dans l'histoire de l'art.",
77-
en: "Polyglot query observatory for tracing movements, artists, works, places, and influence across art history."
78-
},
79-
"hero-eyebrow": {
80-
fr: "Manifeste",
81-
en: "Manifest"
82-
},
83-
"hero-title": {
84-
fr: "Parcourez l'histoire de l'art a travers des surfaces de requete en direct et des semantiques multilingues.",
85-
en: "Navigate art history through live query surfaces and multilingual semantics."
86-
},
87-
"hero-description": {
88-
fr: "MotusArtium se conçoit comme un instrument culturel plutot qu'un tableau de bord : un espace ou les documents GraphQL, les relations semantiques et l'exploration linguistique restent visibles ensemble.",
89-
en: "MotusArtium is designed as a cultural instrument rather than a dashboard: a place where GraphQL documents, semantic relationships, and language-aware exploration are visible at the same time."
90-
},
91-
"entry-movements-title": {
92-
fr: "Commencer par les mouvements",
93-
en: "Start with Movements"
94-
},
95-
"entry-movements-copy": {
96-
fr: "Entrez par les ecoles, ruptures et successions pour voir l'histoire de l'art se reorganiser comme une constellation vivante.",
97-
en: "Enter through schools, ruptures, and successions to watch art history reorganize itself as a living constellation."
98-
},
99-
"entry-artists-title": {
100-
fr: "Commencer par les artistes",
101-
en: "Start with Artists"
102-
},
103-
"entry-artists-copy": {
104-
fr: "Suivez la creation par les personnes, l'influence, le lieu de naissance et l'oeuvre tout en gardant la trajectoire GraphQL visible.",
105-
en: "Trace creation through people, influence, birthplace, and oeuvre while the active GraphQL path remains visible."
106-
},
107-
"entry-themes-title": {
108-
fr: "Commencer par les themes",
109-
en: "Start with Themes"
110-
},
111-
"entry-themes-copy": {
112-
fr: "Abordez l'atlas par materiau, sujet, musee ou lieu et laissez l'interface reformuler la lentille narrative.",
113-
en: "Approach the atlas by material, subject, museum, or place and let the interface reshape the narrative lens."
114-
},
115-
"app-root-hint": {
116-
fr: "<strong>Montage Multilingual :</strong> ce panneau accueille les fragments d'interface Multilingual integres progressivement dans l'Observatory.",
117-
en: "<strong>Multilingual mount:</strong> this panel is reserved for embedded Multilingual UI fragments and diagnostics as we progressively connect more of the original runtime into the Observatory shell."
118-
},
119-
"polyglot-card-1-title": {
120-
fr: "Surface d'interface",
121-
en: "Interface Surface"
122-
},
123-
"polyglot-card-1-copy": {
124-
fr: "La coque change invites, libelles et interpretation avec la langue active.",
125-
en: "The shell changes prompts, labels, and interpretation text with the active language."
126-
},
127-
"polyglot-card-2-title": {
128-
fr: "Surface d'entite",
129-
en: "Entity Surface"
130-
},
131-
"polyglot-card-2-copy": {
132-
fr: "Les entites selectionnees peuvent etre lues selon plusieurs surfaces linguistiques tout en gardant la meme identite Wikidata.",
133-
en: "Selected entities can be read through different language surfaces while keeping the same Wikidata identity."
134-
},
135-
"polyglot-card-3-title": {
136-
fr: "Lentille source",
137-
en: "Source Lens"
138-
}
67+
"brand-eyebrow": "shell.brand.eyebrow",
68+
"brand-title": "shell.brand.title",
69+
"brand-subtitle": "shell.brand.subtitle",
70+
"hero-eyebrow": "shell.hero.eyebrow",
71+
"hero-title": "shell.hero.title",
72+
"hero-description": "shell.hero.description",
73+
"entry-movements-title": "shell.entry.movements.title",
74+
"entry-movements-copy": "shell.entry.movements.copy",
75+
"entry-artists-title": "shell.entry.artists.title",
76+
"entry-artists-copy": "shell.entry.artists.copy",
77+
"entry-themes-title": "shell.entry.themes.title",
78+
"entry-themes-copy": "shell.entry.themes.copy",
79+
"app-root-hint": "shell.appRoot.hint",
80+
"polyglot-card-1-title": "shell.polyglot.card1.title",
81+
"polyglot-card-1-copy": "shell.polyglot.card1.copy",
82+
"polyglot-card-2-title": "shell.polyglot.card2.title",
83+
"polyglot-card-2-copy": "shell.polyglot.card2.copy",
84+
"polyglot-card-3-title": "shell.polyglot.card3.title"
13985
};
14086

14187
const runtimeState = {
@@ -693,12 +639,12 @@
693639
}
694640

695641
function applyInterfaceLanguage(languageCode) {
696-
Object.entries(translatableElements).forEach(([id, values]) => {
642+
Object.entries(translatableElements).forEach(([id, key]) => {
697643
const element = document.getElementById(id);
698644
if (!element) {
699645
return;
700646
}
701-
const value = values[languageCode] || values.en || values.fr;
647+
const value = traduireInterface(key, {}, languageCode);
702648
if (id === "app-root-hint") {
703649
element.innerHTML = value;
704650
} else {

0 commit comments

Comments
 (0)