From 58182fcbdff37231fa82334d0d5211d0828e41b3 Mon Sep 17 00:00:00 2001 From: Alexey Krainev Date: Sat, 8 Nov 2025 15:08:08 +0500 Subject: [PATCH] Add Russian case --- frontend/src/locale/IntlProvider.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/locale/IntlProvider.tsx b/frontend/src/locale/IntlProvider.tsx index c2779908..34f268d8 100644 --- a/frontend/src/locale/IntlProvider.tsx +++ b/frontend/src/locale/IntlProvider.tsx @@ -1,15 +1,18 @@ import { createIntl, createIntlCache } from "react-intl"; import langEn from "./lang/en.json"; +import langRu from "./lang/ru.json"; import langList from "./lang/lang-list.json"; // first item of each array should be the language code, // not the country code // Remember when adding to this list, also update check-locales.js script -const localeOptions = [["en", "en-US"]]; +const localeOptions = [["en", "en-US"], ["ru", "ru-RU"]]; const loadMessages = (locale?: string): typeof langList & typeof langEn => { const thisLocale = locale || "en"; switch (thisLocale.slice(0, 2)) { + case "ru": + return Object.assign({}, langList, langRu); default: return Object.assign({}, langList, langEn); } @@ -17,6 +20,8 @@ const loadMessages = (locale?: string): typeof langList & typeof langEn => { const getFlagCodeForLocale = (locale?: string) => { switch (locale) { + case "ru": + return "RU"; default: return "EN"; }