Re-enable german translation

zio/stable
Paul Frazee 2024-01-23 20:39:35 -08:00
parent e628556d1f
commit d87c643715
4 changed files with 13 additions and 19 deletions

View File

@ -118,9 +118,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
switch (lang) {
case 'en':
return AppLanguage.en
// DISABLED until this translation is fixed -prf
// case 'de':
// return AppLanguage.de
case 'de':
return AppLanguage.de
case 'es':
return AppLanguage.es
case 'fr':

View File

@ -3,8 +3,7 @@ import {i18n} from '@lingui/core'
import {useLanguagePrefs} from '#/state/preferences'
import {messages as messagesEn} from '#/locale/locales/en/messages'
// DISABLED until this translation is fixed -prf
// import {messages as messagesDe} from '#/locale/locales/de/messages'
import {messages as messagesDe} from '#/locale/locales/de/messages'
import {messages as messagesId} from '#/locale/locales/id/messages'
import {messages as messagesEs} from '#/locale/locales/es/messages'
import {messages as messagesFr} from '#/locale/locales/fr/messages'
@ -23,11 +22,10 @@ import {AppLanguage} from '#/locale/languages'
*/
export async function dynamicActivate(locale: AppLanguage) {
switch (locale) {
// DISABLED until this translation is fixed -prf
// case AppLanguage.de: {
// i18n.loadAndActivate({locale, messages: messagesDe})
// break
// }
case AppLanguage.de: {
i18n.loadAndActivate({locale, messages: messagesDe})
break
}
case AppLanguage.es: {
i18n.loadAndActivate({locale, messages: messagesEs})
break

View File

@ -12,11 +12,10 @@ export async function dynamicActivate(locale: AppLanguage) {
let mod: any
switch (locale) {
// DISABLED until this translation is fixed -prf
// case AppLanguage.de: {
// mod = await import(`./locales/de/messages`)
// break
// }
case AppLanguage.de: {
mod = await import(`./locales/de/messages`)
break
}
case AppLanguage.es: {
mod = await import(`./locales/es/messages`)
break

View File

@ -6,8 +6,7 @@ interface Language {
export enum AppLanguage {
en = 'en',
// DISABLED until this translation is fixed -prf
// de = 'de',
de = 'de',
es = 'es',
fr = 'fr',
hi = 'hi',
@ -26,8 +25,7 @@ interface AppLanguageConfig {
export const APP_LANGUAGES: AppLanguageConfig[] = [
{code2: AppLanguage.en, name: 'English'},
// DISABLED until this translation is fixed -prf
// {code2: AppLanguage.de, name: 'Deutsch'},
{code2: AppLanguage.de, name: 'Deutsch'},
{code2: AppLanguage.es, name: 'Español'},
{code2: AppLanguage.fr, name: 'Français'},
{code2: AppLanguage.hi, name: 'हिंदी'},