add ru lang

This commit is contained in:
Kieran 2023-04-09 11:24:49 +01:00
parent b73f38c76e
commit 42eacc7864
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
3 changed files with 5 additions and 2 deletions

View File

@ -12,6 +12,7 @@ import idMessages from "translations/id.json";
import arMessages from "translations/ar.json"; import arMessages from "translations/ar.json";
import itMessages from "translations/it.json"; import itMessages from "translations/it.json";
import deMessages from "translations/de.json"; import deMessages from "translations/de.json";
import ruMessages from "translations/ru.json";
const DEFAULT_LOCALE = "en-US"; const DEFAULT_LOCALE = "en-US";
@ -37,6 +38,8 @@ const getMessages = (locale: string) => {
return itMessages; return itMessages;
case "de": case "de":
return deMessages; return deMessages;
case "ru":
return ruMessages;
default: default:
return enMessages; return enMessages;
} }

View File

@ -40,7 +40,7 @@ const PreferencesPage = () => {
) )
} }
style={{ textTransform: "capitalize" }}> style={{ textTransform: "capitalize" }}>
{["en", "ja", "es", "hu", "zh", "fr", "ar", "it", "id", "de"].sort().map(a => ( {["en", "ja", "es", "hu", "zh", "fr", "ar", "it", "id", "de", "ru"].sort().map(a => (
<option value={a}> <option value={a}>
{new Intl.DisplayNames([a], { {new Intl.DisplayNames([a], {
type: "language", type: "language",

View File

@ -27,7 +27,7 @@ export interface UserPreferences {
/** /**
* User selected language * User selected language
*/ */
language?: "en" | "ja" | "es" | "hu" | "zh" | "fr" | "ar" | "it" | "id" | "de"; language?: "en" | "ja" | "es" | "hu" | "zh" | "fr" | "ar" | "it" | "id" | "de" | "ru";
/** /**
* Enable reactions / reposts / zaps * Enable reactions / reposts / zaps