mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-04 05:51:19 +12:00
Localization improvements and fixes (#956)
This commit is contained in:
parent
4d1864c8a1
commit
c16e258c93
34 changed files with 229 additions and 356 deletions
|
@ -633,7 +633,7 @@ void wxGameList::OnContextMenuSelected(wxCommandEvent& event)
|
|||
if(dialog.ShowModal() == wxID_OK)
|
||||
{
|
||||
const auto custom_name = dialog.GetValue();
|
||||
GetConfig().SetGameListCustomName(title_id, wxHelper::MakeUTF8(custom_name));
|
||||
GetConfig().SetGameListCustomName(title_id, custom_name.utf8_string());
|
||||
m_name_cache.clear();
|
||||
g_config.Save();
|
||||
// update list entry
|
||||
|
@ -1036,8 +1036,8 @@ void wxGameList::OnGameEntryUpdatedByTitleId(wxTitleIdEvent& event)
|
|||
|
||||
|
||||
const auto region_text = fmt::format("{}", gameInfo.GetRegion());
|
||||
SetItem(index, ColumnRegion, _(region_text));
|
||||
SetItem(index, ColumnTitleID, _(fmt::format("{:016x}", titleId)));
|
||||
SetItem(index, ColumnRegion, wxGetTranslation(region_text));
|
||||
SetItem(index, ColumnTitleID, fmt::format("{:016x}", titleId));
|
||||
}
|
||||
else if (m_style == Style::kIcons)
|
||||
{
|
||||
|
@ -1124,7 +1124,7 @@ void wxGameList::HandleTitleListCallback(CafeTitleListCallbackEvent* evt)
|
|||
|
||||
void wxGameList::RemoveCache(const std::list<fs::path>& cachePaths, const std::string& titleName)
|
||||
{
|
||||
wxMessageDialog dialog(this, fmt::format(fmt::runtime(_("Remove the shader caches for {}?").ToStdString()), titleName), _("Remove shader caches"), wxCENTRE | wxYES_NO | wxICON_EXCLAMATION);
|
||||
wxMessageDialog dialog(this, formatWxString(_("Remove the shader caches for {}?"), titleName), _("Remove shader caches"), wxCENTRE | wxYES_NO | wxICON_EXCLAMATION);
|
||||
dialog.SetYesNoLabels(_("Yes"), _("No"));
|
||||
|
||||
const auto dialogResult = dialog.ShowModal();
|
||||
|
@ -1139,7 +1139,7 @@ void wxGameList::RemoveCache(const std::list<fs::path>& cachePaths, const std::s
|
|||
if (errs.empty())
|
||||
wxMessageDialog(this, _("The shader caches were removed!"), _("Shader caches removed"), wxCENTRE | wxOK | wxICON_INFORMATION).ShowModal();
|
||||
else
|
||||
wxMessageDialog(this, fmt::format(fmt::runtime(_("Failed to remove the shader caches:\n{}").ToStdString()), fmt::join(errs, "\n")), _("Error"), wxCENTRE | wxOK | wxICON_ERROR).ShowModal();
|
||||
wxMessageDialog(this, formatWxString(_("Failed to remove the shader caches:\n{}"), fmt::join(errs, "\n")), _("Error"), wxCENTRE | wxOK | wxICON_ERROR).ShowModal();
|
||||
}
|
||||
|
||||
void wxGameList::AsyncWorkerThread()
|
||||
|
@ -1265,13 +1265,13 @@ void wxGameList::CreateShortcut(GameInfo2& gameInfo) {
|
|||
|
||||
// In most cases it should find it
|
||||
if (!result_index){
|
||||
wxMessageBox("Icon is yet to load, so will not be used by the shortcut", "Warning", wxOK | wxCENTRE | wxICON_WARNING);
|
||||
wxMessageBox(_("Icon is yet to load, so will not be used by the shortcut"), _("Warning"), wxOK | wxCENTRE | wxICON_WARNING);
|
||||
}
|
||||
else {
|
||||
const fs::path out_icon_dir = ActiveSettings::GetUserDataPath("icons");
|
||||
|
||||
if (!fs::exists(out_icon_dir) && !fs::create_directories(out_icon_dir)){
|
||||
wxMessageBox("Cannot access the icon directory, the shortcut will have no icon", "Warning", wxOK | wxCENTRE | wxICON_WARNING);
|
||||
wxMessageBox(_("Cannot access the icon directory, the shortcut will have no icon"), _("Warning"), wxOK | wxCENTRE | wxICON_WARNING);
|
||||
}
|
||||
else {
|
||||
icon_path = out_icon_dir / fmt::format("{:016x}.png", gameInfo.GetBaseTitleId());
|
||||
|
@ -1282,7 +1282,7 @@ void wxGameList::CreateShortcut(GameInfo2& gameInfo) {
|
|||
wxPNGHandler pngHandler;
|
||||
if (!pngHandler.SaveFile(&image, png_file, false)) {
|
||||
icon_path = std::nullopt;
|
||||
wxMessageBox("The icon was unable to be saved, the shortcut will have no icon", "Warning", wxOK | wxCENTRE | wxICON_WARNING);
|
||||
wxMessageBox(_("The icon was unable to be saved, the shortcut will have no icon"), _("Warning"), wxOK | wxCENTRE | wxICON_WARNING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1306,7 +1306,7 @@ void wxGameList::CreateShortcut(GameInfo2& gameInfo) {
|
|||
std::ofstream output_stream(output_path);
|
||||
if (!output_stream.good())
|
||||
{
|
||||
const wxString errorMsg = fmt::format("Failed to save desktop entry to {}", output_path.utf8_string());
|
||||
auto errorMsg = formatWxString(_("Failed to save desktop entry to {}"), output_path.utf8_string());
|
||||
wxMessageBox(errorMsg, _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue