mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-16 23:05:23 +01:00
* Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Update mysterious-chest-dialogue.json * Update mysterious-chest-dialogue.json * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Update i18n.ts * Update settings.ts * Update settings-display-ui-handler.ts * Update starter-select-ui-handler.ts * Update i18n.ts * Update i18n.ts * Update settings.ts * Update settings-display-ui-handler.ts * Update i18n.ts * Update starter-select-ui-handler.ts * Update utils.ts * Update utils.ts * Add files via upload * Rename statuses_dk.json to statuses_da.json * Update statuses_da.json * Update and rename types_dk.json to types_da.json * Rename statuses_dk.png to statuses_da.png * Rename types_dk.png to types_da.png * Delete src/locales/dk directory * Add files via upload * Apply suggestions from code review * Delete src/locales/da directory * Delete src/locales/tr directory * Update i18n.ts * Update i18n.ts * Update utils.ts * Main -> Beta (1.1.6) (#4751) * Comment out startGame call on manifest fetch failure * [Hotfix] Fix status damage triggering before berry usage (#4732) * [Hotfix] Fix Eternatus egg tier (#4734) * [Hotfix] Fix manifest getting loaded before the game is initialized (#4739) * fix locales path for offline builds (#4739) * [Sprite] Hotfix cut off Binacle sprite (#4741) * [Sprite][hotfix] Fixed cropping on 658 static greninja and ash greninja (#4743) * [Sprite][hotfix] Fixed cropping on static greninja and ash greninja * [Hotfix] Fix crash when Mist would block a stat drop (#4746) --------- Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com> Co-authored-by: chaosgrimmon <31082757+chaosgrimmon@users.noreply.github.com> Co-authored-by: pom-eranian <lrlrliwoo@gmail.com> * Update settings-display-ui-handler.ts * Delete src/utils.ts * Update common.ts * Delete src/utils.ts * Update common.ts * Romanian workspace (#25) * Russian workspace (#26) * Update settings-display-ui-handler.ts * Update settings-display-ui-handler.ts * Update settings.ts * Update settings-display-ui-handler.ts * Update i18n.ts * Update settings.ts * Update settings-display-ui-handler.ts * Update common.ts * Update and rename statuses_ca-ES.json to statuses_ca.json * Update and rename types_ca-ES.json to types_ca.json * Add files via upload * Delete public/images/statuses_ca-ES.png * Delete public/images/types_ca-ES.png * Update locales submodule --------- Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com> Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt> Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com> Co-authored-by: chaosgrimmon <31082757+chaosgrimmon@users.noreply.github.com> Co-authored-by: pom-eranian <lrlrliwoo@gmail.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
133 lines
3.8 KiB
TypeScript
133 lines
3.8 KiB
TypeScript
import type { UiMode } from "#enums/ui-mode";
|
|
import AbstractSettingsUiHandler from "./abstract-settings-ui-handler";
|
|
import { SettingKeys, SettingType } from "#app/system/settings/settings";
|
|
("#app/inputs-controller");
|
|
|
|
export default class SettingsDisplayUiHandler extends AbstractSettingsUiHandler {
|
|
/**
|
|
* Creates an instance of SettingsGamepadUiHandler.
|
|
*
|
|
* @param mode - The UI mode, optional.
|
|
*/
|
|
constructor(mode: UiMode | null = null) {
|
|
super(SettingType.DISPLAY, mode);
|
|
this.title = "Display";
|
|
|
|
/**
|
|
* Update to current language from default value.
|
|
* - default value is 'English'
|
|
*/
|
|
const languageIndex = this.settings.findIndex(s => s.key === SettingKeys.Language);
|
|
if (languageIndex >= 0) {
|
|
const currentLocale = localStorage.getItem("prLang");
|
|
switch (currentLocale) {
|
|
case "en":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "English",
|
|
label: "English",
|
|
};
|
|
break;
|
|
case "es-ES":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "Español (ES)",
|
|
label: "Español (ES)",
|
|
};
|
|
break;
|
|
case "es-MX":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "Español (LATAM)",
|
|
label: "Español (LATAM)",
|
|
};
|
|
break;
|
|
case "fr":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "Français",
|
|
label: "Français",
|
|
};
|
|
break;
|
|
case "de":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "Deutsch",
|
|
label: "Deutsch",
|
|
};
|
|
break;
|
|
case "it":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "Italiano",
|
|
label: "Italiano",
|
|
};
|
|
break;
|
|
case "pt-BR":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "Português (BR)",
|
|
label: "Português (BR)",
|
|
};
|
|
break;
|
|
case "ko":
|
|
case "ko-KR":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "한국어",
|
|
label: "한국어",
|
|
};
|
|
break;
|
|
case "ja":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "日本語",
|
|
label: "日本語",
|
|
};
|
|
break;
|
|
case "zh-CN":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "简体中文",
|
|
label: "简体中文",
|
|
};
|
|
break;
|
|
case "zh-TW":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "繁體中文",
|
|
label: "繁體中文",
|
|
};
|
|
break;
|
|
case "ca":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "Català",
|
|
label: "Català (Needs Help)",
|
|
};
|
|
break;
|
|
case "tr":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "Türkçe",
|
|
label: "Türkçe (Needs Help)",
|
|
};
|
|
break;
|
|
case "ru":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "Русский",
|
|
label: "Русский (Needs Help)",
|
|
};
|
|
break;
|
|
case "da":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "Dansk",
|
|
label: "Dansk (Needs Help)",
|
|
};
|
|
break;
|
|
case "ro":
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "Română",
|
|
label: "Română (Needs Help)",
|
|
};
|
|
break;
|
|
default:
|
|
this.settings[languageIndex].options[0] = {
|
|
value: "English",
|
|
label: "English",
|
|
};
|
|
break;
|
|
}
|
|
}
|
|
|
|
this.localStorageKey = "settings";
|
|
}
|
|
}
|