Localization improvements and fixes (#956)

This commit is contained in:
Francesco Saltori 2023-09-08 02:09:03 +02:00 committed by GitHub
parent 4d1864c8a1
commit c16e258c93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 229 additions and 356 deletions

View file

@ -16,18 +16,18 @@ std::string _GetTitleIdTypeStr(TitleId titleId)
switch (tip.GetType())
{
case TitleIdParser::TITLE_TYPE::AOC:
return _("DLC").ToStdString();
return _("DLC").utf8_string();
case TitleIdParser::TITLE_TYPE::BASE_TITLE:
return _("Base game").ToStdString();
return _("Base game").utf8_string();
case TitleIdParser::TITLE_TYPE::BASE_TITLE_DEMO:
return _("Demo").ToStdString();
return _("Demo").utf8_string();
case TitleIdParser::TITLE_TYPE::SYSTEM_TITLE:
case TitleIdParser::TITLE_TYPE::SYSTEM_OVERLAY_TITLE:
return _("System title").ToStdString();
return _("System title").utf8_string();
case TitleIdParser::TITLE_TYPE::SYSTEM_DATA:
return _("System data title").ToStdString();
return _("System data title").utf8_string();
case TitleIdParser::TITLE_TYPE::BASE_TITLE_UPDATE:
return _("Update").ToStdString();
return _("Update").utf8_string();
default:
break;
}
@ -60,8 +60,8 @@ bool GameUpdateWindow::ParseUpdate(const fs::path& metaPath)
std::string typeStrToInstall = _GetTitleIdTypeStr(m_title_info.GetAppTitleId());
std::string typeStrCurrentlyInstalled = _GetTitleIdTypeStr(tmp.GetAppTitleId());
std::string wxMsg = wxHelper::MakeUTF8(_("It seems that there is already a title installed at the target location but it has a different type.\nCurrently installed: \'{}\' Installing: \'{}\'\n\nThis can happen for titles which were installed with very old Cemu versions.\nDo you still want to continue with the installation? It will replace the currently installed title."));
wxMessageDialog dialog(this, fmt::format(fmt::runtime(wxMsg), typeStrCurrentlyInstalled, typeStrToInstall), _("Warning"), wxCENTRE | wxYES_NO | wxICON_EXCLAMATION);
auto wxMsg = _("It seems that there is already a title installed at the target location but it has a different type.\nCurrently installed: \'{}\' Installing: \'{}\'\n\nThis can happen for titles which were installed with very old Cemu versions.\nDo you still want to continue with the installation? It will replace the currently installed title.");
wxMessageDialog dialog(this, formatWxString(wxMsg, typeStrCurrentlyInstalled, typeStrToInstall), _("Warning"), wxCENTRE | wxYES_NO | wxICON_EXCLAMATION);
if (dialog.ShowModal() != wxID_YES)
return false;
}
@ -90,7 +90,7 @@ bool GameUpdateWindow::ParseUpdate(const fs::path& metaPath)
if (ec)
{
const auto error_msg = wxStringFormat2(_("Error when trying to move former title installation:\n{}"), GetSystemErrorMessage(ec));
const auto error_msg = formatWxString(_("Error when trying to move former title installation:\n{}"), GetSystemErrorMessage(ec));
wxMessageBox(error_msg, _("Error"), wxOK | wxCENTRE, this);
return false;
}
@ -244,7 +244,7 @@ void GameUpdateWindow::ThreadWork()
error_msg << GetSystemErrorMessage(ex);
if(currentDirEntry != fs::directory_entry{})
error_msg << fmt::format("\n{}\n{}",_("Current file:").ToStdString(), _pathToUtf8(currentDirEntry.path()));
error_msg << fmt::format("\n{}\n{}",_("Current file:").utf8_string(), _pathToUtf8(currentDirEntry.path()));
m_thread_exception = error_msg.str();
m_thread_state = ThreadCanceled;