From d3874d5aacb8bfc54d774a98936dc3aceaee827c Mon Sep 17 00:00:00 2001 From: Rintim Date: Sun, 16 Aug 2020 21:30:05 +0800 Subject: [PATCH] =?UTF-8?q?2020/08/16:Inchar=20-=20=E9=96=8B=E5=A7=8B?= =?UTF-8?q?=E6=BC=A2=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/fbi/.DS_Store | Bin 0 -> 6148 bytes source/fbi/action/rename.c | 2 +- source/fbi/dumpnand.c | 16 ++++---- source/fbi/extsavedata.c | 32 ++++++++------- source/fbi/files.c | 76 ++++++++++++++++++------------------ source/fbi/mainmenu.c | 2 +- source/fbi/task/listfiles.c | 12 +++--- source/fbi/task/uitask.c | 68 ++++++++++++++++---------------- 8 files changed, 109 insertions(+), 99 deletions(-) create mode 100644 source/fbi/.DS_Store diff --git a/source/fbi/.DS_Store b/source/fbi/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ebf35ef3f02338f2e0c99cc6a0505751274bbea5 GIT binary patch literal 6148 zcmeH~JqiLr422WjV!>uh%V|7-Hy9Q@ffrB^EEEO*>N&bEnIO1Yi^vNkZ<3j?>{sk; zL`3`Bb}rJ1NDDWWnT3HV@S!XgpbMih*fu7fncDnq3%3fCL5v#x?Kk{$IjB&HsZIrX)ZD ze?~x?#cI*xrQ&XVdp)bKqiX8{hx&1Zm!AM6b`?+IZrD$@facIr6%`nN1RMhc34E2n E1Kju$#sB~S literal 0 HcmV?d00001 diff --git a/source/fbi/action/rename.c b/source/fbi/action/rename.c index a39979f..19cd737 100644 --- a/source/fbi/action/rename.c +++ b/source/fbi/action/rename.c @@ -57,7 +57,7 @@ static void action_rename_onresponse(ui_view* view, void* data, SwkbdButton butt } if(R_SUCCEEDED(res)) { - if(strncmp(selected->name, "", LIST_ITEM_NAME_MAX) != 0 && strncmp(selected->name, "", LIST_ITEM_NAME_MAX) != 0) { + if(strncmp(selected->name, "<當前目錄>", LIST_ITEM_NAME_MAX) != 0 && strncmp(selected->name, "<當前文件>", LIST_ITEM_NAME_MAX) != 0) { string_copy(selected->name, fileName, LIST_ITEM_NAME_MAX); } diff --git a/source/fbi/dumpnand.c b/source/fbi/dumpnand.c index c10c560..d3e480c 100644 --- a/source/fbi/dumpnand.c +++ b/source/fbi/dumpnand.c @@ -80,7 +80,7 @@ static Result dumpnand_restore(void* data, u32 index) { } static bool dumpnand_error(void* data, u32 index, Result res, ui_view** errorView) { - *errorView = error_display_res(NULL, NULL, res, "Failed to dump NAND."); + *errorView = error_display_res(NULL, NULL, res, "無法導出NAND"); return true; } @@ -92,7 +92,7 @@ static void dumpnand_update(ui_view* view, void* data, float* progress, char* te info_destroy(view); if(R_SUCCEEDED(dumpData->result)) { - prompt_display_notify("Success", "NAND dumped.", COLOR_TEXT, NULL, NULL, NULL); + prompt_display_notify("成功", "NAND已成功導出", COLOR_TEXT, NULL, NULL, NULL); } free(dumpData); @@ -118,9 +118,9 @@ static void dumpnand_onresponse(ui_view* view, void* data, u32 response) { Result res = task_data_op(dumpData); if(R_SUCCEEDED(res)) { - info_display("Dumping NAND", "Press B to cancel.", true, data, dumpnand_update, NULL); + info_display("導出NAND", "按B鍵停止", true, data, dumpnand_update, NULL); } else { - error_display_res(NULL, NULL, res, "Failed to initiate NAND dump."); + error_display_res(NULL, NULL, res, "無法初始化導出NAND"); free(data); } } else { @@ -131,7 +131,7 @@ static void dumpnand_onresponse(ui_view* view, void* data, u32 response) { void dumpnand_open() { data_op_data* data = (data_op_data*) calloc(1, sizeof(data_op_data)); if(data == NULL) { - error_display(NULL, NULL, "Failed to allocate dump NAND data."); + error_display(NULL, NULL, "無法分配導出NAND數據"); return; } @@ -164,5 +164,7 @@ void dumpnand_open() { data->finished = true; - prompt_display_yes_no("Confirmation", "Dump raw NAND image to the SD card?", COLOR_TEXT, data, NULL, dumpnand_onresponse); -} \ No newline at end of file + prompt_display_yes_no("確認", "是否導出原始NAND鏡像?", COLOR_TEXT, data, NULL, dumpnand_onresponse); +} + +// オケー \ No newline at end of file diff --git a/source/fbi/extsavedata.c b/source/fbi/extsavedata.c index af57925..bb49a92 100644 --- a/source/fbi/extsavedata.c +++ b/source/fbi/extsavedata.c @@ -10,9 +10,9 @@ #include "task/uitask.h" #include "../core/core.h" -static list_item browse_user_save_data = {"Browse User Save Data", COLOR_TEXT, action_browse_user_ext_save_data}; -static list_item browse_spotpass_save_data = {"Browse SpotPass Save Data", COLOR_TEXT, action_browse_boss_ext_save_data}; -static list_item delete_save_data = {"Delete Save Data", COLOR_TEXT, action_delete_ext_save_data}; +static list_item browse_user_save_data = {"瀏覽使用者保存數據", COLOR_TEXT, action_browse_user_ext_save_data}; +static list_item browse_spotpass_save_data = {"瀏覽SpotPass保存數據", COLOR_TEXT, action_browse_boss_ext_save_data}; +static list_item delete_save_data = {"刪除保存數據", COLOR_TEXT, action_delete_ext_save_data}; typedef struct { populate_ext_save_data_data populateData; @@ -69,7 +69,7 @@ static void extsavedata_action_update(ui_view* view, void* data, linked_list* it static void extsavedata_action_open(linked_list* items, list_item* selected) { extsavedata_action_data* data = (extsavedata_action_data*) calloc(1, sizeof(extsavedata_action_data)); if(data == NULL) { - error_display(NULL, NULL, "Failed to allocate ext save data action data."); + error_display(NULL, NULL, "無法分配額外保存數據操作的數據."); return; } @@ -77,7 +77,7 @@ static void extsavedata_action_open(linked_list* items, list_item* selected) { data->items = items; data->selected = selected; - list_display("Ext Save Data Action", "A: Select, B: Return", data, extsavedata_action_update, extsavedata_action_draw_top); + list_display("額外保存數據操作", "A: 選擇, B: 返回", data, extsavedata_action_update, extsavedata_action_draw_top); } static void extsavedata_options_add_entry(linked_list* items, const char* name, bool* val) { @@ -135,15 +135,15 @@ static void extsavedata_options_update(ui_view* view, void* data, linked_list* i } if(linked_list_size(items) == 0) { - extsavedata_options_add_entry(items, "Show SD", &listData->showSD); - extsavedata_options_add_entry(items, "Show NAND", &listData->showNAND); - extsavedata_options_add_entry(items, "Sort by ID", &listData->sortById); - extsavedata_options_add_entry(items, "Sort by name", &listData->sortByName); + extsavedata_options_add_entry(items, "顯示SD卡", &listData->showSD); + extsavedata_options_add_entry(items, "顯示NAND", &listData->showNAND); + extsavedata_options_add_entry(items, "按ID排列", &listData->sortById); + extsavedata_options_add_entry(items, "按名稱排列", &listData->sortByName); } } static void extsavedata_options_open(extsavedata_data* data) { - list_display("Options", "A: Toggle, B: Return", data, extsavedata_options_update, NULL); + list_display("選項", "A: 切換, B: 返回", data, extsavedata_options_update, NULL); } static void extsavedata_draw_top(ui_view* view, void* data, float x1, float y1, float x2, float y2, list_item* selected) { @@ -188,14 +188,14 @@ static void extsavedata_update(ui_view* view, void* data, linked_list* items, li listData->populateData.items = items; Result res = task_populate_ext_save_data(&listData->populateData); if(R_FAILED(res)) { - error_display_res(NULL, NULL, res, "Failed to initiate ext save data list population."); + error_display_res(NULL, NULL, res, "無法初始化額外保存數據列表"); } listData->populated = true; } if(listData->populateData.finished && R_FAILED(listData->populateData.result)) { - error_display_res(NULL, NULL, listData->populateData.result, "Failed to populate ext save data list."); + error_display_res(NULL, NULL, listData->populateData.result, "無法填充額外保存數據列表"); listData->populateData.result = 0; } @@ -255,7 +255,7 @@ static int extsavedata_compare(void* data, const void* p1, const void* p2) { void extsavedata_open() { extsavedata_data* data = (extsavedata_data*) calloc(1, sizeof(extsavedata_data)); if(data == NULL) { - error_display(NULL, NULL, "Failed to allocate ext save data data."); + error_display(NULL, NULL, "無法分配額外保存數據數據"); return; } @@ -271,5 +271,7 @@ void extsavedata_open() { data->sortById = false; data->sortByName = true; - list_display("Ext Save Data", "A: Select, B: Return, X: Refresh, Select: Options", data, extsavedata_update, extsavedata_draw_top); -} \ No newline at end of file + list_display("額外保存數據", "A: 選擇, B: 返回, X: 刷新, Select: 選項", data, extsavedata_update, extsavedata_draw_top); +} + +// オケー \ No newline at end of file diff --git a/source/fbi/files.c b/source/fbi/files.c index 90ecd94..06581cf 100644 --- a/source/fbi/files.c +++ b/source/fbi/files.c @@ -10,30 +10,30 @@ #include "task/uitask.h" #include "../core/core.h" -static list_item rename_opt = {"Rename", COLOR_TEXT, action_rename}; -static list_item copy = {"Copy", COLOR_TEXT, NULL}; -static list_item paste = {"Paste", COLOR_TEXT, action_paste_contents}; +static list_item rename_opt = {"重命名", COLOR_TEXT, action_rename}; +static list_item copy = {"復制", COLOR_TEXT, NULL}; +static list_item paste = {"粘貼", COLOR_TEXT, action_paste_contents}; -static list_item delete_file = {"Delete", COLOR_TEXT, action_delete_file}; +static list_item delete_file = {"刪除", COLOR_TEXT, action_delete_file}; -static list_item install_cia = {"Install CIA", COLOR_TEXT, action_install_cia}; -static list_item install_and_delete_cia = {"Install and delete CIA", COLOR_TEXT, action_install_cia_delete}; +static list_item install_cia = {"安裝CIA", COLOR_TEXT, action_install_cia}; +static list_item install_and_delete_cia = {"安裝並刪除CIA", COLOR_TEXT, action_install_cia_delete}; -static list_item install_ticket = {"Install ticket", COLOR_TEXT, action_install_ticket}; -static list_item install_and_delete_ticket = {"Install and delete ticket", COLOR_TEXT, action_install_ticket_delete}; +static list_item install_ticket = {"安裝ticket", COLOR_TEXT, action_install_ticket}; +static list_item install_and_delete_ticket = {"安裝並刪除ticket", COLOR_TEXT, action_install_ticket_delete}; -static list_item delete_dir = {"Delete", COLOR_TEXT, action_delete_dir}; -static list_item copy_all_contents = {"Copy all contents", COLOR_TEXT, NULL}; -static list_item delete_all_contents = {"Delete all contents", COLOR_TEXT, action_delete_dir_contents}; -static list_item new_folder = {"New folder", COLOR_TEXT, action_new_folder}; +static list_item delete_dir = {"刪除", COLOR_TEXT, action_delete_dir}; +static list_item copy_all_contents = {"復制所有内容", COLOR_TEXT, NULL}; +static list_item delete_all_contents = {"刪除所有内容", COLOR_TEXT, action_delete_dir_contents}; +static list_item new_folder = {"新文件夾", COLOR_TEXT, action_new_folder}; -static list_item install_all_cias = {"Install all CIAs", COLOR_TEXT, action_install_cias}; -static list_item install_and_delete_all_cias = {"Install and delete all CIAs", COLOR_TEXT, action_install_cias_delete}; -static list_item delete_all_cias = {"Delete all CIAs", COLOR_TEXT, action_delete_dir_cias}; +static list_item install_all_cias = {"安裝所有CIAs", COLOR_TEXT, action_install_cias}; +static list_item install_and_delete_all_cias = {"安裝並刪除所有CIAs", COLOR_TEXT, action_install_cias_delete}; +static list_item delete_all_cias = {"刪除所有CIAs", COLOR_TEXT, action_delete_dir_cias}; -static list_item install_all_tickets = {"Install all tickets", COLOR_TEXT, action_install_tickets}; -static list_item install_and_delete_all_tickets = {"Install and delete all tickets", COLOR_TEXT, action_install_tickets_delete}; -static list_item delete_all_tickets = {"Delete all tickets", COLOR_TEXT, action_delete_dir_tickets}; +static list_item install_all_tickets = {"安裝所有tickets", COLOR_TEXT, action_install_tickets}; +static list_item install_and_delete_all_tickets = {"安裝並刪除所有tickets", COLOR_TEXT, action_install_tickets_delete}; +static list_item delete_all_tickets = {"刪除所有tickets", COLOR_TEXT, action_delete_dir_tickets}; typedef struct { populate_files_data populateData; @@ -107,9 +107,9 @@ static void files_action_update(ui_view* view, void* data, linked_list* items, l Result res = 0; if(R_SUCCEEDED(res = clipboard_set_contents(actionData->parent->archive, info->path, selected == ©_all_contents))) { - prompt_display_notify("Success", selected == ©_all_contents ? "Current directory contents copied to clipboard." : (info->attributes & FS_ATTRIBUTE_DIRECTORY) ? "Current directory copied to clipboard." : "File copied to clipboard.", COLOR_TEXT, info, task_draw_file_info, NULL); + prompt_display_notify("成功", selected == ©_all_contents ? "當前文件夾的文件已復制到剪貼板上" : (info->attributes & FS_ATTRIBUTE_DIRECTORY) ? "當前文件夾文件已復制到剪貼板上" : "文件已復制到剪貼板上", COLOR_TEXT, info, task_draw_file_info, NULL); } else { - error_display_res(info, task_draw_file_info, res, "Failed to copy to clipboard."); + error_display_res(info, task_draw_file_info, res, "無法復制到剪貼板上"); } } else if(selected == &install_all_cias || selected == &install_and_delete_all_cias || selected == &install_all_tickets || selected == &install_and_delete_all_tickets) { void (*filteredAction)(linked_list*, list_item*, bool (*)(void*, const char*, u32), void*) = action; @@ -171,7 +171,7 @@ static void files_action_update(ui_view* view, void* data, linked_list* items, l static void files_action_open(linked_list* items, list_item* selected, files_data* parent) { files_action_data* data = (files_action_data*) calloc(1, sizeof(files_action_data)); if(data == NULL) { - error_display(NULL, NULL, "Failed to allocate files action data."); + error_display(NULL, NULL, "無法分配文件操作數據"); return; } @@ -196,7 +196,7 @@ static void files_action_open(linked_list* items, list_item* selected, files_dat } } - list_display((((file_info*) selected->data)->attributes & FS_ATTRIBUTE_DIRECTORY) ? "Directory Action" : "File Action", "A: Select, B: Return", data, files_action_update, files_action_draw_top); + list_display((((file_info*) selected->data)->attributes & FS_ATTRIBUTE_DIRECTORY) ? "文件夾操作" : "文件操作", "A: 選擇, B: 返回", data, files_action_update, files_action_draw_top); } static void files_options_add_entry(linked_list* items, const char* name, bool* val) { @@ -238,16 +238,16 @@ static void files_options_update(ui_view* view, void* data, linked_list* items, } if(linked_list_size(items) == 0) { - files_options_add_entry(items, "Show hidden", &listData->showHidden); - files_options_add_entry(items, "Show directories", &listData->showDirectories); - files_options_add_entry(items, "Show files", &listData->showFiles); - files_options_add_entry(items, "Show CIAs", &listData->showCias); - files_options_add_entry(items, "Show tickets", &listData->showTickets); + files_options_add_entry(items, "顯示隱藏文件", &listData->showHidden); + files_options_add_entry(items, "顯示文件夾", &listData->showDirectories); + files_options_add_entry(items, "顯示文件", &listData->showFiles); + files_options_add_entry(items, "顯示CIAs", &listData->showCias); + files_options_add_entry(items, "顯示tickets", &listData->showTickets); } } static void files_options_open(files_data* data) { - list_display("Options", "A: Toggle, B: Return", data, files_options_update, NULL); + list_display("選項", "A: 切換, B: 返回", data, files_options_update, NULL); } static void files_draw_top(ui_view* view, void* data, float x1, float y1, float x2, float y2, list_item* selected) { @@ -270,7 +270,7 @@ static void files_repopulate(files_data* listData, linked_list* items) { Result res = task_populate_files(&listData->populateData); if(R_FAILED(res)) { - error_display_res(NULL, NULL, res, "Failed to initiate file list population."); + error_display_res(NULL, NULL, res, "無法初始化文件列表"); } listData->populated = true; @@ -347,7 +347,7 @@ static void files_update(ui_view* view, void* data, linked_list* items, list_ite if(selected != NULL && selected->data != NULL && (selectedTouched || (hidKeysDown() & KEY_A))) { file_info* fileInfo = (file_info*) selected->data; - if((fileInfo->attributes & FS_ATTRIBUTE_DIRECTORY) && strncmp(selected->name, "", LIST_ITEM_NAME_MAX) != 0) { + if((fileInfo->attributes & FS_ATTRIBUTE_DIRECTORY) && strncmp(selected->name, "<當前文件夾>", LIST_ITEM_NAME_MAX) != 0) { files_navigate(listData, items, fileInfo->path); } else { files_action_open(items, selected, listData); @@ -360,7 +360,7 @@ static void files_update(ui_view* view, void* data, linked_list* items, list_ite } if(listData->populateData.finished && R_FAILED(listData->populateData.result)) { - error_display_res(NULL, NULL, listData->populateData.result, "Failed to populate file list."); + error_display_res(NULL, NULL, listData->populateData.result, "無法填充文件列表"); listData->populateData.result = 0; } @@ -369,7 +369,7 @@ static void files_update(ui_view* view, void* data, linked_list* items, list_ite void files_open(FS_ArchiveID archiveId, FS_Path archivePath) { files_data* data = (files_data*) calloc(1, sizeof(files_data)); if(data == NULL) { - error_display(NULL, NULL, "Failed to allocate files data."); + error_display(NULL, NULL, "無法分配文件數據"); return; } @@ -397,7 +397,7 @@ void files_open(FS_ArchiveID archiveId, FS_Path archivePath) { if(archivePath.data != NULL) { data->archivePath.data = calloc(1, data->archivePath.size); if(data->archivePath.data == NULL) { - error_display(NULL, NULL, "Failed to allocate files data."); + error_display(NULL, NULL, "無法分配文件數據"); files_free_data(data); return; @@ -412,13 +412,13 @@ void files_open(FS_ArchiveID archiveId, FS_Path archivePath) { Result res = 0; if(R_FAILED(res = fs_open_archive(&data->archive, archiveId, archivePath))) { - error_display_res(NULL, NULL, res, "Failed to open file listing archive."); + error_display_res(NULL, NULL, res, "無法打開文件列表存檔"); files_free_data(data); return; } - list_display("Files", "A: Select, B: Back, X: Refresh, Select: Options", data, files_update, files_draw_top); + list_display("文件", "A: 選擇, B: 返回, X: 刷新, Select: 選項", data, files_update, files_draw_top); } static void files_open_nand_warning_onresponse(ui_view* view, void* data, u32 response) { @@ -430,7 +430,7 @@ static void files_open_nand_warning_onresponse(ui_view* view, void* data, u32 re } void files_open_nand_warning(FS_ArchiveID archive) { - prompt_display_yes_no("Confirmation", "Modifying the NAND is dangerous and can render\n the system inoperable.\nMake sure you know what you are doing.\n\nProceed?", COLOR_TEXT, (void*) archive, NULL, files_open_nand_warning_onresponse); + prompt_display_yes_no("確認", "修改NAND是危險的,可能會導致\n 系統無法正常運行。\n確保自己知道行為造成的後果。\n\n是否繼續?", COLOR_TEXT, (void*) archive, NULL, files_open_nand_warning_onresponse); } void files_open_sd() { @@ -451,4 +451,6 @@ void files_open_twl_photo() { void files_open_twl_sound() { files_open(ARCHIVE_TWL_SOUND, fsMakePath(PATH_EMPTY, "")); -} \ No newline at end of file +} + +// オケー \ No newline at end of file diff --git a/source/fbi/mainmenu.c b/source/fbi/mainmenu.c index 61d9e15..c5065da 100644 --- a/source/fbi/mainmenu.c +++ b/source/fbi/mainmenu.c @@ -64,5 +64,5 @@ static void mainmenu_update(ui_view* view, void* data, linked_list* items, list_ void mainmenu_open() { resources_load(); - list_display("Main Menu", "A: Select, START: Exit", NULL, mainmenu_update, mainmenu_draw_top); + list_display("主菜單", "A: 選擇, START: 退出", NULL, mainmenu_update, mainmenu_draw_top); } diff --git a/source/fbi/task/listfiles.c b/source/fbi/task/listfiles.c index 02168d5..3b6cb2e 100644 --- a/source/fbi/task/listfiles.c +++ b/source/fbi/task/listfiles.c @@ -16,8 +16,8 @@ int task_compare_files(void* userData, const void* p1, const void* p2) { list_item* info1 = (list_item*) p1; list_item* info2 = (list_item*) p2; - bool info1Base = strncmp(info1->name, "", LIST_ITEM_NAME_MAX) == 0 || strncmp(info1->name, "", LIST_ITEM_NAME_MAX) == 0; - bool info2Base = strncmp(info2->name, "", LIST_ITEM_NAME_MAX) == 0 || strncmp(info2->name, "", LIST_ITEM_NAME_MAX) == 0; + bool info1Base = strncmp(info1->name, "<當前文件夾>", LIST_ITEM_NAME_MAX) == 0 || strncmp(info1->name, "<當前文件>", LIST_ITEM_NAME_MAX) == 0; + bool info2Base = strncmp(info2->name, "<當前文件夾>", LIST_ITEM_NAME_MAX) == 0 || strncmp(info2->name, "<當前文件>", LIST_ITEM_NAME_MAX) == 0; if(info1Base && !info2Base) { return -1; @@ -199,9 +199,9 @@ static void task_populate_files_thread(void* arg) { if(R_SUCCEEDED(res = task_create_file_item(&baseItem, data->archive, data->path, 0, false))) { file_info* baseInfo = (file_info*) baseItem->data; if(baseInfo->attributes & FS_ATTRIBUTE_DIRECTORY) { - string_copy(baseItem->name, "", LIST_ITEM_NAME_MAX); + string_copy(baseItem->name, "<當前文件夾>", LIST_ITEM_NAME_MAX); } else { - string_copy(baseItem->name, "", LIST_ITEM_NAME_MAX); + string_copy(baseItem->name, "<當前文件>", LIST_ITEM_NAME_MAX); } linked_list queue; @@ -363,4 +363,6 @@ Result task_populate_files(populate_files_data* data) { } return res; -} \ No newline at end of file +} + +// オケー \ No newline at end of file diff --git a/source/fbi/task/uitask.c b/source/fbi/task/uitask.c index c0ba7ac..7846bf1 100644 --- a/source/fbi/task/uitask.c +++ b/source/fbi/task/uitask.c @@ -67,10 +67,10 @@ void task_draw_ext_save_data_info(ui_view* view, void* data, float x1, float y1, char infoText[512]; snprintf(infoText, sizeof(infoText), - "Ext Save Data ID: %016llX\n" - "Shared: %s", + "額外保存數據ID: %016llX\n" + "動態: %s", info->extSaveDataId, - info->shared ? "Yes" : "No"); + info->shared ? "是" : "否"); float infoWidth; screen_get_string_size(&infoWidth, NULL, infoText, 0.5f, 0.5f); @@ -87,18 +87,18 @@ void task_draw_file_info(ui_view* view, void* data, float x1, float y1, float x2 size_t infoTextPos = 0; if(strlen(info->name) > 48) { - infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "Name: %.45s...\n", info->name); + infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "名稱: %.45s...\n", info->name); } else { - infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "Name: %.48s\n", info->name); + infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "名稱: %.48s\n", info->name); } - infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "Attributes: "); + infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "屬性: "); if(info->attributes & (FS_ATTRIBUTE_DIRECTORY | FS_ATTRIBUTE_HIDDEN | FS_ATTRIBUTE_ARCHIVE | FS_ATTRIBUTE_READ_ONLY)) { bool needsSeparator = false; if(info->attributes & FS_ATTRIBUTE_DIRECTORY) { - infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "Directory"); + infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "文件夾"); needsSeparator = true; } @@ -107,7 +107,7 @@ void task_draw_file_info(ui_view* view, void* data, float x1, float y1, float x2 infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, ", "); } - infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "Hidden"); + infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "隐藏文件"); needsSeparator = true; } @@ -116,7 +116,7 @@ void task_draw_file_info(ui_view* view, void* data, float x1, float y1, float x2 infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, ", "); } - infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "Archive"); + infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "文件"); needsSeparator = true; } @@ -125,17 +125,17 @@ void task_draw_file_info(ui_view* view, void* data, float x1, float y1, float x2 infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, ", "); } - infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "Read Only"); + infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "只讀"); needsSeparator = true; } } else { - infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "None"); + infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "無"); } infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "\n"); if(!(info->attributes & FS_ATTRIBUTE_DIRECTORY)) { - infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "Size: %.2f %s\n", + infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "大小: %.2f %s\n", ui_get_display_size(info->size), ui_get_display_size_units(info->size)); if(info->isCia && info->ciaInfo.loaded) { @@ -146,21 +146,21 @@ void task_draw_file_info(ui_view* view, void* data, float x1, float y1, float x2 smdh_region_to_string(regionString, info->ciaInfo.meta.region, sizeof(regionString)); } else { - snprintf(regionString, sizeof(regionString), "Unknown"); + snprintf(regionString, sizeof(regionString), "未知"); } infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, - "Title ID: %016llX\n" - "Version: %hu (%d.%d.%d)\n" - "Region: %s\n" - "Installed Size: %.2f %s", + "應用ID: %016llX\n" + "版本: %hu (%d.%d.%d)\n" + "區域: %s\n" + "安裝後大小: %.2f %s", info->ciaInfo.titleId, info->ciaInfo.version, (info->ciaInfo.version >> 10) & 0x3F, (info->ciaInfo.version >> 4) & 0x3F, info->ciaInfo.version & 0xF, regionString, ui_get_display_size(info->ciaInfo.installedSize), ui_get_display_size_units(info->ciaInfo.installedSize)); } else if(info->isTicket && info->ticketInfo.loaded) { - infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "Ticket ID: %016llX", info->ticketInfo.titleId); + infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "數據ID: %016llX", info->ticketInfo.titleId); } } @@ -178,11 +178,11 @@ void task_draw_pending_title_info(ui_view* view, void* data, float x1, float y1, char infoText[512]; snprintf(infoText, sizeof(infoText), - "Pending Title ID: %016llX\n" - "Media Type: %s\n" - "Version: %hu (%d.%d.%d)", + "待定應用ID: %016llX\n" + "媒體類型: %s\n" + "版本: %hu (%d.%d.%d)", info->titleId, - info->mediaType == MEDIATYPE_NAND ? "NAND" : info->mediaType == MEDIATYPE_SD ? "SD" : "Game Card", + info->mediaType == MEDIATYPE_NAND ? "NAND" : info->mediaType == MEDIATYPE_SD ? "SD" : "遊戲卡帶", info->version, (info->version >> 10) & 0x3F, (info->version >> 4) & 0x3F, info->version & 0xF); float infoWidth; @@ -198,7 +198,7 @@ void task_draw_system_save_data_info(ui_view* view, void* data, float x1, float char infoText[512]; - snprintf(infoText, sizeof(infoText), "System Save Data ID: %08lX", info->systemSaveDataId); + snprintf(infoText, sizeof(infoText), "系統保存數據ID: %08lX", info->systemSaveDataId); float infoWidth; screen_get_string_size(&infoWidth, NULL, infoText, 0.5f, 0.5f); @@ -214,7 +214,7 @@ void task_draw_ticket_info(ui_view* view, void* data, float x1, float y1, float if(info->loaded) { char infoText[512]; - snprintf(infoText, sizeof(infoText), "Title ID: %016llX", info->titleId); + snprintf(infoText, sizeof(infoText), "應用ID: %016llX", info->titleId); float infoWidth; screen_get_string_size(&infoWidth, NULL, infoText, 0.5f, 0.5f); @@ -235,20 +235,20 @@ void task_draw_title_info(ui_view* view, void* data, float x1, float y1, float x smdh_region_to_string(regionString, info->meta.region, sizeof(regionString)); } else { - snprintf(regionString, sizeof(regionString), "Unknown"); + snprintf(regionString, sizeof(regionString), "未知"); } char infoText[512]; snprintf(infoText, sizeof(infoText), - "Title ID: %016llX\n" - "Media Type: %s\n" - "Version: %hu (%d.%d.%d)\n" - "Product Code: %s\n" - "Region: %s\n" - "Size: %.2f %s", + "應用ID: %016llX\n" + "媒體類型: %s\n" + "版本: %hu (%d.%d.%d)\n" + "產品代碼: %s\n" + "區域: %s\n" + "大小: %.2f %s", info->titleId, - info->mediaType == MEDIATYPE_NAND ? "NAND" : info->mediaType == MEDIATYPE_SD ? "SD" : "Game Card", + info->mediaType == MEDIATYPE_NAND ? "NAND" : info->mediaType == MEDIATYPE_SD ? "SD" : "遊戲卡帶", info->version, (info->version >> 10) & 0x3F, (info->version >> 4) & 0x3F, info->version & 0xF, info->productCode, regionString, @@ -260,4 +260,6 @@ void task_draw_title_info(ui_view* view, void* data, float x1, float y1, float x float infoX = x1 + (x2 - x1 - infoWidth) / 2; float infoY = y1 + (y2 - y1) / 2 - 8; screen_draw_string(infoText, infoX, infoY, 0.5f, 0.5f, COLOR_TEXT, true); -} \ No newline at end of file +} + +// オケー \ No newline at end of file