mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-03-21 17:24:37 -05:00
adjust translations in UI
1. Remove error message translations. 2. Using format string in json file instead of using C++ strings. 3. More accurate naming for translation entries 4. Added the initial strings for newly added translation items in json.
This commit is contained in:
parent
37e8f10aa8
commit
18cb1e0742
|
|
@ -13,8 +13,8 @@ saveTypeMainMenu = 2, "Cache"
|
|||
saveTypeMainMenu = 3, "System"
|
||||
saveTypeMainMenu = 4, "System BCAT"
|
||||
saveTypeMainMenu = 5, "SysTemp Storagetem"
|
||||
settingsMainMenu = 0, "Settings"
|
||||
extrasMainMenu = 0, "Extras"
|
||||
mainMenuSettings = 0, "Settings"
|
||||
mainMenuExtras = 0, "Extras"
|
||||
translationMainPage = 0, "Translation: "
|
||||
loadingStartPage = 0, "Loading..."
|
||||
|
||||
|
|
@ -37,19 +37,16 @@ infoStatus = 6, "Current Title: "
|
|||
infoStatus = 7, "Safe Title: "
|
||||
infoStatus = 8, "Sort Type: "
|
||||
infoStatus = 9, "Saving the file master..."
|
||||
infoStatus = 10, "Error committing file to device -> 0x%X\n"
|
||||
infoStatus = 11, "Deleting..."
|
||||
infoStatus = 12, "SaveCreate Failed -> "
|
||||
infoStatus = 14, "Trash emptied."
|
||||
infoStatus = 10, "Deleting..."
|
||||
infoStatus = 11, "Trash emptied."
|
||||
|
||||
newSafeTitle = 0, "Input New Output Folder"
|
||||
expandSize = 0, "Enter New Size in MB"
|
||||
expandSizeFailed = 0, "Extend Failed: %uMB to %uMB -> %X\n"
|
||||
newFolderPopFldMenu = 0, "New Folder"
|
||||
newFolderCopyMenu = 0, "New"
|
||||
swkbdNewSafeTitle = 0, "Input New Output Folder"
|
||||
swkbdExpandSize = 0, "Enter New Size in MB"
|
||||
folderMenuNew = 0, "New Folder"
|
||||
fileModeMenuMkDir = 0, "New"
|
||||
|
||||
changeToPopStatus = 0, "changed to"
|
||||
tmpEmptyPopStatus = 0, "contains illegal or non-ASCII characters."
|
||||
popChangeOutputFolder = 0, "#%s# changed to #%s#"
|
||||
popChangeOutputError = 0, "#%s# contains illegal or non-ASCII characters."
|
||||
|
||||
#If author is not "NULL", your name will be displayed in the UI
|
||||
author = 0, "NULL"
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ saveTypeMainMenu = 2, "缓存"
|
|||
saveTypeMainMenu = 3, "系统"
|
||||
saveTypeMainMenu = 4, "系统BCAT"
|
||||
saveTypeMainMenu = 5, "临时"
|
||||
settingsMainMenu = 0, "系统设置"
|
||||
extrasMainMenu = 0, "附加功能"
|
||||
mainMenuSettings = 0, "系统设置"
|
||||
mainMenuExtras = 0, "附加功能"
|
||||
translationMainPage = 0, "翻译:"
|
||||
loadingStartPage = 0, "加载中..."
|
||||
|
||||
|
|
@ -37,19 +37,16 @@ infoStatus = 6, "当前Title:"
|
|||
infoStatus = 7, "安全Title:"
|
||||
infoStatus = 8, "排序类型:"
|
||||
infoStatus = 9, "正在文件管理器里保存..."
|
||||
infoStatus = 10, "提交文件到设备错误 -> 0x%X\n"
|
||||
infoStatus = 11, "正在删除"
|
||||
infoStatus = 12, "存档创建失败 -> "
|
||||
infoStatus = 14, "回收站已清空。"
|
||||
infoStatus = 10, "正在删除"
|
||||
infoStatus = 11, "回收站已清空。"
|
||||
|
||||
newSafeTitle = 0, "输入新的导出目录名称"
|
||||
expandSize = 0, "输入新的大小(单位MB)"
|
||||
expandSizeFailed = 0, "大小扩展失败:%uMB到%uMB -> %X\n"
|
||||
newFolderPopFldMenu = 0, "新建目录"
|
||||
newFolderCopyMenu = 0, "新建"
|
||||
swkbdNewSafeTitle = 0, "输入新的导出目录名称"
|
||||
swkbdExpandSize = 0, "输入新的大小(单位MB)"
|
||||
folderMenuNew = 0, "新建目录"
|
||||
fileModeMenuMkDir = 0, "新建"
|
||||
|
||||
changeToPopStatus = 0, "更改到"
|
||||
tmpEmptyPopStatus = 0, "包含非法或者非ASCII的字符。"
|
||||
popChangeOutputFolder = 0, "#%s# 更改到 #%s#"
|
||||
popChangeOutputError = 0, "#%s# 包含非法或者非ASCII的字符。"
|
||||
|
||||
#如果author不是“NULL”,您的姓名将显示在UI中
|
||||
author = 0, "zdm65477730"
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ saveTypeMainMenu = 2, "緩存"
|
|||
saveTypeMainMenu = 3, "系統"
|
||||
saveTypeMainMenu = 4, "系統BCAT"
|
||||
saveTypeMainMenu = 5, "臨時"
|
||||
settingsMainMenu = 0, "系統設置"
|
||||
extrasMainMenu = 0, "附加設定"
|
||||
mainMenuSettings = 0, "系統設置"
|
||||
mainMenuExtras = 0, "附加設定"
|
||||
translationMainPage = 0, "翻譯:"
|
||||
loadingStartPage = 0, "加載中…"
|
||||
|
||||
|
|
@ -37,19 +37,16 @@ infoStatus = 6, "當前Title:"
|
|||
infoStatus = 7, "安全Title:"
|
||||
infoStatus = 8, "排序類型:"
|
||||
infoStatus = 9, "正在檔案管理器裏保存…"
|
||||
infoStatus = 10, "提交檔案到設備錯誤-> 0x%X\n"
|
||||
infoStatus = 11, "正在删除"
|
||||
infoStatus = 12, "存檔創建失敗->"
|
||||
infoStatus = 14, "回收站已清空。"
|
||||
infoStatus = 10, "正在删除"
|
||||
infoStatus = 11, "回收站已清空。"
|
||||
|
||||
newSafeTitle = 0, "輸入新的匯出目錄名稱"
|
||||
expandSize = 0, "輸入新的大小(組織MB)"
|
||||
expandSizeFailed = 0, "大小擴展失敗:%uMB到%uMB -> %X\n"
|
||||
newFolderPopFldMenu = 0, "新建目錄"
|
||||
newFolderCopyMenu = 0, "新建"
|
||||
swkbdNewSafeTitle = 0, "輸入新的匯出目錄名稱"
|
||||
swkbdExpandSize = 0, "輸入新的大小(組織MB)"
|
||||
folderMenuNew = 0, "新建目錄"
|
||||
fileModeMenuMkDir = 0, "新建"
|
||||
|
||||
changeToPopStatus = 0, "更改到"
|
||||
tmpEmptyPopStatus = 0, "包含非法或者非ASCII字元。"
|
||||
popChangeOutputFolder = 0, "#%s# 更改到 #%s#"
|
||||
popChangeOutputError = 0, "#%s# 包含非法或者非ASCII字元。"
|
||||
|
||||
#If author is not "NULL", your name will be displayed in the UI
|
||||
author = 0, "Leo"
|
||||
|
|
|
|||
11
src/cfg.cpp
11
src/cfg.cpp
|
|
@ -104,7 +104,6 @@ void cfg::pathDefAdd(const uint64_t& tid, const std::string& newPath)
|
|||
{
|
||||
std::string oldSafe = data::titles[tid].safeTitle;
|
||||
std::string tmp = util::safeString(newPath);
|
||||
std::string popmsg = "'%s' ";
|
||||
if(!tmp.empty())
|
||||
{
|
||||
pathDefs[tid] = tmp;
|
||||
|
|
@ -114,14 +113,10 @@ void cfg::pathDefAdd(const uint64_t& tid, const std::string& newPath)
|
|||
std::string newOutput = fs::getWorkDir() + tmp;
|
||||
rename(oldOutput.c_str(), newOutput.c_str());
|
||||
|
||||
popmsg += ui::getUICString("changeToPopStatus", 0);
|
||||
popmsg += " '%s'";
|
||||
ui::showPopMessage(POP_FRAME_DEFAULT, popmsg.c_str(), oldSafe.c_str(), tmp.c_str());
|
||||
}
|
||||
else {
|
||||
popmsg += ui::getUICString("tmpEmptyPopStatus", 0);
|
||||
ui::showPopMessage(POP_FRAME_DEFAULT, popmsg.c_str(), newPath.c_str());
|
||||
ui::showPopMessage(POP_FRAME_DEFAULT, ui::getUICString("popChangeOutputFolder", 0), oldSafe.c_str(), tmp.c_str());
|
||||
}
|
||||
else
|
||||
ui::showPopMessage(POP_FRAME_DEFAULT, ui::getUICString("popChangeOutputError", 0), newPath.c_str());
|
||||
}
|
||||
|
||||
std::string cfg::getPathDefinition(const uint64_t& tid)
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ bool fs::commitToDevice(const std::string& dev)
|
|||
Result res = fsdevCommitDevice(dev.c_str());
|
||||
if(R_FAILED(res))
|
||||
{
|
||||
fs::logWrite(ui::getUICString("infoStatus", 10), res);
|
||||
fs::logWrite("Error committing file to device -> 0x%X\n", res);
|
||||
ui::showPopMessage(POP_FRAME_DEFAULT, ui::getUICString("popErrorCommittingFile", 0));
|
||||
ret = false;
|
||||
}
|
||||
|
|
@ -692,7 +692,7 @@ void fs::deleteBackup(void *a)
|
|||
unsigned ind = m->getSelected() - 1;
|
||||
|
||||
std::string itemName = d->getItem(ind);
|
||||
t->status->setStatus(ui::getUICString("infoStatus", 11));
|
||||
t->status->setStatus(ui::getUICString("infoStatus", 10));
|
||||
if(cfg::config["trashBin"])
|
||||
{
|
||||
data::userTitleInfo *getTID = data::getCurrentUserTitleInfo();
|
||||
|
|
|
|||
|
|
@ -126,9 +126,7 @@ void fs::createSaveData_t(void *a)
|
|||
else
|
||||
{
|
||||
ui::showPopMessage(POP_FRAME_DEFAULT, ui::getUICString("saveDataCreationFailed", 0));
|
||||
std::string logstr(ui::getUICString("infoStatus", 12));
|
||||
logstr += "%X\n";
|
||||
fs::logWrite(logstr.c_str(), res);
|
||||
fs::logWrite("SaveCreate Failed -> %X\n", res);
|
||||
}
|
||||
delete s;
|
||||
t->finished = true;
|
||||
|
|
|
|||
|
|
@ -163,8 +163,8 @@ void ui::init()
|
|||
threadMngr = new ui::threadProcMngr;
|
||||
|
||||
//Need these from user/main menu
|
||||
settPos = ui::usrMenu->getOptPos(ui::getUICString("settingsMainMenu", 0));
|
||||
extPos = ui::usrMenu->getOptPos(ui::getUICString("extrasMainMenu", 0));
|
||||
settPos = ui::usrMenu->getOptPos(ui::getUICString("mainMenuSettings", 0));
|
||||
extPos = ui::usrMenu->getOptPos(ui::getUICString("mainMenuExtras", 0));
|
||||
}
|
||||
|
||||
void ui::exit()
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ static void _copyMenuRename(void *a)
|
|||
static void _copyMenuMkDir(void *a)
|
||||
{
|
||||
menuFuncArgs *ma = (menuFuncArgs *)a;
|
||||
std::string getNewFolder = util::getStringInput(SwkbdType_QWERTY, ui::getUIString("newFolderCopyMenu", 0), ui::getUIString("swkbdMkDir", 0), 64, 0, NULL);
|
||||
std::string getNewFolder = util::getStringInput(SwkbdType_QWERTY, ui::getUIString("fileModeMenuMkDir", 0), ui::getUIString("swkbdMkDir", 0), 64, 0, NULL);
|
||||
if(!getNewFolder.empty())
|
||||
{
|
||||
std::string createPath = *ma->path + getNewFolder;
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ static void toggleOpt(void *a)
|
|||
case 0:
|
||||
fs::delDir(fs::getWorkDir() + "_TRASH_/");
|
||||
mkdir(std::string(fs::getWorkDir() + "_TRASH_").c_str(), 777);
|
||||
ui::showPopMessage(POP_FRAME_DEFAULT, ui::getUICString("infoStatus", 14));
|
||||
ui::showPopMessage(POP_FRAME_DEFAULT, ui::getUICString("infoStatus", 11));
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ void ui::populateFldMenu()
|
|||
|
||||
*backargs = {fldMenu, fldList};
|
||||
|
||||
fldMenu->addOpt(NULL, ui::getUICString("newFolderPopFldMenu", 0));
|
||||
fldMenu->addOpt(NULL, ui::getUICString("folderMenuNew", 0));
|
||||
fldMenu->optAddButtonEvent(0, HidNpadButton_A, fs::createNewBackup, backargs);
|
||||
|
||||
for(unsigned i = 0; i < fldList->getCount(); i++)
|
||||
|
|
@ -170,7 +170,7 @@ static void ttlOptsDefinePath(void *a)
|
|||
{
|
||||
uint64_t tid = data::getCurrentUserTitleInfo()->tid;
|
||||
std::string safeTitle = data::getTitleInfoByTID(tid)->safeTitle;
|
||||
std::string newSafeTitle = util::getStringInput(SwkbdType_QWERTY, safeTitle, ui::getUICString("newSafeTitle", 0), 0x200, 0, NULL);
|
||||
std::string newSafeTitle = util::getStringInput(SwkbdType_QWERTY, safeTitle, ui::getUICString("swkbdNewSafeTitle", 0), 0x200, 0, NULL);
|
||||
if(!newSafeTitle.empty())
|
||||
cfg::pathDefAdd(tid, newSafeTitle);
|
||||
}
|
||||
|
|
@ -286,7 +286,7 @@ static void ttlOptsExtendSaveData_t(void *a)
|
|||
threadInfo *t = (threadInfo *)a;
|
||||
data::userTitleInfo *d = data::getCurrentUserTitleInfo();
|
||||
|
||||
std::string expSizeStr = util::getStringInput(SwkbdType_NumPad, "", ui::getUICString("expandSize", 0), 4, 0, NULL);
|
||||
std::string expSizeStr = util::getStringInput(SwkbdType_NumPad, "", ui::getUICString("swkbdExpandSize", 0), 4, 0, NULL);
|
||||
if(!expSizeStr.empty())
|
||||
{
|
||||
int64_t journ = 0, expSize;
|
||||
|
|
@ -337,7 +337,7 @@ static void ttlOptsExtendSaveData_t(void *a)
|
|||
fsFsGetTotalSpace(fsdevGetDeviceFileSystem("sv"), "/", &totalSize);
|
||||
fs::unmountSave();
|
||||
|
||||
fs::logWrite(ui::getUICString("expandSizeFailed", 0), totalSize / 1024 / 1024, expSize / 1024 / 1024, res);
|
||||
fs::logWrite("Extend Failed: %uMB to %uMB -> %X\n", totalSize / 1024 / 1024, expSize / 1024 / 1024, res);
|
||||
ui::showPopMessage(POP_FRAME_DEFAULT, ui::getUICString("saveDataExtendFailed", 0));
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -54,6 +54,12 @@ void ui::initStrings()
|
|||
addUIString("saveDataDeleteAllUser", 0, "*ARE YOU SURE YOU WANT TO DELETE ALL SAVE DATA FOR %s?*");
|
||||
addUIString("saveDataBackupDeleted", 0, "#%s# has been deleted.");
|
||||
addUIString("saveDataBackupMovedToTrash", 0, "#%s# has been moved to trash.");
|
||||
addUIString("saveTypeMainMenu", 0, "Device");
|
||||
addUIString("saveTypeMainMenu", 1, "BCAT");
|
||||
addUIString("saveTypeMainMenu", 2, "Cache");
|
||||
addUIString("saveTypeMainMenu", 3, "System");
|
||||
addUIString("saveTypeMainMenu", 4, "System BCAT");
|
||||
addUIString("saveTypeMainMenu", 5, "SysTemp Storagetem");
|
||||
|
||||
//Internet Related
|
||||
addUIString("onlineErrorConnecting", 0, "Error Connecting!");
|
||||
|
|
@ -67,6 +73,10 @@ void ui::initStrings()
|
|||
addUIString("fileModeMenu", 4, "Properties");
|
||||
addUIString("fileModeMenu", 5, "Close");
|
||||
addUIString("fileModeMenu", 6, "Add to Path Filters");
|
||||
addUIString("fileModeMenuMkDir", 0, "New");
|
||||
|
||||
//New folder pop menu strings
|
||||
addUIString("folderMenuNew", 0, "New Folder");
|
||||
|
||||
//File mode properties string
|
||||
addUIString("fileModeFileProperties", 0, "Path: %s\nSize: %s");
|
||||
|
|
@ -95,6 +105,16 @@ void ui::initStrings()
|
|||
addUIString("settingsMenu", 19, "Title Sorting Type: ");
|
||||
addUIString("settingsMenu", 20, "Animation Scale: ");
|
||||
|
||||
//Main menu
|
||||
addUIString("mainMenuSettings", 0, "Settings");
|
||||
addUIString("mainMenuExtras", 0, "Extras");
|
||||
|
||||
// Translator in main page
|
||||
addUIString("translationMainPage", 0, "Translation: ");
|
||||
|
||||
//Loading page
|
||||
addUIString("loadingStartPage", 0, "Loading...");
|
||||
|
||||
//Sort Strings for ^
|
||||
addUIString("sortType", 0, "Alphabetical");
|
||||
addUIString("sortType", 1, "Time Played");
|
||||
|
|
@ -156,6 +176,8 @@ void ui::initStrings()
|
|||
addUIString("popSaveIsEmpty", 0, "Save data is empty!");
|
||||
addUIString("popProcessShutdown", 0, "#%s# successfully shutdown.");
|
||||
addUIString("popAddedToPathFilter", 0, "'#%s#' added to path filters.");
|
||||
addUIString("popChangeOutputFolder", 0, "#%s# changed to #%s#");
|
||||
addUIString("popChangeOutputError", 0, "#%s# contains illegal or non-ASCII characters.");
|
||||
|
||||
//Keyboard hints
|
||||
addUIString("swkbdEnterName", 0, "Enter a new name");
|
||||
|
|
@ -165,6 +187,22 @@ void ui::initStrings()
|
|||
addUIString("swkbdSysSavID", 0, "Enter System Save ID");
|
||||
addUIString("swkbdRename", 0, "Enter a new name for item");
|
||||
addUIString("swkbdMkDir", 0, "Enter a folder name");
|
||||
addUIString("swkbdNewSafeTitle", 0, "Input New Output Folder");
|
||||
addUIString("swkbdExpandSize", 0, "Enter New Size in MB");
|
||||
|
||||
//Status informations
|
||||
addUIString("infoStatus", 0, "TID: ");
|
||||
addUIString("infoStatus", 1, "SID: ");
|
||||
addUIString("infoStatus", 2, "Play Time: ");
|
||||
addUIString("infoStatus", 3, "Total Launches: ");
|
||||
addUIString("infoStatus", 4, "User Count: ");
|
||||
addUIString("infoStatus", 5, "Current User: ");
|
||||
addUIString("infoStatus", 6, "Current Title: ");
|
||||
addUIString("infoStatus", 7, "Safe Title: ");
|
||||
addUIString("infoStatus", 8, "Sort Type: ");
|
||||
addUIString("infoStatus", 9, "Saving the file master...");
|
||||
addUIString("infoStatus", 10, "Deleting...");
|
||||
addUIString("infoStatus", 11, "Trash emptied.");
|
||||
}
|
||||
|
||||
void ui::loadTrans()
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include "usr.h"
|
||||
#include "ttl.h"
|
||||
|
||||
static const char *settText = ui::getUICString("settingsMainMenu", 0), *extText = ui::getUICString("extrasMainMenu", 0);
|
||||
static const char *settText = ui::getUICString("mainMenuSettings", 0), *extText = ui::getUICString("mainMenuExtras", 0);
|
||||
|
||||
//Main menu/Users + options, folder
|
||||
ui::menu *ui::usrMenu;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user