From 5af6ae9321dfe390f51a99cc47a68ddb6b65c6a7 Mon Sep 17 00:00:00 2001 From: vnctdj <3978690+vnctdj@users.noreply.github.com> Date: Sat, 9 Jan 2021 15:01:35 +0100 Subject: [PATCH] Improve some i18n things - reuse some translations - move some strings to a more suitable category I will adapt the lang .ini files accordingly. --- Core/Dialog/PSPMsgDialog.cpp | 12 ++++++------ Core/Dialog/PSPNetconfDialog.cpp | 2 +- Core/HLE/sceKernelModule.cpp | 2 +- UI/GameSettingsScreen.cpp | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Core/Dialog/PSPMsgDialog.cpp b/Core/Dialog/PSPMsgDialog.cpp index d68abaa9b522..8361adbc3e9e 100755 --- a/Core/Dialog/PSPMsgDialog.cpp +++ b/Core/Dialog/PSPMsgDialog.cpp @@ -149,11 +149,11 @@ int PSPMsgDialog::Init(unsigned int paramAddr) { void PSPMsgDialog::FormatErrorCode(uint32_t code) { - auto di = GetI18NCategory("Dialog"); + auto err = GetI18NCategory("Dialog"); switch (code) { case SCE_UTILITY_SAVEDATA_ERROR_LOAD_DATA_BROKEN: - snprintf(msgText, 512, "%s (%08x)", di->T("MsgErrorSavedataDataBroken", "Save data was corrupt."), code); + snprintf(msgText, 512, "%s (%08x)", err->T("MsgErrorSavedataDataBroken", "Save data was corrupt."), code); break; case SCE_UTILITY_SAVEDATA_ERROR_LOAD_NO_MS: @@ -161,23 +161,23 @@ void PSPMsgDialog::FormatErrorCode(uint32_t code) { case SCE_UTILITY_SAVEDATA_ERROR_SAVE_NO_MS: case SCE_UTILITY_SAVEDATA_ERROR_DELETE_NO_MS: case SCE_UTILITY_SAVEDATA_ERROR_SIZES_NO_MS: - snprintf(msgText, 512, "%s (%08x)", di->T("MsgErrorSavedataNoMS", "Memory stick not inserted."), code); + snprintf(msgText, 512, "%s (%08x)", err->T("MsgErrorSavedataNoMS", "Memory stick not inserted."), code); break; case SCE_UTILITY_SAVEDATA_ERROR_LOAD_NO_DATA: case SCE_UTILITY_SAVEDATA_ERROR_RW_NO_DATA: case SCE_UTILITY_SAVEDATA_ERROR_DELETE_NO_DATA: case SCE_UTILITY_SAVEDATA_ERROR_SIZES_NO_DATA: - snprintf(msgText, 512, "%s (%08x)", di->T("MsgErrorSavedataNoData", "Warning: no save data was found."), code); + snprintf(msgText, 512, "%s (%08x)", err->T("MsgErrorSavedataNoData", "Warning: no save data was found."), code); break; case SCE_UTILITY_SAVEDATA_ERROR_RW_MEMSTICK_FULL: case SCE_UTILITY_SAVEDATA_ERROR_SAVE_MS_NOSPACE: - snprintf(msgText, 512, "%s (%08x)", di->T("MsgErrorSavedataMSFull", "Memory stick full. Check your storage space."), code); + snprintf(msgText, 512, "%s (%08x)", err->T("MsgErrorSavedataMSFull", "Memory stick full. Check your storage space."), code); break; default: - snprintf(msgText, 512, "%s %08x", di->T("MsgErrorCode", "Error code:"), code); + snprintf(msgText, 512, "%s %08x", err->T("MsgErrorCode", "Error code:"), code); } } diff --git a/Core/Dialog/PSPNetconfDialog.cpp b/Core/Dialog/PSPNetconfDialog.cpp index 4e3fe9ae1c80..b7126d334881 100644 --- a/Core/Dialog/PSPNetconfDialog.cpp +++ b/Core/Dialog/PSPNetconfDialog.cpp @@ -347,7 +347,7 @@ int PSPNetconfDialog::Update(int animSpeed) { if (g_Config.iWlanAdhocChannel == PSP_SYSTEMPARAM_ADHOC_CHANNEL_AUTOMATIC) channel = "Automatic"; - DisplayMessage(di->T("ConnectingPleaseWait", "Connecting.\nPlease wait..."), di->T("Channel") + std::string(" ") + di->T(channel)); + DisplayMessage(di->T("ConnectingPleaseWait", "Connecting.\nPlease wait..."), di->T("Channel:") + std::string(" ") + di->T(channel)); // Only Join mode is showing Cancel button on KHBBS and the button will fade out before the dialog is fading out, probably because it's already connected thus can't be canceled anymore if (request.netAction == NETCONF_JOIN_ADHOC) diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index 43b012a60680..2c8814683b26 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -1720,7 +1720,7 @@ void __KernelLoadReset() { bool __KernelLoadExec(const char *filename, u32 paramPtr, std::string *error_string) { SceKernelLoadExecParam param; - PSP_SetLoading("Loading exec..."); + PSP_SetLoading("Loading executable..."); if (paramPtr) Memory::ReadStruct(paramPtr, ¶m); diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 417d17da45ad..0d13f0428a51 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -766,7 +766,7 @@ void GameSettingsScreen::CreateViews() { networkingSettingsScroll->Add(networkingSettings); tabHolder->AddTab(ms->T("Networking"), networkingSettingsScroll); - networkingSettings->Add(new ItemHeader(n->T("Networking"))); + networkingSettings->Add(new ItemHeader(ms->T("Networking"))); networkingSettings->Add(new Choice(n->T("Adhoc Multiplayer forum")))->OnClick.Handle(this, &GameSettingsScreen::OnAdhocGuides);