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

@ -570,8 +570,8 @@ void GraphicPacksWindow2::OnActivePresetChanged(wxCommandEvent& event)
wxASSERT(obj);
const auto string_data = dynamic_cast<wxStringClientData*>(obj->GetClientObject());
wxASSERT(string_data);
const auto preset = wxHelper::MakeUTF8(obj->GetStringSelection());
if(m_shown_graphic_pack->SetActivePreset(wxHelper::MakeUTF8(string_data->GetData()), preset))
const auto preset = obj->GetStringSelection().utf8_string();
if(m_shown_graphic_pack->SetActivePreset(string_data->GetData().utf8_string(), preset))
{
wxWindowUpdateLocker lock(this);
ClearPresets();
@ -629,7 +629,7 @@ void GraphicPacksWindow2::OnCheckForUpdates(wxCommandEvent& event)
const auto packs = str.str();
if(!packs.empty())
{
wxMessageBox(fmt::format("{}\n \n{} \n{}", _("This update removed or renamed the following graphic packs:").ToStdString(), packs, _("You may need to set them up again.").ToStdString()),
wxMessageBox(fmt::format("{}\n \n{} \n{}", _("This update removed or renamed the following graphic packs:").utf8_string(), packs, _("You may need to set them up again.").utf8_string()),
_("Warning"), wxOK | wxCENTRE | wxICON_INFORMATION, this);
}
}
@ -668,7 +668,7 @@ void GraphicPacksWindow2::SashPositionChanged(wxEvent& event)
void GraphicPacksWindow2::OnFilterUpdate(wxEvent& event)
{
m_filter = wxHelper::MakeUTF8(m_filter_text->GetValue());
m_filter = m_filter_text->GetValue().utf8_string();
FillGraphicPackList();
event.Skip();
}