add chinese as an option in selection menu, translate command ui

This commit is contained in:
umbresp 2024-05-08 05:05:34 -05:00
parent 17aca32145
commit e1117ddbfb
3 changed files with 11 additions and 7 deletions

View File

@ -1,9 +1,9 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const commandUiHandler: SimpleTranslationEntries = {
"fight": "Fight",
"ball": "Ball",
"pokemon": "Pokémon",
"run": "Run",
"actionMessage": "What will\n{{pokemonName}} do?",
"fight": "战斗",
"ball": "精靈球",
"pokemon": "宝可梦",
"run": "逃走",
"actionMessage": "{{pokemonName}}要怎么做?",
} as const;

View File

@ -59,7 +59,7 @@ export function initI18n(): void {
i18next.use(LanguageDetector).init({
lng: lang,
fallbackLng: 'en',
supportedLngs: ['en', 'es', 'fr', 'it', 'de', 'zh-hans'],
supportedLngs: ['en', 'es', 'fr', 'it', 'de', 'zh_hans'],
debug: true,
interpolation: {
escapeValue: false,
@ -80,7 +80,7 @@ export function initI18n(): void {
de: {
...deConfig
},
zh-hans: {
zh_hans: {
...zhHansConfig
}
},

View File

@ -198,6 +198,10 @@ export function setSetting(scene: BattleScene, setting: Setting, value: integer)
label: 'German',
handler: () => changeLocaleHandler('de')
},
{
label: 'Chinese (Simplified)',
handler: () => changeLocaleHandler('zh_hans')
},
{
label: 'Cancel',
handler: () => cancelHandler()