Skip to content

Commit

Permalink
Improve some i18n things
Browse files Browse the repository at this point in the history
- reuse some translations
- move some strings to a more suitable category

I will adapt the lang .ini files accordingly.
  • Loading branch information
vnctdj committed Jan 9, 2021
1 parent e00f894 commit 5af6ae9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions Core/Dialog/PSPMsgDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,35 +149,35 @@ 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:
case SCE_UTILITY_SAVEDATA_ERROR_RW_NO_MEMSTICK:
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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Core/Dialog/PSPNetconfDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Core/HLE/sceKernelModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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, &param);
Expand Down
2 changes: 1 addition & 1 deletion UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 5af6ae9

Please sign in to comment.