Skip to content

Commit

Permalink
Merge pull request #154 from dukesrg/master
Browse files Browse the repository at this point in the history
added fileexplorer and firmloader translation
  • Loading branch information
AlbertoSONIC committed Aug 10, 2015
2 parents 69270ec + c40b93f commit bc08b47
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 14 deletions.
5 changes: 4 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
"OPENING": "Opening %s...\n",
"RESTORE": "Restore %ls",
"RESTORING": "Restoring %ls...\n",
"LOAD": "Load %ls",
"DIRECTORY": "Directory: %s",
"MISSING": "Missing %ls!\n",
"ERROR_OPENING": "Error opening %s!\n",
"ERROR_CREATING": "Error creating %s!\n",
"ERROR_READING": "Error reading %s!\n",
"ERROR_WRITING": "Error writing %s!\n",
"ERROR_COPYING": "Error copying %s to %s!\n",
"WRONG": "Wrong %s %ls!",
"WRONG": "Wrong %s %ls!\n",
"GOT": "Got %ls\n",
"EXPECTED": "Expected %ls\n",
"VERSION": "version",
Expand All @@ -44,6 +46,7 @@
"TMD_VERSION": "TMD version",
"TMD_SIZE": "TMD size",
"HASH": "hash",
"FIRMWARE_FILE": "firmware file",
"HEALTH_AND_SAFETY": "Health & Safety info",
"CHECK_TMD_ONLY": "check TMD only",
"INJECT_FBI": "inject FBI",
Expand Down
5 changes: 4 additions & 1 deletion lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
"OPENING": "Открывается %s...\n",
"RESTORE": "Восстановление %ls",
"RESTORING": "Восстанавливается %ls...\n",
"LOAD": "Загрузка %ls",
"DIRECTORY": "Папка: %s",
"MISSING": "Отсутствует %ls!\n",
"ERROR_OPENING": "Ошибка открытия %s!\n",
"ERROR_CREATING": "Ошибка созжания %s!\n",
"ERROR_READING": "Ошибка чтения %s!\n",
"ERROR_WRITING": "Ошибка записи %s!\n",
"ERROR_COPYING": "Ошибка копирования %s в %s!\n",
"WRONG": " %s %ls!",
"WRONG": " %s %ls!\n",
"GOT": "Получено %ls\n",
"EXPECTED": "Требуется %ls\n",
"VERSION": "версия",
Expand All @@ -44,6 +46,7 @@
"TMD_VERSION": "версия TMD",
"TMD_SIZE": "размер TMD",
"HASH": "хэш",
"FIRMWARE_FILE": "файл прошивки",
"HEALTH_AND_SAFETY": "Информация и здоровье и безопасности",
"CHECK_TMD_ONLY": "только проверить TMD",
"INJECT_FBI": "вставить FBI",
Expand Down
16 changes: 7 additions & 9 deletions rxtools/source/features/cfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "CTRDecryptor.h"
#include "TitleKeyDecrypt.h"
#include "configuration.h"
#include "lang.h"

#define FIRM_ADDR 0x24000000
#define ARMBXR4 0x47204C00
Expand Down Expand Up @@ -322,11 +323,9 @@ void FirmLoader(){
if (loadFirm(firm_path))
{
ConsoleInit();
ConsoleSetTitle(L"FIRM LOADER ERROR!");
print(L"The file you selected is not a\n");
print(L"firmware. Are you crazy?!\n");
print(L"\n");
print(L"Press A to exit\n");
ConsoleSetTitle(strings[STR_LOAD], strings[STR_FIRMWARE_FILE]);
print(strings[STR_WRONG], "", strings[STR_FIRMWARE_FILE]);
print(strings[STR_PRESS_BUTTON_ACTION], strings[STR_BUTTON_A], strings[STR_CONTINUE]);
ConsoleShow();
WaitForButton(BUTTON_A);
return;
Expand All @@ -335,10 +334,9 @@ void FirmLoader(){
if (loadExecReboot())
{
ConsoleInit();
ConsoleSetTitle(L"FIRM LOADER ERROR!");
print(L"Failed to load and execute reboot.bin\n"
L"\n"
L"Press A to exit\n");
ConsoleSetTitle(strings[STR_LOAD], strings[STR_FIRMWARE_FILE]);
print(strings[STR_ERROR_LAUNCHING], strings[STR_FIRMWARE_FILE]);
print(strings[STR_PRESS_BUTTON_ACTION], strings[STR_BUTTON_A], strings[STR_CONTINUE]);
ConsoleShow();
WaitForButton(BUTTON_A);
return;
Expand Down
6 changes: 3 additions & 3 deletions rxtools/source/features/fileexplorer.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ size_t file_list(const char *path, char ***ls) {

int res=f_opendir(&myDir, dir);
if (res == FR_NO_FILE) {
print(L"no such directory: '%s'", path);
print(strings[STR_ERROR_OPENING], path);
return 0;
}
*ls = NULL;
Expand All @@ -66,7 +66,7 @@ size_t file_list(const char *path, char ***ls) {

void FileExplorerShow(){
ConsoleInit();
ConsoleSetTitle(L"DIR: %s", dir);
ConsoleSetTitle(strings[STR_DIRECTORY], dir);
if (count != 0)
{
int n = 0;
Expand All @@ -80,7 +80,7 @@ void FileExplorerShow(){

int i = 0;
for (i = beginning; i < beginning + list[(pointer / 7)]; i++) {
print(L"%s %s\n", i == pointer ? " " : "", files[i]);
print(L"%ls %s\n", i == pointer ? strings[STR_CURSOR] : strings[STR_NO_CURSOR], files[i]);
}
}
ConsoleShow();
Expand Down
4 changes: 4 additions & 0 deletions rxtools/source/lib/lang.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ static const char *keys[STR_NUM] = {
[STR_OPENING] = "OPENING",
[STR_RESTORE] = "RESTORE",
[STR_RESTORING] = "RESTORING",
[STR_LOAD] = "LOAD",
[STR_DIRECTORY] = "DIRECTORY",
[STR_MISSING] = "MISSING",
[STR_ERROR_OPENING] = "ERROR_OPENING",
[STR_ERROR_CREATING] = "ERROR_CREATING",
[STR_ERROR_READING] = "ERROR_READING",
[STR_ERROR_WRITING] = "ERROR_WRITING",
[STR_ERROR_COPYING] = "ERROR_COPYING",
[STR_ERROR_LAUNCHING] = "ERROR_LAUNCHING",
[STR_WRONG] = "WRONG",
[STR_GOT] = "GOT",
[STR_EXPECTED] = "EXPECTED",
Expand Down Expand Up @@ -81,6 +84,7 @@ static const char *keys[STR_NUM] = {
[STR_TMD_VERSION] = "TMD_VERSION",
[STR_TMD_SIZE] = "TMD_SIZE",
[STR_HASH] = "HASH",
[STR_FIRMWARE_FILE] = "FIRMWARE_FILE",
[STR_CHECK_TMD_ONLY] = "CHECK_TMD_ONLY",
[STR_INJECT_FBI] = "INJECT_FBI",
[STR_SYSTEM_TITLES] = "SYSTEM_TITLES",
Expand Down
4 changes: 4 additions & 0 deletions rxtools/source/lib/lang.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@ enum {
STR_OPENING,
STR_RESTORE,
STR_RESTORING,
STR_LOAD,
STR_DIRECTORY,
STR_MISSING,
STR_ERROR_OPENING,
STR_ERROR_CREATING,
STR_ERROR_READING,
STR_ERROR_WRITING,
STR_ERROR_COPYING,
STR_ERROR_LAUNCHING,
STR_WRONG,
STR_GOT,
STR_EXPECTED,
Expand Down Expand Up @@ -76,6 +79,7 @@ enum {
STR_TMD_VERSION,
STR_TMD_SIZE,
STR_HASH,
STR_FIRMWARE_FILE,
STR_CHECK_TMD_ONLY,
STR_INJECT_FBI,
STR_SYSTEM_TITLES,
Expand Down

0 comments on commit bc08b47

Please sign in to comment.