Skip to content

Commit

Permalink
Add French language
Browse files Browse the repository at this point in the history
  • Loading branch information
cdauth committed Sep 30, 2024
1 parent 7c5a8ec commit d252789
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/src/lib/utils/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { defineComponent, ref, type Directive } from "vue";
import messagesEn from "../../i18n/en.json";
import messagesDe from "../../i18n/de.json";
import messagesEs from "../../i18n/es.json";
import messagesFr from "../../i18n/fr.json";
import messagesNbNo from "../../i18n/nb-NO.json";
import messagesRu from "../../i18n/ru.json";
import messagesZhHant from "../../i18n/zh-Hant.json";
Expand All @@ -17,6 +18,7 @@ onI18nReady((i18n) => {
i18n.addResourceBundle("en", namespace, messagesEn);
i18n.addResourceBundle("de", namespace, messagesDe);
i18n.addResourceBundle("es", namespace, messagesEs);
i18n.addResourceBundle("fr", namespace, messagesFr);
i18n.addResourceBundle("nb-NO", namespace, messagesNbNo);
i18n.addResourceBundle("ru", namespace, messagesRu);
i18n.addResourceBundle("zh-Hant", namespace, messagesZhHant);
Expand All @@ -26,6 +28,7 @@ if (import.meta.hot) {
import.meta.hot!.accept(`../../i18n/en.json`, getAcceptHotI18n("en", namespace));
import.meta.hot!.accept(`../../i18n/de.json`, getAcceptHotI18n("de", namespace));
import.meta.hot!.accept(`../../i18n/es.json`, getAcceptHotI18n("es", namespace));
import.meta.hot!.accept(`../../i18n/fr.json`, getAcceptHotI18n("fr", namespace));
import.meta.hot!.accept(`../../i18n/nb-NO.json`, getAcceptHotI18n("nb-NO", namespace));
import.meta.hot!.accept(`../../i18n/ru.json`, getAcceptHotI18n("ru", namespace));
import.meta.hot!.accept(`../../i18n/zh-Hant.json`, getAcceptHotI18n("zh-Hant", namespace));
Expand Down
1 change: 1 addition & 0 deletions leaflet/src/i18n/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions leaflet/src/utils/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { i18n } from "i18next";
import messagesDe from "../i18n/de.json";
import messagesEn from "../i18n/en.json";
import messagesEs from "../i18n/es.json";
import messagesFr from "../i18n/fr.json";
import messagesNbNo from "../i18n/nb-NO.json";
import messagesRu from "../i18n/ru.json";
import messagesZhHant from "../i18n/zh-Hant.json";
Expand All @@ -14,6 +15,7 @@ onI18nReady((i18n) => {
i18n.addResourceBundle("en", namespace, messagesEn);
i18n.addResourceBundle("de", namespace, messagesDe);
i18n.addResourceBundle("es", namespace, messagesEs);
i18n.addResourceBundle("fr", namespace, messagesFr);
i18n.addResourceBundle("nb-NO", namespace, messagesNbNo);
i18n.addResourceBundle("ru", namespace, messagesRu);
i18n.addResourceBundle("zh-Hant", namespace, messagesZhHant);
Expand All @@ -24,6 +26,7 @@ if (import.meta.hot) {
import.meta.hot!.accept(`../i18n/en.json`, getAcceptHotI18n("en", namespace));
import.meta.hot!.accept(`../i18n/de.json`, getAcceptHotI18n("de", namespace));
import.meta.hot!.accept(`../i18n/es.json`, getAcceptHotI18n("es", namespace));
import.meta.hot!.accept(`../i18n/fr.json`, getAcceptHotI18n("fr", namespace));
import.meta.hot!.accept(`../i18n/nb-NO.json`, getAcceptHotI18n("nb-NO", namespace));
import.meta.hot!.accept(`../i18n/ru.json`, getAcceptHotI18n("ru", namespace));
import.meta.hot!.accept(`../i18n/zh-Hant.json`, getAcceptHotI18n("zh-Hant", namespace));
Expand Down
2 changes: 2 additions & 0 deletions server/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defaultI18nGetter, getRawI18n, onI18nReady, setLanguageDetector, setI18
import messagesEn from "./i18n/en.json";
import messagesDe from "./i18n/de.json";
import messagesEs from "./i18n/es.json";
import messagesFr from "./i18n/fr.json";
import messagesNbNo from "./i18n/nb-NO.json";
import messagesRu from "./i18n/ru.json";
import messagesZhHant from "./i18n/zh-Hant.json";
Expand Down Expand Up @@ -42,6 +43,7 @@ onI18nReady((i18n) => {
i18n.addResourceBundle("en", namespace, messagesEn);
i18n.addResourceBundle("de", namespace, messagesDe);
i18n.addResourceBundle("es", namespace, messagesEs);
i18n.addResourceBundle("fr", namespace, messagesFr);
i18n.addResourceBundle("nb-NO", namespace, messagesNbNo);
i18n.addResourceBundle("ru", namespace, messagesRu);
i18n.addResourceBundle("zh-Hant", namespace, messagesZhHant);
Expand Down
1 change: 1 addition & 0 deletions server/src/i18n/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
4 changes: 4 additions & 0 deletions utils/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getAcceptHotI18n, getRawI18n, onI18nReady } from "./i18n-utils";
import messagesDe from "./i18n/de.json";
import messagesEn from "./i18n/en.json";
import messagesEs from "./i18n/es.json";
import messagesFr from "./i18n/fr.json";
import messagesNbNo from "./i18n/nb-NO.json";
import messagesRu from "./i18n/ru.json";
import messagesZhHant from "./i18n/zh-Hant.json";
Expand All @@ -14,6 +15,7 @@ onI18nReady((i18n) => {
i18n.addResourceBundle("en", namespace, messagesEn);
i18n.addResourceBundle("de", namespace, messagesDe);
i18n.addResourceBundle("es", namespace, messagesEs);
i18n.addResourceBundle("fr", namespace, messagesFr);
i18n.addResourceBundle("nb-NO", namespace, messagesNbNo);
i18n.addResourceBundle("ru", namespace, messagesRu);
i18n.addResourceBundle("zh-Hant", namespace, messagesZhHant);
Expand All @@ -24,6 +26,7 @@ if (import.meta.hot) {
import.meta.hot!.accept(`./i18n/en.json`, getAcceptHotI18n("en", namespace));
import.meta.hot!.accept(`./i18n/de.json`, getAcceptHotI18n("de", namespace));
import.meta.hot!.accept(`./i18n/es.json`, getAcceptHotI18n("es", namespace));
import.meta.hot!.accept(`./i18n/fr.json`, getAcceptHotI18n("fr", namespace));
import.meta.hot!.accept(`./i18n/nb-NO.json`, getAcceptHotI18n("nb-NO", namespace));
import.meta.hot!.accept(`./i18n/ru.json`, getAcceptHotI18n("ru", namespace));
import.meta.hot!.accept(`./i18n/zh-Hant.json`, getAcceptHotI18n("zh-Hant", namespace));
Expand All @@ -44,6 +47,7 @@ export function getLocalizedLanguageList(): Record<string, string> {
"en": getI18n().t("i18n.language-en", { lng: "en" }),
"de": getI18n().t("i18n.language-de", { lng: "de" }),
"es": getI18n().t("i18n.language-es", { lng: "es" }),
"fr": getI18n().t("i18n.language-fr", { lng: "fr" }),
"nb-NO": getI18n().t("i18n.language-nb-no", { lng: "nb-NO" }),
"ru": getI18n().t("i18n.language-ru", { lng: "ru" }),
"zh-Hant": getI18n().t("i18n.language-zh-hant", { lng: "zh-Hant" })
Expand Down
1 change: 1 addition & 0 deletions utils/src/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"language-en": "Englisch",
"language-de": "Deutsch",
"language-es": "Spanisch",
"language-fr": "Französisch",
"language-nb-no": "Norwegisch Bokmål (Norwegen)",
"language-ru": "Russian",
"language-zh-hant": "Chinesisch (traditionell)"
Expand Down
1 change: 1 addition & 0 deletions utils/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"language-en": "English",
"language-de": "German",
"language-es": "Spanish",
"language-fr": "French",
"language-nb-no": "Norwegian Bokmål (Norway)",
"language-ru": "Russian",
"language-zh-hant": "Chinese (Traditional)"
Expand Down

0 comments on commit d252789

Please sign in to comment.