mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-10-10 01:11:00 +08:00
Compare commits
6 Commits
CN_Build9
...
CN-Release
Author | SHA1 | Date | |
---|---|---|---|
|
ed4cd718ce | ||
|
30a1d408b5 | ||
|
e616e4444c | ||
|
4ce63659fc | ||
|
e04725a610 | ||
|
f654403b62 |
8
Makefile
8
Makefile
@ -15,16 +15,16 @@ EXTRA_OUTPUT_FILES := servefiles
|
||||
|
||||
BUILD_FLAGS := -Wno-format-truncation
|
||||
|
||||
VERSION_PARTS := 2.6.0 # $(subst ., ,$(shell git describe --tags --abbrev=0))
|
||||
VERSION_PARTS := 2.6.1 # $(subst ., ,$(shell git describe --tags --abbrev=0))
|
||||
|
||||
VERSION_MAJOR := 2#$(word 1, $(VERSION_PARTS))
|
||||
VERSION_MINOR := 6#$(word 2, $(VERSION_PARTS))
|
||||
VERSION_MICRO := 0#$(word 3, $(VERSION_PARTS))
|
||||
VERSION_MICRO := 1#$(word 3, $(VERSION_PARTS))
|
||||
|
||||
CHINESE_VERSION := Build 9
|
||||
CHINESE_VERSION := CV1
|
||||
|
||||
DESCRIPTION := 3DS开源应用管理器.
|
||||
AUTHOR := Steveice10 Theopse
|
||||
AUTHOR := Steveice10 + Theopse(汉化)
|
||||
|
||||
PRODUCT_CODE := CTR-P-CFBI
|
||||
UNIQUE_ID := 0xF8001
|
||||
|
@ -10,8 +10,8 @@ FBI是一个开源的3DS应用管理器。
|
||||
|
||||
## 特性(等待翻译)
|
||||
|
||||
* Browse and modify the SD card, TWL photos, TWL sounds, save data, and ext save data.
|
||||
* Export, import, and erase save data from DS cartridges.
|
||||
* 浏览和修改(micro)SD card, TWL相片, TWL声音, 保存数据, 扩展保存数据。
|
||||
* 从DS游戏卡导出, 导入, 删除游戏存储数据。
|
||||
* Export, import, and delete save data secure values.
|
||||
* Install titles/tickets from a file system, over a local network, or over the Internet with a URL or QR code.
|
||||
* Automatically imports title seeds on installation, either from the Internet or the SD card.
|
||||
|
@ -26,7 +26,7 @@ void smdh_region_to_string(char* out, u32 region, size_t size) {
|
||||
if(region == 0) {
|
||||
snprintf(out, size, "未知");
|
||||
} else if((region & SMDH_ALL_REGIONS) == SMDH_ALL_REGIONS) {
|
||||
snprintf(out, size, "无");
|
||||
snprintf(out, size, "无/任意");
|
||||
} else {
|
||||
size_t pos = 0;
|
||||
|
||||
|
@ -431,7 +431,7 @@ void screen_get_texture_size(u32* width, u32* height, u32 id) {
|
||||
|
||||
void screen_begin_frame() {
|
||||
if(!C3D_FrameBegin(C3D_FRAME_SYNCDRAW)) {
|
||||
error_panic("无法启动相框.");
|
||||
error_panic("无法启动相机.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -779,7 +779,7 @@ ui_view* error_display_errno(void* data, void (*drawTop)(ui_view* view, void* da
|
||||
err = -err;
|
||||
}
|
||||
|
||||
snprintf(errorData->fullText, 4096, "%s\nI/O Error: %s (%d)", textBuf, strerror(err), err);
|
||||
snprintf(errorData->fullText, 4096, "%s\nI/O 错误: %s (%d)", textBuf, strerror(err), err);
|
||||
|
||||
return prompt_display_notify("错误", errorData->fullText, COLOR_TEXT, errorData, error_draw_top, error_onresponse);
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ static void ui_draw_top(ui_view* ui) {
|
||||
screen_set_base_alpha(ui_fade_alpha);
|
||||
|
||||
char verText[64];
|
||||
snprintf(verText, 64, "\nVer. %d.%d.%d\n(Chinese Build 9)", VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO);
|
||||
snprintf(verText, 64, "版本 %d.%d.%d", VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO);
|
||||
|
||||
float verWidth;
|
||||
float verHeight;
|
||||
@ -158,8 +158,28 @@ static void ui_draw_top(ui_view* ui) {
|
||||
screen_draw_string(verText, topScreenTopBarX + 2, topScreenTopBarY + (topScreenTopBarHeight - verHeight) / 2, 0.5f, 0.5f, COLOR_TEXT, true);
|
||||
|
||||
time_t t = time(NULL);
|
||||
char* timeText = ctime(&t);
|
||||
timeText[strlen(timeText) - 1] = '\0';
|
||||
|
||||
|
||||
//char* timeText = ctime(&t);
|
||||
char otimeText[20];
|
||||
struct tm * timeinfo = localtime(&t);
|
||||
strftime(otimeText, 20, "%Y/%m/%d %H:%M:%S",timeinfo);
|
||||
|
||||
char weekInfo[7];
|
||||
strftime(weekInfo, 7, "%a",timeinfo);
|
||||
|
||||
if (strcmp(weekInfo, "Mon") == 0) snprintf(weekInfo, 7, "周一");
|
||||
if (strcmp(weekInfo, "Tue") == 0) snprintf(weekInfo, 7, "周二");
|
||||
if (strcmp(weekInfo, "Wed") == 0) snprintf(weekInfo, 7, "周三");
|
||||
if (strcmp(weekInfo, "Thu") == 0) snprintf(weekInfo, 7, "周四");
|
||||
if (strcmp(weekInfo, "Fri") == 0) snprintf(weekInfo, 7, "周五");
|
||||
if (strcmp(weekInfo, "Sat") == 0) snprintf(weekInfo, 7, "周六");
|
||||
if (strcmp(weekInfo, "Sun") == 0) snprintf(weekInfo, 7, "周日");
|
||||
|
||||
char timeText[28];
|
||||
snprintf(timeText, 28, "%s %s", otimeText, weekInfo);
|
||||
|
||||
timeText[27] = '\0';
|
||||
|
||||
float timeTextWidth;
|
||||
float timeTextHeight;
|
||||
@ -224,7 +244,7 @@ static void ui_draw_top(ui_view* ui) {
|
||||
}
|
||||
|
||||
u64 size = (u64) resource.freeClusters * (u64) resource.clusterSize;
|
||||
snprintf(currBuffer, sizeof(ui_free_space_buffer) - (currBuffer - ui_free_space_buffer), "CTR NAND: %.1f %s",
|
||||
snprintf(currBuffer, sizeof(ui_free_space_buffer) - (currBuffer - ui_free_space_buffer), "3DS 分区: %.1f %s",
|
||||
ui_get_display_size(size), ui_get_display_size_units(size));
|
||||
currBuffer += strlen(currBuffer);
|
||||
}
|
||||
@ -236,7 +256,7 @@ static void ui_draw_top(ui_view* ui) {
|
||||
}
|
||||
|
||||
u64 size = (u64) resource.freeClusters * (u64) resource.clusterSize;
|
||||
snprintf(currBuffer, sizeof(ui_free_space_buffer) - (currBuffer - ui_free_space_buffer), "TWL NAND: %.1f %s",
|
||||
snprintf(currBuffer, sizeof(ui_free_space_buffer) - (currBuffer - ui_free_space_buffer), "DSi 分区: %.1f %s",
|
||||
ui_get_display_size(size), ui_get_display_size_units(size));
|
||||
currBuffer += strlen(currBuffer);
|
||||
}
|
||||
@ -248,7 +268,7 @@ static void ui_draw_top(ui_view* ui) {
|
||||
}
|
||||
|
||||
u64 size = (u64) resource.freeClusters * (u64) resource.clusterSize;
|
||||
snprintf(currBuffer, sizeof(ui_free_space_buffer) - (currBuffer - ui_free_space_buffer), "TWL 照片: %.1f %s",
|
||||
snprintf(currBuffer, sizeof(ui_free_space_buffer) - (currBuffer - ui_free_space_buffer), "DSi 照片区: %.1f %s",
|
||||
ui_get_display_size(size), ui_get_display_size_units(size));
|
||||
currBuffer += strlen(currBuffer);
|
||||
}
|
||||
|
@ -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("确认", "修改 NAND 是危险的,\n这可能导致系统无法正常运行,\n请您确保自己知道正在做什么.\n\n继续?", 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() {
|
||||
|
@ -7,11 +7,11 @@
|
||||
#include "section.h"
|
||||
#include "../core/core.h"
|
||||
|
||||
static list_item sd = {"SD 卡", COLOR_TEXT, files_open_sd};
|
||||
static list_item ctr_nand = {"CTR NAND", COLOR_TEXT, files_open_ctr_nand};
|
||||
static list_item twl_nand = {"TWL NAND", COLOR_TEXT, files_open_twl_nand};
|
||||
static list_item twl_photo = {"TWL 照片", COLOR_TEXT, files_open_twl_photo};
|
||||
static list_item twl_sound = {"TWL 声音", COLOR_TEXT, files_open_twl_sound};
|
||||
static list_item sd = {"(Micro) SD 卡", COLOR_TEXT, files_open_sd};
|
||||
static list_item ctr_nand = {"3DS 闪存分区 (CTR NAND)", COLOR_TEXT, files_open_ctr_nand};
|
||||
static list_item twl_nand = {"DSi 闪存分区 (TWL NAND)", COLOR_TEXT, files_open_twl_nand};
|
||||
static list_item twl_photo = {"DSi 照片区", COLOR_TEXT, files_open_twl_photo};
|
||||
static list_item twl_sound = {"DSi 录音区", COLOR_TEXT, files_open_twl_sound};
|
||||
static list_item dump_nand = {"导出 NAND", COLOR_TEXT, dumpnand_open};
|
||||
static list_item titles = {"应用", COLOR_TEXT, titles_open};
|
||||
static list_item pending_titles = {"未完成的应用", COLOR_TEXT, pendingtitles_open};
|
||||
|
@ -129,14 +129,18 @@ void task_draw_file_info(ui_view* view, void* data, float x1, float y1, float x2
|
||||
needsSeparator = true;
|
||||
}
|
||||
} else {
|
||||
infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "无");
|
||||
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, "大小: %.2f %s\n",
|
||||
infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "大小: %.2f %s",
|
||||
ui_get_display_size(info->size), ui_get_display_size_units(info->size));
|
||||
|
||||
infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, " (%.2f %s)\n",
|
||||
ui_get_display_size(info->ciaInfo.installedSize),
|
||||
ui_get_display_size_units(info->ciaInfo.installedSize));
|
||||
|
||||
if(info->isCia && info->ciaInfo.loaded) {
|
||||
char regionString[64];
|
||||
@ -152,13 +156,11 @@ void task_draw_file_info(ui_view* view, void* data, float x1, float y1, float x2
|
||||
infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos,
|
||||
"应用 ID: %016llX\n"
|
||||
"版本: %hu (%d.%d.%d)\n"
|
||||
"区域: %s\n"
|
||||
"安装后大小: %.2f %s",
|
||||
"区域: %s",
|
||||
//"安装后大小: %.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));
|
||||
regionString);
|
||||
} else if(info->isTicket && info->ticketInfo.loaded) {
|
||||
infoTextPos += snprintf(infoText + infoTextPos, sizeof(infoText) - infoTextPos, "应用 ID: %016llX", info->ticketInfo.titleId);
|
||||
}
|
||||
|
@ -12,13 +12,19 @@
|
||||
#include "../core/core.h"
|
||||
|
||||
static void update_check_update(ui_view* view, void* data, float* progress, char* text) {
|
||||
//ui_pop();
|
||||
//info_destroy(view);
|
||||
//prompt_display_notify("检查更新", "测试/滚动版不支持检查更新\n仅预览版及稳定版支持更新至最新版本.", COLOR_TEXT, NULL, NULL, NULL);
|
||||
//return;
|
||||
|
||||
|
||||
bool hasUpdate = false;
|
||||
char updateURL[DOWNLOAD_URL_MAX];
|
||||
|
||||
Result res = 0;
|
||||
|
||||
json_t* json = NULL;
|
||||
if(R_SUCCEEDED(res = http_download_json(/*"https://api.github.com/repos/Theopse/fbi-i18n-zh-cn/releases/latest"*/ "https://null", &json, 16 * 1024))) {
|
||||
if(R_SUCCEEDED(res = http_download_json("https://api.github.com/repos/Theopse/FBI-i18n-zh/releases/latest" /*"https://null"*/, &json, 16 * 1024))) {
|
||||
if(json_is_object(json)) {
|
||||
json_t* name = json_object_get(json, "name");
|
||||
json_t* assets = json_object_get(json, "assets");
|
||||
|
Loading…
x
Reference in New Issue
Block a user