Japanese localization (#2003)

* add japanese to list of languages

* add japanese translations

* change `jp` to `ja`

* minor changes to Japanese translation

* minor changes to Japanese translation

* update japanese strings with feedback

* Update languages.ts

* Extract translations

* Gitignore new compiled file

* allow switching to japanese

---------

Co-authored-by: Jake Gold <jake@blueskyweb.xyz>
Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
Ansh 2023-12-13 01:12:19 +05:30 committed by GitHub
parent 27561ae79f
commit 90647fe7cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 2430 additions and 15 deletions

View file

@ -4,6 +4,7 @@ import {i18n} from '@lingui/core'
import {useLanguagePrefs} from '#/state/preferences'
import {messages as messagesEn} from '#/locale/locales/en/messages'
import {messages as messagesHi} from '#/locale/locales/hi/messages'
import {messages as messagesJa} from '#/locale/locales/ja/messages'
import {sanitizeAppLanguageSetting} from '#/locale/helpers'
import {AppLanguage} from '#/locale/languages'
@ -16,6 +17,10 @@ export async function dynamicActivate(locale: AppLanguage) {
i18n.loadAndActivate({locale, messages: messagesHi})
break
}
case AppLanguage.ja: {
i18n.loadAndActivate({locale, messages: messagesJa})
break
}
default: {
i18n.loadAndActivate({locale, messages: messagesEn})
break