Просмотр исходного кода

[web] Enable Russian

The translation percentage of Russian in crowdin is now 100%, it's time to
enable it as an option in the UI.

A big thank you to the translators.
Manav Rathi 1 год назад
Родитель
Сommit
cc90dd7ba5

+ 2 - 0
web/apps/photos/src/components/Sidebar/Preferences/LanguageSelector.tsx

@@ -27,6 +27,8 @@ export const localeName = (locale: SupportedLocale) => {
             return "Español";
         case "pt-BR":
             return "Brazilian Portuguese";
+        case "ru-RU":
+            return "Russian";
     }
 };
 

+ 3 - 0
web/packages/ui/i18n.ts

@@ -31,6 +31,7 @@ export const supportedLocales = [
     "nl-NL" /* Dutch */,
     "es-ES" /* Spanish */,
     "pt-BR" /* Portuguese, Brazilian */,
+    "ru-RU" /* Russian */,
 ] as const;
 
 /** The type of {@link supportedLocales}. */
@@ -212,6 +213,8 @@ const closestSupportedLocale = (
             // We'll never get here (it'd already be an exact match), just kept
             // to keep this list consistent.
             return "pt-BR";
+        } else if (ls.startsWith("ru")) {
+            return "ru-RU";
         }
     }