[#282] adding missing translations (#322)

* [#282] added russian translations
* [#282] added vietnamese

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
Camille Moussu
2025-11-18 10:41:41 +01:00
committed by GitHub
parent ffe204d60b
commit 1b3faff0b5
4 changed files with 511 additions and 4 deletions
+13 -2
View File
@@ -13,10 +13,21 @@ import { useAppDispatch, useAppSelector } from "./app/hooks";
import { push } from "redux-first-history";
import { ErrorSnackbar } from "./components/Error/ErrorSnackbar";
import I18n from "cozy-ui/transpiled/react/providers/I18n";
import {
enGB,
fr as frLocale,
ru as ruLocale,
vi as viLocale,
} from "date-fns/locale";
import en from "./locales/en.json";
import fr from "./locales/fr.json";
import ru from "./locales/ru.json";
import vi from "./locales/vi.json";
const locale = { en, fr };
const locale = { en, fr, ru, vi };
const dateLocales = { en: enGB, fr: frLocale, ru: ruLocale, vi: viLocale };
function App() {
const error = useAppSelector((state) => state.user.error);
@@ -34,6 +45,7 @@ function App() {
<I18n
dictRequire={(lang: keyof typeof locale) => locale[lang]}
lang={lang}
locales={dateLocales}
>
<Suspense fallback={<Loading />}>
<Router history={history}>
@@ -45,7 +57,6 @@ function App() {
</Routes>
</Router>
<ErrorSnackbar error={error} type="user" />
<ErrorSnackbar error={error} type="user" />
</Suspense>
</I18n>
</CustomThemeProvider>