浏览代码

[web] Enable Russian (#1288)

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 年之前
父节点
当前提交
a7625cd83d
共有 2 个文件被更改,包括 5 次插入0 次删除
  1. 2 0
      web/apps/photos/src/components/Sidebar/Preferences/LanguageSelector.tsx
  2. 3 0
      web/packages/ui/i18n.ts

+ 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";
         }
     }