Translation for both Chinese simplified and traditional (#56)

* add Chinese Simplified translation

* add Chinese Traditional translation
This commit is contained in:
玻璃兔 2020-03-20 09:08:11 +08:00 committed by GitHub
parent ee7e7c7746
commit 4a26b0ce95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 409 additions and 1 deletions

196
romfs/lang/zh-CN.json Normal file
View File

@ -0,0 +1,196 @@
{
"main":{
"menu": {
"sd": "通过SD卡安装",
"net": "通过网络安装",
"usb": "通过USB安装",
"sig": "管理签名补丁signature patches",
"set": "设置",
"exit": "退出"
},
"net": {
"title": "连接错误",
"desc": "请确认关闭飞行模式,并保证网络连接通畅。"
},
"usb": {
"warn": {
"title": "警告!",
"desc": "USB安装方式不一定能“正常工作”。\n如果您不幸遇到这样的情况那就使劲儿扯自己的头发吧\n\n推荐在PC端使用NS-USBloader配合安装。\n实在不行就通过网络安装吧...",
"opt1": "不再对此进行警告"
},
"error": {
"title": "USB未连接",
"desc": "请通过USB线连接你的远程设备"
}
},
"applet": {
"title": "不支持Applet模式",
"desc": "您可以尝试在“Applet模式”下使用本程序。\n但如果出现问题请切换到“非Applet模式”再运行。\n\n切换方法\n 退回系统桌面选中任意一个游戏,按住\ue0e5后点\ue0e0进入游戏直到跳回hbmenu界面再松开按钮!\n然后再选择Awoo Installer届时将不会弹出此对话框"
},
"buttons": "\ue0e0 选择 \ue0e1 退出"
},
"inst": {
"net": {
"help": {
"title": "帮助",
"desc": "文件可以通过NS-USBloader远程安装。\n也可以选择输入URL地址安装。\n如果你的工具对某种文件格式不支持你可以尝试修改文件的扩展名再选择它安装的时候Awoo不在乎扩展名是什么\n\n如果你还是搞不懂那就通过SD卡拷贝安装吧"
},
"src": {
"title": "您要通过什么方式安装",
"opt0": "URL",
"opt1": "谷歌网盘Google Drive"
},
"url": {
"hint": "输入文件的URL地址",
"invalid": "URL地址无效",
"source_string": " 通过URL"
},
"gdrive": {
"hint": "请输入一个谷歌网盘文件的ID",
"alt_name": "谷歌网盘文件",
"source_string": " 从谷歌网盘"
},
"top_info": "选择您要安装的文件,然后按下 \ue0ef ",
"top_info1": "等待连接中... 您的Switch主机IP是: ",
"failed": "远程安装失败!",
"transfer_interput": "传输过程中产生了一个错误,请您检查网络连接是否正常!",
"source_string": " 通过局域网安装",
"buttons": "\ue0e3 通过Internet \ue0e2 帮助 \ue0e1 取消",
"buttons1": "\ue0e0 选择文件 \ue0e3 全选 \ue0ef 安装选中的文件 \ue0e1 返回"
},
"sd": {
"help": {
"title": "帮助",
"desc": "复制您的 NSP, NSZ, XCI, XCZ 文件到SD卡, \n选择你要安装的文件然后按 \ue0ef 安装!"
},
"top_info": "选择你要安装的文件,然后按 \ue0ef 安装!",
"source_string": " 从SD卡",
"delete_info": " 安装完成要将原文件从SD卡删除吗",
"delete_info_multi": " 所有文件已安装要把所有原文件从SD卡删除吗",
"delete_desc": "安装成功后已经不需要原文件。",
"buttons": "\ue0e0 选择文件 \ue0e3 全选 \ue0ef 安装 \ue0e2 帮助 \ue0e1 取消"
},
"usb": {
"help": {
"title": "帮助",
"desc": "文件可以通过NS-USBloader远程安装。\n也可以选择输入URL地址安装。\n如果你的工具对某种文件格式不支持你可以尝试修改文件的扩展名再选择它安装的时候Awoo不在乎扩展名是什么\n\n如果你还是搞不懂那就通过SD卡拷贝安装吧"
},
"top_info": "USB连接成功! 正在接收文件列表...",
"top_info2": "选择您想通过USB安装的文件, 然后按 \ue0ef 安装",
"error": "USB传输超时...",
"source_string": " 通过USB",
"buttons": "\ue0e2 (按住) 帮助 \ue0e1 (按住) 取消",
"buttons2": "\ue0e0 选择文件 \ue0e3 全选 \ue0ef 安装文件 \ue0e1 取消"
},
"target": {
"desc0": "将 ",
"desc1": " 安装到哪?",
"desc00": "将已选择的 ",
"desc01": " 文件安装到哪?",
"opt0": "SD卡",
"opt1": "内部闪存"
},
"info_page": {
"top_info0": "正在安装 ",
"preparing": "初始化安装...",
"failed": "安装失败 ",
"failed_desc": "可以从系统设置小程序中删除部分安装的内容。",
"complete": "安装完成",
"desc0": " 安装成功!",
"desc1": " 已安装!",
"downloading": "下载中 ",
"at": " 在 "
},
"nca_verify": {
"title": "无效的 NCA 签名!",
"desc": "签名不正确的文件只能自己评估可靠性。\n重新打包的文件或DLC通常会报这样的警告。 您可以通过设置选项忽略这些警告。\n\n你确定要继续安装吗",
"opt1": "是的,我知道风险在哪",
"error": "NCA没有正确签名: "
},
"finished": [
"享受您的“合法备份”吧!",
"我敢保证当你玩过之后,更有兴趣购买这游戏!",
"你会买游戏的,对吧?任天堂感谢你!",
"绕过DRM很棒不是吗",
"粗来混,早晚要还的!",
"任天堂已经朝你这派了忍者",
"你甚至不需要相信民主自由就能拿到这样的好处了..."
]
},
"sig": {
"install": "安装",
"uninstall": "卸载",
"update": "更新",
"version_text": "您目前已安装适用于HOS版本的签名补丁 ",
"title0": "安装签名补丁?",
"desc0": "官方软件需要安装签名补丁。",
"backup_failed": "不能备份Hekate的patches.ini! 继续安装?",
"backup_failed_desc": "如果你没在用Hekate的话你可以忽略这个警告",
"download_failed": "无法下载签名补丁",
"download_failed_desc": "您可能在设置中提供了无效的来源,\n或者服务器正好挂了。",
"version_text2": "你的签名补丁已更新 ",
"install_complete": "安装完成!",
"complete_desc": "需要重启你的主机",
"restart": "立即重启",
"later": "稍后重启",
"extract_failed": "无法解压文件!",
"restore_failed": "不能回复原Hekate的patches.ini要继续卸载吗",
"uninstall_complete": "卸载完成",
"remove_failed": "无法删除签名补丁",
"remove_failed_desc": "文件已经被重命名或删除",
"generic_error": "安装签名补丁失败!"
},
"options": {
"menu_items": {
"ignore_firm": "忽略固件版本要求",
"nca_verify": "安装前验证NCA签名",
"boost_mode": "安装过程中开启“超频”模式",
"ask_delete": "安装后询问是否删除原文件",
"auto_update": "自动更新",
"gay_option": "基友模式",
"sig_url": "签名补丁来源URL: ",
"language": "语言: ",
"check_update": "检测更新",
"credits": "致谢"
},
"nca_warn": {
"title": "警告!",
"desc": "有些可安装文件可能存在木马!\n你要非常信任这个文件才能关闭此验证\n\n您是否确定要关闭NCA签名验证",
"opt1": "是的,我不怕变砖!"
},
"sig_hint": "输入获取签名补丁的URL",
"update": {
"title": "有新版本可以更新",
"desc0": "Awoo Installer ",
"desc1": " 新的更新! 要继续吗?",
"opt0": "更新",
"top_info": "正在更新 ...",
"bot_info": "正在下载 ...",
"bot_info2": "正在解压 ...",
"complete": "更新完成!",
"failed": "更新失败!",
"end_desc": "程序将关闭!",
"title_check_fail": "无需更新",
"desc_check_fail": "已是最新版!"
},
"credits": {
"title": "感谢下列人士",
"desc": "- 来自 HookedBehemoth 的巨大贡献\n- Adubbz 以及其他为Tinfoil贡献过的人\n- XorTroll 强大的Plutonium库和金叶子工具\n- blawar (wife strangulator)和 nicoboss 对 NSZ 格式的支持\n- 来自AtlasNX Discuck的好心人 (至少其中的一部分)\n- 来自RetroNX Discuck的好心人 (虽然没直接参与)\n- 来自namako8982的Momiji美术\n- 也特别感谢TheXzoron"
},
"language": {
"title": "选择语言",
"desc": "更改语言后程序将关闭,请重新打开,或者按 \ue0e1 取消。",
"system_language": "系统默认"
},
"title": "更改 Awoo 安装器的设置!",
"buttons": "\ue0e0 选择/更改 \ue0e1 取消"
},
"common": {
"ok": "确定",
"cancel": "取消",
"close": "关闭",
"yes": "是",
"no": "否",
"cancel_desc": "按 \ue0e1 取消"
}
}

197
romfs/lang/zh-TW.json Normal file
View File

@ -0,0 +1,197 @@
{
"main":{
"menu": {
"sd": "通過SD卡安裝",
"net": "通過網路安裝",
"usb": "通過USB安裝",
"sig": "管理簽名補丁signature patches",
"set": "設置",
"exit": "退出"
},
"net": {
"title": "連接錯誤",
"desc": "請確認關閉飛行模式,並確保網路連接暢通。"
},
"usb": {
"warn": {
"title": "警告!",
"desc": "USB安裝方式不一定能“正常工作”。\n如果您不幸遇到這樣的情況那就用力扯自己的頭髮吧\n推薦在PC端使用NS-USBloader配合安裝。\n還是不行就通過網路安裝吧...",
"opt1": "不再對此進行警告"
},
"error": {
"title": "USB未連接",
"desc": "請通過USB線連接您的遠程設備"
}
},
"applet": {
"title": "不支援Applet模式",
"desc": "您可以嘗試在“Applet模式”下使用本程式,但如果出現問題請切換到“非Applet模式”再運行。\n切換方法\n 退回系統桌面選中任意一個遊戲,按住\ue0e5後點\ue0e0進入遊戲直到跳回hbmenu界面再鬆開按鈕!\n然後再選擇Awoo Installer屆時將不會彈出此對話框"
},
"buttons": "\ue0e0 選擇 \ue0e1 退出"
},
"inst": {
"net": {
"help": {
"title": "幫助",
"desc": "文件可以通過NS-USBloader遠程安裝。\n也可以選擇輸入URL地址安裝。\n如果您的遠程工具對某種文件格式不支援您可以嘗試修改文件的擴展名再選擇它安裝的時候Awoo並不在意擴展名\n如果還是搞不懂那就使用SD卡安裝方式吧"
},
"src": {
"title": "您想要通過哪種方式安裝",
"opt0": "URL",
"opt1": "谷歌網盤Google Drive"
},
"url": {
"hint": "輸入文件的URL地址",
"invalid": "URL地址無效",
"source_string": " 通過URL"
},
"gdrive": {
"hint": "請輸入一個谷歌網盤文件的ID",
"alt_name": "谷歌網盤文件",
"source_string": " 從谷歌網盤"
},
"top_info": "選擇您要安裝的文件,然後按下 \ue0ef 號",
"top_info1": "等待連接中... 您的Switch主機IP是: ",
"failed": "遠程安裝失敗!",
"transfer_interput": "傳輸過程中產生了一個錯誤,請您檢查網路連接是否正常!",
"source_string": " 通過局域網安裝",
"buttons": "\ue0e3 通過Internet \ue0e2 幫助 \ue0e1 取消",
"buttons1": "\ue0e0 選擇文件 \ue0e3 全選 \ue0ef 安裝選中的文件 \ue0e1 返回"
},
"sd": {
"help": {
"title": "幫助",
"desc": "複製您的 NSP, NSZ, XCI, XCZ 文件到SD卡, \n選擇想要安裝的文件然後按 \ue0ef 安裝!"
},
"top_info": "選擇想要安裝的文件,然後按 \ue0ef 安裝!",
"source_string": " 從SD卡",
"delete_info": " 安裝完成要將原文件從SD卡刪除嗎",
"delete_info_multi": " 所有文件已安裝要把所有原文件從SD卡刪除嗎",
"delete_desc": "安裝成功後已經不需要原文件。",
"buttons": "\ue0e0 選擇文件 \ue0e3 全選 \ue0ef 安裝 \ue0e2 幫助 \ue0e1 取消"
},
"usb": {
"help": {
"title": "幫助",
"desc": "文件可以通過NS-USBloader遠程安裝。\n也可以選擇輸入URL地址安裝。\n如果您的遠程工具對某種文件格式不支援您可以嘗試修改文件的擴展名再選擇它安裝的時候Awoo並不在意擴展名\n如果還是搞不懂那就使用SD卡安裝方式吧"
},
"top_info": "USB連接成功! 正在接收文件列表...",
"top_info2": "選擇您想通過USB安裝的文件, 然後按 \ue0ef 安裝",
"error": "USB傳輸超時...",
"source_string": " 通過USB",
"buttons": "\ue0e2 (按住) 幫助 \ue0e1 (按住) 取消",
"buttons2": "\ue0e0 選擇文件 \ue0e3 全選 \ue0ef 安裝文件 \ue0e1 取消"
},
"target": {
"desc0": "將 ",
"desc1": " 安裝到哪?",
"desc00": "將已選擇的 ",
"desc01": " 文件安裝到哪?",
"opt0": "SD卡",
"opt1": "內部閃存"
},
"info_page": {
"top_info0": "正在安裝 ",
"preparing": "初始化安裝...",
"failed": "安裝失敗 ",
"failed_desc": "可以從系統設置中刪除部分安裝的內容。",
"complete": "安裝完成",
"desc0": " 安裝成功!",
"desc1": " 已安裝!",
"downloading": "下載中 ",
"at": " 在 "
},
"nca_verify": {
"title": "無效的 NCA 簽名!",
"desc": "簽名不正確的文件只能自己評估可靠性。\n重新打包的文件或DLC通常會報這樣的警告。 您可以通過設置選項忽略這些警告。\n您確定要繼續安裝嗎",
"opt1": "是的,我知道風險在哪",
"error": "NCA沒有正確簽名: "
},
"finished": [
"享受您的“合法版本”吧!",
"我敢保證當您玩過之後,更有興趣購買正版遊戲!",
"您會買這遊戲的,對吧?任天堂感謝您!",
"繞過DRM很棒不是嗎",
"粗來混,早晚要還的!",
"任天堂已經對您派遣了忍者",
"您甚至不需要相信民主自由就能拿到這樣的好處了..."
]
},
"sig": {
"install": "安裝",
"uninstall": "卸載",
"update": "更新",
"version_text": "您目前已安裝適用於HOS版本的簽名補丁 ",
"title0": "安裝簽名補丁?",
"desc0": "官方軟件需要安裝簽名補丁。",
"backup_failed": "不能備份Hekate的patches.ini! 繼續安裝?",
"backup_failed_desc": "如果您沒在用Hekate的話可以忽略這個警告",
"download_failed": "無法下載簽名補丁",
"download_failed_desc": "您可能在設置中提供了無效的來源,\n或者服務器正好掛了。",
"version_text2": "簽名補丁已更新 ",
"install_complete": "安裝完成!",
"complete_desc": "需要重啟您的主機",
"restart": "立即重啟",
"later": "稍後重啟",
"extract_failed": "無法解壓文件!",
"restore_failed": "不能回復原Hekate的patches.ini要繼續卸載嗎",
"uninstall_complete": "卸載完成",
"remove_failed": "無法刪除簽名補丁",
"remove_failed_desc": "文件已經被重命名或刪除",
"generic_error": "安裝簽名補丁失敗!"
},
"options": {
"menu_items": {
"ignore_firm": "忽略固件版本要求",
"nca_verify": "安裝前驗證NCA簽名",
"boost_mode": "安裝過程中開啟“超頻”模式",
"ask_delete": "安裝後詢問是否刪除原文件",
"auto_update": "自動更新",
"gay_option": "基友模式",
"sig_url": "簽名補丁來源URL: ",
"language": "語言: ",
"check_update": "檢測更新",
"credits": "致谢"
},
"nca_warn": {
"title": "警告!",
"desc": "有些可安裝文件可能存在木馬!\n您要非常信任這個文件才能關閉此驗證\n您是否確定要關閉NCA簽名驗證",
"opt1": "是的我不怕Switch變磚"
},
"sig_hint": "輸入獲取簽名補丁的URL",
"update": {
"title": "有新版本可以更新",
"desc0": "Awoo Installer ",
"desc1": " 新的更新! 要繼續嗎?",
"opt0": "更新",
"top_info": "正在更新 ...",
"bot_info": "正在下載 ...",
"bot_info2": "正在解壓 ...",
"complete": "更新完成!",
"failed": "更新失敗!",
"end_desc": "本程式將關閉!",
"title_check_fail": "找不到更新",
"desc_check_fail": "已更新到最新版!"
},
"credits": {
"title": "感謝下列人士",
"desc": "- 來自HookedBehemoth 的巨大貢獻\n- Adubbz 以及其他為Tinfoil貢獻過的人\n- XorTroll 強大的Plutonium庫和金葉子工具\n- blawar (wife strangulator)和nicoboss 對NSZ 格式的支持\n- 來自AtlasNX Discuck的好心人 (至少其中一部分)\n- 來自RetroNX Discuck的好心人 (雖然沒直接參與)\n- 來自namako8982的Momiji美術\n- 也特別感謝TheXzoron"
},
"language": {
"title": "選擇語言",
"desc": "更改語言後本程式將關閉,請重新打開, 或按 \ue0e1 返回。",
"system_language": "系統默認"
},
"title": "更改 Awoo 安裝器的設置!",
"buttons": "\ue0e0 選擇/更改 \ue0e1 取消"
},
"common": {
"ok": "確定",
"cancel": "取消",
"close": "關閉",
"yes": "是",
"no": "否",
"cancel_desc": "按 \ue0e1 取消"
}
}

View File

@ -16,7 +16,7 @@
namespace inst::ui { namespace inst::ui {
extern MainApplication *mainApp; extern MainApplication *mainApp;
std::vector<std::string> languageStrings = {"English", "日本語", "Français", "Deutsch", "Italiano", "Русский"}; std::vector<std::string> languageStrings = {"English", "日本語", "Français", "Deutsch", "Italiano", "Русский", "簡体中文","繁體中文"};
optionsPage::optionsPage() : Layout::Layout() { optionsPage::optionsPage() : Layout::Layout() {
this->SetBackgroundColor(COLOR("#670000FF")); this->SetBackgroundColor(COLOR("#670000FF"));
@ -90,6 +90,10 @@ namespace inst::ui {
return languageStrings[4]; return languageStrings[4];
case 10: case 10:
return languageStrings[5]; return languageStrings[5];
case 6:
return languageStrings[6];
case 11:
return languageStrings[7];
default: default:
return "options.language.system_language"_lang; return "options.language.system_language"_lang;
} }
@ -218,6 +222,12 @@ namespace inst::ui {
case 5: case 5:
inst::config::languageSetting = 10; inst::config::languageSetting = 10;
break; break;
case 6:
inst::config::languageSetting = 6;
break;
case 7:
inst::config::languageSetting = 11;
break;
default: default:
inst::config::languageSetting = 99; inst::config::languageSetting = 99;
} }

View File

@ -1,6 +1,7 @@
#include <iostream> #include <iostream>
#include <switch.h> #include <switch.h>
#include <filesystem> #include <filesystem>
#include <pu/Plutonium>
#include "util/lang.hpp" #include "util/lang.hpp"
#include "util/config.hpp" #include "util/config.hpp"
@ -40,6 +41,8 @@ namespace Language {
break; break;
case 6: case 6:
languagePath = "romfs:/lang/zh-CN.json"; languagePath = "romfs:/lang/zh-CN.json";
// the default font will miss some chinese character, so use a chinese font (simplified)
pu::ui::render::SetDefaultFontFromShared(pu::ui::render::SharedFont::ChineseSimplified);
break; break;
case 7: case 7:
languagePath = "romfs:/lang/ko.json"; languagePath = "romfs:/lang/ko.json";
@ -55,6 +58,8 @@ namespace Language {
break; break;
case 11: case 11:
languagePath = "romfs:/lang/zh-TW.json"; languagePath = "romfs:/lang/zh-TW.json";
// the default font will miss some chinese character, so use a chinese font (traditional)
pu::ui::render::SetDefaultFontFromShared(pu::ui::render::SharedFont::ChineseTraditional);
break; break;
default: default:
languagePath = "romfs:/lang/en.json"; languagePath = "romfs:/lang/en.json";