From d25278915a84d508d21f0589b717f5bef90f1dc7 Mon Sep 17 00:00:00 2001 From: Candid Dauth Date: Mon, 30 Sep 2024 15:58:36 +0200 Subject: [PATCH] Add French language --- frontend/src/lib/utils/i18n.ts | 3 +++ leaflet/src/i18n/fr.json | 1 + leaflet/src/utils/i18n.ts | 3 +++ server/src/i18n.ts | 2 ++ server/src/i18n/fr.json | 1 + utils/src/i18n.ts | 4 ++++ utils/src/i18n/de.json | 1 + utils/src/i18n/en.json | 1 + 8 files changed, 16 insertions(+) create mode 100644 leaflet/src/i18n/fr.json create mode 100644 server/src/i18n/fr.json diff --git a/frontend/src/lib/utils/i18n.ts b/frontend/src/lib/utils/i18n.ts index b2f38344..e3cebe22 100644 --- a/frontend/src/lib/utils/i18n.ts +++ b/frontend/src/lib/utils/i18n.ts @@ -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"; @@ -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); @@ -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)); diff --git a/leaflet/src/i18n/fr.json b/leaflet/src/i18n/fr.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/leaflet/src/i18n/fr.json @@ -0,0 +1 @@ +{} diff --git a/leaflet/src/utils/i18n.ts b/leaflet/src/utils/i18n.ts index 9f8b9485..d1518102 100644 --- a/leaflet/src/utils/i18n.ts +++ b/leaflet/src/utils/i18n.ts @@ -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"; @@ -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); @@ -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)); diff --git a/server/src/i18n.ts b/server/src/i18n.ts index 657bec46..a9fb3255 100644 --- a/server/src/i18n.ts +++ b/server/src/i18n.ts @@ -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"; @@ -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); diff --git a/server/src/i18n/fr.json b/server/src/i18n/fr.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/server/src/i18n/fr.json @@ -0,0 +1 @@ +{} diff --git a/utils/src/i18n.ts b/utils/src/i18n.ts index 4426771a..5fe4d2ad 100644 --- a/utils/src/i18n.ts +++ b/utils/src/i18n.ts @@ -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"; @@ -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); @@ -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)); @@ -44,6 +47,7 @@ export function getLocalizedLanguageList(): Record { "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" }) diff --git a/utils/src/i18n/de.json b/utils/src/i18n/de.json index 10ec1e8b..6c19164d 100644 --- a/utils/src/i18n/de.json +++ b/utils/src/i18n/de.json @@ -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)" diff --git a/utils/src/i18n/en.json b/utils/src/i18n/en.json index c4b54614..2a7afe5f 100644 --- a/utils/src/i18n/en.json +++ b/utils/src/i18n/en.json @@ -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)"