mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-16 11:48:28 +12:00
Update fmt version to 9.1.0 (#177)
This commit is contained in:
parent
f2ec0b4083
commit
0ed4fdcd78
16 changed files with 56 additions and 33 deletions
|
@ -217,7 +217,7 @@ void CemuApp::CreateDefaultFiles(bool first_start)
|
|||
// check for mlc01 folder missing if custom path has been set
|
||||
if (!fs::exists(mlc) && !first_start)
|
||||
{
|
||||
const std::wstring message = fmt::format(_(L"Your mlc01 folder seems to be missing.\n\nThis is where Cemu stores save files, game updates and other Wii U files.\n\nThe expected path is:\n{}\n\nDo you want to create the folder at the expected path?").ToStdWstring(), mlc);
|
||||
const std::wstring message = fmt::format(fmt::runtime(_(L"Your mlc01 folder seems to be missing.\n\nThis is where Cemu stores save files, game updates and other Wii U files.\n\nThe expected path is:\n{}\n\nDo you want to create the folder at the expected path?").ToStdWstring()), mlc);
|
||||
|
||||
wxMessageDialog dialog(nullptr, message, "Error", wxCENTRE | wxYES_NO | wxCANCEL| wxICON_WARNING);
|
||||
dialog.SetYesNoCancelLabels(_("Yes"), _("No"), _("Select a custom path"));
|
||||
|
@ -293,7 +293,7 @@ void CemuApp::CreateDefaultFiles(bool first_start)
|
|||
catch (const std::exception& ex)
|
||||
{
|
||||
std::stringstream errorMsg;
|
||||
errorMsg << fmt::format(_("Couldn't create a required mlc01 subfolder or file!\n\nError: {0}\nTarget path:\n{1}").ToStdString(), ex.what(), boost::nowide::narrow(mlc));
|
||||
errorMsg << fmt::format(fmt::runtime(_("Couldn't create a required mlc01 subfolder or file!\n\nError: {0}\nTarget path:\n{1}").ToStdString()), ex.what(), boost::nowide::narrow(mlc));
|
||||
|
||||
#if BOOST_OS_WINDOWS
|
||||
const DWORD lastError = GetLastError();
|
||||
|
@ -319,7 +319,7 @@ void CemuApp::CreateDefaultFiles(bool first_start)
|
|||
catch (const std::exception& ex)
|
||||
{
|
||||
std::stringstream errorMsg;
|
||||
errorMsg << fmt::format(_("Couldn't create a required cemu directory or file!\n\nError: {0}").ToStdString(), ex.what());
|
||||
errorMsg << fmt::format(fmt::runtime(_("Couldn't create a required cemu directory or file!\n\nError: {0}").ToStdString()), ex.what());
|
||||
|
||||
#if BOOST_OS_WINDOWS
|
||||
const DWORD lastError = GetLastError();
|
||||
|
|
|
@ -63,7 +63,7 @@ bool GameUpdateWindow::ParseUpdate(const fs::path& metaPath)
|
|||
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(wxMsg, typeStrCurrentlyInstalled, typeStrToInstall), _("Warning"), wxCENTRE | wxYES_NO | wxICON_EXCLAMATION);
|
||||
wxMessageDialog dialog(this, fmt::format(fmt::runtime(wxMsg), typeStrCurrentlyInstalled, typeStrToInstall), _("Warning"), wxCENTRE | wxYES_NO | wxICON_EXCLAMATION);
|
||||
if (dialog.ShowModal() != wxID_YES)
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1110,7 +1110,7 @@ void GeneralSettings2::OnAccountDelete(wxCommandEvent& event)
|
|||
auto& account = obj->GetAccount();
|
||||
|
||||
const std::wstring format_str = _("Are you sure you want to delete the account {} with id {:x}?").ToStdWstring();
|
||||
const std::wstring msg = fmt::format(format_str,
|
||||
const std::wstring msg = fmt::format(fmt::runtime(format_str),
|
||||
std::wstring{ account.GetMiiName() }, account.GetPersistentId());
|
||||
|
||||
const int answer = wxMessageBox(msg, _("Confirmation"), wxYES_NO | wxCENTRE | wxICON_QUESTION, this);
|
||||
|
|
|
@ -1803,7 +1803,7 @@ public:
|
|||
|
||||
void AddHeaderInfo(wxWindow* parent, wxSizer* sizer)
|
||||
{
|
||||
auto versionString = fmt::format(_("Cemu\nVersion {0}\nCompiled on {1}\nOriginal authors: {2}").ToStdString(), BUILD_VERSION_STRING, BUILD_DATE, "Exzap, Petergov");
|
||||
auto versionString = fmt::format(fmt::runtime(_("Cemu\nVersion {0}\nCompiled on {1}\nOriginal authors: {2}").ToStdString()), BUILD_VERSION_STRING, BUILD_DATE, "Exzap, Petergov");
|
||||
|
||||
sizer->Add(new wxStaticText(parent, wxID_ANY, versionString), wxSizerFlags().Border(wxALL, 3).Border(wxTOP, 10));
|
||||
sizer->Add(new wxHyperlinkCtrl(parent, -1, "https://cemu.info", "https://cemu.info"), wxSizerFlags().Expand().Border(wxTOP | wxBOTTOM, 3));
|
||||
|
|
|
@ -27,7 +27,7 @@ VulkanCanvas::VulkanCanvas(wxWindow* parent, const wxSize& size, bool is_main_wi
|
|||
}
|
||||
catch(const std::exception& ex)
|
||||
{
|
||||
const auto msg = fmt::format(_("Error when initializing Vulkan renderer:\n{}").ToStdString(), ex.what());
|
||||
const auto msg = fmt::format(fmt::runtime(_("Error when initializing Vulkan renderer:\n{}").ToStdString()), ex.what());
|
||||
forceLog_printf(const_cast<char*>(msg.c_str()));
|
||||
wxMessageDialog dialog(this, msg, _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
|
||||
dialog.ShowModal();
|
||||
|
|
|
@ -293,23 +293,23 @@ void wxTitleManagerList::OnConvertToCompressedFormat(uint64 titleId)
|
|||
std::string msg = wxHelper::MakeUTF8(_("The following content will be converted to a compressed Wii U archive file (.wua):\n \n"));
|
||||
|
||||
if (titleInfo_base.IsValid())
|
||||
msg.append(fmt::format(wxHelper::MakeUTF8(_("Base game: {}")), _utf8Wrapper(titleInfo_base.GetPath())));
|
||||
msg.append(fmt::format(fmt::runtime(wxHelper::MakeUTF8(_("Base game: {}"))), _utf8Wrapper(titleInfo_base.GetPath())));
|
||||
else
|
||||
msg.append(fmt::format(wxHelper::MakeUTF8(_("Base game: Not installed"))));
|
||||
msg.append(fmt::format(fmt::runtime(wxHelper::MakeUTF8(_("Base game: Not installed")))));
|
||||
|
||||
msg.append("\n");
|
||||
|
||||
if (titleInfo_update.IsValid())
|
||||
msg.append(fmt::format(wxHelper::MakeUTF8(_("Update: {}")), _utf8Wrapper(titleInfo_update.GetPath())));
|
||||
msg.append(fmt::format(fmt::runtime(wxHelper::MakeUTF8(_("Update: {}"))), _utf8Wrapper(titleInfo_update.GetPath())));
|
||||
else
|
||||
msg.append(fmt::format(wxHelper::MakeUTF8(_("Update: Not installed"))));
|
||||
msg.append(fmt::format(fmt::runtime(wxHelper::MakeUTF8(_("Update: Not installed")))));
|
||||
|
||||
msg.append("\n");
|
||||
|
||||
if (titleInfo_aoc.IsValid())
|
||||
msg.append(fmt::format(wxHelper::MakeUTF8(_("DLC: {}")), _utf8Wrapper(titleInfo_aoc.GetPath())));
|
||||
msg.append(fmt::format(fmt::runtime(wxHelper::MakeUTF8(_("DLC: {}"))), _utf8Wrapper(titleInfo_aoc.GetPath())));
|
||||
else
|
||||
msg.append(fmt::format(wxHelper::MakeUTF8(_("DLC: Not installed"))));
|
||||
msg.append(fmt::format(fmt::runtime(wxHelper::MakeUTF8(_("DLC: Not installed")))));
|
||||
|
||||
const int answer = wxMessageBox(wxString::FromUTF8(msg), _("Confirmation"), wxOK | wxCANCEL | wxCENTRE | wxICON_QUESTION, this);
|
||||
if (answer != wxOK)
|
||||
|
|
|
@ -71,7 +71,7 @@ void wxCreateAccountDialog::OnOK(wxCommandEvent& event)
|
|||
const auto id = GetPersistentId();
|
||||
if(id < Account::kMinPersistendId)
|
||||
{
|
||||
wxMessageBox(fmt::format(_("The persistent id must be greater than {:x}!").ToStdString(), Account::kMinPersistendId),
|
||||
wxMessageBox(fmt::format(fmt::runtime(_("The persistent id must be greater than {:x}!").ToStdString()), Account::kMinPersistendId),
|
||||
_("Error"), wxOK | wxCENTRE | wxICON_ERROR, this);
|
||||
return;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ void wxCreateAccountDialog::OnOK(wxCommandEvent& event)
|
|||
const auto& account = Account::GetAccount(id);
|
||||
if(account.GetPersistentId() == id)
|
||||
{
|
||||
const std::wstring msg = fmt::format(_("The persistent id {:x} is already in use by account {}!").ToStdWstring(),
|
||||
const std::wstring msg = fmt::format(fmt::runtime(_("The persistent id {:x} is already in use by account {}!").ToStdWstring()),
|
||||
account.GetPersistentId(), std::wstring{ account.GetMiiName() });
|
||||
wxMessageBox(msg, _("Error"), wxOK | wxCENTRE | wxICON_ERROR, this);
|
||||
return;
|
||||
|
|
|
@ -48,13 +48,13 @@ template<typename ...TArgs>
|
|||
wxString wxStringFormat2(const wxString& format, TArgs&&...args)
|
||||
{
|
||||
// ignores locale?
|
||||
return fmt::format(format.ToStdString(), std::forward<TArgs>(args)...);
|
||||
return fmt::format(fmt::runtime(format.ToStdString()), std::forward<TArgs>(args)...);
|
||||
}
|
||||
|
||||
template<typename ...TArgs>
|
||||
wxString wxStringFormat2W(const wxString& format, TArgs&&...args)
|
||||
{
|
||||
return fmt::format(format.ToStdWstring(), std::forward<TArgs>(args)...);
|
||||
return fmt::format(fmt::runtime(format.ToStdWstring()), std::forward<TArgs>(args)...);
|
||||
}
|
||||
|
||||
// executes a function when destroying the obj
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue