Added Chinese + modded language options

This commit is contained in:
mrdude2478 2022-04-28 00:04:16 +01:00
parent 78cc891c97
commit a04cc1c0e2
9 changed files with 37 additions and 77 deletions

View File

@ -197,7 +197,7 @@
},
"credits": {
"title": "Vielen Dank an die folgenden Leute!",
"desc": "TinWoo - MrDude\nTinleaf - BlaWar\nAwoo Installer - Huntereb\nHard Drive Support - DarkMatterCore\n\n\nhttps://github.com/Huntereb/Awoo-Installer\nhttps://github.com/blawar/tinleaf\nhttps://github.com/DarkMatterCore/libusbhsfs\n\nThanks for testing - LyuboA"
"desc": "TinWoo - MrDude\nXorTroll - Plutonium\nTinleaf - BlaWar\nAwoo Installer - Huntereb\nHard Drive Support - DarkMatterCore\n\n\nhttps://github.com/Huntereb/Awoo-Installer\nhttps://github.com/blawar/tinleaf\nhttps://github.com/DarkMatterCore/libusbhsfs\n\nThanks for testing - LyuboA"
},
"language": {
"title": "Wähle TinWoo Installer Sprache",

View File

@ -197,7 +197,7 @@
},
"credits": {
"title": "Thanks to the following!",
"desc": "TinWoo - MrDude\nTinleaf - BlaWar\nAwoo Installer - Huntereb\nHard Drive Support - DarkMatterCore\n\n\nhttps://github.com/Huntereb/Awoo-Installer\nhttps://github.com/blawar/tinleaf\nhttps://github.com/DarkMatterCore/libusbhsfs\n\nThanks for testing - LyuboA"
"desc": "TinWoo - MrDude\nXorTroll - Plutonium\nTinleaf - BlaWar\nAwoo Installer - Huntereb\nHard Drive Support - DarkMatterCore\n\n\nhttps://github.com/Huntereb/Awoo-Installer\nhttps://github.com/blawar/tinleaf\nhttps://github.com/DarkMatterCore/libusbhsfs\n\nThanks for testing - LyuboA"
},
"language": {
"title": "Select TinWoo Installer's language",

View File

@ -197,7 +197,7 @@
},
"credits": {
"title": "Merci aux personnes suivantes !",
"desc": "TinWoo - MrDude\nTinleaf - BlaWar\nAwoo Installer - Huntereb\nHard Drive Support - DarkMatterCore\n\n\nhttps://github.com/Huntereb/Awoo-Installer\nhttps://github.com/blawar/tinleaf\nhttps://github.com/DarkMatterCore/libusbhsfs\n\nThanks for testing - LyuboA"
"desc": "TinWoo - MrDude\nXorTroll - Plutonium\nTinleaf - BlaWar\nAwoo Installer - Huntereb\nHard Drive Support - DarkMatterCore\n\n\nhttps://github.com/Huntereb/Awoo-Installer\nhttps://github.com/blawar/tinleaf\nhttps://github.com/DarkMatterCore/libusbhsfs\n\nThanks for testing - LyuboA"
},
"language": {
"title": "Sélectionnez la langue de TinWoo Installer",

View File

@ -197,7 +197,7 @@
},
"credits": {
"title": "Un ringraziamento alle seguenti persone!",
"desc": "TinWoo - MrDude\nTinleaf - BlaWar\nAwoo Installer - Huntereb\nHard Drive Support - DarkMatterCore\n\n\nhttps://github.com/Huntereb/Awoo-Installer\nhttps://github.com/blawar/tinleaf\nhttps://github.com/DarkMatterCore/libusbhsfs\n\nThanks for testing - LyuboA"
"desc": "TinWoo - MrDude\nXorTroll - Plutonium\nTinleaf - BlaWar\nAwoo Installer - Huntereb\nHard Drive Support - DarkMatterCore\n\n\nhttps://github.com/Huntereb/Awoo-Installer\nhttps://github.com/blawar/tinleaf\nhttps://github.com/DarkMatterCore/libusbhsfs\n\nThanks for testing - LyuboA"
},
"language": {
"title": "Seleziona la lingua di TinWoo Installer",

View File

@ -197,7 +197,7 @@
},
"credits": {
"title": "以下の方々に感謝します!",
"desc": "TinWoo - MrDude\nTinleaf - BlaWar\nAwoo Installer - Huntereb\nHard Drive Support - DarkMatterCore\n\n\nhttps://github.com/Huntereb/Awoo-Installer\nhttps://github.com/blawar/tinleaf\nhttps://github.com/DarkMatterCore/libusbhsfs\n\nThanks for testing - LyuboA"
"desc": "TinWoo - MrDude\nXorTroll - Plutonium\nTinleaf - BlaWar\nAwoo Installer - Huntereb\nHard Drive Support - DarkMatterCore\n\n\nhttps://github.com/Huntereb/Awoo-Installer\nhttps://github.com/blawar/tinleaf\nhttps://github.com/DarkMatterCore/libusbhsfs\n\nThanks for testing - LyuboA"
},
"language": {
"title": "TinWoo Installerの言語を選択",

View File

@ -197,7 +197,7 @@
},
"credits": {
"title": "Выражаем благодарность следующим людям:",
"desc": "TinWoo - MrDude\nTinleaf - BlaWar\nAwoo Installer - Huntereb\nHard Drive Support - DarkMatterCore\n\n\nhttps://github.com/Huntereb/Awoo-Installer\nhttps://github.com/blawar/tinleaf\nhttps://github.com/DarkMatterCore/libusbhsfs\n\nThanks for testing - LyuboA"
"desc": "TinWoo - MrDude\nXorTroll - Plutonium\nTinleaf - BlaWar\nAwoo Installer - Huntereb\nHard Drive Support - DarkMatterCore\n\n\nhttps://github.com/Huntereb/Awoo-Installer\nhttps://github.com/blawar/tinleaf\nhttps://github.com/DarkMatterCore/libusbhsfs\n\nThanks for testing - LyuboA"
},
"language": {
"title": "Выбор языка",

View File

@ -265,7 +265,8 @@ namespace inst::ui {
}
if (Down & HidNpadButton_A) {
switch (this->optionMenu->GetSelectedIndex()) {
int menuindex = this->optionMenu->GetSelectedIndex();
switch (menuindex) {
case 0:
this->installMenuItem_Click();
break;

View File

@ -18,7 +18,7 @@
namespace inst::ui {
extern MainApplication *mainApp;
std::vector<std::string> languageStrings = {"English", "日本語", "Français", "Deutsch", "Italiano", "Русский"};
std::vector<std::string> languageStrings = {"En", "Jpn", "Fr", "De", "It", "Ru", "Zh"};
optionsPage::optionsPage() : Layout::Layout() {
this->infoRect = Rectangle::New(0, 95, 1280, 60, COLOR("#00000080"));
@ -88,24 +88,10 @@ namespace inst::ui {
}
std::string optionsPage::getMenuLanguage(int ourLangCode) {
switch (ourLangCode) {
case 1:
case 12:
return languageStrings[0];
case 0:
return languageStrings[1];
case 2:
case 13:
return languageStrings[2];
case 3:
return languageStrings[3];
case 4:
return languageStrings[4];
case 10:
return languageStrings[5];
default:
return "options.language.system_language"_lang;
}
if (ourLangCode >= 0) return languageStrings[ourLangCode];
else {
return "options.language.system_language"_lang;
}
}
void sigPatchesMenuItem_Click() {
@ -113,7 +99,6 @@ namespace inst::ui {
}
void thememessage() {
//inst::ui::mainApp->CreateShowDialog("main.theme.title"_lang, "main.theme.desc"_lang, {"common.ok"_lang}, true);
int ourResult = inst::ui::mainApp->CreateShowDialog("main.theme.title"_lang, "main.theme.desc"_lang, {"common.ok"_lang, "common.cancel"_lang}, true);
if (ourResult != 0) {
//
@ -185,12 +170,15 @@ namespace inst::ui {
int rc;
std::vector<std::string> downloadUrl;
std::vector<std::string> languageList;
switch (this->menu->GetSelectedIndex()) {
case 0:
int index = this->menu->GetSelectedIndex();
switch (index) {
case 0:
inst::config::ignoreReqVers = !inst::config::ignoreReqVers;
inst::config::setConfig();
this->setMenuText();
this->menu->SetSelectedIndex(0);
//makes sure to jump back to the selected item once the menu is reloaded
this->menu->SetSelectedIndex(index);
//
break;
case 1:
if (inst::config::validateNCAs) {
@ -198,25 +186,25 @@ namespace inst::ui {
} else inst::config::validateNCAs = true;
inst::config::setConfig();
this->setMenuText();
this->menu->SetSelectedIndex(1);
this->menu->SetSelectedIndex(index);
break;
case 2:
inst::config::overClock = !inst::config::overClock;
inst::config::setConfig();
this->setMenuText();
this->menu->SetSelectedIndex(2);
this->menu->SetSelectedIndex(index);
break;
case 3:
inst::config::deletePrompt = !inst::config::deletePrompt;
inst::config::setConfig();
this->setMenuText();
this->menu->SetSelectedIndex(3);
this->menu->SetSelectedIndex(index);
break;
case 4:
inst::config::autoUpdate = !inst::config::autoUpdate;
inst::config::setConfig();
this->setMenuText();
this->menu->SetSelectedIndex(4);
this->menu->SetSelectedIndex(index);
break;
case 5:
if (inst::config::gayMode) {
@ -229,7 +217,7 @@ namespace inst::ui {
mainApp->mainPage->awooImage->SetVisible(true);
}
this->setMenuText();
this->menu->SetSelectedIndex(5);
this->menu->SetSelectedIndex(index);
thememessage();
inst::config::setConfig();
break;
@ -242,7 +230,7 @@ namespace inst::ui {
inst::config::useSound = true;
}
this->setMenuText();
this->menu->SetSelectedIndex(6);
this->menu->SetSelectedIndex(index);
inst::config::setConfig();
break;
@ -255,7 +243,7 @@ namespace inst::ui {
inst::config::sigPatchesUrl = keyboardResult;
inst::config::setConfig();
this->setMenuText();
this->menu->SetSelectedIndex(8);
this->menu->SetSelectedIndex(index);
}
break;
case 9:
@ -263,28 +251,13 @@ namespace inst::ui {
languageList.push_back("options.language.system_language"_lang);
rc = inst::ui::mainApp->CreateShowDialog("options.language.title"_lang, "options.language.desc"_lang, languageList, false);
if (rc == -1) break;
switch(rc) {
case 0:
inst::config::languageSetting = 1;
break;
case 1:
inst::config::languageSetting = 0;
break;
case 2:
inst::config::languageSetting = 2;
break;
case 3:
inst::config::languageSetting = 3;
break;
case 4:
inst::config::languageSetting = 4;
break;
case 5:
inst::config::languageSetting = 10;
break;
default:
inst::config::languageSetting = 99;
if (rc < 99) {
inst::config::languageSetting = (rc);
}
else {
inst::config::languageSetting = 99;
}
inst::config::setConfig();
mainApp->FadeOut();
mainApp->Close();

View File

@ -22,10 +22,12 @@ namespace Language {
}
switch (langInt) {
case 0:
languagePath = "romfs:/lang/en.json";
break;
case 1:
languagePath = "romfs:/lang/jp.json";
break;
case 2:
case 13:
languagePath = "romfs:/lang/fr.json";
break;
case 3:
@ -35,26 +37,10 @@ namespace Language {
languagePath = "romfs:/lang/it.json";
break;
case 5:
case 14:
languagePath = "romfs:/lang/es.json";
break;
case 6:
languagePath = "romfs:/lang/zh-CN.json";
break;
case 7:
languagePath = "romfs:/lang/ko.json";
break;
case 8:
languagePath = "romfs:/lang/nl.json";
break;
case 9:
languagePath = "romfs:/lang/pt.json";
break;
case 10:
languagePath = "romfs:/lang/ru.json";
break;
case 11:
languagePath = "romfs:/lang/zh-TW.json";
case 6:
languagePath = "romfs:/lang/zh-rTW.json";
break;
default:
languagePath = "romfs:/lang/en.json";