[Enhancement] Translate Settings Menu (#2187)

* Add en settings translations

* Add fr settings translations

* Translate settings menu

* Add de settings translations keys

* Add es settings translations keys

* Add it settings translations keys

* Add ko settings translations keys

* Add pt br settings translations keys

* Add zh cn settings translations keys

* Add zh tw settings translations keys

* Add ko settings translations keys

* Add de settings translations keys

* Fix a forgotten test
This commit is contained in:
Alexis Faizeau 2024-06-17 15:47:22 +02:00 committed by GitHub
parent ebaecbe5a8
commit f3e3b58a43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 1311 additions and 111 deletions

View File

@ -54,5 +54,109 @@ export const menu: SimpleTranslationEntries = {
"yes":"Ja", "yes":"Ja",
"no":"Nein", "no":"Nein",
"disclaimer": "DISCLAIMER", "disclaimer": "DISCLAIMER",
"disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed." "disclaimerDescription": "Dieses Spiel ist ein unfertiges Produkt. Es kann spielbeinträchtigende Fehler (bis hin zum Verlust des Speicherstandes) aufweisen, sich ohne Vorankündigung ändern und es gibt keine Garantie dass es weiterentwickelt oder fertiggestellt wird.",
"general": "Allgemein",
"display": "Anzeige",
"audio": "Audio",
"gamepad": "Controller",
"keyboard": "Tastatur",
"gameSpeed": "Spielgeschwindigkeit",
"hpBarSpeed": "KP-Balken Geschwindigkeit",
"expGainsSpeed": "EXP-Balken Geschwindigkeit",
"expPartyDisplay": "Team-EXP anzeigen",
"skipSeenDialogues": "Gesehenen Dialog überspringen",
"battleStyle": "Kampfstil",
"enableRetries": "Erneut versuchen aktivieren",
"tutorials": "Tutorials",
"touchControls": "Touch Steuerung",
"vibrations": "Vibration",
"normal": "Normal",
"fast": "Schnell",
"faster": "Schneller",
"skip": "Überspringen",
"levelUpNotifications": "Auflevelbenachrichtigung",
"on": "An",
"off": "Aus",
"switch": "Wechsel",
"set": "Folge",
"auto": "Auto",
"disabled": "Deaktiviert",
"language": "Sprache",
"change": "Ändern",
"uiTheme": "UI Thema",
"default": "Standard",
"legacy": "Legacy",
"windowType": "Fenster Typ",
"moneyFormat": "Währungsformat",
"damageNumbers": "Schadensnummern",
"simple": "Simpel",
"fancy": "Schön",
"abbreviated": "Abgekürzt",
"moveAnimations": "Attacken Animationen",
"showStatsOnLevelUp": "Werte beim Aufleveln anzeigen",
"candyUpgradeNotification": "Bonbon Upgrade Benachrichtigung",
"passivesOnly": "Nur Passive",
"candyUpgradeDisplay": "Bonbon Upgrade Anzeige",
"icon": "Icon",
"animation": "Animation",
"moveInfo": "Attacken-Info",
"showMovesetFlyout": "Zeige Attacken Flyout",
"showArenaFlyout": "Zeige Arena Flyout",
"showTimeOfDayWidget": "Zeige Tageszeit Widget",
"timeOfDayAnimation": "Tageszeit Animation",
"bounce": "Springen",
"back": "Zurück",
"spriteSet": "Sprite Satz",
"consistent": "Konistent",
"mixedAnimated": "Gemischt animiert",
"fusionPaletteSwaps": "Fusion-Farbpalettenwechsel",
"playerGender": "Spieler Geschlecht",
"typeHints": "Typhinweise",
"masterVolume": "Gesamtlautstärke",
"bgmVolume": "Hintergrundmusik",
"seVolume": "Spezialeffekte",
"musicPreference": "Musik Präferenz",
"mixed": "Gemisch",
"gamepadPleasePlug": "Bitte einen Controller anschließen oder eine Taste drücken",
"delete": "Löschen",
"keyboardPleasePress": "Bitte eine Taste auf der Tastatur drücken",
"reset": "Zurücksetzen",
"requireReload": "Neuladen benötigt",
"action": "Aktion",
"pressToBind": "Zum Zuweisen drücken",
"pressButton": "Eine Taste drücken...",
"buttonUp": "Hoch",
"buttonDown": "Runter",
"altButtonUp": "Hoch (Alt)",
"buttonLeft": "Links",
"buttonRight": "Rechts",
"buttonAction": "Aktion",
"buttonMenu": "Menü",
"buttonSubmit": "Bestätigen",
"altButtonDown": "Runter (Alt)",
"altButtonLeft": "Links (Alt)",
"altButtonRight": "Rechts (Alt)",
"altButtonAction": "Aktion (Alt)",
"buttonCancel": "Abbrechen",
"altButtonCancel": "Abbrechen (Alt)",
"altButtonMenu": "Menü (Alt)",
"buttonStats": "Statistiken",
"altButtonStats": "Statistiken (Alt)",
"buttonCycleForm": "Form wechseln",
"altButtonCycleForm": "Form wechseln (Alt)",
"buttonCycleShiny": "Schillernd wechseln",
"altButtonCycleShiny": "Schillernd wechseln (Alt)",
"buttonCycleGender": "Geschlecht wechseln",
"altButtonCycleGender": "Geschlecht wechseln (Alt)",
"buttonCycleAbility": "Fähigkeit wechseln",
"altButtonCycleAbility": "Fähigkeit wechseln (Alt)",
"buttonCycleNature": "Wesen wechseln",
"altButtonCycleNature": "Wesen wechslen (Alt)",
"buttonCycleVariant": "Variante wechseln",
"altButtonCycleVariant": "Variante wechseln (Alt)",
"buttonSpeedUp": "Beschleunigen",
"altButtonSpeedUp": "Beschleunigen (Alt)",
"buttonSlowDown": "Verlangsamen",
"altButtonSlowDown": "Verlangsamen (Alt)",
"altButtonSubmit": "Bestätigen (Alt)",
} as const; } as const;

View File

@ -54,5 +54,109 @@ export const menu: SimpleTranslationEntries = {
"yes":"Yes", "yes":"Yes",
"no":"No", "no":"No",
"disclaimer": "DISCLAIMER", "disclaimer": "DISCLAIMER",
"disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed." "disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed.",
"general": "General",
"display": "Display",
"audio": "Audio",
"gamepad": "Gamepad",
"keyboard": "Keyboard",
"gameSpeed": "Game Speed",
"hpBarSpeed": "HP Bar Speed",
"expGainsSpeed": "EXP Gains Speed",
"expPartyDisplay": "Show EXP Party",
"skipSeenDialogues": "Skip Seen Dialogues",
"battleStyle": "Battle Style",
"enableRetries": "Enable Retries",
"tutorials": "Tutorials",
"touchControls": "Touch Controls",
"vibrations": "Vibrations",
"normal": "Normal",
"fast": "Fast",
"faster": "Faster",
"skip": "Skip",
"levelUpNotifications": "Level Up Notifications",
"on": "On",
"off": "Off",
"switch": "Switch",
"set": "Set",
"auto": "Auto",
"disabled": "Disabled",
"language": "Language",
"change": "Change",
"uiTheme": "UI Theme",
"default": "Default",
"legacy": "Legacy",
"windowType": "Window Type",
"moneyFormat": "Money Format",
"damageNumbers": "Damage Numbers",
"simple": "Simple",
"fancy": "Fancy",
"abbreviated": "Abbreviated",
"moveAnimations": "Move Animations",
"showStatsOnLevelUp": "Show Stats on Level Up",
"candyUpgradeNotification": "Candy Upgrade Notification",
"passivesOnly": "Passives Only",
"candyUpgradeDisplay": "Candy Upgrade Display",
"icon": "Icon",
"animation": "Animation",
"moveInfo": "Move Info",
"showMovesetFlyout": "Show Moveset Flyout",
"showArenaFlyout": "Show Arena Flyout",
"showTimeOfDayWidget": "Show Time of Day Widget",
"timeOfDayAnimation": "Time of Day Animation",
"bounce": "Bounce",
"back": "Back",
"spriteSet": "Sprite Set",
"consistent": "Consistent",
"mixedAnimated": "Mixed Animated",
"fusionPaletteSwaps": "Fusion Palette Swaps",
"playerGender": "Player Gender",
"typeHints": "Type Hints",
"masterVolume": "Master Volume",
"bgmVolume": "BGM Volume",
"seVolume": "SE Volume",
"musicPreference": "Music Preference",
"mixed": "Mixed",
"gamepadPleasePlug": "Please Plug in a Gamepad or Press a Button",
"delete": "Delete",
"keyboardPleasePress": "Please Press a Key on Your Keyboard",
"reset": "Reset",
"requireReload": "Reload Required",
"action": "Action",
"pressToBind": "Press to Bind",
"pressButton": "Press a Button...",
"buttonUp": "Up",
"buttonDown": "Down",
"altButtonUp": "Up (Alt)",
"buttonLeft": "Left",
"buttonRight": "Right",
"buttonAction": "Action",
"buttonMenu": "Menu",
"buttonSubmit": "Submit",
"altButtonDown": "Down (Alt)",
"altButtonLeft": "Left (Alt)",
"altButtonRight": "Right (Alt)",
"altButtonAction": "Action (Alt)",
"buttonCancel": "Cancel",
"altButtonCancel": "Cancel (Alt)",
"altButtonMenu": "Menu (Alt)",
"buttonStats": "Stats",
"altButtonStats": "Stats (Alt)",
"buttonCycleForm": "Cycle Form",
"altButtonCycleForm": "Cycle Form (Alt)",
"buttonCycleShiny": "Cycle Shiny",
"altButtonCycleShiny": "Cycle Shiny (Alt)",
"buttonCycleGender": "Cycle Gender",
"altButtonCycleGender": "Cycle Gender (Alt)",
"buttonCycleAbility": "Cycle Ability",
"altButtonCycleAbility": "Cycle Ability (Alt)",
"buttonCycleNature": "Cycle Nature",
"altButtonCycleNature": "Cycle Nature (Alt)",
"buttonCycleVariant": "Cycle Variant",
"altButtonCycleVariant": "Cycle Variant (Alt)",
"buttonSpeedUp": "Speed Up",
"altButtonSpeedUp": "Speed Up (Alt)",
"buttonSlowDown": "Slow Down",
"altButtonSlowDown": "Slow Down (Alt)",
"altButtonSubmit": "Submit (Alt)"
} as const; } as const;

View File

@ -54,5 +54,109 @@ export const menu: SimpleTranslationEntries = {
"yes":"Sí", "yes":"Sí",
"no":"No", "no":"No",
"disclaimer": "AVISO", "disclaimer": "AVISO",
"disclaimerDescription": "Este juego es un producto inacabado; puede tener problemas de jugabilidad (incluyendo la posible pérdida de datos de guardado),\ncambiar sin avisar, y puede o no puede ser actualizado hasta ser completado." "disclaimerDescription": "Este juego es un producto inacabado; puede tener problemas de jugabilidad (incluyendo la posible pérdida de datos de guardado),\ncambiar sin avisar, y puede o no puede ser actualizado hasta ser completado.",
"general": "General",
"display": "Display",
"audio": "Audio",
"gamepad": "Gamepad",
"keyboard": "Keyboard",
"gameSpeed": "Game Speed",
"hpBarSpeed": "HP Bar Speed",
"expGainsSpeed": "EXP Gains Speed",
"expPartyDisplay": "Show EXP Party",
"skipSeenDialogues": "Skip Seen Dialogues",
"battleStyle": "Battle Style",
"enableRetries": "Enable Retries",
"tutorials": "Tutorials",
"touchControls": "Touch Controls",
"vibrations": "Vibrations",
"normal": "Normal",
"fast": "Fast",
"faster": "Faster",
"skip": "Skip",
"levelUpNotifications": "Level Up Notifications",
"on": "On",
"off": "Off",
"switch": "Switch",
"set": "Set",
"auto": "Auto",
"disabled": "Disabled",
"language": "Language",
"change": "Change",
"uiTheme": "UI Theme",
"default": "Default",
"legacy": "Legacy",
"windowType": "Window Type",
"moneyFormat": "Money Format",
"damageNumbers": "Damage Numbers",
"simple": "Simple",
"fancy": "Fancy",
"abbreviated": "Abbreviated",
"moveAnimations": "Move Animations",
"showStatsOnLevelUp": "Show Stats on Level Up",
"candyUpgradeNotification": "Candy Upgrade Notification",
"passivesOnly": "Passives Only",
"candyUpgradeDisplay": "Candy Upgrade Display",
"icon": "Icon",
"animation": "Animation",
"moveInfo": "Move Info",
"showMovesetFlyout": "Show Moveset Flyout",
"showArenaFlyout": "Show Arena Flyout",
"showTimeOfDayWidget": "Show Time of Day Widget",
"timeOfDayAnimation": "Time of Day Animation",
"bounce": "Bounce",
"back": "Back",
"spriteSet": "Sprite Set",
"consistent": "Consistent",
"mixedAnimated": "Mixed Animated",
"fusionPaletteSwaps": "Fusion Palette Swaps",
"playerGender": "Player Gender",
"typeHints": "Type Hints",
"masterVolume": "Master Volume",
"bgmVolume": "BGM Volume",
"seVolume": "SE Volume",
"musicPreference": "Music Preference",
"mixed": "Mixed",
"gamepadPleasePlug": "Please Plug in a Gamepad or Press a Button",
"delete": "Delete",
"keyboardPleasePress": "Please Press a Key on Your Keyboard",
"reset": "Reset",
"requireReload": "Reload Required",
"action": "Action",
"pressToBind": "Press to Bind",
"pressButton": "Press a Button...",
"buttonUp": "Up",
"buttonDown": "Down",
"altButtonUp": "Up (Alt)",
"buttonLeft": "Left",
"buttonRight": "Right",
"buttonAction": "Action",
"buttonMenu": "Menu",
"buttonSubmit": "Submit",
"altButtonDown": "Down (Alt)",
"altButtonLeft": "Left (Alt)",
"altButtonRight": "Right (Alt)",
"altButtonAction": "Action (Alt)",
"buttonCancel": "Cancel",
"altButtonCancel": "Cancel (Alt)",
"altButtonMenu": "Menu (Alt)",
"buttonStats": "Stats",
"altButtonStats": "Stats (Alt)",
"buttonCycleForm": "Cycle Form",
"altButtonCycleForm": "Cycle Form (Alt)",
"buttonCycleShiny": "Cycle Shiny",
"altButtonCycleShiny": "Cycle Shiny (Alt)",
"buttonCycleGender": "Cycle Gender",
"altButtonCycleGender": "Cycle Gender (Alt)",
"buttonCycleAbility": "Cycle Ability",
"altButtonCycleAbility": "Cycle Ability (Alt)",
"buttonCycleNature": "Cycle Nature",
"altButtonCycleNature": "Cycle Nature (Alt)",
"buttonCycleVariant": "Cycle Variant",
"altButtonCycleVariant": "Cycle Variant (Alt)",
"buttonSpeedUp": "Speed Up",
"altButtonSpeedUp": "Speed Up (Alt)",
"buttonSlowDown": "Slow Down",
"altButtonSlowDown": "Slow Down (Alt)",
"altButtonSubmit": "Submit (Alt)"
} as const; } as const;

View File

@ -44,10 +44,114 @@ export const menu: SimpleTranslationEntries = {
"score": "Score", "score": "Score",
"wave": "Wave", "wave": "Wave",
"loading": "Chargement…", "loading": "Chargement…",
"loadingAsset": "Loading asset: {{assetName}}", "loadingAsset": "Chargement de la ressource: {{assetName}}",
"playersOnline": "Joueurs Connectés", "playersOnline": "Joueurs Connectés",
"yes":"Oui", "yes":"Oui",
"no":"Non", "no":"Non",
"disclaimer": "AVERTISSEMENT", "disclaimer": "AVERTISSEMENT",
"disclaimerDescription": "Ce jeu nest pas un produit fini et peut contenir des problèmes de jouabilité, dont de possibles pertes de sauvegardes,\ndes modifications sans avertissement et pourrait ou non encore être mis à jour ou terminé." "disclaimerDescription": "Ce jeu nest pas un produit fini et peut contenir des problèmes de jouabilité, dont de possibles pertes de sauvegardes,\ndes modifications sans avertissement et pourrait ou non encore être mis à jour ou terminé.",
"general": "Général",
"display": "Affichage",
"audio": "Audio",
"gamepad": "Manette",
"keyboard": "Clavier",
"gameSpeed": "Vitesse du jeu",
"hpBarSpeed": "Vitesse de la barre de PV",
"expGainsSpeed": "Vitesse des gains dEXP",
"expPartyDisplay": "Afficher EXP équipe",
"skipSeenDialogues": "Passer les dialogues déjà vus",
"battleStyle": "Style de combat",
"enableRetries": "Activer les réessais",
"tutorials": "Tutoriels",
"touchControls": "Contrôles tactiles",
"vibrations": "Vibrations",
"normal": "Normal",
"fast": "Rapide",
"faster": "Plus rapide",
"skip": "Passer",
"levelUpNotifications": "Montée de niveau",
"on": "Activé",
"off": "Désactivé",
"switch": "Choix",
"set": "Défini",
"auto": "Auto",
"disabled": "Désactivé",
"language": "Langue",
"change": "Changer",
"uiTheme": "Interface",
"default": "Par défaut",
"legacy": "Ancienne",
"windowType": "Type de fenêtre",
"moneyFormat": "Format de largent",
"damageNumbers": "Nombres de dégâts",
"simple": "Simple",
"fancy": "Amélioré",
"abbreviated": "Abrégé",
"moveAnimations": "Animations de mouvement",
"showStatsOnLevelUp": "Afficher les stats à la montée de niveau",
"candyUpgradeNotification": "Notif amélioration de bonbon",
"passivesOnly": "Passifs",
"candyUpgradeDisplay": "Amélioration bonbon",
"icon": "Icône",
"animation": "Animation",
"moveInfo": "Info de capacité",
"showMovesetFlyout": "Afficher le volet de capacités",
"showArenaFlyout": "Afficher le volet darène",
"showTimeOfDayWidget": "Widget de lheure",
"timeOfDayAnimation": "Animation de lheure",
"bounce": "Sauter",
"back": "Retour",
"spriteSet": "Ensemble de sprites",
"consistent": "Consistant",
"mixedAnimated": "Mixte",
"fusionPaletteSwaps": "Palettes de fusion",
"playerGender": "Genre du joueur",
"typeHints": "Indications de type",
"masterVolume": "Volume principal",
"bgmVolume": "Volume BGM",
"seVolume": "Volume SE",
"musicPreference": "Préférence musicale",
"mixed": "Mixte",
"gamepadPleasePlug": "Veuillez brancher une manette ou appuyer sur un bouton",
"delete": "Supprimer",
"keyboardPleasePress": "Veuillez appuyer sur une touche de votre clavier",
"reset": "Réinitialiser",
"requireReload": "Redémarrage requis",
"action": "Action",
"pressToBind": "Sélectionnez pour assigner",
"pressButton": "Appuyez sur un bouton...",
"buttonUp": "Haut",
"buttonDown": "Bas",
"altButtonUp": "Haut (Alt)",
"buttonLeft": "Gauche",
"buttonRight": "Droite",
"buttonAction": "Action",
"buttonMenu": "Menu",
"buttonSubmit": "Valider",
"altButtonDown": "Bas (Alt)",
"altButtonLeft": "Gauche (Alt)",
"altButtonRight": "Droite (Alt)",
"altButtonAction": "Action (Alt)",
"buttonCancel": "Annuler",
"altButtonCancel": "Annuler (Alt)",
"altButtonMenu": "Menu (Alt)",
"buttonStats": "Stats",
"altButtonStats": "Stats (Alt)",
"buttonCycleForm": "Cycle de forme",
"altButtonCycleForm": "Cycle de forme (Alt)",
"buttonCycleShiny": "Cycle de chromatique",
"altButtonCycleShiny": "Cycle de chromatique (Alt)",
"buttonCycleGender": "Cycle de genre",
"altButtonCycleGender": "Cycle de genre (Alt)",
"buttonCycleAbility": "Cycle de capacité",
"altButtonCycleAbility": "Cycle de capacité (Alt)",
"buttonCycleNature": "Cycle de nature",
"altButtonCycleNature": "Cycle de nature (Alt)",
"buttonCycleVariant": "Cycle de variante",
"altButtonCycleVariant": "Cycle de variante (Alt)",
"buttonSpeedUp": "Accélérer",
"altButtonSpeedUp": "Accélérer (Alt)",
"buttonSlowDown": "Ralentir",
"altButtonSlowDown": "Ralentir (Alt)",
"altButtonSubmit": "Valider (Alt)",
} as const; } as const;

View File

@ -54,5 +54,109 @@ export const menu: SimpleTranslationEntries = {
"yes":"Si", "yes":"Si",
"no":"No", "no":"No",
"disclaimer": "DISCLAIMER", "disclaimer": "DISCLAIMER",
"disclaimerDescription": "Questo gioco è un prodotto incompleto; si potrebbero riscontrare errori (inclusa la perdita dei dati di salvataggio),\ncambiamenti impercettibili, e non è detto che venga aggiornato nel tempo o mai completato del tutto." "disclaimerDescription": "Questo gioco è un prodotto incompleto; si potrebbero riscontrare errori (inclusa la perdita dei dati di salvataggio),\ncambiamenti impercettibili, e non è detto che venga aggiornato nel tempo o mai completato del tutto.",
"general": "General",
"display": "Display",
"audio": "Audio",
"gamepad": "Gamepad",
"keyboard": "Keyboard",
"gameSpeed": "Game Speed",
"hpBarSpeed": "HP Bar Speed",
"expGainsSpeed": "EXP Gains Speed",
"expPartyDisplay": "Show EXP Party",
"skipSeenDialogues": "Skip Seen Dialogues",
"battleStyle": "Battle Style",
"enableRetries": "Enable Retries",
"tutorials": "Tutorials",
"touchControls": "Touch Controls",
"vibrations": "Vibrations",
"normal": "Normal",
"fast": "Fast",
"faster": "Faster",
"skip": "Skip",
"levelUpNotifications": "Level Up Notifications",
"on": "On",
"off": "Off",
"switch": "Switch",
"set": "Set",
"auto": "Auto",
"disabled": "Disabled",
"language": "Language",
"change": "Change",
"uiTheme": "UI Theme",
"default": "Default",
"legacy": "Legacy",
"windowType": "Window Type",
"moneyFormat": "Money Format",
"damageNumbers": "Damage Numbers",
"simple": "Simple",
"fancy": "Fancy",
"abbreviated": "Abbreviated",
"moveAnimations": "Move Animations",
"showStatsOnLevelUp": "Show Stats on Level Up",
"candyUpgradeNotification": "Candy Upgrade Notification",
"passivesOnly": "Passives Only",
"candyUpgradeDisplay": "Candy Upgrade Display",
"icon": "Icon",
"animation": "Animation",
"moveInfo": "Move Info",
"showMovesetFlyout": "Show Moveset Flyout",
"showArenaFlyout": "Show Arena Flyout",
"showTimeOfDayWidget": "Show Time of Day Widget",
"timeOfDayAnimation": "Time of Day Animation",
"bounce": "Bounce",
"back": "Back",
"spriteSet": "Sprite Set",
"consistent": "Consistent",
"mixedAnimated": "Mixed Animated",
"fusionPaletteSwaps": "Fusion Palette Swaps",
"playerGender": "Player Gender",
"typeHints": "Type Hints",
"masterVolume": "Master Volume",
"bgmVolume": "BGM Volume",
"seVolume": "SE Volume",
"musicPreference": "Music Preference",
"mixed": "Mixed",
"gamepadPleasePlug": "Please Plug in a Gamepad or Press a Button",
"delete": "Delete",
"keyboardPleasePress": "Please Press a Key on Your Keyboard",
"reset": "Reset",
"requireReload": "Reload Required",
"action": "Action",
"pressToBind": "Press to Bind",
"pressButton": "Press a Button...",
"buttonUp": "Up",
"buttonDown": "Down",
"altButtonUp": "Up (Alt)",
"buttonLeft": "Left",
"buttonRight": "Right",
"buttonAction": "Action",
"buttonMenu": "Menu",
"buttonSubmit": "Submit",
"altButtonDown": "Down (Alt)",
"altButtonLeft": "Left (Alt)",
"altButtonRight": "Right (Alt)",
"altButtonAction": "Action (Alt)",
"buttonCancel": "Cancel",
"altButtonCancel": "Cancel (Alt)",
"altButtonMenu": "Menu (Alt)",
"buttonStats": "Stats",
"altButtonStats": "Stats (Alt)",
"buttonCycleForm": "Cycle Form",
"altButtonCycleForm": "Cycle Form (Alt)",
"buttonCycleShiny": "Cycle Shiny",
"altButtonCycleShiny": "Cycle Shiny (Alt)",
"buttonCycleGender": "Cycle Gender",
"altButtonCycleGender": "Cycle Gender (Alt)",
"buttonCycleAbility": "Cycle Ability",
"altButtonCycleAbility": "Cycle Ability (Alt)",
"buttonCycleNature": "Cycle Nature",
"altButtonCycleNature": "Cycle Nature (Alt)",
"buttonCycleVariant": "Cycle Variant",
"altButtonCycleVariant": "Cycle Variant (Alt)",
"buttonSpeedUp": "Speed Up",
"altButtonSpeedUp": "Speed Up (Alt)",
"buttonSlowDown": "Slow Down",
"altButtonSlowDown": "Slow Down (Alt)",
"altButtonSubmit": "Submit (Alt)",
} as const; } as const;

View File

@ -55,4 +55,108 @@ export const menu: SimpleTranslationEntries = {
"no":"아니오", "no":"아니오",
"disclaimer": "면책 조항", "disclaimer": "면책 조항",
"disclaimerDescription": "이 게임은 완전히 개발되지 않았습니다- (세이브 데이터 소실을 포함) 플레이에 지장을 주는 문제가 생길 수 있으며,\n공지 없이 업데이트가 진행 혹은 중지될 수 있습니다.", "disclaimerDescription": "이 게임은 완전히 개발되지 않았습니다- (세이브 데이터 소실을 포함) 플레이에 지장을 주는 문제가 생길 수 있으며,\n공지 없이 업데이트가 진행 혹은 중지될 수 있습니다.",
"general": "일반",
"display": "디스플레이",
"audio": "오디오",
"gamepad": "게임패드",
"keyboard": "키보드",
"gameSpeed": "게임 속도",
"hpBarSpeed": "HP 속도",
"expGainsSpeed": "경험치 속도",
"expPartyDisplay": "파티 경험치 표시",
"skipSeenDialogues": "본 대화 생략",
"battleStyle": "배틀 방식",
"enableRetries": "재도전 허용",
"tutorials": "튜토리얼",
"touchControls": "터치 컨트롤",
"vibrations": "진동",
"normal": "보통",
"fast": "빠르게",
"faster": "더 빠르게",
"skip": "스킵",
"levelUpNotifications": "레벨업 알림",
"on": "설정",
"off": "해제",
"switch": "교체허용",
"set": "해제",
"auto": "자동",
"disabled": "비활성",
"language": "언어",
"change": "변경",
"uiTheme": "UI 테마",
"default": "기본",
"legacy": "레거시",
"windowType": "윈도우 타입",
"moneyFormat": "소지금 표시",
"damageNumbers": "대미지 표시",
"simple": "심플",
"fancy": "팬시",
"abbreviated": "축약",
"moveAnimations": "기술 애니메이션",
"showStatsOnLevelUp": "레벨업 능력치 표시",
"candyUpgradeNotification": "사탕 업그레이드 알림",
"passivesOnly": "패시브만",
"candyUpgradeDisplay": "사탕 업그레이드 표시",
"icon": "아이콘",
"animation": "애니메이션",
"moveInfo": "기술 정보",
"showMovesetFlyout": "상대 기술 보기",
"showArenaFlyout": "배틀 효과 보기",
"showTimeOfDayWidget": "시간 위젯",
"timeOfDayAnimation": "시간 애니메이션",
"bounce": "바운스",
"back": "백",
"spriteSet": "스프라이트",
"consistent": "기본",
"mixedAnimated": "믹스",
"fusionPaletteSwaps": "융합 팔레트 스왑",
"playerGender": "플레이어 성별",
"typeHints": "타입 힌트",
"masterVolume": "마스터 볼륨",
"bgmVolume": "BGM 볼륨",
"seVolume": "SE 볼륨",
"musicPreference": "음악 설정",
"mixed": "믹스",
"gamepadPleasePlug": "게임패드를 연결하거나 버튼을 입력하세요",
"delete": "삭제",
"keyboardPleasePress": "키보드의 키를 입력하세요",
"reset": "리셋",
"requireReload": "새로고침 필요",
"action": "액션",
"pressToBind": "할당을 위해 입력하세요",
"pressButton": "버튼을 입력하세요",
"buttonUp": "위",
"buttonDown": "아래",
"altButtonUp": "위 (대체)",
"buttonLeft": "왼쪽",
"buttonRight": "오른쪽",
"buttonAction": "액션",
"buttonMenu": "메뉴",
"buttonSubmit": "확인",
"altButtonDown": "아래 (대체)",
"altButtonLeft": "왼쪽 (대체)",
"altButtonRight": "오른쪽 (대체)",
"altButtonAction": "액션 (대체)",
"buttonCancel": "취소",
"altButtonCancel": "취소 (대체)",
"altButtonMenu": "메뉴 (대체)",
"buttonStats": "스탯",
"altButtonStats": "스탯 (대체)",
"buttonCycleForm": "폼 변환",
"altButtonCycleForm": "폼 변환 (대체)",
"buttonCycleShiny": "특별한 색 변환",
"altButtonCycleShiny": "특별한 색 변환 (대체)",
"buttonCycleGender": "성별 변환",
"altButtonCycleGender": "성별 변환 (대체)",
"buttonCycleAbility": "특성 변환",
"altButtonCycleAbility": "특성 변환 (대체)",
"buttonCycleNature": "성격 변환",
"altButtonCycleNature": "성격 변환 (대체)",
"buttonCycleVariant": "색상 변환",
"altButtonCycleVariant": "색상 변환 (대체)",
"buttonSpeedUp": "속도 올리기",
"altButtonSpeedUp": "속도 올리기 (대체)",
"buttonSlowDown": "속도 내리기",
"altButtonSlowDown": "속도 내리기 (대체)",
"altButtonSubmit": "확인 (대체)",
} as const; } as const;

View File

@ -54,5 +54,109 @@ export const menu: SimpleTranslationEntries = {
"yes": "Sim", "yes": "Sim",
"no": "Não", "no": "Não",
"disclaimer": "AVISO", "disclaimer": "AVISO",
"disclaimerDescription": "Este jogo é um produto inacabado; ele pode ter problemas de jogabilidade (incluindo possíveis perdas de dados salvos),\n sofrer alterações sem aviso prévio e pode ou não ser atualizado ou concluído." "disclaimerDescription": "Este jogo é um produto inacabado; ele pode ter problemas de jogabilidade (incluindo possíveis perdas de dados salvos),\n sofrer alterações sem aviso prévio e pode ou não ser atualizado ou concluído.",
"general": "General",
"display": "Display",
"audio": "Audio",
"gamepad": "Gamepad",
"keyboard": "Keyboard",
"gameSpeed": "Game Speed",
"hpBarSpeed": "HP Bar Speed",
"expGainsSpeed": "EXP Gains Speed",
"expPartyDisplay": "Show EXP Party",
"skipSeenDialogues": "Skip Seen Dialogues",
"battleStyle": "Battle Style",
"enableRetries": "Enable Retries",
"tutorials": "Tutorials",
"touchControls": "Touch Controls",
"vibrations": "Vibrations",
"normal": "Normal",
"fast": "Fast",
"faster": "Faster",
"skip": "Skip",
"levelUpNotifications": "Level Up Notifications",
"on": "On",
"off": "Off",
"switch": "Switch",
"set": "Set",
"auto": "Auto",
"disabled": "Disabled",
"language": "Language",
"change": "Change",
"uiTheme": "UI Theme",
"default": "Default",
"legacy": "Legacy",
"windowType": "Window Type",
"moneyFormat": "Money Format",
"damageNumbers": "Damage Numbers",
"simple": "Simple",
"fancy": "Fancy",
"abbreviated": "Abbreviated",
"moveAnimations": "Move Animations",
"showStatsOnLevelUp": "Show Stats on Level Up",
"candyUpgradeNotification": "Candy Upgrade Notification",
"passivesOnly": "Passives Only",
"candyUpgradeDisplay": "Candy Upgrade Display",
"icon": "Icon",
"animation": "Animation",
"moveInfo": "Move Info",
"showMovesetFlyout": "Show Moveset Flyout",
"showArenaFlyout": "Show Arena Flyout",
"showTimeOfDayWidget": "Show Time of Day Widget",
"timeOfDayAnimation": "Time of Day Animation",
"bounce": "Bounce",
"back": "Back",
"spriteSet": "Sprite Set",
"consistent": "Consistent",
"mixedAnimated": "Mixed Animated",
"fusionPaletteSwaps": "Fusion Palette Swaps",
"playerGender": "Player Gender",
"typeHints": "Type Hints",
"masterVolume": "Master Volume",
"bgmVolume": "BGM Volume",
"seVolume": "SE Volume",
"musicPreference": "Music Preference",
"mixed": "Mixed",
"gamepadPleasePlug": "Please Plug in a Gamepad or Press a Button",
"delete": "Delete",
"keyboardPleasePress": "Please Press a Key on Your Keyboard",
"reset": "Reset",
"requireReload": "Reload Required",
"action": "Action",
"pressToBind": "Press to Bind",
"pressButton": "Press a Button...",
"buttonUp": "Up",
"buttonDown": "Down",
"altButtonUp": "Up (Alt)",
"buttonLeft": "Left",
"buttonRight": "Right",
"buttonAction": "Action",
"buttonMenu": "Menu",
"buttonSubmit": "Submit",
"altButtonDown": "Down (Alt)",
"altButtonLeft": "Left (Alt)",
"altButtonRight": "Right (Alt)",
"altButtonAction": "Action (Alt)",
"buttonCancel": "Cancel",
"altButtonCancel": "Cancel (Alt)",
"altButtonMenu": "Menu (Alt)",
"buttonStats": "Stats",
"altButtonStats": "Stats (Alt)",
"buttonCycleForm": "Cycle Form",
"altButtonCycleForm": "Cycle Form (Alt)",
"buttonCycleShiny": "Cycle Shiny",
"altButtonCycleShiny": "Cycle Shiny (Alt)",
"buttonCycleGender": "Cycle Gender",
"altButtonCycleGender": "Cycle Gender (Alt)",
"buttonCycleAbility": "Cycle Ability",
"altButtonCycleAbility": "Cycle Ability (Alt)",
"buttonCycleNature": "Cycle Nature",
"altButtonCycleNature": "Cycle Nature (Alt)",
"buttonCycleVariant": "Cycle Variant",
"altButtonCycleVariant": "Cycle Variant (Alt)",
"buttonSpeedUp": "Speed Up",
"altButtonSpeedUp": "Speed Up (Alt)",
"buttonSlowDown": "Slow Down",
"altButtonSlowDown": "Slow Down (Alt)",
"altButtonSubmit": "Submit (Alt)"
} as const; } as const;

View File

@ -54,5 +54,109 @@ export const menu: SimpleTranslationEntries = {
"yes": "是", "yes": "是",
"no": "否", "no": "否",
"disclaimer": "DISCLAIMER", "disclaimer": "DISCLAIMER",
"disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed." "disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed.",
"general": "General",
"display": "Display",
"audio": "Audio",
"gamepad": "Gamepad",
"keyboard": "Keyboard",
"gameSpeed": "Game Speed",
"hpBarSpeed": "HP Bar Speed",
"expGainsSpeed": "EXP Gains Speed",
"expPartyDisplay": "Show EXP Party",
"skipSeenDialogues": "Skip Seen Dialogues",
"battleStyle": "Battle Style",
"enableRetries": "Enable Retries",
"tutorials": "Tutorials",
"touchControls": "Touch Controls",
"vibrations": "Vibrations",
"normal": "Normal",
"fast": "Fast",
"faster": "Faster",
"skip": "Skip",
"levelUpNotifications": "Level Up Notifications",
"on": "On",
"off": "Off",
"switch": "Switch",
"set": "Set",
"auto": "Auto",
"disabled": "Disabled",
"language": "Language",
"change": "Change",
"uiTheme": "UI Theme",
"default": "Default",
"legacy": "Legacy",
"windowType": "Window Type",
"moneyFormat": "Money Format",
"damageNumbers": "Damage Numbers",
"simple": "Simple",
"fancy": "Fancy",
"abbreviated": "Abbreviated",
"moveAnimations": "Move Animations",
"showStatsOnLevelUp": "Show Stats on Level Up",
"candyUpgradeNotification": "Candy Upgrade Notification",
"passivesOnly": "Passives Only",
"candyUpgradeDisplay": "Candy Upgrade Display",
"icon": "Icon",
"animation": "Animation",
"moveInfo": "Move Info",
"showMovesetFlyout": "Show Moveset Flyout",
"showArenaFlyout": "Show Arena Flyout",
"showTimeOfDayWidget": "Show Time of Day Widget",
"timeOfDayAnimation": "Time of Day Animation",
"bounce": "Bounce",
"back": "Back",
"spriteSet": "Sprite Set",
"consistent": "Consistent",
"mixedAnimated": "Mixed Animated",
"fusionPaletteSwaps": "Fusion Palette Swaps",
"playerGender": "Player Gender",
"typeHints": "Type Hints",
"masterVolume": "Master Volume",
"bgmVolume": "BGM Volume",
"seVolume": "SE Volume",
"musicPreference": "Music Preference",
"mixed": "Mixed",
"gamepadPleasePlug": "Please Plug in a Gamepad or Press a Button",
"delete": "Delete",
"keyboardPleasePress": "Please Press a Key on Your Keyboard",
"reset": "Reset",
"requireReload": "Reload Required",
"action": "Action",
"pressToBind": "Press to Bind",
"pressButton": "Press a Button...",
"buttonUp": "Up",
"buttonDown": "Down",
"altButtonUp": "Up (Alt)",
"buttonLeft": "Left",
"buttonRight": "Right",
"buttonAction": "Action",
"buttonMenu": "Menu",
"buttonSubmit": "Submit",
"altButtonDown": "Down (Alt)",
"altButtonLeft": "Left (Alt)",
"altButtonRight": "Right (Alt)",
"altButtonAction": "Action (Alt)",
"buttonCancel": "Cancel",
"altButtonCancel": "Cancel (Alt)",
"altButtonMenu": "Menu (Alt)",
"buttonStats": "Stats",
"altButtonStats": "Stats (Alt)",
"buttonCycleForm": "Cycle Form",
"altButtonCycleForm": "Cycle Form (Alt)",
"buttonCycleShiny": "Cycle Shiny",
"altButtonCycleShiny": "Cycle Shiny (Alt)",
"buttonCycleGender": "Cycle Gender",
"altButtonCycleGender": "Cycle Gender (Alt)",
"buttonCycleAbility": "Cycle Ability",
"altButtonCycleAbility": "Cycle Ability (Alt)",
"buttonCycleNature": "Cycle Nature",
"altButtonCycleNature": "Cycle Nature (Alt)",
"buttonCycleVariant": "Cycle Variant",
"altButtonCycleVariant": "Cycle Variant (Alt)",
"buttonSpeedUp": "Speed Up",
"altButtonSpeedUp": "Speed Up (Alt)",
"buttonSlowDown": "Slow Down",
"altButtonSlowDown": "Slow Down (Alt)",
"altButtonSubmit": "Submit (Alt)"
} as const; } as const;

View File

@ -54,5 +54,109 @@ export const menu: SimpleTranslationEntries = {
"yes":"是", "yes":"是",
"no":"否", "no":"否",
"disclaimer": "DISCLAIMER", "disclaimer": "DISCLAIMER",
"disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed." "disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed.",
"general": "General",
"display": "Display",
"audio": "Audio",
"gamepad": "Gamepad",
"keyboard": "Keyboard",
"gameSpeed": "Game Speed",
"hpBarSpeed": "HP Bar Speed",
"expGainsSpeed": "EXP Gains Speed",
"expPartyDisplay": "Show EXP Party",
"skipSeenDialogues": "Skip Seen Dialogues",
"battleStyle": "Battle Style",
"enableRetries": "Enable Retries",
"tutorials": "Tutorials",
"touchControls": "Touch Controls",
"vibrations": "Vibrations",
"normal": "Normal",
"fast": "Fast",
"faster": "Faster",
"skip": "Skip",
"levelUpNotifications": "Level Up Notifications",
"on": "On",
"off": "Off",
"switch": "Switch",
"set": "Set",
"auto": "Auto",
"disabled": "Disabled",
"language": "Language",
"change": "Change",
"uiTheme": "UI Theme",
"default": "Default",
"legacy": "Legacy",
"windowType": "Window Type",
"moneyFormat": "Money Format",
"damageNumbers": "Damage Numbers",
"simple": "Simple",
"fancy": "Fancy",
"abbreviated": "Abbreviated",
"moveAnimations": "Move Animations",
"showStatsOnLevelUp": "Show Stats on Level Up",
"candyUpgradeNotification": "Candy Upgrade Notification",
"passivesOnly": "Passives Only",
"candyUpgradeDisplay": "Candy Upgrade Display",
"icon": "Icon",
"animation": "Animation",
"moveInfo": "Move Info",
"showMovesetFlyout": "Show Moveset Flyout",
"showArenaFlyout": "Show Arena Flyout",
"showTimeOfDayWidget": "Show Time of Day Widget",
"timeOfDayAnimation": "Time of Day Animation",
"bounce": "Bounce",
"back": "Back",
"spriteSet": "Sprite Set",
"consistent": "Consistent",
"mixedAnimated": "Mixed Animated",
"fusionPaletteSwaps": "Fusion Palette Swaps",
"playerGender": "Player Gender",
"typeHints": "Type Hints",
"masterVolume": "Master Volume",
"bgmVolume": "BGM Volume",
"seVolume": "SE Volume",
"musicPreference": "Music Preference",
"mixed": "Mixed",
"gamepadPleasePlug": "Please Plug in a Gamepad or Press a Button",
"delete": "Delete",
"keyboardPleasePress": "Please Press a Key on Your Keyboard",
"reset": "Reset",
"requireReload": "Reload Required",
"action": "Action",
"pressToBind": "Press to Bind",
"pressButton": "Press a Button...",
"buttonUp": "Up",
"buttonDown": "Down",
"altButtonUp": "Up (Alt)",
"buttonLeft": "Left",
"buttonRight": "Right",
"buttonAction": "Action",
"buttonMenu": "Menu",
"buttonSubmit": "Submit",
"altButtonDown": "Down (Alt)",
"altButtonLeft": "Left (Alt)",
"altButtonRight": "Right (Alt)",
"altButtonAction": "Action (Alt)",
"buttonCancel": "Cancel",
"altButtonCancel": "Cancel (Alt)",
"altButtonMenu": "Menu (Alt)",
"buttonStats": "Stats",
"altButtonStats": "Stats (Alt)",
"buttonCycleForm": "Cycle Form",
"altButtonCycleForm": "Cycle Form (Alt)",
"buttonCycleShiny": "Cycle Shiny",
"altButtonCycleShiny": "Cycle Shiny (Alt)",
"buttonCycleGender": "Cycle Gender",
"altButtonCycleGender": "Cycle Gender (Alt)",
"buttonCycleAbility": "Cycle Ability",
"altButtonCycleAbility": "Cycle Ability (Alt)",
"buttonCycleNature": "Cycle Nature",
"altButtonCycleNature": "Cycle Nature (Alt)",
"buttonCycleVariant": "Cycle Variant",
"altButtonCycleVariant": "Cycle Variant (Alt)",
"buttonSpeedUp": "Speed Up",
"altButtonSpeedUp": "Speed Up (Alt)",
"buttonSlowDown": "Slow Down",
"altButtonSlowDown": "Slow Down (Alt)",
"altButtonSubmit": "Submit (Alt)"
} as const; } as const;

View File

@ -2,6 +2,7 @@ import {Button} from "#enums/buttons";
import BattleScene from "#app/battle-scene"; import BattleScene from "#app/battle-scene";
import {Mode} from "#app/ui/ui"; import {Mode} from "#app/ui/ui";
import SettingsKeyboardUiHandler from "#app/ui/settings/settings-keyboard-ui-handler"; import SettingsKeyboardUiHandler from "#app/ui/settings/settings-keyboard-ui-handler";
import i18next from "i18next";
export enum SettingKeyboard { export enum SettingKeyboard {
// Default_Layout = "DEFAULT_LAYOUT", // Default_Layout = "DEFAULT_LAYOUT",
@ -41,7 +42,7 @@ export enum SettingKeyboard {
Alt_Button_Submit = "ALT_BUTTON_SUBMIT", Alt_Button_Submit = "ALT_BUTTON_SUBMIT",
} }
const pressAction = "Press action to assign"; const pressAction = i18next.t("menu:pressToBind");
export const settingKeyboardOptions = { export const settingKeyboardOptions = {
// [SettingKeyboard.Default_Layout]: ['Default'], // [SettingKeyboard.Default_Layout]: ['Default'],

View File

@ -9,10 +9,33 @@ import { EaseType } from "#enums/ease-type";
import { MoneyFormat } from "#enums/money-format"; import { MoneyFormat } from "#enums/money-format";
import { PlayerGender } from "#enums/player-gender"; import { PlayerGender } from "#enums/player-gender";
const MUTE = "Mute"; const VOLUME_OPTIONS: SettingOption[] = new Array(11).fill(null).map((_, i) => i ? {
const VOLUME_OPTIONS = new Array(11).fill(null).map((_, i) => i ? (i * 10).toString() : MUTE); value: (i * 10).toString(),
const OFF_ON = ["Off", "On"]; label: (i * 10).toString(),
const AUTO_DISABLED = ["Auto", "Disabled"]; } : {
value: "Mute",
label: i18next.t("menu:mute")
});
const OFF_ON: SettingOption[] = [
{
value: "Off",
label: i18next.t("menu:off")
},
{
value: "On",
label: i18next.t("menu:on")
}
];
const AUTO_DISABLED: SettingOption[] = [
{
value: "Auto",
label: i18next.t("menu:auto")
},
{
value: "Disabled",
label: i18next.t("menu:disabled")
}
];
/** /**
* Types for helping separate settings to different menus * Types for helping separate settings to different menus
@ -23,10 +46,15 @@ export enum SettingType {
AUDIO AUDIO
} }
type SettingOption = {
value: string,
label: string
};
export interface Setting { export interface Setting {
key: string key: string
label: string label: string
options: Array<string> options: SettingOption[]
default: number default: number
type: SettingType type: SettingType
requireReload?: boolean requireReload?: boolean
@ -77,164 +105,321 @@ export const SettingKeys = {
export const Setting: Array<Setting> = [ export const Setting: Array<Setting> = [
{ {
key: SettingKeys.Game_Speed, key: SettingKeys.Game_Speed,
label: "Game Speed", label: i18next.t("menu:gameSpeed"),
options: ["1x", "1.25x", "1.5x", "2x", "2.5x", "3x", "4x", "5x"], options: [
{
value: "1",
label: "1x"
},
{
value: "1.25",
label: "1.25x"
},
{
value: "1.5",
label: "1.5x"
},
{
value: "2",
label: "2x"
},
{
value: "2.5",
label: "2.5x"
},
{
value: "3",
label: "3x"
},
{
value: "4",
label: "4x"
},
{
value: "5",
label: "5x"
}
],
default: 3, default: 3,
type: SettingType.GENERAL type: SettingType.GENERAL
}, },
{ {
key: SettingKeys.HP_Bar_Speed, key: SettingKeys.HP_Bar_Speed,
label: "HP Bar Speed", label: i18next.t("menu:hpBarSpeed"),
options: ["Normal", "Fast", "Faster", "Skip"], options: [
{
value: "Normal",
label: i18next.t("menu:normal")
},
{
value: "Fast",
label: i18next.t("menu:fast")
},
{
value: "Faster",
label: i18next.t("menu:faster")
},
{
value: "Skip",
label: i18next.t("menu:skip")
}
],
default: 0, default: 0,
type: SettingType.GENERAL type: SettingType.GENERAL
}, },
{ {
key: SettingKeys.EXP_Gains_Speed, key: SettingKeys.EXP_Gains_Speed,
label: "EXP Gains Speed", label: i18next.t("menu:expGainsSpeed"),
options: ["Normal", "Fast", "Faster", "Skip"], options: [
{
value: "Normal",
label: i18next.t("menu:normal")
},
{
value: "Fast",
label: i18next.t("menu:fast")
},
{
value: "Faster",
label: i18next.t("menu:faster")
},
{
value: "Skip",
label: i18next.t("menu:skip")
}
],
default: 0, default: 0,
type: SettingType.GENERAL type: SettingType.GENERAL
}, },
{ {
key: SettingKeys.EXP_Party_Display, key: SettingKeys.EXP_Party_Display,
label: "EXP Party Display", label: i18next.t("menu:expPartyDisplay"),
options: ["Normal", "Level Up Notification", "Skip"], options: [
{
value: "Normal",
label: i18next.t("menu:normal")
},
{
value: "Level Up Notification",
label: i18next.t("menu:levelUpNotifications")
},
{
value: "Skip",
label: i18next.t("menu:skip")
}
],
default: 0, default: 0,
type: SettingType.GENERAL type: SettingType.GENERAL
}, },
{ {
key: SettingKeys.Skip_Seen_Dialogues, key: SettingKeys.Skip_Seen_Dialogues,
label: "Skip Seen Dialogues", label: i18next.t("menu:skipSeenDialogues"),
options: OFF_ON, options: OFF_ON,
default: 0, default: 0,
type: SettingType.GENERAL type: SettingType.GENERAL
}, },
{ {
key: SettingKeys.Battle_Style, key: SettingKeys.Battle_Style,
label: "Battle Style", label: i18next.t("menu:battleStyle"),
options: ["Switch", "Set"], options: [
{
value: "Switch",
label: i18next.t("menu:switch")
},
{
value: "Set",
label: i18next.t("menu:set")
}
],
default: 0, default: 0,
type: SettingType.GENERAL type: SettingType.GENERAL
}, },
{ {
key: SettingKeys.Enable_Retries, key: SettingKeys.Enable_Retries,
label: "Enable Retries", label: i18next.t("menu:enableRetries"),
options: OFF_ON, options: OFF_ON,
default: 0, default: 0,
type: SettingType.GENERAL type: SettingType.GENERAL
}, },
{ {
key: SettingKeys.Tutorials, key: SettingKeys.Tutorials,
label: "Tutorials", label: i18next.t("menu:tutorials"),
options: OFF_ON, options: OFF_ON,
default: 1, default: 1,
type: SettingType.GENERAL type: SettingType.GENERAL
}, },
{ {
key: SettingKeys.Touch_Controls, key: SettingKeys.Touch_Controls,
label: "Touch Controls", label: i18next.t("menu:touchControls"),
options: AUTO_DISABLED, options: AUTO_DISABLED,
default: 0, default: 0,
type: SettingType.GENERAL type: SettingType.GENERAL
}, },
{ {
key: SettingKeys.Vibration, key: SettingKeys.Vibration,
label: "Vibration", label: i18next.t("menu:vibrations"),
options: AUTO_DISABLED, options: AUTO_DISABLED,
default: 0, default: 0,
type: SettingType.GENERAL type: SettingType.GENERAL
}, },
{ {
key: SettingKeys.Language, key: SettingKeys.Language,
label: "Language", label: i18next.t("menu:language"),
options: ["English", "Change"], options: [
{
value: "English",
label: "English"
},
{
value: "Change",
label: i18next.t("menu:change")
}
],
default: 0, default: 0,
type: SettingType.DISPLAY, type: SettingType.DISPLAY,
requireReload: true requireReload: true
}, },
{ {
key: SettingKeys.UI_Theme, key: SettingKeys.UI_Theme,
label: "UI Theme", label: i18next.t("menu:uiTheme"),
options: ["Default", "Legacy"], options: [
{
value: "Default",
label: i18next.t("menu:default")
},
{
value: "Legacy",
label: i18next.t("menu:legacy")
}
],
default: 0, default: 0,
type: SettingType.DISPLAY, type: SettingType.DISPLAY,
requireReload: true requireReload: true
}, },
{ {
key: SettingKeys.Window_Type, key: SettingKeys.Window_Type,
label: "Window Type", label: i18next.t("menu:windowType"),
options: new Array(5).fill(null).map((_, i) => (i + 1).toString()), options: new Array(5).fill(null).map((_, i) => {
const windowType = (i + 1).toString();
return {
value: windowType,
label: windowType
};
}),
default: 0, default: 0,
type: SettingType.DISPLAY type: SettingType.DISPLAY
}, },
{ {
key: SettingKeys.Money_Format, key: SettingKeys.Money_Format,
label: "Money Format", label: i18next.t("menu:moneyFormat"),
options: ["Normal", "Abbreviated"], options: [
{
value: "Normal",
label: i18next.t("menu:normal")
},
{
value: "Abbreviated",
label: i18next.t("menu:abbreviated")
}
],
default: 0, default: 0,
type: SettingType.DISPLAY type: SettingType.DISPLAY
}, },
{ {
key: SettingKeys.Damage_Numbers, key: SettingKeys.Damage_Numbers,
label: "Damage Numbers", label: i18next.t("menu:damageNumbers"),
options: ["Off", "Simple", "Fancy"], options: [
{
value: "Off",
label: i18next.t("menu:off")
},
{
value: "Simple",
label: i18next.t("menu:simple")
},
{
value: "Fancy",
label: i18next.t("menu:fancy")
}
],
default: 0, default: 0,
type: SettingType.DISPLAY type: SettingType.DISPLAY
}, },
{ {
key: SettingKeys.Move_Animations, key: SettingKeys.Move_Animations,
label: "Move Animations", label: i18next.t("menu:moveAnimations"),
options: OFF_ON, options: OFF_ON,
default: 1, default: 1,
type: SettingType.DISPLAY type: SettingType.DISPLAY
}, },
{ {
key: SettingKeys.Show_Stats_on_Level_Up, key: SettingKeys.Show_Stats_on_Level_Up,
label: "Show Stats on Level Up", label: i18next.t("menu:showStatsOnLevelUp"),
options: OFF_ON, options: OFF_ON,
default: 1, default: 1,
type: SettingType.DISPLAY type: SettingType.DISPLAY
}, },
{ {
key: SettingKeys.Candy_Upgrade_Notification, key: SettingKeys.Candy_Upgrade_Notification,
label: "Candy Upgrade Notification", label: i18next.t("menu:candyUpgradeNotification"),
options: ["Off", "Passives Only", "On"], options: [
{
value: "Off",
label: i18next.t("menu:off")
},
{
value: "Passives Only",
label: i18next.t("menu:passivesOnly")
},
{
value: "On",
label: i18next.t("menu:on")
}
],
default: 0, default: 0,
type: SettingType.DISPLAY type: SettingType.DISPLAY
}, },
{ {
key: SettingKeys.Candy_Upgrade_Display, key: SettingKeys.Candy_Upgrade_Display,
label: "Candy Upgrade Display", label: i18next.t("menu:candyUpgradeDisplay"),
options: ["Icon", "Animation"], options: [
{
value: "Icon",
label: i18next.t("menu:icon")
},
{
value: "Animation",
label: i18next.t("menu:animation")
}
],
default: 0, default: 0,
type: SettingType.DISPLAY, type: SettingType.DISPLAY,
requireReload: true requireReload: true
}, },
{ {
key: SettingKeys.Move_Info, key: SettingKeys.Move_Info,
label: "Move Info", label: i18next.t("menu:moveInfo"),
options: OFF_ON, options: OFF_ON,
default: 1, default: 1,
type: SettingType.DISPLAY type: SettingType.DISPLAY
}, },
{ {
key: SettingKeys.Show_Moveset_Flyout, key: SettingKeys.Show_Moveset_Flyout,
label: "Show Moveset Flyout", label: i18next.t("menu:showMovesetFlyout"),
options: OFF_ON, options: OFF_ON,
default: 1, default: 1,
type: SettingType.DISPLAY type: SettingType.DISPLAY
}, },
{ {
key: SettingKeys.Show_Arena_Flyout, key: SettingKeys.Show_Arena_Flyout,
label: "Show Battle Effects Flyout", label: i18next.t("menu:showArenaFlyout"),
options: OFF_ON, options: OFF_ON,
default: 1, default: 1,
type: SettingType.DISPLAY type: SettingType.DISPLAY
}, },
{ {
key: SettingKeys.Show_Time_Of_Day_Widget, key: SettingKeys.Show_Time_Of_Day_Widget,
label: "Show Time of Day Widget", label: i18next.t("menu:showTimeOfDayWidget"),
options: OFF_ON, options: OFF_ON,
default: 1, default: 1,
type: SettingType.DISPLAY, type: SettingType.DISPLAY,
@ -242,65 +427,101 @@ export const Setting: Array<Setting> = [
}, },
{ {
key: SettingKeys.Time_Of_Day_Animation, key: SettingKeys.Time_Of_Day_Animation,
label: "Time of Day Animation", label: i18next.t("menu:timeOfDayAnimation"),
options: ["Bounce", "Back"], options: [
{
value: "Bounce",
label: i18next.t("menu:bounce")
},
{
value: "Back",
label: i18next.t("menu:back")
}
],
default: 0, default: 0,
type: SettingType.DISPLAY type: SettingType.DISPLAY
}, },
{ {
key: SettingKeys.Sprite_Set, key: SettingKeys.Sprite_Set,
label: "Sprite Set", label: i18next.t("menu:spriteSet"),
options: ["Consistent", "Mixed Animated"], options: [
{
value: "Consistent",
label: i18next.t("menu:consistent")
},
{
value: "Mixed Animated",
label: i18next.t("menu:mixedAnimated")
}
],
default: 0, default: 0,
type: SettingType.DISPLAY, type: SettingType.DISPLAY,
requireReload: true requireReload: true
}, },
{ {
key: SettingKeys.Fusion_Palette_Swaps, key: SettingKeys.Fusion_Palette_Swaps,
label: "Fusion Palette Swaps", label: i18next.t("menu:fusionPaletteSwaps"),
options: OFF_ON, options: OFF_ON,
default: 1, default: 1,
type: SettingType.DISPLAY type: SettingType.DISPLAY
}, },
{ {
key: SettingKeys.Player_Gender, key: SettingKeys.Player_Gender,
label: "Player Gender", label: i18next.t("menu:playerGender"),
options: ["Boy", "Girl"], options: [
{
value: "Boy",
label: i18next.t("menu:boy")
},
{
value: "Girl",
label: i18next.t("menu:girl")
}
],
default: 0, default: 0,
type: SettingType.DISPLAY type: SettingType.DISPLAY
}, },
{ {
key: SettingKeys.Type_Hints, key: SettingKeys.Type_Hints,
label: "Type hints", label: i18next.t("menu:typeHints"),
options: OFF_ON, options: OFF_ON,
default: 0, default: 0,
type: SettingType.DISPLAY type: SettingType.DISPLAY
}, },
{ {
key: SettingKeys.Master_Volume, key: SettingKeys.Master_Volume,
label: "Master Volume", label: i18next.t("menu:masterVolume"),
options: VOLUME_OPTIONS, options: VOLUME_OPTIONS,
default: 5, default: 5,
type: SettingType.AUDIO type: SettingType.AUDIO
}, },
{ {
key: SettingKeys.BGM_Volume, key: SettingKeys.BGM_Volume,
label: "BGM Volume", label: i18next.t("menu:bgmVolume"),
options: VOLUME_OPTIONS, options: VOLUME_OPTIONS,
default: 10, default: 10,
type: SettingType.AUDIO type: SettingType.AUDIO
}, },
{ {
key: SettingKeys.SE_Volume, key: SettingKeys.SE_Volume,
label: "SE Volume", label: i18next.t("menu:seVolume"),
options: VOLUME_OPTIONS, options: VOLUME_OPTIONS,
default: 10, default: 10,
type: SettingType.AUDIO type: SettingType.AUDIO
}, },
{ {
key: SettingKeys.Music_Preference, key: SettingKeys.Music_Preference,
label: "Music Preference", label: i18next.t("menu:musicPreference"),
options: ["Consistent", "Mixed"], options: [
{
value: "Consistent",
label: i18next.t("menu:consistent")
},
{
value: "Mixed",
label: i18next.t("menu:mixed")
}
],
default: 0, default: 0,
type: SettingType.AUDIO, type: SettingType.AUDIO,
requireReload: true requireReload: true
@ -333,23 +554,23 @@ export function resetSettings(scene: BattleScene) {
*/ */
export function setSetting(scene: BattleScene, setting: string, value: integer): boolean { export function setSetting(scene: BattleScene, setting: string, value: integer): boolean {
const index: number = settingIndex(setting); const index: number = settingIndex(setting);
if ( index === -1) { if (index === -1) {
return false; return false;
} }
switch (Setting[index].key) { switch (Setting[index].key) {
case SettingKeys.Game_Speed: case SettingKeys.Game_Speed:
scene.gameSpeed = parseFloat(Setting[index].options[value].replace("x", "")); scene.gameSpeed = parseFloat(Setting[index].options[value].value.replace("x", ""));
break; break;
case SettingKeys.Master_Volume: case SettingKeys.Master_Volume:
scene.masterVolume = value ? parseInt(Setting[index].options[value]) * 0.01 : 0; scene.masterVolume = value ? parseInt(Setting[index].options[value].value) * 0.01 : 0;
scene.updateSoundVolume(); scene.updateSoundVolume();
break; break;
case SettingKeys.BGM_Volume: case SettingKeys.BGM_Volume:
scene.bgmVolume = value ? parseInt(Setting[index].options[value]) * 0.01 : 0; scene.bgmVolume = value ? parseInt(Setting[index].options[value].value) * 0.01 : 0;
scene.updateSoundVolume(); scene.updateSoundVolume();
break; break;
case SettingKeys.SE_Volume: case SettingKeys.SE_Volume:
scene.seVolume = value ? parseInt(Setting[index].options[value]) * 0.01 : 0; scene.seVolume = value ? parseInt(Setting[index].options[value].value) * 0.01 : 0;
scene.updateSoundVolume(); scene.updateSoundVolume();
break; break;
case SettingKeys.Music_Preference: case SettingKeys.Music_Preference:
@ -362,19 +583,19 @@ export function setSetting(scene: BattleScene, setting: string, value: integer):
scene.uiTheme = value; scene.uiTheme = value;
break; break;
case SettingKeys.Window_Type: case SettingKeys.Window_Type:
updateWindowType(scene, parseInt(Setting[index].options[value])); updateWindowType(scene, parseInt(Setting[index].options[value].value));
break; break;
case SettingKeys.Tutorials: case SettingKeys.Tutorials:
scene.enableTutorials = Setting[index].options[value] === "On"; scene.enableTutorials = Setting[index].options[value].value === "On";
break; break;
case SettingKeys.Move_Info: case SettingKeys.Move_Info:
scene.enableMoveInfo = Setting[index].options[value] === "On"; scene.enableMoveInfo = Setting[index].options[value].value === "On";
break; break;
case SettingKeys.Enable_Retries: case SettingKeys.Enable_Retries:
scene.enableRetries = Setting[index].options[value] === "On"; scene.enableRetries = Setting[index].options[value].value === "On";
break; break;
case SettingKeys.Skip_Seen_Dialogues: case SettingKeys.Skip_Seen_Dialogues:
scene.skipSeenDialogues = Setting[index].options[value] === "On"; scene.skipSeenDialogues = Setting[index].options[value].value === "On";
break; break;
case SettingKeys.Battle_Style: case SettingKeys.Battle_Style:
scene.battleStyle = value; scene.battleStyle = value;
@ -390,7 +611,7 @@ export function setSetting(scene: BattleScene, setting: string, value: integer):
case SettingKeys.Candy_Upgrade_Display: case SettingKeys.Candy_Upgrade_Display:
scene.candyUpgradeDisplay = value; scene.candyUpgradeDisplay = value;
case SettingKeys.Money_Format: case SettingKeys.Money_Format:
switch (Setting[index].options[value]) { switch (Setting[index].options[value].value) {
case "Normal": case "Normal":
scene.moneyFormat = MoneyFormat.NORMAL; scene.moneyFormat = MoneyFormat.NORMAL;
break; break;
@ -407,22 +628,22 @@ export function setSetting(scene: BattleScene, setting: string, value: integer):
} }
break; break;
case SettingKeys.Move_Animations: case SettingKeys.Move_Animations:
scene.moveAnimations = Setting[index].options[value] === "On"; scene.moveAnimations = Setting[index].options[value].value === "On";
break; break;
case SettingKeys.Show_Moveset_Flyout: case SettingKeys.Show_Moveset_Flyout:
scene.showMovesetFlyout = Setting[index].options[value] === "On"; scene.showMovesetFlyout = Setting[index].options[value].value === "On";
break; break;
case SettingKeys.Show_Arena_Flyout: case SettingKeys.Show_Arena_Flyout:
scene.showArenaFlyout = Setting[index].options[value] === "On"; scene.showArenaFlyout = Setting[index].options[value].value === "On";
break; break;
case SettingKeys.Show_Time_Of_Day_Widget: case SettingKeys.Show_Time_Of_Day_Widget:
scene.showTimeOfDayWidget = Setting[index].options[value] === "On"; scene.showTimeOfDayWidget = Setting[index].options[value].value === "On";
break; break;
case SettingKeys.Time_Of_Day_Animation: case SettingKeys.Time_Of_Day_Animation:
scene.timeOfDayAnimation = Setting[index].options[value] === "Bounce" ? EaseType.BOUNCE : EaseType.BACK; scene.timeOfDayAnimation = Setting[index].options[value].value === "Bounce" ? EaseType.BOUNCE : EaseType.BACK;
break; break;
case SettingKeys.Show_Stats_on_Level_Up: case SettingKeys.Show_Stats_on_Level_Up:
scene.showLevelUpStats = Setting[index].options[value] === "On"; scene.showLevelUpStats = Setting[index].options[value].value === "On";
break; break;
case SettingKeys.EXP_Gains_Speed: case SettingKeys.EXP_Gains_Speed:
scene.expGainsSpeed = value; scene.expGainsSpeed = value;
@ -438,7 +659,7 @@ export function setSetting(scene: BattleScene, setting: string, value: integer):
break; break;
case SettingKeys.Player_Gender: case SettingKeys.Player_Gender:
if (scene.gameData) { if (scene.gameData) {
const female = Setting[index].options[value] === "Girl"; const female = Setting[index].options[value].value === "Girl";
scene.gameData.gender = female ? PlayerGender.FEMALE : PlayerGender.MALE; scene.gameData.gender = female ? PlayerGender.FEMALE : PlayerGender.MALE;
scene.trainer.setTexture(scene.trainer.texture.key.replace(female ? "m" : "f", female ? "f" : "m")); scene.trainer.setTexture(scene.trainer.texture.key.replace(female ? "m" : "f", female ? "f" : "m"));
} else { } else {
@ -446,17 +667,17 @@ export function setSetting(scene: BattleScene, setting: string, value: integer):
} }
break; break;
case SettingKeys.Touch_Controls: case SettingKeys.Touch_Controls:
scene.enableTouchControls = Setting[index].options[value] !== "Disabled" && hasTouchscreen(); scene.enableTouchControls = Setting[index].options[value].value !== "Disabled" && hasTouchscreen();
const touchControls = document.getElementById("touchControls"); const touchControls = document.getElementById("touchControls");
if (touchControls) { if (touchControls) {
touchControls.classList.toggle("visible", scene.enableTouchControls); touchControls.classList.toggle("visible", scene.enableTouchControls);
} }
break; break;
case SettingKeys.Vibration: case SettingKeys.Vibration:
scene.enableVibration = Setting[index].options[value] !== "Disabled" && hasTouchscreen(); scene.enableVibration = Setting[index].options[value].value !== "Disabled" && hasTouchscreen();
break; break;
case SettingKeys.Type_Hints: case SettingKeys.Type_Hints:
scene.typeHints = Setting[index].options[value] === "On"; scene.typeHints = Setting[index].options[value].value === "On";
break; break;
case SettingKeys.Language: case SettingKeys.Language:
if (value) { if (value) {
@ -517,7 +738,7 @@ export function setSetting(scene: BattleScene, setting: string, value: integer):
handler: () => changeLocaleHandler("ko") handler: () => changeLocaleHandler("ko")
}, },
{ {
label: "Cancel", label: i18next.t("menu:back"),
handler: () => cancelHandler() handler: () => cancelHandler()
} }
], ],

View File

@ -190,12 +190,12 @@ export class UiInputs {
buttonSpeedChange(up = true): void { buttonSpeedChange(up = true): void {
const settingGameSpeed = settingIndex(SettingKeys.Game_Speed); const settingGameSpeed = settingIndex(SettingKeys.Game_Speed);
if (up && this.scene.gameSpeed < 5) { if (up && this.scene.gameSpeed < 5) {
this.scene.gameData.saveSetting(SettingKeys.Game_Speed, Setting[settingGameSpeed].options.indexOf(`${this.scene.gameSpeed}x`) + 1); this.scene.gameData.saveSetting(SettingKeys.Game_Speed, Setting[settingGameSpeed].options.findIndex((item) => item.value === `${this.scene.gameSpeed}x`) + 1);
if (this.scene.ui?.getMode() === Mode.SETTINGS) { if (this.scene.ui?.getMode() === Mode.SETTINGS) {
(this.scene.ui.getHandler() as SettingsUiHandler).show([]); (this.scene.ui.getHandler() as SettingsUiHandler).show([]);
} }
} else if (!up && this.scene.gameSpeed > 1) { } else if (!up && this.scene.gameSpeed > 1) {
this.scene.gameData.saveSetting(SettingKeys.Game_Speed, Math.max(Setting[settingGameSpeed].options.indexOf(`${this.scene.gameSpeed}x`) - 1, 0)); this.scene.gameData.saveSetting(SettingKeys.Game_Speed, Math.max(Setting[settingGameSpeed].options.findIndex((item) => item.value === `${this.scene.gameSpeed}x`) - 1, 0));
if (this.scene.ui?.getMode() === Mode.SETTINGS) { if (this.scene.ui?.getMode() === Mode.SETTINGS) {
(this.scene.ui.getHandler() as SettingsUiHandler).show([]); (this.scene.ui.getHandler() as SettingsUiHandler).show([]);
} }

View File

@ -5,6 +5,7 @@ import {addWindow} from "../ui-theme";
import {addTextObject, TextStyle} from "../text"; import {addTextObject, TextStyle} from "../text";
import {Button} from "#enums/buttons"; import {Button} from "#enums/buttons";
import {NavigationManager} from "#app/ui/settings/navigationMenu"; import {NavigationManager} from "#app/ui/settings/navigationMenu";
import i18next from "i18next";
/** /**
* Abstract class for handling UI elements related to button bindings. * Abstract class for handling UI elements related to button bindings.
@ -78,7 +79,7 @@ export default abstract class AbstractBindingUiHandler extends UiHandler {
this.actionsContainer.add(this.actionBg); this.actionsContainer.add(this.actionBg);
// Text prompts and instructions for the user. // Text prompts and instructions for the user.
this.unlockText = addTextObject(this.scene, 0, 0, "Press a button...", TextStyle.WINDOW); this.unlockText = addTextObject(this.scene, 0, 0, i18next.t("menu:pressButton"), TextStyle.WINDOW);
this.unlockText.setOrigin(0, 0); this.unlockText.setOrigin(0, 0);
this.unlockText.setPositionRelative(this.titleBg, 36, 4); this.unlockText.setPositionRelative(this.titleBg, 36, 4);
this.optionSelectContainer.add(this.unlockText); this.optionSelectContainer.add(this.unlockText);
@ -92,7 +93,7 @@ export default abstract class AbstractBindingUiHandler extends UiHandler {
this.optionSelectBg.setOrigin(0.5); this.optionSelectBg.setOrigin(0.5);
this.optionSelectContainer.add(this.optionSelectBg); this.optionSelectContainer.add(this.optionSelectBg);
this.cancelLabel = addTextObject(this.scene, 0, 0, "Cancel", TextStyle.SETTINGS_LABEL); this.cancelLabel = addTextObject(this.scene, 0, 0, i18next.t("menu:back"), TextStyle.SETTINGS_LABEL);
this.cancelLabel.setOrigin(0, 0.5); this.cancelLabel.setOrigin(0, 0.5);
this.cancelLabel.setPositionRelative(this.actionBg, 10, this.actionBg.height / 2); this.cancelLabel.setPositionRelative(this.actionBg, 10, this.actionBg.height / 2);
this.actionsContainer.add(this.cancelLabel); this.actionsContainer.add(this.cancelLabel);

View File

@ -8,6 +8,7 @@ import {getIconWithSettingName} from "#app/configs/inputs/configHandler";
import NavigationMenu, {NavigationManager} from "#app/ui/settings/navigationMenu"; import NavigationMenu, {NavigationManager} from "#app/ui/settings/navigationMenu";
import { Device } from "#enums/devices"; import { Device } from "#enums/devices";
import { Button } from "#enums/buttons"; import { Button } from "#enums/buttons";
import i18next from "i18next";
export interface InputsIcons { export interface InputsIcons {
[key: string]: Phaser.GameObjects.Sprite; [key: string]: Phaser.GameObjects.Sprite;
@ -83,6 +84,12 @@ export default abstract class AbstractControlSettingsUiHandler extends UiHandler
return settings; return settings;
} }
private camelize(string: string): string {
return string.replace(/(?:^\w|[A-Z]|\b\w)/g, function(word, index) {
return index === 0 ? word.toLowerCase() : word.toUpperCase();
}).replace(/\s+/g, "");
}
/** /**
* Setup UI elements. * Setup UI elements.
*/ */
@ -108,7 +115,7 @@ export default abstract class AbstractControlSettingsUiHandler extends UiHandler
iconAction.setPositionRelative(this.actionsBg, this.navigationContainer.width - 32, 4); iconAction.setPositionRelative(this.actionsBg, this.navigationContainer.width - 32, 4);
this.navigationIcons["BUTTON_ACTION"] = iconAction; this.navigationIcons["BUTTON_ACTION"] = iconAction;
const actionText = addTextObject(this.scene, 0, 0, "Action", TextStyle.SETTINGS_LABEL); const actionText = addTextObject(this.scene, 0, 0, i18next.t("menu:action"), TextStyle.SETTINGS_LABEL);
actionText.setOrigin(0, 0.15); actionText.setOrigin(0, 0.15);
actionText.setPositionRelative(iconAction, -actionText.width/6-2, 0); actionText.setPositionRelative(iconAction, -actionText.width/6-2, 0);
@ -117,7 +124,7 @@ export default abstract class AbstractControlSettingsUiHandler extends UiHandler
iconCancel.setPositionRelative(this.actionsBg, this.navigationContainer.width - 100, 4); iconCancel.setPositionRelative(this.actionsBg, this.navigationContainer.width - 100, 4);
this.navigationIcons["BUTTON_CANCEL"] = iconCancel; this.navigationIcons["BUTTON_CANCEL"] = iconCancel;
const cancelText = addTextObject(this.scene, 0, 0, "Cancel", TextStyle.SETTINGS_LABEL); const cancelText = addTextObject(this.scene, 0, 0, i18next.t("menu:back"), TextStyle.SETTINGS_LABEL);
cancelText.setOrigin(0, 0.15); cancelText.setOrigin(0, 0.15);
cancelText.setPositionRelative(iconCancel, -cancelText.width/6-2, 0); cancelText.setPositionRelative(iconCancel, -cancelText.width/6-2, 0);
@ -126,7 +133,7 @@ export default abstract class AbstractControlSettingsUiHandler extends UiHandler
iconReset.setPositionRelative(this.actionsBg, this.navigationContainer.width - 180, 4); iconReset.setPositionRelative(this.actionsBg, this.navigationContainer.width - 180, 4);
this.navigationIcons["BUTTON_HOME"] = iconReset; this.navigationIcons["BUTTON_HOME"] = iconReset;
const resetText = addTextObject(this.scene, 0, 0, "Reset all", TextStyle.SETTINGS_LABEL); const resetText = addTextObject(this.scene, 0, 0, i18next.t("menu:reset"), TextStyle.SETTINGS_LABEL);
resetText.setOrigin(0, 0.15); resetText.setOrigin(0, 0.15);
resetText.setPositionRelative(iconReset, -resetText.width/6-2, 0); resetText.setPositionRelative(iconReset, -resetText.width/6-2, 0);
@ -178,7 +185,7 @@ export default abstract class AbstractControlSettingsUiHandler extends UiHandler
// Create and add a text object for the setting name to the scene. // Create and add a text object for the setting name to the scene.
const isLock = this.settingBlacklisted.includes(this.setting[setting]); const isLock = this.settingBlacklisted.includes(this.setting[setting]);
const labelStyle = isLock ? TextStyle.SETTINGS_LOCKED : TextStyle.SETTINGS_LABEL; const labelStyle = isLock ? TextStyle.SETTINGS_LOCKED : TextStyle.SETTINGS_LABEL;
settingLabels[s] = addTextObject(this.scene, 8, 28 + s * 16, settingName, labelStyle); settingLabels[s] = addTextObject(this.scene, 8, 28 + s * 16, i18next.t(`menu:${this.camelize(settingName)}`), labelStyle);
settingLabels[s].setOrigin(0, 0); settingLabels[s].setOrigin(0, 0);
optionsContainer.add(settingLabels[s]); optionsContainer.add(settingLabels[s]);

View File

@ -8,6 +8,7 @@ import {Button} from "#enums/buttons";
import {InputsIcons} from "#app/ui/settings/abstract-control-settings-ui-handler.js"; import {InputsIcons} from "#app/ui/settings/abstract-control-settings-ui-handler.js";
import NavigationMenu, {NavigationManager} from "#app/ui/settings/navigationMenu"; import NavigationMenu, {NavigationManager} from "#app/ui/settings/navigationMenu";
import { Setting, SettingKeys } from "#app/system/settings/settings"; import { Setting, SettingKeys } from "#app/system/settings/settings";
import i18next from "i18next";
/** /**
@ -71,7 +72,7 @@ export default class AbstractSettingsUiHandler extends UiHandler {
iconAction.setPositionRelative(actionsBg, this.navigationContainer.width - 32, 4); iconAction.setPositionRelative(actionsBg, this.navigationContainer.width - 32, 4);
this.navigationIcons["BUTTON_ACTION"] = iconAction; this.navigationIcons["BUTTON_ACTION"] = iconAction;
const actionText = addTextObject(this.scene, 0, 0, "Action", TextStyle.SETTINGS_LABEL); const actionText = addTextObject(this.scene, 0, 0, i18next.t("menu:action"), TextStyle.SETTINGS_LABEL);
actionText.setOrigin(0, 0.15); actionText.setOrigin(0, 0.15);
actionText.setPositionRelative(iconAction, -actionText.width/6-2, 0); actionText.setPositionRelative(iconAction, -actionText.width/6-2, 0);
@ -80,7 +81,7 @@ export default class AbstractSettingsUiHandler extends UiHandler {
iconCancel.setPositionRelative(actionsBg, this.navigationContainer.width - 100, 4); iconCancel.setPositionRelative(actionsBg, this.navigationContainer.width - 100, 4);
this.navigationIcons["BUTTON_CANCEL"] = iconCancel; this.navigationIcons["BUTTON_CANCEL"] = iconCancel;
const cancelText = addTextObject(this.scene, 0, 0, "Cancel", TextStyle.SETTINGS_LABEL); const cancelText = addTextObject(this.scene, 0, 0, i18next.t("menu:back"), TextStyle.SETTINGS_LABEL);
cancelText.setOrigin(0, 0.15); cancelText.setOrigin(0, 0.15);
cancelText.setPositionRelative(iconCancel, -cancelText.width/6-2, 0); cancelText.setPositionRelative(iconCancel, -cancelText.width/6-2, 0);
@ -95,7 +96,7 @@ export default class AbstractSettingsUiHandler extends UiHandler {
.forEach((setting, s) => { .forEach((setting, s) => {
let settingName = setting.label; let settingName = setting.label;
if (setting?.requireReload) { if (setting?.requireReload) {
settingName += " (Requires Reload)"; settingName += ` (${i18next.t("menu:requireReload")})`;
} }
this.settingLabels[s] = addTextObject(this.scene, 8, 28 + s * 16, settingName, TextStyle.SETTINGS_LABEL); this.settingLabels[s] = addTextObject(this.scene, 8, 28 + s * 16, settingName, TextStyle.SETTINGS_LABEL);
@ -103,7 +104,7 @@ export default class AbstractSettingsUiHandler extends UiHandler {
this.optionsContainer.add(this.settingLabels[s]); this.optionsContainer.add(this.settingLabels[s]);
this.optionValueLabels.push(setting.options.map((option, o) => { this.optionValueLabels.push(setting.options.map((option, o) => {
const valueLabel = addTextObject(this.scene, 0, 0, option, setting.default === o ? TextStyle.SETTINGS_SELECTED : TextStyle.WINDOW); const valueLabel = addTextObject(this.scene, 0, 0, option.label, setting.default === o ? TextStyle.SETTINGS_SELECTED : TextStyle.WINDOW);
valueLabel.setOrigin(0, 0); valueLabel.setOrigin(0, 0);
this.optionsContainer.add(valueLabel); this.optionsContainer.add(valueLabel);

View File

@ -4,6 +4,7 @@ import {InputsIcons} from "#app/ui/settings/abstract-control-settings-ui-handler
import {addTextObject, setTextStyle, TextStyle} from "#app/ui/text"; import {addTextObject, setTextStyle, TextStyle} from "#app/ui/text";
import {addWindow} from "#app/ui/ui-theme"; import {addWindow} from "#app/ui/ui-theme";
import {Button} from "#enums/buttons"; import {Button} from "#enums/buttons";
import i18next from "i18next";
const LEFT = "LEFT"; const LEFT = "LEFT";
const RIGHT = "RIGHT"; const RIGHT = "RIGHT";
@ -32,7 +33,7 @@ export class NavigationManager {
Mode.SETTINGS_GAMEPAD, Mode.SETTINGS_GAMEPAD,
Mode.SETTINGS_KEYBOARD, Mode.SETTINGS_KEYBOARD,
]; ];
this.labels = ["General", "Display", "Audio", "Gamepad", "Keyboard"]; this.labels = [i18next.t("menu:general"), i18next.t("menu:display"), i18next.t("menu:audio"), i18next.t("menu:gamepad"), i18next.t("menu:keyboard")];
} }
public reset() { public reset() {

View File

@ -25,34 +25,64 @@ export default class SettingsDisplayUiHandler extends AbstractSettingsUiHandler
const currentLocale = localStorage.getItem("prLang"); const currentLocale = localStorage.getItem("prLang");
switch (currentLocale) { switch (currentLocale) {
case "en": case "en":
this.settings[languageIndex].options[0] = "English"; this.settings[languageIndex].options[0] = {
value: "English",
label: "English",
};
break; break;
case "es": case "es":
this.settings[languageIndex].options[0] = "Español"; this.settings[languageIndex].options[0] = {
value: "Español",
label: "Español",
};
break; break;
case "it": case "it":
this.settings[languageIndex].options[0] = "Italiano"; this.settings[languageIndex].options[0] = {
value: "Italiano",
label: "Italiano",
};
break; break;
case "fr": case "fr":
this.settings[languageIndex].options[0] = "Français"; this.settings[languageIndex].options[0] = {
value: "Français",
label: "Français",
};
break; break;
case "de": case "de":
this.settings[languageIndex].options[0] = "Deutsch"; this.settings[languageIndex].options[0] = {
value: "Deutsch",
label: "Deutsch",
};
break; break;
case "pt-BR": case "pt-BR":
this.settings[languageIndex].options[0] = "Português (BR)"; this.settings[languageIndex].options[0] = {
value: "Português (BR)",
label: "Português (BR)",
};
break; break;
case "zh-CN": case "zh-CN":
this.settings[languageIndex].options[0] = "简体中文"; this.settings[languageIndex].options[0] = {
value: "简体中文",
label: "简体中文",
};
break; break;
case "zh-TW": case "zh-TW":
this.settings[languageIndex].options[0] = "繁體中文"; this.settings[languageIndex].options[0] = {
value: "繁體中文",
label: "繁體中文",
};
break; break;
case "ko": case "ko":
this.settings[languageIndex].options[0] = "한국어"; this.settings[languageIndex].options[0] = {
value: "한국어",
label: "한국어",
};
break; break;
default: default:
this.settings[languageIndex].options[0] = "English"; this.settings[languageIndex].options[0] = {
value: "English",
label: "English",
};
break; break;
} }
} }

View File

@ -15,6 +15,7 @@ import {InterfaceConfig} from "#app/inputs-controller";
import AbstractControlSettingsUiHandler from "#app/ui/settings/abstract-control-settings-ui-handler.js"; import AbstractControlSettingsUiHandler from "#app/ui/settings/abstract-control-settings-ui-handler.js";
import {Device} from "#enums/devices"; import {Device} from "#enums/devices";
import {truncateString} from "#app/utils"; import {truncateString} from "#app/utils";
import i18next from "i18next";
/** /**
* Class representing the settings UI handler for gamepads. * Class representing the settings UI handler for gamepads.
@ -54,7 +55,7 @@ export default class SettingsGamepadUiHandler extends AbstractControlSettingsUiH
this.layout["noGamepads"] = new Map(); this.layout["noGamepads"] = new Map();
const optionsContainer = this.scene.add.container(0, 0); const optionsContainer = this.scene.add.container(0, 0);
optionsContainer.setVisible(false); // Initially hide the container as no gamepads are connected. optionsContainer.setVisible(false); // Initially hide the container as no gamepads are connected.
const label = addTextObject(this.scene, 8, 28, "Please plug a controller or press a button", TextStyle.SETTINGS_LABEL); const label = addTextObject(this.scene, 8, 28, i18next.t("menu:gamepadPleasePlug"), TextStyle.SETTINGS_LABEL);
label.setOrigin(0, 0); label.setOrigin(0, 0);
optionsContainer.add(label); optionsContainer.add(label);
this.settingsContainer.add(optionsContainer); this.settingsContainer.add(optionsContainer);

View File

@ -15,6 +15,7 @@ import {addTextObject, TextStyle} from "#app/ui/text";
import {deleteBind} from "#app/configs/inputs/configHandler"; import {deleteBind} from "#app/configs/inputs/configHandler";
import {Device} from "#enums/devices"; import {Device} from "#enums/devices";
import {NavigationManager} from "#app/ui/settings/navigationMenu"; import {NavigationManager} from "#app/ui/settings/navigationMenu";
import i18next from "i18next";
/** /**
* Class representing the settings UI handler for keyboards. * Class representing the settings UI handler for keyboards.
@ -58,7 +59,7 @@ export default class SettingsKeyboardUiHandler extends AbstractControlSettingsUi
this.layout["noKeyboard"] = new Map(); this.layout["noKeyboard"] = new Map();
const optionsContainer = this.scene.add.container(0, 0); const optionsContainer = this.scene.add.container(0, 0);
optionsContainer.setVisible(false); // Initially hide the container as no gamepads are connected. optionsContainer.setVisible(false); // Initially hide the container as no gamepads are connected.
const label = addTextObject(this.scene, 8, 28, "Please press a key on your keyboard", TextStyle.SETTINGS_LABEL); const label = addTextObject(this.scene, 8, 28, i18next.t("menu:keyboardPleasePress"), TextStyle.SETTINGS_LABEL);
label.setOrigin(0, 0); label.setOrigin(0, 0);
optionsContainer.add(label); optionsContainer.add(label);
this.settingsContainer.add(optionsContainer); this.settingsContainer.add(optionsContainer);
@ -68,7 +69,7 @@ export default class SettingsKeyboardUiHandler extends AbstractControlSettingsUi
iconDelete.setPositionRelative(this.actionsBg, this.navigationContainer.width - 260, 4); iconDelete.setPositionRelative(this.actionsBg, this.navigationContainer.width - 260, 4);
this.navigationIcons["BUTTON_DELETE"] = iconDelete; this.navigationIcons["BUTTON_DELETE"] = iconDelete;
const deleteText = addTextObject(this.scene, 0, 0, "Delete", TextStyle.SETTINGS_LABEL); const deleteText = addTextObject(this.scene, 0, 0, i18next.t("menu:delete"), TextStyle.SETTINGS_LABEL);
deleteText.setOrigin(0, 0.15); deleteText.setOrigin(0, 0.15);
deleteText.setPositionRelative(iconDelete, -deleteText.width/6-2, 0); deleteText.setPositionRelative(iconDelete, -deleteText.width/6-2, 0);