Compare commits

...

6 Commits

Author SHA1 Message Date
Rintim Theopse
ed4cd718ce Update README.md 2021-10-05 08:48:20 +00:00
Rintim
30a1d408b5 [2021/01/21-Niean] Releases 2021-01-21 23:22:42 +08:00
Rintim
e616e4444c [2021/01/20-Inchar] Locate changes 2021-01-20 23:07:25 +08:00
Rintim
4ce63659fc [2021/01/20-Inchar] Time's format 2021-01-20 23:07:18 +08:00
Rintim
e04725a610 [2021/01/19-Inchar] Fix some word's expression 2021-01-19 22:57:34 +08:00
Rintim
f654403b62 [2021/01/18-Inchar] A little change 2021-01-18 13:09:02 +08:00
10 changed files with 57 additions and 29 deletions

View File

@ -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

View File

@ -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.

View File

@ -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;

View File

@ -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;
}
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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() {

View File

@ -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};

View File

@ -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);
}

View File

@ -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");