Add Russian translation (#3875)

* Add Russian translation

* Update messages.po

* Update messages.po (draft)

* Добавлены новые строки для перевода

В ручную объеденил исправленный RU с самым новым EN. Могут быть ошибки но быстрый тест проблем не выявил.

* Переведены не переведенные строки, некоторые исправления перевода.

* Еще небольшие правки

* Update messages.po (draft)

* Update messages.po (stage)

* Update messages.po

* Init lingui compiling ru language

* Update messages.po

* Update messages.po (clear)

* Update messages.po

* Update messages.po

* change await import to await Promise.all

* Update messages.po

* Update messages.po (clear)

---------

Co-authored-by: DearFox <59219907+DearFox@users.noreply.github.com>
zio/stable
Kirill 2024-09-07 23:50:18 +03:00 committed by GitHub
parent 9b8d62ca25
commit 63ab16a62d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 7685 additions and 0 deletions

View File

@ -14,6 +14,7 @@ module.exports = {
'ja', 'ja',
'ko', 'ko',
'pt-BR', 'pt-BR',
'ru',
'tr', 'tr',
'uk', 'uk',
'zh-CN', 'zh-CN',

View File

@ -143,6 +143,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
return AppLanguage.ko return AppLanguage.ko
case 'pt-BR': case 'pt-BR':
return AppLanguage.pt_BR return AppLanguage.pt_BR
case 'ru':
return AppLanguage.ru
case 'tr': case 'tr':
return AppLanguage.tr return AppLanguage.tr
case 'uk': case 'uk':

View File

@ -24,6 +24,7 @@ import {messages as messagesIt} from '#/locale/locales/it/messages'
import {messages as messagesJa} from '#/locale/locales/ja/messages' import {messages as messagesJa} from '#/locale/locales/ja/messages'
import {messages as messagesKo} from '#/locale/locales/ko/messages' import {messages as messagesKo} from '#/locale/locales/ko/messages'
import {messages as messagesPt_BR} from '#/locale/locales/pt-BR/messages' import {messages as messagesPt_BR} from '#/locale/locales/pt-BR/messages'
import {messages as messagesRu} from '#/locale/locales/ru/messages'
import {messages as messagesTr} from '#/locale/locales/tr/messages' import {messages as messagesTr} from '#/locale/locales/tr/messages'
import {messages as messagesUk} from '#/locale/locales/uk/messages' import {messages as messagesUk} from '#/locale/locales/uk/messages'
import {messages as messagesZh_CN} from '#/locale/locales/zh-CN/messages' import {messages as messagesZh_CN} from '#/locale/locales/zh-CN/messages'
@ -131,6 +132,14 @@ export async function dynamicActivate(locale: AppLanguage) {
]) ])
break break
} }
case AppLanguage.ru: {
i18n.loadAndActivate({locale, messages: messagesRu})
await Promise.all([
import('@formatjs/intl-pluralrules/locale-data/ru'),
import('@formatjs/intl-numberformat/locale-data/ru'),
])
break
}
case AppLanguage.tr: { case AppLanguage.tr: {
i18n.loadAndActivate({locale, messages: messagesTr}) i18n.loadAndActivate({locale, messages: messagesTr})
await Promise.all([ await Promise.all([

View File

@ -60,6 +60,10 @@ export async function dynamicActivate(locale: AppLanguage) {
mod = await import(`./locales/pt-BR/messages`) mod = await import(`./locales/pt-BR/messages`)
break break
} }
case AppLanguage.ru: {
mod = await import(`./locales/ru/messages`)
break
}
case AppLanguage.tr: { case AppLanguage.tr: {
mod = await import(`./locales/tr/messages`) mod = await import(`./locales/tr/messages`)
break break

View File

@ -18,6 +18,7 @@ export enum AppLanguage {
ja = 'ja', ja = 'ja',
ko = 'ko', ko = 'ko',
pt_BR = 'pt-BR', pt_BR = 'pt-BR',
ru = 'ru',
tr = 'tr', tr = 'tr',
uk = 'uk', uk = 'uk',
zh_CN = 'zh-CN', zh_CN = 'zh-CN',
@ -43,6 +44,7 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [
{code2: AppLanguage.ja, name: '日本語 Japanese'}, {code2: AppLanguage.ja, name: '日本語 Japanese'},
{code2: AppLanguage.ko, name: '한국어 Korean'}, {code2: AppLanguage.ko, name: '한국어 Korean'},
{code2: AppLanguage.pt_BR, name: 'Português (BR) Portuguese (BR)'}, {code2: AppLanguage.pt_BR, name: 'Português (BR) Portuguese (BR)'},
{code2: AppLanguage.ru, name: 'Русский Russian'},
{code2: AppLanguage.tr, name: 'Türkçe Turkish'}, {code2: AppLanguage.tr, name: 'Türkçe Turkish'},
{code2: AppLanguage.uk, name: 'Українська Ukrainian'}, {code2: AppLanguage.uk, name: 'Українська Ukrainian'},
{code2: AppLanguage.zh_CN, name: '简体中文(中国)– Chinese (Simplified)'}, {code2: AppLanguage.zh_CN, name: '简体中文(中国)– Chinese (Simplified)'},

File diff suppressed because it is too large Load Diff