Skip to content

Commit

Permalink
Translation 2.0 commit 21
Browse files Browse the repository at this point in the history
Signed-off-by: Simo <[email protected]>
  • Loading branch information
Simo3ds authored Dec 21, 2023
1 parent 24ceda2 commit 932c8a8
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions sysmodules/rosalina/source/errdisp.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ static int ERRF_FormatRegisterDump(char *out, const ERRF_ExceptionData *exceptio
static int ERRF_FormatGenericInfo(char *out, const ERRF_FatalErrInfo *info)
{
static const char *types[] = {
"generic", "corrupted", "card removed", "exception", "result failure", "generic (log only)", "invalid"
"generico", "corrotto", "scheda rimossa", "inaspettato", "risulta fallito", "generico (solo log)", "invalido"
};

static const char *exceptionTypes[] = {
"prefetch abort", "data abort", "undefined instruction", "VFP", "invalid"
"aborto prefetch", "aborto dati", "istruzioni indefinite", "VFP", "invalido"
};

const char *type = (u32)info->type > (u32)ERRF_ERRTYPE_LOG_ONLY ? types[6] : types[(u32)info->type];
Expand All @@ -160,12 +160,12 @@ static int ERRF_FormatGenericInfo(char *out, const ERRF_FatalErrInfo *info)
const char *exceptionType = (u32) info->data.exception_data.excep.type > (u32)ERRF_EXCEPTION_VFP ?
exceptionTypes[4] : exceptionTypes[(u32)info->data.exception_data.excep.type];

out += sprintf(out, "Error type: exception (%s)\n", exceptionType);
out += sprintf(out, "Tipo di errore: inaspettato (%s)\n", exceptionType);
}
else
out += sprintf(out, "Error type: %s\n", type);
out += sprintf(out, "Tipo di errore: %s\n", type);

out += sprintf(out, "\nProcess ID: %lu\n", info->procId);
out += sprintf(out, "\nID Programma: %lu\n", info->procId);

res = svcOpenProcess(&processHandle, info->procId);
if(R_SUCCEEDED(res))
Expand All @@ -175,8 +175,8 @@ static int ERRF_FormatGenericInfo(char *out, const ERRF_FatalErrInfo *info)
svcGetProcessInfo((s64 *)name, processHandle, 0x10000);
svcGetProcessInfo((s64 *)&titleId, processHandle, 0x10001);
svcCloseHandle(processHandle);
out += sprintf(out, "Process name: %s\n", name);
out += sprintf(out, "Process title ID: %016llx\n", titleId);
out += sprintf(out, "Nome programma: %s\n", name);
out += sprintf(out, "ID Titolo del programma: %016llx\n", titleId);
}

out += sprintf(out, "\n");
Expand All @@ -194,27 +194,27 @@ static int ERRF_FormatError(char *out, const ERRF_FatalErrInfo *info, bool isLog
u64 timeNow = osGetTime();
u64 timeAtBoot = timeNow - (1000 * svcGetSystemTick() / SYSCLOCK_ARM11);
dateTimeToString(dateTimeStr, timeNow, false);
out += sprintf(out, "Reported on: %s\n", dateTimeStr);
out += sprintf(out, "Riportato su: %s\n", dateTimeStr);
dateTimeToString(dateTimeStr, timeAtBoot, false);
out += sprintf(out, "System booted on: %s\n\n", dateTimeStr);
out += sprintf(out, "Sistema avviato su: %s\n\n", dateTimeStr);

}
switch (info->type)
{
case ERRF_ERRTYPE_NAND_DAMAGED:
out += sprintf(out, "The NAND chip has been damaged.\n");
out += sprintf(out, "Il chip della NAND e' danneggiato.\n");
break;
case ERRF_ERRTYPE_CARD_REMOVED:
{
const char *medium = R_MODULE(info->resCode) == RM_SDMC ? "SD card" : "cartridge";
out += sprintf(out, "The %s was removed.\n", medium);
const char *medium = R_MODULE(info->resCode) == RM_SDMC ? "Scheda SD" : "cartuccia";
out += sprintf(out, "La %s e' stata rimossa.\n", medium);
break;
}
case ERRF_ERRTYPE_GENERIC:
case ERRF_ERRTYPE_LOG_ONLY:
out += ERRF_FormatGenericInfo(out, info);
out += sprintf(out, "Address: 0x%08lx\n", info->pcAddr);
out += sprintf(out, "Error code: 0x%08lx\n", info->resCode);
out += sprintf(out, "Indirizzo: 0x%08lx\n", info->pcAddr);
out += sprintf(out, "Codice errore: 0x%08lx\n", info->resCode);
break;
case ERRF_ERRTYPE_EXCEPTION:
out += ERRF_FormatGenericInfo(out, info);
Expand All @@ -223,11 +223,11 @@ static int ERRF_FormatError(char *out, const ERRF_FatalErrInfo *info, bool isLog
break;
case ERRF_ERRTYPE_FAILURE:
out += ERRF_FormatGenericInfo(out, info);
out += sprintf(out, "Error code: 0x%08lx\n", info->resCode);
out += sprintf(out, "Reason: %.96s\n", info->data.failure_mesg);
out += sprintf(out, "Codice errore: 0x%08lx\n", info->resCode);
out += sprintf(out, "Ragioni: %.96s\n", info->data.failure_mesg);
break;
default:
out += sprintf(out, "Invalid fatal error data.\n");
out += sprintf(out, "Errore fatale dati invalido.\n");
}

// We might not always have enough space to display this on screen, so keep it to the log file
Expand All @@ -243,17 +243,17 @@ static void ERRF_DisplayError(ERRF_FatalErrInfo *info, bool continueAfterErrdisp
{
Draw_Lock();

u32 posY = Draw_DrawString(10, 10, COLOR_RED, "An error occurred (ErrDisp)");
u32 posY = Draw_DrawString(10, 10, COLOR_RED, "Si e' verificato un errore (ErrDisp)");
char buf[0x400];

ERRF_FormatError(buf, info, false);
posY = posY < 30 ? 30 : posY;

posY = Draw_DrawString(10, posY, COLOR_WHITE, buf);
if(continueAfterErrdisp)
posY = Draw_DrawString(10, posY + SPACING_Y, COLOR_TITLE, "Press any button to continue.\nThere is a high chance that it crashed.\nTo reboot, press A + B + X + Y + Start.");
posY = Draw_DrawString(10, posY + SPACING_Y, COLOR_TITLE, "Premi un qualsiasi tasto.\nC'e' una grande possibilita' che sia crashato.\nPer riavviare, premi A + B + X + Y + Start.");
else
posY = Draw_DrawString(10, posY + SPACING_Y, COLOR_WHITE, "Press any button to reboot.");
posY = Draw_DrawString(10, posY + SPACING_Y, COLOR_WHITE, "Premi un qualsiasi tasto per riavviare.");

Draw_FlushFramebuffer();
Draw_Unlock();
Expand Down

0 comments on commit 932c8a8

Please sign in to comment.