mirror of
https://github.com/GerbilSoft/rom-properties.git
synced 2025-06-18 11:35:38 -04:00
CMakeLists.txt: Use C++20 if it's available.
rp-libfmt.h: - Make FSTR() a no-op if building as C++20, since fmt::format() can do its own compile-time checking using `consteval` without FMT_STRING(). - Add FRUN() annotations to all gettext-translated strings. This is needed in order to bypass the automatic compile-time format checking when using C++20. - Add FSTR() annotations to some format strings where it was missing. WiiUFstPrint: Change some fmt::print() that don't actually use formatting back to fputs().
This commit is contained in:
parent
5e4571f209
commit
af0e29f7eb
@ -77,9 +77,11 @@ SET(CMAKE_LINK_DEPENDS_NO_SHARED ON)
|
||||
# enough tests are added.
|
||||
ENABLE_TESTING()
|
||||
|
||||
# Set the standards versions: C11, C++17
|
||||
# Set the standards versions. (Minimum C11, C++14)
|
||||
# C17 was added in CMake 3.21; for older versions, use C11.
|
||||
# C++17 was added in CMake 3.8; for older versions, use C++14.
|
||||
# C++20 was added in CMake 3.12; for older versions, use C++17.
|
||||
# - C++20 is needed for std::span<>.
|
||||
# NOTE: These aren't set as hard requirements, though if the compiler
|
||||
# doesn't support them, code will either be less optimal or will fail
|
||||
# to compile.
|
||||
@ -89,7 +91,10 @@ SET(CMAKE_CXX_STANDARD_REQUIRED OFF)
|
||||
SET(CMAKE_CXX_EXTENSIONS ON)
|
||||
IF(CMAKE_VERSION VERSION_GREATER 3.20) # >= 3.21
|
||||
SET(CMAKE_C_STANDARD 17)
|
||||
SET(CMAKE_CXX_STANDARD 17)
|
||||
SET(CMAKE_CXX_STANDARD 20)
|
||||
ELSEIF(CMAKE_VERSION VERSION_GREATER 3.11) # >= 3.12
|
||||
SET(CMAKE_C_STANDARD 11)
|
||||
SET(CMAKE_CXX_STANDARD 20)
|
||||
ELSEIF(CMAKE_VERSION VERSION_GREATER 3.7) # >= 3.8
|
||||
SET(CMAKE_C_STANDARD 11)
|
||||
SET(CMAKE_CXX_STANDARD 17)
|
||||
|
@ -613,7 +613,7 @@ rp_rom_data_view_init_header_row(RpRomDataView *page)
|
||||
|
||||
const string sysInfo = fmt::format(
|
||||
// tr: {0:s} == system name, {1:s} == file type
|
||||
C_("RomDataView", "{0:s}\n{1:s}"), systemName, fileType);
|
||||
FRUN(C_("RomDataView", "{0:s}\n{1:s}")), systemName, fileType);
|
||||
gtk_label_set_text(GTK_LABEL(page->lblSysInfo), sysInfo.c_str());
|
||||
|
||||
// Supported image types.
|
||||
@ -1476,7 +1476,7 @@ rp_rom_data_view_update_display(RpRomDataView *page)
|
||||
auto &tab = tabs[tabIdx];
|
||||
|
||||
// tr: Field description label.
|
||||
const string txt = fmt::format(desc_label_fmt, field.name);
|
||||
const string txt = fmt::format(FRUN(desc_label_fmt), field.name);
|
||||
GtkWidget *const lblDesc = gtk_label_new(txt.c_str());
|
||||
// NOTE: No name for this GtkWidget.
|
||||
gtk_label_set_use_underline(GTK_LABEL(lblDesc), false);
|
||||
|
@ -309,7 +309,7 @@ rp_rom_data_view_getSaveFileDialog_callback(GFile *file, save_data_t *save_data)
|
||||
? rp_language_combo_box_get_selected_lc(RP_LANGUAGE_COMBO_BOX(page->cboLanguage))
|
||||
: 0;
|
||||
|
||||
ofs << "== " << fmt::format(C_("RomDataView", "File: '{:s}'"), romData->filename()) << '\n';
|
||||
ofs << "== " << fmt::format(FRUN(C_("RomDataView", "File: '{:s}'")), romData->filename()) << '\n';
|
||||
ROMOutput ro(romData, sel_lc);
|
||||
ofs << ro;
|
||||
ofs.flush();
|
||||
@ -418,7 +418,7 @@ rp_rom_data_view_doRomOp_stdop(RpRomDataView *page, int id)
|
||||
: 0;
|
||||
|
||||
ostringstream oss;
|
||||
oss << "== " << fmt::format(C_("RomDataView", "File: '{:s}'"), rom_filename) << '\n';
|
||||
oss << "== " << fmt::format(FRUN(C_("RomDataView", "File: '{:s}'")), rom_filename) << '\n';
|
||||
ROMOutput ro(romData, sel_lc);
|
||||
oss << ro;
|
||||
oss.flush();
|
||||
|
@ -460,7 +460,7 @@ rp_about_tab_init_program_title_text(GtkWidget *imgLogo, GtkLabel *lblTitle)
|
||||
// tr: Uses Pango's HTML subset for formatting.
|
||||
sPrgTitle += C_("AboutTab", "<b>ROM Properties Page</b>\nShell Extension");
|
||||
sPrgTitle += "\n\n";
|
||||
sPrgTitle += fmt::format(C_("AboutTab", "Version {:s}"), programVersion);
|
||||
sPrgTitle += fmt::format(FRUN(C_("AboutTab", "Version {:s}")), programVersion);
|
||||
if (gitVersion) {
|
||||
sPrgTitle += '\n';
|
||||
sPrgTitle += gitVersion;
|
||||
@ -494,7 +494,7 @@ rp_about_tab_init_credits_tab(GtkLabel *lblCredits)
|
||||
sCredits += '\n';
|
||||
sCredits += fmt::format(
|
||||
// tr: {:s} is the name of the license.
|
||||
C_("AboutTab|Credits", "This program is licensed under the {:s} or later."), sPrgLicense);
|
||||
FRUN(C_("AboutTab|Credits", "This program is licensed under the {:s} or later.")), sPrgLicense);
|
||||
|
||||
AboutTabText::CreditType lastCreditType = AboutTabText::CreditType::Continue;
|
||||
for (const AboutTabText::CreditsData_t *creditsData = AboutTabText::getCreditsData();
|
||||
@ -543,7 +543,7 @@ rp_about_tab_init_credits_tab(GtkLabel *lblCredits)
|
||||
}
|
||||
if (creditsData->sub) {
|
||||
// tr: Sub-credit
|
||||
sCredits += fmt::format(C_("AboutTab|Credits", " ({:s})"),
|
||||
sCredits += fmt::format(FRUN(C_("AboutTab|Credits", " ({:s})")),
|
||||
creditsData->sub);
|
||||
}
|
||||
|
||||
@ -593,7 +593,7 @@ rp_about_tab_init_libraries_tab(GtkLabel *lblLibraries)
|
||||
(GTK_MAJOR_VERSION >= 4 ? "" : "+"),
|
||||
(guint)GTK_MAJOR_VERSION, (guint)GTK_MINOR_VERSION,
|
||||
(guint)GTK_MICRO_VERSION);
|
||||
sLibraries += fmt::format(sCompiledWith, gtkVersionCompiled) + '\n';
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), gtkVersionCompiled) + '\n';
|
||||
|
||||
// NOTE: Although the GTK+ 2.x headers export variables,
|
||||
// the shared libraries for 2.24.33 do *not* export them,
|
||||
@ -604,13 +604,13 @@ rp_about_tab_init_libraries_tab(GtkLabel *lblLibraries)
|
||||
(gtk_major >= 4 ? "" : "+"),
|
||||
gtk_major, gtk_get_minor_version(),
|
||||
gtk_get_micro_version());
|
||||
sLibraries += fmt::format(sUsingDll, gtkVersionUsing);
|
||||
sLibraries += fmt::format(FRUN(sUsingDll), gtkVersionUsing);
|
||||
#endif /* GTK_CHECK_VERSION(2, 90, 7) */
|
||||
sLibraries += "\n"
|
||||
"Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald.\n"
|
||||
"Copyright (C) 1995-2022 the GTK+ Team and others.\n"
|
||||
"<a href='https://www.gtk.org/'>https://www.gtk.org/</a>\n";
|
||||
sLibraries += fmt::format(sLicenses, "GNU LGPL v2.1+");
|
||||
sLibraries += fmt::format(FRUN(sLicenses), "GNU LGPL v2.1+");
|
||||
|
||||
/** zlib **/
|
||||
#ifdef HAVE_ZLIB
|
||||
@ -620,15 +620,15 @@ rp_about_tab_init_libraries_tab(GtkLabel *lblLibraries)
|
||||
sZlibVersion += RpPng::zlib_version_string();
|
||||
|
||||
#if defined(USE_INTERNAL_ZLIB) && !defined(USE_INTERNAL_ZLIB_DLL)
|
||||
sLibraries += fmt::format(sIntCopyOf, sZlibVersion);
|
||||
sLibraries += fmt::format(FRUN(sIntCopyOf), sZlibVersion);
|
||||
#else
|
||||
# ifdef ZLIBNG_VERSION
|
||||
sLibraries += fmt::format(sCompiledWith, "zlib-ng " ZLIBNG_VERSION);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), "zlib-ng " ZLIBNG_VERSION);
|
||||
# else /* !ZLIBNG_VERSION */
|
||||
sLibraries += fmt::format(sCompiledWith, "zlib " ZLIB_VERSION);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), "zlib " ZLIB_VERSION);
|
||||
# endif /* ZLIBNG_VERSION */
|
||||
sLibraries += '\n';
|
||||
sLibraries += fmt::format(sUsingDll, sZlibVersion);
|
||||
sLibraries += fmt::format(FRUN(sUsingDll), sZlibVersion);
|
||||
#endif
|
||||
sLibraries += "\n"
|
||||
"Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler.\n"
|
||||
@ -637,7 +637,7 @@ rp_about_tab_init_libraries_tab(GtkLabel *lblLibraries)
|
||||
// TODO: Also if zlibVersion() contains "zlib-ng"?
|
||||
sLibraries += "<a href='https://github.com/zlib-ng/zlib-ng'>https://github.com/zlib-ng/zlib-ng</a>\n";
|
||||
# endif /* ZLIBNG_VERSION */
|
||||
sLibraries += fmt::format(sLicense, "zlib license");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "zlib license");
|
||||
#endif /* HAVE_ZLIB */
|
||||
|
||||
/** libpng **/
|
||||
@ -652,7 +652,7 @@ rp_about_tab_init_libraries_tab(GtkLabel *lblLibraries)
|
||||
|
||||
sLibraries += "\n\n";
|
||||
#if defined(USE_INTERNAL_PNG) && !defined(USE_INTERNAL_ZLIB_DLL)
|
||||
sLibraries += fmt::format(sIntCopyOf, pngVersion);
|
||||
sLibraries += fmt::format(FRUN(sIntCopyOf), pngVersion);
|
||||
#else
|
||||
// NOTE: Gentoo's libpng has "+apng" at the end of
|
||||
// PNG_LIBPNG_VER_STRING if APNG is enabled.
|
||||
@ -674,9 +674,9 @@ rp_about_tab_init_libraries_tab(GtkLabel *lblLibraries)
|
||||
fullPngVersionCompiled = fmt::format(FSTR("{:s} (No APNG support)"), pngVersionCompiled);
|
||||
}
|
||||
|
||||
sLibraries += fmt::format(sCompiledWith, fullPngVersionCompiled);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), fullPngVersionCompiled);
|
||||
sLibraries += '\n';
|
||||
sLibraries += fmt::format(sUsingDll, pngVersion);
|
||||
sLibraries += fmt::format(FRUN(sUsingDll), pngVersion);
|
||||
#endif
|
||||
|
||||
sLibraries += RpPng::libpng_copyright_string();
|
||||
@ -686,7 +686,7 @@ rp_about_tab_init_libraries_tab(GtkLabel *lblLibraries)
|
||||
sLibraries += C_("AboutTab|Libraries", "APNG patch:");
|
||||
sLibraries += " <a href='https://sourceforge.net/projects/libpng-apng/'>https://sourceforge.net/projects/libpng-apng/</a>\n";
|
||||
}
|
||||
sLibraries += fmt::format(sLicense, "libpng license");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "libpng license");
|
||||
#endif /* HAVE_PNG */
|
||||
|
||||
/** nettle **/
|
||||
@ -696,18 +696,18 @@ rp_about_tab_init_libraries_tab(GtkLabel *lblLibraries)
|
||||
int ret = AesNettle::get_nettle_compile_time_version(&nettle_major, &nettle_minor);
|
||||
if (ret == 0) {
|
||||
if (nettle_major >= 3) {
|
||||
sLibraries += fmt::format(sCompiledWith,
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith),
|
||||
fmt::format(FSTR("GNU Nettle {:d}.{:d}"),
|
||||
nettle_major, nettle_minor));
|
||||
} else {
|
||||
sLibraries += fmt::format(sCompiledWith, "GNU Nettle 2.x");
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), "GNU Nettle 2.x");
|
||||
}
|
||||
sLibraries += '\n';
|
||||
}
|
||||
|
||||
ret = AesNettle::get_nettle_runtime_version(&nettle_major, &nettle_minor);
|
||||
if (ret == 0) {
|
||||
sLibraries += fmt::format(sUsingDll,
|
||||
sLibraries += fmt::format(FRUN(sUsingDll),
|
||||
fmt::format(FSTR("GNU Nettle {:d}.{:d}"),
|
||||
nettle_major, nettle_minor));
|
||||
sLibraries += '\n';
|
||||
@ -721,12 +721,12 @@ rp_about_tab_init_libraries_tab(GtkLabel *lblLibraries)
|
||||
sLibraries += "Copyright (C) 2001-2014 Niels Möller.\n"
|
||||
"<a href='https://www.lysator.liu.se/~nisse/nettle/'>https://www.lysator.liu.se/~nisse/nettle/</a>\n";
|
||||
}
|
||||
sLibraries += fmt::format(sLicenses, "GNU LGPL v3+, GNU GPL v2+");
|
||||
sLibraries += fmt::format(FRUN(sLicenses), "GNU LGPL v3+, GNU GPL v2+");
|
||||
} else {
|
||||
sLibraries +=
|
||||
"Copyright (C) 2001-2013 Niels Möller.\n"
|
||||
"<a href='https://www.lysator.liu.se/~nisse/nettle/'>https://www.lysator.liu.se/~nisse/nettle/</a>\n";
|
||||
sLibraries += fmt::format(sLicense, "GNU LGPL v2.1+");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "GNU LGPL v2.1+");
|
||||
}
|
||||
#endif /* ENABLE_DECRYPTION && HAVE_NETTLE */
|
||||
|
||||
@ -739,15 +739,15 @@ rp_about_tab_init_libraries_tab(GtkLabel *lblLibraries)
|
||||
static_cast<unsigned int>(TIXML2_PATCH_VERSION));
|
||||
|
||||
# if defined(USE_INTERNAL_XML) && !defined(USE_INTERNAL_XML_DLL)
|
||||
sLibraries += fmt::format(sIntCopyOf, tinyXml2Version);
|
||||
sLibraries += fmt::format(FRUN(sIntCopyOf), tinyXml2Version);
|
||||
# else
|
||||
// FIXME: Runtime version?
|
||||
sLibraries += fmt::format(sCompiledWith, tinyXml2Version);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), tinyXml2Version);
|
||||
# endif
|
||||
sLibraries += "\n"
|
||||
"Copyright (C) 2000-2021 Lee Thomason\n"
|
||||
"<a href='http://www.grinninglizard.com/'>http://www.grinninglizard.com/</a>\n";
|
||||
sLibraries += fmt::format(sLicense, "zlib license");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "zlib license");
|
||||
#endif /* ENABLE_XML */
|
||||
|
||||
/** GNU gettext **/
|
||||
@ -766,11 +766,11 @@ rp_about_tab_init_libraries_tab(GtkLabel *lblLibraries)
|
||||
static_cast<unsigned int>((LIBINTL_VERSION >> 8) & 0xFF));
|
||||
}
|
||||
// FIXME: Runtime version?
|
||||
sLibraries += fmt::format(sCompiledWith, gettextVersion);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), gettextVersion);
|
||||
sLibraries += "\n"
|
||||
"Copyright (C) 1995-1997, 2000-2016, 2018-2020 Free Software Foundation, Inc.\n"
|
||||
"<a href='https://www.gnu.org/software/gettext/'>https://www.gnu.org/software/gettext/</a>\n";
|
||||
sLibraries += fmt::format(sLicense, "GNU LGPL v2.1+");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "GNU LGPL v2.1+");
|
||||
#endif /* HAVE_GETTEXT && LIBINTL_VERSION */
|
||||
|
||||
// We're done building the string.
|
||||
@ -850,7 +850,7 @@ updChecker_error(RpUpdateChecker *updChecker,
|
||||
|
||||
gtk_label_set_markup(GTK_LABEL(tab->lblUpdateCheck),
|
||||
// tr: Error message template. (GTK version, with C++20 formatting)
|
||||
fmt::format(C_("ConfigDialog", "<b>ERROR:</b> {:s}"), error).c_str());
|
||||
fmt::format(FRUN(C_("ConfigDialog", "<b>ERROR:</b> {:s}")), error).c_str());
|
||||
}
|
||||
|
||||
static void
|
||||
@ -880,7 +880,7 @@ updChecker_retrieved(RpUpdateChecker *updChecker,
|
||||
string sVersionLabel;
|
||||
sVersionLabel.reserve(512);
|
||||
|
||||
sVersionLabel = fmt::format(C_("AboutTab", "Latest version: {:s}"), sUpdVersion);
|
||||
sVersionLabel = fmt::format(FRUN(C_("AboutTab", "Latest version: {:s}")), sUpdVersion);
|
||||
if (updateVersion > ourVersion) {
|
||||
sVersionLabel += "\n\n";
|
||||
sVersionLabel += C_("AboutTab", "<b>New version available!</b>");
|
||||
|
@ -463,7 +463,7 @@ ccCleaner_error(RpCacheCleaner *cleaner, const char *error, RpCacheTab *tab)
|
||||
gtk_progress_bar_set_error(GTK_PROGRESS_BAR(tab->pbCacheStatus), TRUE);
|
||||
|
||||
// tr: Error message template. (GTK version, with C++20 formatting)
|
||||
const string s_msg = fmt::format(C_("ConfigDialog", "<b>ERROR:</b> {:s}"), error);
|
||||
const string s_msg = fmt::format(FRUN(C_("ConfigDialog", "<b>ERROR:</b> {:s}")), error);
|
||||
gtk_label_set_markup(GTK_LABEL(tab->lblCacheStatus), s_msg.c_str());
|
||||
// FIXME: Causes crashes...
|
||||
//MessageSound::play(GTK_MESSAGE_WARNING, s_msg.c_str(), GTK_WIDGET(tab));
|
||||
@ -518,8 +518,8 @@ ccCleaner_cacheCleared(RpCacheCleaner *cleaner, RpCacheDir cache_dir, unsigned i
|
||||
|
||||
if (dirErrs > 0 || fileErrs > 0) {
|
||||
// tr: Error message template. (GTK version, with C++20 formatting)
|
||||
const string s_msg = fmt::format(C_("ConfigDialog", "<b>ERROR:</b> {:s}"),
|
||||
fmt::format(C_("CacheTab", "Unable to delete {0:Ld} file(s) and/or {1:Ld} dir(s)."),
|
||||
const string s_msg = fmt::format(FRUN(C_("ConfigDialog", "<b>ERROR:</b> {:s}")),
|
||||
fmt::format(FRUN(C_("CacheTab", "Unable to delete {0:Ld} file(s) and/or {1:Ld} dir(s).")),
|
||||
fileErrs, dirErrs).c_str());
|
||||
gtk_label_set_markup(GTK_LABEL(tab->lblCacheStatus), s_msg.c_str());
|
||||
// FIXME: Causes crashes...
|
||||
|
@ -563,13 +563,13 @@ rp_key_manager_tab_show_key_import_return_status(RpKeyManagerTab *tab,
|
||||
case KeyStoreUI::ImportStatus::OpenError:
|
||||
if (iret.error_code != 0) {
|
||||
// tr: {0:s} == filename, {1:s} == error message
|
||||
msg = fmt::format(C_("KeyManagerTab",
|
||||
"An error occurred while opening '{0:s}': {1:s}"),
|
||||
msg = fmt::format(FRUN(C_("KeyManagerTab",
|
||||
"An error occurred while opening '{0:s}': {1:s}")),
|
||||
fileNoPath, strerror(iret.error_code));
|
||||
} else {
|
||||
// tr: {:s} == filename
|
||||
msg = fmt::format(C_("KeyManagerTab",
|
||||
"An error occurred while opening '{:s}'."),
|
||||
msg = fmt::format(FRUN(C_("KeyManagerTab",
|
||||
"An error occurred while opening '{:s}'.")),
|
||||
fileNoPath);
|
||||
}
|
||||
type = GTK_MESSAGE_ERROR;
|
||||
@ -579,13 +579,13 @@ rp_key_manager_tab_show_key_import_return_status(RpKeyManagerTab *tab,
|
||||
// TODO: Error code for short reads.
|
||||
if (iret.error_code != 0) {
|
||||
// tr: {0:s} == filename, {1:s} == error message
|
||||
msg = fmt::format(C_("KeyManagerTab",
|
||||
"An error occurred while reading '{0:s}': {1:s}"),
|
||||
msg = fmt::format(FRUN(C_("KeyManagerTab",
|
||||
"An error occurred while reading '{0:s}': {1:s}")),
|
||||
fileNoPath, strerror(iret.error_code));
|
||||
} else {
|
||||
// tr: {:s} == filename
|
||||
msg = fmt::format(C_("KeyManagerTab",
|
||||
"An error occurred while reading '{:s}'."),
|
||||
msg = fmt::format(FRUN(C_("KeyManagerTab",
|
||||
"An error occurred while reading '{:s}'.")),
|
||||
fileNoPath);
|
||||
}
|
||||
type = GTK_MESSAGE_ERROR;
|
||||
@ -593,16 +593,16 @@ rp_key_manager_tab_show_key_import_return_status(RpKeyManagerTab *tab,
|
||||
|
||||
case KeyStoreUI::ImportStatus::InvalidFile:
|
||||
// tr: {0:s} == filename, {1:s} == type of file
|
||||
msg = fmt::format(C_("KeyManagerTab",
|
||||
"The file '{0:s}' is not a valid {1:s} file."),
|
||||
msg = fmt::format(FRUN(C_("KeyManagerTab",
|
||||
"The file '{0:s}' is not a valid {1:s} file.")),
|
||||
fileNoPath, keyType);
|
||||
type = GTK_MESSAGE_WARNING;
|
||||
break;
|
||||
|
||||
case KeyStoreUI::ImportStatus::NoKeysImported:
|
||||
// tr: {:s} == filename
|
||||
msg = fmt::format(C_("KeyManagerTab",
|
||||
"No keys were imported from '{:s}'."),
|
||||
msg = fmt::format(FRUN(C_("KeyManagerTab",
|
||||
"No keys were imported from '{:s}'.")),
|
||||
fileNoPath);
|
||||
type = GTK_MESSAGE_INFO;
|
||||
showKeyStats = true;
|
||||
@ -611,10 +611,10 @@ rp_key_manager_tab_show_key_import_return_status(RpKeyManagerTab *tab,
|
||||
case KeyStoreUI::ImportStatus::KeysImported: {
|
||||
const int keyCount = static_cast<int>(iret.keysImportedVerify + iret.keysImportedNoVerify);
|
||||
// tr: {0:Ld} == number of keys, {1:s} == filename
|
||||
msg = fmt::format(NC_("KeyManagerTab",
|
||||
msg = fmt::format(FRUN(NC_("KeyManagerTab",
|
||||
"{0:Ld} key was imported from '{1:s}'.",
|
||||
"{0:Ld} keys were imported from '{1:s}'.",
|
||||
keyCount),
|
||||
keyCount)),
|
||||
keyCount, fileNoPath);
|
||||
type = GTK_MESSAGE_INFO; // NOTE: No equivalent to KMessageWidget::Positive.
|
||||
showKeyStats = true;
|
||||
@ -629,55 +629,55 @@ rp_key_manager_tab_show_key_import_return_status(RpKeyManagerTab *tab,
|
||||
if (iret.keysExist > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(NC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(NC_("KeyManagerTab",
|
||||
"{:Ld} key already exists in the Key Manager.",
|
||||
"{:Ld} keys already exist in the Key Manager.",
|
||||
iret.keysExist),
|
||||
iret.keysExist)),
|
||||
iret.keysExist);
|
||||
}
|
||||
if (iret.keysInvalid > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(NC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(NC_("KeyManagerTab",
|
||||
"{:Ld} key was not imported because it is incorrect.",
|
||||
"{:Ld} keys were not imported because they are incorrect.",
|
||||
iret.keysInvalid),
|
||||
iret.keysInvalid)),
|
||||
iret.keysInvalid);
|
||||
}
|
||||
if (iret.keysNotUsed > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(NC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(NC_("KeyManagerTab",
|
||||
"{:Ld} key was not imported because it isn't used by rom-properties.",
|
||||
"{:Ld} keys were not imported because they aren't used by rom-properties.",
|
||||
iret.keysNotUsed),
|
||||
iret.keysNotUsed)),
|
||||
iret.keysNotUsed);
|
||||
}
|
||||
if (iret.keysCantDecrypt > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(NC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(NC_("KeyManagerTab",
|
||||
"{:Ld} key was not imported because it is encrypted and the master key isn't available.",
|
||||
"{:Ld} keys were not imported because they are encrypted and the master key isn't available.",
|
||||
iret.keysCantDecrypt),
|
||||
iret.keysCantDecrypt)),
|
||||
iret.keysCantDecrypt);
|
||||
}
|
||||
if (iret.keysImportedVerify > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(NC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(NC_("KeyManagerTab",
|
||||
"{:Ld} key has been imported and verified as correct.",
|
||||
"{:Ld} keys have been imported and verified as correct.",
|
||||
iret.keysImportedVerify),
|
||||
iret.keysImportedVerify)),
|
||||
iret.keysImportedVerify);
|
||||
}
|
||||
if (iret.keysImportedNoVerify > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(NC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(NC_("KeyManagerTab",
|
||||
"{:Ld} key has been imported without verification.",
|
||||
"{:Ld} keys have been imported without verification.",
|
||||
iret.keysImportedNoVerify),
|
||||
iret.keysImportedNoVerify)),
|
||||
iret.keysImportedNoVerify);
|
||||
}
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ rp_nautilus_properties_model_load_from_romData(RpNautilusPropertiesModel *self,
|
||||
// NOTE: Using " | " separator; other UI frontends use "\n". (rpcli uses a single space)
|
||||
const string sysInfo = fmt::format(
|
||||
// tr: {0:s} == system name, {1:s} == file type
|
||||
C_("RomDataView", "{0:s} | {1:s}"), systemName, fileType);
|
||||
FRUN(C_("RomDataView", "{0:s} | {1:s}")), systemName, fileType);
|
||||
append_item(self, C_("RomDataView", "File Type"), sysInfo.c_str());
|
||||
|
||||
// Process RomData fields.
|
||||
|
@ -143,7 +143,7 @@ void RomDataViewPrivate::initHeaderRow(void)
|
||||
|
||||
const QString sysInfo = U82Q(fmt::format(
|
||||
// tr: {0:s} == system name, {1:s} == file type
|
||||
C_("RomDataView", "{0:s}\n{1:s}"), systemName, fileType));
|
||||
FRUN(C_("RomDataView", "{0:s}\n{1:s}")), systemName, fileType));
|
||||
ui.lblSysInfo->setText(sysInfo);
|
||||
ui.lblSysInfo->show();
|
||||
|
||||
@ -1018,7 +1018,7 @@ void RomDataViewPrivate::initDisplayWidgets(void)
|
||||
}
|
||||
|
||||
// tr: Field description label.
|
||||
const string txt = fmt::format(desc_label_fmt, field.name);
|
||||
const string txt = fmt::format(FRUN(desc_label_fmt), field.name);
|
||||
QLabel *const lblDesc = new QLabel(U82Q(txt), q);
|
||||
// NOTE: No name for this QObject.
|
||||
lblDesc->setAlignment(Qt::AlignLeft | Qt::AlignTop);
|
||||
|
@ -193,7 +193,7 @@ void RomDataViewPrivate::doRomOp_stdop(int id)
|
||||
switch (id) {
|
||||
case OPTION_COPY_TEXT: {
|
||||
ostringstream oss;
|
||||
oss << "== " << fmt::format(C_("RomDataView", "File: '{:s}'"), rom_filename) << '\n';
|
||||
oss << "== " << fmt::format(FRUN(C_("RomDataView", "File: '{:s}'")), rom_filename) << '\n';
|
||||
ROMOutput ro(romData.get(), sel_lc);
|
||||
oss << ro;
|
||||
oss.flush();
|
||||
@ -263,7 +263,7 @@ void RomDataViewPrivate::doRomOp_stdop(int id)
|
||||
|
||||
switch (id) {
|
||||
case OPTION_EXPORT_TEXT: {
|
||||
ofs << "== " << fmt::format(C_("RomDataView", "File: '{:s}'"), rom_filename) << '\n';
|
||||
ofs << "== " << fmt::format(FRUN(C_("RomDataView", "File: '{:s}'")), rom_filename) << '\n';
|
||||
ROMOutput ro(romData.get(), sel_lc);
|
||||
ofs << ro;
|
||||
ofs.flush();
|
||||
|
@ -193,7 +193,7 @@ void AboutTabPrivate::initProgramTitleText(void)
|
||||
// tr: Uses Qt's HTML subset for formatting.
|
||||
sPrgTitle += C_("AboutTab", "<b>ROM Properties Page</b><br>Shell Extension");
|
||||
sPrgTitle += BR BR;
|
||||
sPrgTitle += fmt::format(C_("AboutTab", "Version {:s}"), programVersion);
|
||||
sPrgTitle += fmt::format(FRUN(C_("AboutTab", "Version {:s}")), programVersion);
|
||||
if (gitVersion) {
|
||||
sPrgTitle += BR;
|
||||
sPrgTitle += gitVersion;
|
||||
@ -225,7 +225,7 @@ void AboutTabPrivate::initCreditsTab(void)
|
||||
sCredits += BR;
|
||||
sCredits += fmt::format(
|
||||
// tr: {:s} is the name of the license.
|
||||
C_("AboutTab|Credits", "This program is licensed under the {:s} or later."), sPrgLicense);
|
||||
FRUN(C_("AboutTab|Credits", "This program is licensed under the {:s} or later.")), sPrgLicense);
|
||||
|
||||
AboutTabText::CreditType lastCreditType = AboutTabText::CreditType::Continue;
|
||||
for (const AboutTabText::CreditsData_t *creditsData = AboutTabText::getCreditsData();
|
||||
@ -274,7 +274,7 @@ void AboutTabPrivate::initCreditsTab(void)
|
||||
}
|
||||
if (creditsData->sub) {
|
||||
// tr: Sub-credit
|
||||
sCredits += fmt::format(C_("AboutTab|Credits", " ({:s})"),
|
||||
sCredits += fmt::format(FRUN(C_("AboutTab|Credits", " ({:s})")),
|
||||
creditsData->sub);
|
||||
}
|
||||
|
||||
@ -319,40 +319,40 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
string qtVersion = "Qt ";
|
||||
qtVersion += qVersion();
|
||||
#ifdef QT_IS_STATIC
|
||||
sLibraries += fmt::format(sIntCopyOf, qtVersion);
|
||||
sLibraries += fmt::format(FRUN(sIntCopyOf), qtVersion);
|
||||
#else
|
||||
sLibraries += fmt::format(sCompiledWith, "Qt " QT_VERSION_STR);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), "Qt " QT_VERSION_STR);
|
||||
sLibraries += BR;
|
||||
sLibraries += fmt::format(sUsingDll, qtVersion);
|
||||
sLibraries += fmt::format(FRUN(sUsingDll), qtVersion);
|
||||
#endif /* QT_IS_STATIC */
|
||||
sLibraries += BR
|
||||
"Copyright (C) 1995-2025 The Qt Company Ltd. and/or its subsidiaries." BR
|
||||
"<a href='https://www.qt.io/'>https://www.qt.io/</a>" BR;
|
||||
// TODO: Check QT_VERSION at runtime?
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(4, 5, 0)
|
||||
sLibraries += fmt::format(sLicenses, "GNU LGPL v2.1+, GNU GPL v2+");
|
||||
sLibraries += fmt::format(FRUN(sLicenses), "GNU LGPL v2.1+, GNU GPL v2+");
|
||||
#else
|
||||
sLibraries += fmt::format(sLicense, "GNU GPL v2+");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "GNU GPL v2+");
|
||||
#endif /* QT_VERSION */
|
||||
|
||||
/** KDE **/
|
||||
sLibraries += BR BR;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
// NOTE: Can't obtain the runtime version for KF5 easily...
|
||||
sLibraries += fmt::format(sCompiledWith, "KDE Frameworks " KIO_VERSION_STRING);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), "KDE Frameworks " KIO_VERSION_STRING);
|
||||
sLibraries += BR
|
||||
"Copyright (C) 1996-2022 KDE contributors." BR
|
||||
"<a href='https://www.kde.org/'>https://www.kde.org/</a>" BR;
|
||||
sLibraries += fmt::format(sLicense, "GNU LGPL v2.1+");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "GNU LGPL v2.1+");
|
||||
#else /* QT_VERSION < QT_VERSION_CHECK(5, 0, 0) */
|
||||
string kdeVersion = "KDE Libraries ";
|
||||
kdeVersion += KDE::versionString();
|
||||
sLibraries += fmt::format(sCompiledWith, "KDE Libraries " KDE_VERSION_STRING);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), "KDE Libraries " KDE_VERSION_STRING);
|
||||
sLibraries += BR;
|
||||
sLibraries += fmt::format(sUsingDll, kdeVersion);
|
||||
sLibraries += fmt::format(FRUN(sUsingDll), kdeVersion);
|
||||
sLibraries += BR
|
||||
"Copyright (C) 1996-2017 KDE contributors." BR;
|
||||
sLibraries += fmt::format(sLicense, "GNU LGPL v2.1+");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "GNU LGPL v2.1+");
|
||||
#endif /* QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) */
|
||||
|
||||
/** zlib **/
|
||||
@ -363,15 +363,15 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
sZlibVersion += RpPng::zlib_version_string();
|
||||
|
||||
#if defined(USE_INTERNAL_ZLIB) && !defined(USE_INTERNAL_ZLIB_DLL)
|
||||
sLibraries += fmt::format(sIntCopyOf, sZlibVersion);
|
||||
sLibraries += fmt::format(FRUN(sIntCopyOf), sZlibVersion);
|
||||
#else
|
||||
# ifdef ZLIBNG_VERSION
|
||||
sLibraries += fmt::format(sCompiledWith, "zlib-ng " ZLIBNG_VERSION);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), "zlib-ng " ZLIBNG_VERSION);
|
||||
# else /* !ZLIBNG_VERSION */
|
||||
sLibraries += fmt::format(sCompiledWith, "zlib " ZLIB_VERSION);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), "zlib " ZLIB_VERSION);
|
||||
# endif /* ZLIBNG_VERSION */
|
||||
sLibraries += BR;
|
||||
sLibraries += fmt::format(sUsingDll, sZlibVersion);
|
||||
sLibraries += fmt::format(FRUN(sUsingDll), sZlibVersion);
|
||||
#endif
|
||||
sLibraries += BR
|
||||
"Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler." BR
|
||||
@ -379,7 +379,7 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
if (zlib_is_ng) {
|
||||
sLibraries += "<a href='https://github.com/zlib-ng/zlib-ng'>https://github.com/zlib-ng/zlib-ng</a>" BR;
|
||||
}
|
||||
sLibraries += fmt::format(sLicense, "zlib license");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "zlib license");
|
||||
#endif /* HAVE_ZLIB */
|
||||
|
||||
/** libpng **/
|
||||
@ -394,7 +394,7 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
|
||||
sLibraries += BR BR;
|
||||
#if defined(USE_INTERNAL_PNG) && !defined(USE_INTERNAL_ZLIB_DLL)
|
||||
sLibraries += fmt::format(sIntCopyOf, pngVersion);
|
||||
sLibraries += fmt::format(FRUN(sIntCopyOf), pngVersion);
|
||||
#else
|
||||
// NOTE: Gentoo's libpng has "+apng" at the end of
|
||||
// PNG_LIBPNG_VER_STRING if APNG is enabled.
|
||||
@ -416,9 +416,9 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
fullPngVersionCompiled = fmt::format(FSTR("{:s} (No APNG support)"), pngVersionCompiled);
|
||||
}
|
||||
|
||||
sLibraries += fmt::format(sCompiledWith, fullPngVersionCompiled);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), fullPngVersionCompiled);
|
||||
sLibraries += BR;
|
||||
sLibraries += fmt::format(sUsingDll, pngVersion);
|
||||
sLibraries += fmt::format(FRUN(sUsingDll), pngVersion);
|
||||
#endif
|
||||
|
||||
// Convert newlines to "<br/>\n".
|
||||
@ -438,7 +438,7 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
sLibraries += C_("AboutTab|Libraries", "APNG patch:");
|
||||
sLibraries += " <a href='https://sourceforge.net/projects/libpng-apng/'>https://sourceforge.net/projects/libpng-apng/</a>" BR;
|
||||
}
|
||||
sLibraries += fmt::format(sLicense, "libpng license");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "libpng license");
|
||||
#endif /* HAVE_PNG */
|
||||
|
||||
/** nettle **/
|
||||
@ -448,18 +448,18 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
int ret = AesNettle::get_nettle_compile_time_version(&nettle_major, &nettle_minor);
|
||||
if (ret == 0) {
|
||||
if (nettle_major >= 3) {
|
||||
sLibraries += fmt::format(sCompiledWith,
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith),
|
||||
fmt::format(FSTR("GNU Nettle {:d}.{:d}"),
|
||||
nettle_major, nettle_minor));
|
||||
} else {
|
||||
sLibraries += fmt::format(sCompiledWith, "GNU Nettle 2.x");
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), "GNU Nettle 2.x");
|
||||
}
|
||||
sLibraries += BR;
|
||||
}
|
||||
|
||||
ret = AesNettle::get_nettle_runtime_version(&nettle_major, &nettle_minor);
|
||||
if (ret == 0) {
|
||||
sLibraries += fmt::format(sUsingDll,
|
||||
sLibraries += fmt::format(FRUN(sUsingDll),
|
||||
fmt::format(FSTR("GNU Nettle {:d}.{:d}"),
|
||||
nettle_major, nettle_minor));
|
||||
sLibraries += BR;
|
||||
@ -473,12 +473,12 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
sLibraries += "Copyright (C) 2001-2014 Niels Möller." BR
|
||||
"<a href='https://www.lysator.liu.se/~nisse/nettle/'>https://www.lysator.liu.se/~nisse/nettle/</a>" BR;
|
||||
}
|
||||
sLibraries += fmt::format(sLicenses, "GNU LGPL v3+, GNU GPL v2+");
|
||||
sLibraries += fmt::format(FRUN(sLicenses), "GNU LGPL v3+, GNU GPL v2+");
|
||||
} else {
|
||||
sLibraries +=
|
||||
"Copyright (C) 2001-2013 Niels Möller." BR
|
||||
"<a href='https://www.lysator.liu.se/~nisse/nettle/'>https://www.lysator.liu.se/~nisse/nettle/</a>" BR;
|
||||
sLibraries += fmt::format(sLicense, "GNU LGPL v2.1+");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "GNU LGPL v2.1+");
|
||||
}
|
||||
#endif /* ENABLE_DECRYPTION && HAVE_NETTLE */
|
||||
|
||||
@ -491,15 +491,15 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
static_cast<unsigned int>(TIXML2_PATCH_VERSION));
|
||||
|
||||
# if defined(USE_INTERNAL_XML) && !defined(USE_INTERNAL_XML_DLL)
|
||||
sLibraries += fmt::format(sIntCopyOf, tinyXml2Version);
|
||||
sLibraries += fmt::format(FRUN(sIntCopyOf), tinyXml2Version);
|
||||
# else
|
||||
// FIXME: Runtime version?
|
||||
sLibraries += fmt::format(sCompiledWith, tinyXml2Version);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), tinyXml2Version);
|
||||
# endif
|
||||
sLibraries += BR
|
||||
"Copyright (C) 2000-2021 Lee Thomason" BR
|
||||
"<a href='http://www.grinninglizard.com/'>http://www.grinninglizard.com/</a>" BR;
|
||||
sLibraries += fmt::format(sLicense, "zlib license");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "zlib license");
|
||||
#endif /* ENABLE_XML */
|
||||
|
||||
/** GNU gettext **/
|
||||
@ -518,11 +518,11 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
static_cast<unsigned int>((LIBINTL_VERSION >> 8) & 0xFF));
|
||||
}
|
||||
// FIXME: Runtime version?
|
||||
sLibraries += fmt::format(sCompiledWith, gettextVersion);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), gettextVersion);
|
||||
sLibraries += BR
|
||||
"Copyright (C) 1995-1997, 2000-2016, 2018-2020 Free Software Foundation, Inc." BR
|
||||
"<a href='https://www.gnu.org/software/gettext/'>https://www.gnu.org/software/gettext/</a>" BR;
|
||||
sLibraries += fmt::format(sLicense, "GNU LGPL v2.1+");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "GNU LGPL v2.1+");
|
||||
#endif /* HAVE_GETTEXT && LIBINTL_VERSION */
|
||||
|
||||
// We're done building the string.
|
||||
@ -697,7 +697,7 @@ void AboutTab::updChecker_retrieved(quint64 updateVersion)
|
||||
string sVersionLabel;
|
||||
sVersionLabel.reserve(512);
|
||||
|
||||
sVersionLabel = fmt::format(C_("AboutTab", "Latest version: {:s}"), sUpdVersion);
|
||||
sVersionLabel = fmt::format(FRUN(C_("AboutTab", "Latest version: {:s}")), sUpdVersion);
|
||||
if (updateVersion > ourVersion) {
|
||||
sVersionLabel += BR BR;
|
||||
sVersionLabel += C_("AboutTab", "<b>New version available!</b>");
|
||||
|
@ -296,7 +296,7 @@ void CacheTab::ccCleaner_cacheCleared(CacheCleaner::CacheDir cacheDir, unsigned
|
||||
if (dirErrs > 0 || fileErrs > 0) {
|
||||
// tr: Error message template. (Qt version, with formatting)
|
||||
const QString qs_msg = QC_("ConfigDialog", "<b>ERROR:</b> %1")
|
||||
.arg(U82Q(fmt::format(C_("CacheTab", "Unable to delete {0:Ld} file(s) and/or {1:Ld} dir(s)."),
|
||||
.arg(U82Q(fmt::format(FRUN(C_("CacheTab", "Unable to delete {0:Ld} file(s) and/or {1:Ld} dir(s).")),
|
||||
fileErrs, dirErrs)));
|
||||
d->ui.lblStatus->setText(qs_msg);
|
||||
MessageSound::play(QMessageBox::Warning, qs_msg, this);
|
||||
|
@ -158,14 +158,14 @@ void KeyManagerTabPrivate::showKeyImportReturnStatus(
|
||||
case KeyStoreUI::ImportStatus::OpenError:
|
||||
if (iret.error_code != 0) {
|
||||
// tr: {0:s} == filename, {1:s} == error message
|
||||
msg = fmt::format(C_("KeyManagerTab",
|
||||
"An error occurred while opening '{0:s}': {1:s}"),
|
||||
msg = fmt::format(FRUN(C_("KeyManagerTab",
|
||||
"An error occurred while opening '{0:s}': {1:s}")),
|
||||
fileNoPath.toUtf8().constData(),
|
||||
strerror(iret.error_code));
|
||||
} else {
|
||||
// tr: {:s} == filename
|
||||
msg = fmt::format(C_("KeyManagerTab",
|
||||
"An error occurred while opening '{:s}'."),
|
||||
msg = fmt::format(FRUN(C_("KeyManagerTab",
|
||||
"An error occurred while opening '{:s}'.")),
|
||||
fileNoPath.toUtf8().constData());
|
||||
}
|
||||
type = KMessageWidget::Error;
|
||||
@ -176,14 +176,14 @@ void KeyManagerTabPrivate::showKeyImportReturnStatus(
|
||||
// TODO: Error code for short reads.
|
||||
if (iret.error_code != 0) {
|
||||
// tr: {0:s} == filename, {1:s} == error message
|
||||
msg = fmt::format(C_("KeyManagerTab",
|
||||
"An error occurred while reading '{0:s}': {1:s}"),
|
||||
msg = fmt::format(FRUN(C_("KeyManagerTab",
|
||||
"An error occurred while reading '{0:s}': {1:s}")),
|
||||
fileNoPath.toUtf8().constData(),
|
||||
strerror(iret.error_code));
|
||||
} else {
|
||||
// tr: {:s} == filename
|
||||
msg = fmt::format(C_("KeyManagerTab",
|
||||
"An error occurred while reading '{:s}'."),
|
||||
msg = fmt::format(FRUN(C_("KeyManagerTab",
|
||||
"An error occurred while reading '{:s}'.")),
|
||||
fileNoPath.toUtf8().constData());
|
||||
}
|
||||
type = KMessageWidget::Error;
|
||||
@ -192,8 +192,8 @@ void KeyManagerTabPrivate::showKeyImportReturnStatus(
|
||||
|
||||
case KeyStoreUI::ImportStatus::InvalidFile:
|
||||
// tr: {0:s} == filename, {1:s} == type of file
|
||||
msg = fmt::format(C_("KeyManagerTab",
|
||||
"The file '{0:s}' is not a valid {1:s} file."),
|
||||
msg = fmt::format(FRUN(C_("KeyManagerTab",
|
||||
"The file '{0:s}' is not a valid {1:s} file.")),
|
||||
fileNoPath.toUtf8().constData(),
|
||||
keyType.toUtf8().constData());
|
||||
type = KMessageWidget::Warning;
|
||||
@ -202,8 +202,8 @@ void KeyManagerTabPrivate::showKeyImportReturnStatus(
|
||||
|
||||
case KeyStoreUI::ImportStatus::NoKeysImported:
|
||||
// tr: {:s} == filename
|
||||
msg = fmt::format(C_("KeyManagerTab",
|
||||
"No keys were imported from '{:s}'."),
|
||||
msg = fmt::format(FRUN(C_("KeyManagerTab",
|
||||
"No keys were imported from '{:s}'.")),
|
||||
fileNoPath.toUtf8().constData());
|
||||
type = KMessageWidget::Information;
|
||||
icon = QStyle::SP_MessageBoxInformation;
|
||||
@ -213,10 +213,10 @@ void KeyManagerTabPrivate::showKeyImportReturnStatus(
|
||||
case KeyStoreUI::ImportStatus::KeysImported: {
|
||||
const unsigned int keyCount = iret.keysImportedVerify + iret.keysImportedNoVerify;
|
||||
// tr: {0:Ld} == number of keys, {1:s} == filename
|
||||
msg = fmt::format(NC_("KeyManagerTab",
|
||||
msg = fmt::format(FRUN(NC_("KeyManagerTab",
|
||||
"{0:Ld} key was imported from '{1:s}'.",
|
||||
"{0:Ld} keys were imported from '{1:s}'.",
|
||||
keyCount),
|
||||
keyCount)),
|
||||
keyCount, fileNoPath.toUtf8().constData());
|
||||
type = KMessageWidget::Positive;
|
||||
icon = QStyle::SP_DialogOkButton;
|
||||
@ -232,55 +232,55 @@ void KeyManagerTabPrivate::showKeyImportReturnStatus(
|
||||
if (iret.keysExist > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(NC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(NC_("KeyManagerTab",
|
||||
"{:Ld} key already exists in the Key Manager.",
|
||||
"{:Ld} keys already exist in the Key Manager.",
|
||||
iret.keysExist),
|
||||
iret.keysExist)),
|
||||
iret.keysExist);
|
||||
}
|
||||
if (iret.keysInvalid > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(NC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(NC_("KeyManagerTab",
|
||||
"{:Ld} key was not imported because it is incorrect.",
|
||||
"{:Ld} keys were not imported because they are incorrect.",
|
||||
iret.keysInvalid),
|
||||
iret.keysInvalid)),
|
||||
iret.keysInvalid);
|
||||
}
|
||||
if (iret.keysNotUsed > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(NC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(NC_("KeyManagerTab",
|
||||
"{:Ld} key was not imported because it isn't used by rom-properties.",
|
||||
"{:Ld} keys were not imported because they aren't used by rom-properties.",
|
||||
iret.keysNotUsed),
|
||||
iret.keysNotUsed)),
|
||||
iret.keysNotUsed);
|
||||
}
|
||||
if (iret.keysCantDecrypt > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(NC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(NC_("KeyManagerTab",
|
||||
"{:Ld} key was not imported because it is encrypted and the master key isn't available.",
|
||||
"{:Ld} keys were not imported because they are encrypted and the master key isn't available.",
|
||||
iret.keysCantDecrypt),
|
||||
iret.keysCantDecrypt)),
|
||||
iret.keysCantDecrypt);
|
||||
}
|
||||
if (iret.keysImportedVerify > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(NC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(NC_("KeyManagerTab",
|
||||
"{:Ld} key has been imported and verified as correct.",
|
||||
"{:Ld} keys have been imported and verified as correct.",
|
||||
iret.keysImportedVerify),
|
||||
iret.keysImportedVerify)),
|
||||
iret.keysImportedVerify);
|
||||
}
|
||||
if (iret.keysImportedNoVerify > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(NC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(NC_("KeyManagerTab",
|
||||
"{:Ld} key has been imported without verification.",
|
||||
"{:Ld} keys have been imported without verification.",
|
||||
iret.keysImportedNoVerify),
|
||||
iret.keysImportedNoVerify)),
|
||||
iret.keysImportedNoVerify);
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ void Ext2AttrViewPrivate::retranslateUi_nonDesigner(void)
|
||||
const Ext2AttrCheckboxInfo_t *const p = ext2AttrCheckboxInfo(static_cast<Ext2AttrCheckboxID>(i));
|
||||
|
||||
// Prepend the lsattr character to the checkbox label.
|
||||
s_label = fmt::format(s_lsattr_fmt, p->lsattr_chr,
|
||||
s_label = fmt::format(FRUN(s_lsattr_fmt), p->lsattr_chr,
|
||||
pgettext_expr("Ext2AttrView", p->label));
|
||||
|
||||
checkBoxes[i]->setText(U82Q(s_label));
|
||||
|
@ -293,7 +293,7 @@ int ADX::loadFieldData(void)
|
||||
|
||||
// Sample rate
|
||||
d->fields.addField_string(C_("RomData|Audio", "Sample Rate"),
|
||||
fmt::format(C_("RomData", "{:Ld} Hz"), sample_rate));
|
||||
fmt::format(FRUN(C_("RomData", "{:Ld} Hz")), sample_rate));
|
||||
|
||||
// Length. (non-looping)
|
||||
d->fields.addField_string(C_("RomData|Audio", "Length"),
|
||||
@ -304,7 +304,7 @@ int ADX::loadFieldData(void)
|
||||
// TODO: What does this value represent?
|
||||
// FIXME: Disabling until I figure this out.
|
||||
d->fields.addField_string(C_("ADX", "High-Pass Cutoff"),
|
||||
fmt::format(C_("RomData", "{:Ld} Hz"), adxHeader->high_pass_cutoff));
|
||||
fmt::format(FRUN(C_("RomData", "{:Ld} Hz")), adxHeader->high_pass_cutoff));
|
||||
#endif
|
||||
|
||||
// Translated strings
|
||||
|
@ -410,7 +410,7 @@ int BCSTM::loadFieldData(void)
|
||||
d->fields.addField_string(type_title, type_tbl[static_cast<int>(d->audioFormat)]);
|
||||
} else {
|
||||
d->fields.addField_string(type_title,
|
||||
fmt::format(C_("RomData", "Unknown ({:d})"), static_cast<int>(d->audioFormat)));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:d})")), static_cast<int>(d->audioFormat)));
|
||||
}
|
||||
|
||||
// TODO: Show the version field?
|
||||
@ -477,7 +477,7 @@ int BCSTM::loadFieldData(void)
|
||||
pgettext_expr("BCSTM|Codec", codec_tbl[codec]));
|
||||
} else {
|
||||
d->fields.addField_string(codec_title,
|
||||
fmt::format(C_("RomData", "Unknown ({:d})"), codec));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:d})")), codec));
|
||||
}
|
||||
|
||||
// Number of channels
|
||||
@ -485,7 +485,7 @@ int BCSTM::loadFieldData(void)
|
||||
|
||||
// Sample rate
|
||||
d->fields.addField_string(C_("RomData|Audio", "Sample Rate"),
|
||||
fmt::format(C_("RomData", "{:Ld} Hz"), sample_rate));
|
||||
fmt::format(FRUN(C_("RomData", "{:Ld} Hz")), sample_rate));
|
||||
|
||||
// Length (non-looping)
|
||||
// TODO: Figure this out for BCWAV.
|
||||
|
@ -340,7 +340,7 @@ int BRSTM::loadFieldData(void)
|
||||
pgettext_expr("BRSTM|Codec", codec_tbl[headChunk1->codec]));
|
||||
} else {
|
||||
d->fields.addField_string(codec_title,
|
||||
fmt::format(C_("RomData", "Unknown ({:d})"), headChunk1->codec));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:d})")), headChunk1->codec));
|
||||
}
|
||||
|
||||
// Number of channels
|
||||
@ -352,7 +352,7 @@ int BRSTM::loadFieldData(void)
|
||||
|
||||
// Sample rate
|
||||
d->fields.addField_string(C_("RomData|Audio", "Sample Rate"),
|
||||
fmt::format(C_("RomData", "{:Ld} Hz"), sample_rate));
|
||||
fmt::format(FRUN(C_("RomData", "{:Ld} Hz")), sample_rate));
|
||||
|
||||
// Length (non-looping)
|
||||
d->fields.addField_string(C_("RomData|Audio", "Length"),
|
||||
|
@ -529,7 +529,7 @@ int PSF::loadFieldData(void)
|
||||
pgettext_expr("PSF|System", sys_name));
|
||||
} else {
|
||||
d->fields.addField_string(system_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), psf_version));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), psf_version));
|
||||
}
|
||||
|
||||
// Parse the tags.
|
||||
|
@ -842,7 +842,7 @@ int SNDH::loadFieldData(void)
|
||||
const char *const s_hz = C_("RomData", "{:Ld} Hz");
|
||||
if (tags.vblank_freq != 0) {
|
||||
d->fields.addField_string(C_("SNDH", "VBlank Freq"),
|
||||
fmt::format(s_hz, tags.vblank_freq));
|
||||
fmt::format(FRUN(s_hz), tags.vblank_freq));
|
||||
}
|
||||
|
||||
// Timer frequencies.
|
||||
@ -854,8 +854,8 @@ int SNDH::loadFieldData(void)
|
||||
continue;
|
||||
|
||||
d->fields.addField_string(
|
||||
fmt::format(s_timer_freq, 'A'+i).c_str(),
|
||||
fmt::format(s_hz, tags.timer_freq[i]));
|
||||
fmt::format(FRUN(s_timer_freq), 'A'+i).c_str(),
|
||||
fmt::format(FRUN(s_hz), tags.timer_freq[i]));
|
||||
}
|
||||
|
||||
// Default subtune.
|
||||
|
@ -875,7 +875,7 @@ int SPC::loadFieldData(void)
|
||||
d->fields.addField_string(emulator_used_title, emu);
|
||||
} else {
|
||||
d->fields.addField_string(emulator_used_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), data.uvalue));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), data.uvalue));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -196,11 +196,11 @@ void VGMPrivate::addCommonSoundChip(unsigned int clk_full, const char *display,
|
||||
|
||||
if (clk != 0) {
|
||||
fields.addField_string(
|
||||
fmt::format(s_clockrate, display).c_str(),
|
||||
fmt::format(FRUN(s_clockrate), display).c_str(),
|
||||
LibRpText::formatFrequency(clk));
|
||||
if (dual) {
|
||||
fields.addField_string(
|
||||
fmt::format(s_dualchip, display).c_str(),
|
||||
fmt::format(FRUN(s_dualchip), display).c_str(),
|
||||
(clk_full & VGM_CLK_FLAG_DUALCHIP) ? s_yes : s_no);
|
||||
}
|
||||
}
|
||||
@ -464,11 +464,11 @@ int VGM::loadFieldData(void)
|
||||
const char *const chip_name = (isT6W28 ? "T6W28" : "SN76489");
|
||||
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_clockrate, chip_name).c_str(),
|
||||
fmt::format(FRUN(d->s_clockrate), chip_name).c_str(),
|
||||
LibRpText::formatFrequency(sn76489_clk & ~PSG_T6W28));
|
||||
if (!isT6W28) {
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_dualchip, chip_name).c_str(),
|
||||
fmt::format(FRUN(d->s_dualchip), chip_name).c_str(),
|
||||
(sn76489_clk & VGM_CLK_FLAG_DUALCHIP) ? d->s_yes : d->s_no);
|
||||
}
|
||||
|
||||
@ -485,10 +485,10 @@ int VGM::loadFieldData(void)
|
||||
}
|
||||
|
||||
d->fields.addField_string_numeric(
|
||||
fmt::format(C_("VGM", "{:s} LFSR pattern"), chip_name).c_str(),
|
||||
fmt::format(FRUN(C_("VGM", "{:s} LFSR pattern")), chip_name).c_str(),
|
||||
lfsr_feedback, RomFields::Base::Hex, 4, RomFields::STRF_MONOSPACE);
|
||||
d->fields.addField_string_numeric(
|
||||
fmt::format(C_("VGM", "{:s} LFSR width"), chip_name).c_str(),
|
||||
fmt::format(FRUN(C_("VGM", "{:s} LFSR width")), chip_name).c_str(),
|
||||
lfsr_width);
|
||||
|
||||
// Flags. [1.51]
|
||||
@ -508,7 +508,7 @@ int VGM::loadFieldData(void)
|
||||
}};
|
||||
vector<string> *const v_psg_flags_bitfield_names = RomFields::strArrayToVector_i18n(
|
||||
"VGM|PSGFlags", psg_flags_bitfield_names);
|
||||
d->fields.addField_bitfield(fmt::format(s_flags, chip_name).c_str(),
|
||||
d->fields.addField_bitfield(fmt::format(FRUN(s_flags), chip_name).c_str(),
|
||||
v_psg_flags_bitfield_names, 2, psg_flags);
|
||||
}
|
||||
|
||||
@ -542,10 +542,10 @@ int VGM::loadFieldData(void)
|
||||
clk &= ~VGM_CLK_FLAG_ALTMODE;
|
||||
if (clk != 0) {
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_clockrate, "Sega PCM").c_str(),
|
||||
fmt::format(FRUN(d->s_clockrate), "Sega PCM").c_str(),
|
||||
LibRpText::formatFrequency(clk));
|
||||
d->fields.addField_string_numeric(
|
||||
fmt::format(C_("VGM", "{:s} IF reg"), "Sega PCM").c_str(),
|
||||
fmt::format(FRUN(C_("VGM", "{:s} IF reg")), "Sega PCM").c_str(),
|
||||
le32_to_cpu(vgmHeader->sega_pcm_if_reg),
|
||||
RomFields::Base::Hex, 8, RomFields::STRF_MONOSPACE);
|
||||
}
|
||||
@ -569,16 +569,16 @@ int VGM::loadFieldData(void)
|
||||
const unsigned int clk = clk_full & ~(VGM_CLK_FLAG_ALTMODE | VGM_CLK_FLAG_DUALCHIP);
|
||||
if (clk != 0) {
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_clockrate, "YM2203").c_str(),
|
||||
fmt::format(FRUN(d->s_clockrate), "YM2203").c_str(),
|
||||
LibRpText::formatFrequency(clk));
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_dualchip, "YM2203").c_str(),
|
||||
fmt::format(FRUN(d->s_dualchip), "YM2203").c_str(),
|
||||
(clk_full & VGM_CLK_FLAG_DUALCHIP) ? d->s_yes : d->s_no);
|
||||
|
||||
// TODO: Is AY8910 type needed?
|
||||
vector<string> *const v_ay8910_flags_bitfield_names = RomFields::strArrayToVector_i18n(
|
||||
"VGM|AY8910Flags", ay8910_flags_bitfield_names);
|
||||
d->fields.addField_bitfield(fmt::format(s_flags, "YM2203 (AY8910)").c_str(),
|
||||
d->fields.addField_bitfield(fmt::format(FRUN(s_flags), "YM2203 (AY8910)").c_str(),
|
||||
v_ay8910_flags_bitfield_names, 2, vgmHeader->ym2203_ay8910_flags);
|
||||
}
|
||||
}
|
||||
@ -589,16 +589,16 @@ int VGM::loadFieldData(void)
|
||||
const unsigned int clk = clk_full & ~(VGM_CLK_FLAG_ALTMODE | VGM_CLK_FLAG_DUALCHIP);
|
||||
if (clk != 0) {
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_clockrate, "YM2608").c_str(),
|
||||
fmt::format(FRUN(d->s_clockrate), "YM2608").c_str(),
|
||||
LibRpText::formatFrequency(clk));
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_dualchip, "YM2608").c_str(),
|
||||
fmt::format(FRUN(d->s_dualchip), "YM2608").c_str(),
|
||||
(clk_full & VGM_CLK_FLAG_DUALCHIP) ? d->s_yes : d->s_no);
|
||||
|
||||
// TODO: Is AY8910 type needed?
|
||||
vector<string> *const v_ay8910_flags_bitfield_names = RomFields::strArrayToVector_i18n(
|
||||
"VGM|AY8910Flags", ay8910_flags_bitfield_names);
|
||||
d->fields.addField_bitfield(fmt::format(s_flags, "YM2608 (AY8910)").c_str(),
|
||||
d->fields.addField_bitfield(fmt::format(FRUN(s_flags), "YM2608 (AY8910)").c_str(),
|
||||
v_ay8910_flags_bitfield_names, 2, vgmHeader->ym2608_ay8910_flags);
|
||||
}
|
||||
}
|
||||
@ -612,10 +612,10 @@ int VGM::loadFieldData(void)
|
||||
(clk_full & VGM_CLK_FLAG_ALTMODE) ? "YM2610B" : "YM2610";
|
||||
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_clockrate, chip_name).c_str(),
|
||||
fmt::format(FRUN(d->s_clockrate), chip_name).c_str(),
|
||||
LibRpText::formatFrequency(clk));
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_dualchip, chip_name).c_str(),
|
||||
fmt::format(FRUN(d->s_dualchip), chip_name).c_str(),
|
||||
(clk_full & VGM_CLK_FLAG_DUALCHIP) ? d->s_yes : d->s_no);
|
||||
}
|
||||
}
|
||||
@ -675,15 +675,15 @@ int VGM::loadFieldData(void)
|
||||
}
|
||||
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_clockrate, chip_name).c_str(),
|
||||
fmt::format(FRUN(d->s_clockrate), chip_name).c_str(),
|
||||
LibRpText::formatFrequency(clk));
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_dualchip, chip_name).c_str(),
|
||||
fmt::format(FRUN(d->s_dualchip), chip_name).c_str(),
|
||||
(clk_full & VGM_CLK_FLAG_DUALCHIP) ? d->s_yes : d->s_no);
|
||||
|
||||
vector<string> *const v_ay8910_flags_bitfield_names = RomFields::strArrayToVector_i18n(
|
||||
"VGM|AY8910Flags", ay8910_flags_bitfield_names);
|
||||
d->fields.addField_bitfield(fmt::format(s_flags, chip_name).c_str(),
|
||||
d->fields.addField_bitfield(fmt::format(FRUN(s_flags), chip_name).c_str(),
|
||||
v_ay8910_flags_bitfield_names, 2, vgmHeader->ay8910_flags);
|
||||
}
|
||||
}
|
||||
@ -699,10 +699,10 @@ int VGM::loadFieldData(void)
|
||||
const unsigned int clk = clk_full & ~(VGM_CLK_FLAG_ALTMODE | VGM_CLK_FLAG_DUALCHIP);
|
||||
if (clk != 0) {
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_clockrate, "NES APU").c_str(),
|
||||
fmt::format(FRUN(d->s_clockrate), "NES APU").c_str(),
|
||||
LibRpText::formatFrequency(clk));
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_dualchip, "NES APU").c_str(),
|
||||
fmt::format(FRUN(d->s_dualchip), "NES APU").c_str(),
|
||||
(clk_full & VGM_CLK_FLAG_DUALCHIP) ? d->s_yes : d->s_no);
|
||||
|
||||
// Bit 31 indicates presence of FDS audio hardware.
|
||||
@ -710,7 +710,7 @@ int VGM::loadFieldData(void)
|
||||
? C_("VGM|NESExpansion", "Famicom Disk System")
|
||||
: C_("VGM|NESExpansion", "(none)");
|
||||
d->fields.addField_string(
|
||||
fmt::format(C_("VGM", "{:s} Expansions"), "NES APU").c_str(), nes_exp);
|
||||
fmt::format(FRUN(C_("VGM", "{:s} Expansions")), "NES APU").c_str(), nes_exp);
|
||||
}
|
||||
}
|
||||
|
||||
@ -773,14 +773,14 @@ int VGM::loadFieldData(void)
|
||||
const unsigned int clk = clk_full & ~(VGM_CLK_FLAG_ALTMODE | VGM_CLK_FLAG_DUALCHIP);
|
||||
if (clk != 0) {
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_clockrate, "ES5503").c_str(),
|
||||
fmt::format(FRUN(d->s_clockrate), "ES5503").c_str(),
|
||||
LibRpText::formatFrequency(clk));
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_dualchip, "ES5503").c_str(),
|
||||
fmt::format(FRUN(d->s_dualchip), "ES5503").c_str(),
|
||||
(clk_full & VGM_CLK_FLAG_DUALCHIP) ? d->s_yes : d->s_no);
|
||||
|
||||
d->fields.addField_string_numeric(
|
||||
fmt::format(C_("VGM", "{:s} # of Channels"), "ES5503").c_str(),
|
||||
fmt::format(FRUN(C_("VGM", "{:s} # of Channels")), "ES5503").c_str(),
|
||||
vgmHeader->es5503_num_ch);
|
||||
}
|
||||
}
|
||||
@ -795,14 +795,14 @@ int VGM::loadFieldData(void)
|
||||
: "ES5505";
|
||||
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_clockrate, chip_name).c_str(),
|
||||
fmt::format(FRUN(d->s_clockrate), chip_name).c_str(),
|
||||
LibRpText::formatFrequency(clk));
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_dualchip, chip_name).c_str(),
|
||||
fmt::format(FRUN(d->s_dualchip), chip_name).c_str(),
|
||||
(clk_full & VGM_CLK_FLAG_DUALCHIP) ? d->s_yes : d->s_no);
|
||||
|
||||
d->fields.addField_string_numeric(
|
||||
fmt::format(C_("VGM", "{:s} # of Channels"), chip_name).c_str(),
|
||||
fmt::format(FRUN(C_("VGM", "{:s} # of Channels")), chip_name).c_str(),
|
||||
vgmHeader->es5505_num_ch);
|
||||
}
|
||||
}
|
||||
@ -816,14 +816,14 @@ int VGM::loadFieldData(void)
|
||||
const unsigned int clk = clk_full & ~(VGM_CLK_FLAG_ALTMODE | VGM_CLK_FLAG_DUALCHIP);
|
||||
if (clk != 0) {
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_clockrate, "C352").c_str(),
|
||||
fmt::format(FRUN(d->s_clockrate), "C352").c_str(),
|
||||
LibRpText::formatFrequency(clk));
|
||||
d->fields.addField_string(
|
||||
fmt::format(d->s_dualchip, "C352").c_str(),
|
||||
fmt::format(FRUN(d->s_dualchip), "C352").c_str(),
|
||||
(clk_full & VGM_CLK_FLAG_DUALCHIP) ? d->s_yes : d->s_no);
|
||||
|
||||
d->fields.addField_string_numeric(
|
||||
fmt::format(C_("VGM", "{:s} Clock Divider"), "C352").c_str(),
|
||||
fmt::format(FRUN(C_("VGM", "{:s} Clock Divider")), "C352").c_str(),
|
||||
vgmHeader->c352_clk_div * 4);
|
||||
}
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ int Atari7800::loadFieldData(void)
|
||||
"SNES2Atari"
|
||||
}};
|
||||
for (unsigned int i = 0; i < 2; i++) {
|
||||
const string control_title = fmt::format(C_("Atari7800", "Controller {:d}"), i+1);
|
||||
const string control_title = fmt::format(FRUN(C_("Atari7800", "Controller {:d}")), i+1);
|
||||
const uint8_t control_type = romHeader->control_types[i];
|
||||
|
||||
if (control_type < controller_tbl.size()) {
|
||||
@ -245,7 +245,7 @@ int Atari7800::loadFieldData(void)
|
||||
controller_tbl[control_type]));
|
||||
} else {
|
||||
d->fields.addField_string(control_title.c_str(),
|
||||
fmt::format(C_("RomData", "Unknown ({:d})"), control_type));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:d})")), control_type));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -387,7 +387,7 @@ int CBMCart::loadFieldData(void)
|
||||
d->fields.addField_string(s_type_title, s_type);
|
||||
} else {
|
||||
d->fields.addField_string(s_type_title,
|
||||
fmt::format(C_("RomData", "Unknown ({:d})"), type));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:d})")), type));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -666,7 +666,7 @@ int Dreamcast::loadFieldData(void)
|
||||
const char *const disc_number_title = C_("RomData", "Disc #");
|
||||
d->fields.addField_string(disc_number_title,
|
||||
// tr: Disc X of Y (for multi-disc games)
|
||||
fmt::format(C_("RomData|Disc", "{0:d} of {1:d}"),
|
||||
fmt::format(FRUN(C_("RomData|Disc", "{0:d} of {1:d}")),
|
||||
disc_num, disc_total));
|
||||
}
|
||||
|
||||
@ -720,11 +720,11 @@ int Dreamcast::loadFieldData(void)
|
||||
if (crc16_expected == crc16_actual) {
|
||||
// CRC16 is correct.
|
||||
d->fields.addField_string(C_("RomData", "Checksum"),
|
||||
fmt::format(C_("Dreamcast", "0x{:0>4X} (valid)"), crc16_expected));
|
||||
fmt::format(FRUN(C_("Dreamcast", "0x{:0>4X} (valid)")), crc16_expected));
|
||||
} else {
|
||||
// CRC16 is incorrect.
|
||||
d->fields.addField_string(C_("RomData", "Checksum"),
|
||||
fmt::format(C_("Dreamcast", "0x{0:0>4X} (INVALID; should be 0x{1:0>4X})"),
|
||||
fmt::format(FRUN(C_("Dreamcast", "0x{0:0>4X} (INVALID; should be 0x{1:0>4X})")),
|
||||
crc16_expected, crc16_actual));
|
||||
}
|
||||
} else {
|
||||
@ -733,7 +733,7 @@ int Dreamcast::loadFieldData(void)
|
||||
memcpy(s_crc16, discHeader->device_info, 4);
|
||||
s_crc16[4] = '\0';
|
||||
d->fields.addField_string(C_("RomData", "Checksum"),
|
||||
fmt::format(C_("Dreamcast", "0x{0:0>4X} (HEADER is INVALID: {1:s})"),
|
||||
fmt::format(FRUN(C_("Dreamcast", "0x{0:0>4X} (HEADER is INVALID: {1:s})")),
|
||||
crc16_expected, s_crc16_invalid));
|
||||
}
|
||||
#endif
|
||||
|
@ -1387,7 +1387,7 @@ int DreamcastSave::loadFieldData(void)
|
||||
} else {
|
||||
// Unknown file type.
|
||||
d->fields.addField_string(filetype_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), d->vms_dirent.filetype));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), d->vms_dirent.filetype));
|
||||
}
|
||||
|
||||
// DC VMS directory entry
|
||||
@ -1411,7 +1411,7 @@ int DreamcastSave::loadFieldData(void)
|
||||
} else {
|
||||
// Unknown copy protection.
|
||||
d->fields.addField_string(protect_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), d->vms_dirent.protect));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), d->vms_dirent.protect));
|
||||
}
|
||||
|
||||
// Filename
|
||||
|
@ -443,11 +443,11 @@ string GameCubePrivate::getPublisher(void) const
|
||||
discHeader.company[1],
|
||||
'\0'
|
||||
}};
|
||||
return fmt::format(C_("RomData", "Unknown ({:s})"), s_company.data());
|
||||
return fmt::format(FRUN(C_("RomData", "Unknown ({:s})")), s_company.data());
|
||||
}
|
||||
|
||||
// Disc ID is not alphanumeric.
|
||||
return fmt::format(C_("RomData", "Unknown ({:0>2X} {:0>2X})"),
|
||||
return fmt::format(FRUN(C_("RomData", "Unknown ({:0>2X} {:0>2X})")),
|
||||
static_cast<uint8_t>(discHeader.company[0]),
|
||||
static_cast<uint8_t>(discHeader.company[1]));
|
||||
}
|
||||
@ -1391,7 +1391,7 @@ int GameCube::loadFieldData(void)
|
||||
string s_region;
|
||||
if (suffix) {
|
||||
// tr: {0:s} == full region name, {1:s} == abbreviation
|
||||
s_region = fmt::format(C_("Wii", "{0:s} ({1:s})"), region, suffix);
|
||||
s_region = fmt::format(FRUN(C_("Wii", "{0:s} ({1:s})")), region, suffix);
|
||||
} else {
|
||||
s_region = region;
|
||||
}
|
||||
@ -1400,7 +1400,7 @@ int GameCube::loadFieldData(void)
|
||||
} else {
|
||||
// Invalid region code.
|
||||
d->fields.addField_string(region_code_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>8X})"), d->gcnRegion));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>8X})")), d->gcnRegion));
|
||||
}
|
||||
|
||||
if ((d->discType & GameCubePrivate::DISC_SYSTEM_MASK) != GameCubePrivate::DISC_SYSTEM_WII) {
|
||||
@ -1516,7 +1516,7 @@ int GameCube::loadFieldData(void)
|
||||
// Key error.
|
||||
const char *status = d->wii_getCryptoStatus(d->gamePartition);
|
||||
d->fields.addField_string(game_info_title,
|
||||
fmt::format(C_("GameCube", "ERROR: {:s}"),
|
||||
fmt::format(FRUN(C_("GameCube", "ERROR: {:s}")),
|
||||
(status ? status : C_("GameCube", "Unknown"))));
|
||||
}
|
||||
}
|
||||
|
@ -1123,7 +1123,7 @@ int NES::loadFieldData(void)
|
||||
{
|
||||
d->fields.addField_string(format_title,
|
||||
// tr: ROM format, e.g. iNES or FDS disk image.
|
||||
fmt::format(C_("NES|Format", "{:s} (Wii U Virtual Console)"), rom_format));
|
||||
fmt::format(FRUN(C_("NES|Format", "{:s} (Wii U Virtual Console)")), rom_format));
|
||||
} else {
|
||||
d->fields.addField_string(format_title, rom_format);
|
||||
}
|
||||
@ -1145,7 +1145,7 @@ int NES::loadFieldData(void)
|
||||
const char *const mapper_name = NESMappers::lookup_ines(mapper);
|
||||
if (mapper_name) {
|
||||
// tr: Print the mapper ID followed by the mapper name.
|
||||
s_mapper = fmt::format(C_("NES|Mapper", "{0:d} - {1:s}"),
|
||||
s_mapper = fmt::format(FRUN(C_("NES|Mapper", "{0:d} - {1:s}")),
|
||||
static_cast<unsigned int>(mapper), mapper_name);
|
||||
} else {
|
||||
// tr: Print only the mapper ID.
|
||||
@ -1172,7 +1172,7 @@ int NES::loadFieldData(void)
|
||||
const char *const submapper_name = NESMappers::lookup_nes2_submapper(mapper, submapper);
|
||||
if (submapper_name) {
|
||||
// tr: Print the submapper ID followed by the submapper name.
|
||||
s_submapper = fmt::format(C_("NES|Mapper", "{0:d} - {1:s}"),
|
||||
s_submapper = fmt::format(FRUN(C_("NES|Mapper", "{0:d} - {1:s}")),
|
||||
static_cast<unsigned int>(submapper), submapper_name);
|
||||
} else {
|
||||
// tr: Print only the submapper ID.
|
||||
@ -1263,7 +1263,7 @@ int NES::loadFieldData(void)
|
||||
d->fields.addField_string(publisher_title, publisher);
|
||||
} else {
|
||||
d->fields.addField_string(publisher_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), header->fds.publisher_code));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), header->fds.publisher_code));
|
||||
}
|
||||
|
||||
// Revision
|
||||
@ -1513,7 +1513,7 @@ int NES::loadFieldData(void)
|
||||
if (prg_size > 0) {
|
||||
s_prg_size = formatFileSizeKiB(prg_size);
|
||||
} else {
|
||||
s_prg_size = fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), prg_sz_idx);
|
||||
s_prg_size = fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), prg_sz_idx);
|
||||
}
|
||||
d->fields.addField_string(C_("NES", "PRG ROM Size"), s_prg_size);
|
||||
|
||||
@ -1523,7 +1523,7 @@ int NES::loadFieldData(void)
|
||||
if (chr_size > 0) {
|
||||
s_chr_size = formatFileSizeKiB(chr_size);
|
||||
} else {
|
||||
s_chr_size = fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), chr_sz_idx);
|
||||
s_chr_size = fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), chr_sz_idx);
|
||||
}
|
||||
if (likely(!b_chr_ram)) {
|
||||
d->fields.addField_string(C_("NES", "CHR ROM Size"), s_chr_size);
|
||||
@ -1552,7 +1552,7 @@ int NES::loadFieldData(void)
|
||||
string s_footer_mapper;
|
||||
if (footer_mapper < ARRAY_SIZE(footer_mapper_tbl)) {
|
||||
// tr: Print the mapper ID followed by the mapper name.
|
||||
s_footer_mapper = fmt::format(C_("NES|Mapper", "{0:d} - {1:s}"),
|
||||
s_footer_mapper = fmt::format(FRUN(C_("NES|Mapper", "{0:d} - {1:s}")),
|
||||
footer_mapper, footer_mapper_tbl[footer_mapper]);
|
||||
} else {
|
||||
// tr: Print only the mapper ID.
|
||||
@ -1568,7 +1568,7 @@ int NES::loadFieldData(void)
|
||||
d->fields.addField_string(publisher_title, publisher);
|
||||
} else {
|
||||
d->fields.addField_string(publisher_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), footer.publisher_code));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), footer.publisher_code));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -622,9 +622,9 @@ string SNESPrivate::getPublisher(void) const
|
||||
romHeader.snes.ext.new_publisher_code[1],
|
||||
'\0'
|
||||
}};
|
||||
s_publisher = fmt::format(C_("RomData", "Unknown ({:s})"), s_pub_code.data());
|
||||
s_publisher = fmt::format(FRUN(C_("RomData", "Unknown ({:s})")), s_pub_code.data());
|
||||
} else {
|
||||
s_publisher = fmt::format(C_("RomData", "Unknown ({:0>2X} {:0>2X})"),
|
||||
s_publisher = fmt::format(FRUN(C_("RomData", "Unknown ({:0>2X} {:0>2X})")),
|
||||
static_cast<uint8_t>(romHeader.snes.ext.new_publisher_code[0]),
|
||||
static_cast<uint8_t>(romHeader.snes.ext.new_publisher_code[1]));
|
||||
}
|
||||
@ -635,7 +635,7 @@ string SNESPrivate::getPublisher(void) const
|
||||
if (publisher) {
|
||||
s_publisher = publisher;
|
||||
} else {
|
||||
s_publisher = fmt::format(C_("RomData", "Unknown ({:0>2X})"),
|
||||
s_publisher = fmt::format(FRUN(C_("RomData", "Unknown ({:0>2X})")),
|
||||
romHeader.snes.old_publisher_code);
|
||||
}
|
||||
}
|
||||
@ -1351,7 +1351,7 @@ int SNES::loadFieldData(void)
|
||||
} else {
|
||||
// Unknown ROM mapping.
|
||||
d->fields.addField_string(rom_mapping_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), rom_mapping));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), rom_mapping));
|
||||
}
|
||||
|
||||
// Cartridge HW
|
||||
@ -1396,7 +1396,7 @@ int SNES::loadFieldData(void)
|
||||
pgettext_expr("Region", region_lkup));
|
||||
} else {
|
||||
d->fields.addField_string(region_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"),
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")),
|
||||
romHeader->snes.destination_code));
|
||||
}
|
||||
|
||||
@ -1467,7 +1467,7 @@ int SNES::loadFieldData(void)
|
||||
pgettext_expr("SNES|ProgramType", program_type));
|
||||
} else {
|
||||
d->fields.addField_string(program_type_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>8X})"),
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>8X})")),
|
||||
le32_to_cpu(romHeader->bsx.ext.program_type)));
|
||||
}
|
||||
|
||||
|
@ -553,7 +553,7 @@ int SegaSaturn::loadFieldData(void)
|
||||
const char *const disc_number_title = C_("RomData", "Disc #");
|
||||
d->fields.addField_string(disc_number_title,
|
||||
// tr: Disc X of Y (for multi-disc games)
|
||||
fmt::format(C_("RomData|Disc", "{0:d} of {1:d}"),
|
||||
fmt::format(FRUN(C_("RomData|Disc", "{0:d} of {1:d}")),
|
||||
disc_num, disc_total));
|
||||
}
|
||||
|
||||
|
@ -355,9 +355,9 @@ int WiiU::loadFieldData(void)
|
||||
if (ISALNUM(publisher_code[0]) && ISALNUM(publisher_code[1]) &&
|
||||
ISALNUM(publisher_code[2]) && ISALNUM(publisher_code[3]))
|
||||
{
|
||||
s_publisher = fmt::format(C_("RomData", "Unknown ({:s})"), publisher_code.data());
|
||||
s_publisher = fmt::format(FRUN(C_("RomData", "Unknown ({:s})")), publisher_code.data());
|
||||
} else {
|
||||
s_publisher = fmt::format(C_("RomData", "Unknown ({:0>2X} {:0>2X} {:0>2X} {:0>2X})"),
|
||||
s_publisher = fmt::format(FRUN(C_("RomData", "Unknown ({:0>2X} {:0>2X} {:0>2X} {:0>2X})")),
|
||||
static_cast<uint8_t>(publisher_code[0]),
|
||||
static_cast<uint8_t>(publisher_code[1]),
|
||||
static_cast<uint8_t>(publisher_code[2]),
|
||||
|
@ -949,7 +949,7 @@ int WiiWAD::loadFieldData(void)
|
||||
string s_region;
|
||||
if (suffix) {
|
||||
// tr: {0:s} == full region name, {1:s} == abbreviation
|
||||
s_region = fmt::format(C_("Wii", "{0:s} ({1:s})"), region, suffix);
|
||||
s_region = fmt::format(FRUN(C_("Wii", "{0:s} ({1:s})")), region, suffix);
|
||||
} else {
|
||||
s_region = region;
|
||||
}
|
||||
@ -957,7 +957,7 @@ int WiiWAD::loadFieldData(void)
|
||||
d->fields.addField_string(region_code_title, s_region);
|
||||
} else {
|
||||
d->fields.addField_string(region_code_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), gcnRegion));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), gcnRegion));
|
||||
}
|
||||
|
||||
// Required IOS version.
|
||||
|
@ -988,7 +988,7 @@ int Xbox360_STFS::loadFieldData(void)
|
||||
d->fields.addField_string(s_content_type_title, s_content_type);
|
||||
} else {
|
||||
d->fields.addField_string(s_content_type_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>8X})"),
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>8X})")),
|
||||
be32_to_cpu(stfsMetadata->content_type)));
|
||||
}
|
||||
|
||||
@ -1014,7 +1014,7 @@ int Xbox360_STFS::loadFieldData(void)
|
||||
|
||||
d->fields.addField_string(C_("Xbox360_XEX", "Title ID"),
|
||||
// tr: Xbox 360 title ID (32-bit hex, then two letters followed by a 4-digit decimal number)
|
||||
fmt::format(C_("Xbox360_XEX", "{0:0>8X} ({1:s}-{2:0>4d})"),
|
||||
fmt::format(FRUN(C_("Xbox360_XEX", "{0:0>8X} ({1:s}-{2:0>4d})")),
|
||||
be32_to_cpu(stfsMetadata->title_id.u32),
|
||||
tid_str.c_str(),
|
||||
be16_to_cpu(stfsMetadata->title_id.u16)),
|
||||
@ -1071,7 +1071,7 @@ int Xbox360_STFS::loadFieldData(void)
|
||||
d->fields.addField_string(s_console_type_title, s_console_type);
|
||||
} else {
|
||||
d->fields.addField_string(s_console_type_title,
|
||||
fmt::format(C_("RomData", "Unknown ({:d})"), stfsHeader->console.console_type));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:d})")), stfsHeader->console.console_type));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1310,13 +1310,13 @@ string Xbox360_XEX_Private::getPublisher(void) const
|
||||
ISALNUM(executionID.title_id.b))
|
||||
{
|
||||
// Publisher ID is alphanumeric.
|
||||
return fmt::format(C_("RomData", "Unknown ({:c}{:c})"),
|
||||
return fmt::format(FRUN(C_("RomData", "Unknown ({:c}{:c})")),
|
||||
executionID.title_id.a,
|
||||
executionID.title_id.b);
|
||||
}
|
||||
|
||||
// Publisher ID is not alphanumeric.
|
||||
return fmt::format(C_("RomData", "Unknown ({:0>2X} {:0>2X})"),
|
||||
return fmt::format(FRUN(C_("RomData", "Unknown ({:0>2X} {:0>2X})")),
|
||||
static_cast<uint8_t>(executionID.title_id.a),
|
||||
static_cast<uint8_t>(executionID.title_id.b));
|
||||
}
|
||||
@ -1644,7 +1644,7 @@ int Xbox360_XEX::loadFieldData(void)
|
||||
s_xexKeyID = "XEX2";
|
||||
}
|
||||
d->fields.addField_string(C_("RomData", "Warning"),
|
||||
fmt::format(C_("Xbox360_XEX", "The Xbox 360 {:s} encryption key is not available."), s_xexKeyID),
|
||||
fmt::format(FRUN(C_("Xbox360_XEX", "The Xbox 360 {:s} encryption key is not available.")), s_xexKeyID),
|
||||
RomFields::STRF_WARNING);
|
||||
}
|
||||
}
|
||||
@ -1862,7 +1862,7 @@ int Xbox360_XEX::loadFieldData(void)
|
||||
|
||||
d->fields.addField_string(C_("Xbox360_XEX", "Title ID"),
|
||||
// tr: Xbox 360 title ID (32-bit hex, then two letters followed by a 4-digit decimal number)
|
||||
fmt::format(C_("Xbox360_XEX", "{0:0>8X} ({1:s}-{2:0>4d})"),
|
||||
fmt::format(FRUN(C_("Xbox360_XEX", "{0:0>8X} ({1:s}-{2:0>4d})")),
|
||||
be32_to_cpu(d->executionID.title_id.u32),
|
||||
tid_str.c_str(),
|
||||
be16_to_cpu(d->executionID.title_id.u16)),
|
||||
@ -1879,7 +1879,7 @@ int Xbox360_XEX::loadFieldData(void)
|
||||
if (d->executionID.disc_number != 0 && d->executionID.disc_count > 1) {
|
||||
d->fields.addField_string(C_("RomData", "Disc #"),
|
||||
// tr: Disc X of Y (for multi-disc games)
|
||||
fmt::format(C_("RomData|Disc", "{0:d} of {1:d}"),
|
||||
fmt::format(FRUN(C_("RomData|Disc", "{0:d} of {1:d}")),
|
||||
d->executionID.disc_number,
|
||||
d->executionID.disc_count));
|
||||
}
|
||||
@ -1928,7 +1928,7 @@ int Xbox360_XEX::loadFieldData(void)
|
||||
compression_tbl[d->fileFormatInfo.compression_type]));
|
||||
} else {
|
||||
d->fields.addField_string(C_("Xbox360_XEX", "Compression"),
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"),
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")),
|
||||
d->fileFormatInfo.compression_type));
|
||||
}
|
||||
|
||||
|
@ -1022,7 +1022,7 @@ int XboxDisc::loadFieldData(void)
|
||||
break;
|
||||
default:
|
||||
d->fields.addField_string(s_disc_type,
|
||||
fmt::format(C_("RomData", "Unknown ({:d})"), d->wave));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:d})")), d->wave));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -363,13 +363,13 @@ string Xbox_XBE_Private::getPublisher(void) const
|
||||
ISALNUM(xbeCertificate.title_id.b))
|
||||
{
|
||||
// Publisher ID is alphanumeric.
|
||||
return fmt::format(C_("RomData", "Unknown ({:c}{:c})"),
|
||||
return fmt::format(FRUN(C_("RomData", "Unknown ({:c}{:c})")),
|
||||
xbeCertificate.title_id.a,
|
||||
xbeCertificate.title_id.b);
|
||||
}
|
||||
|
||||
// Publisher ID is not alphanumeric.
|
||||
return fmt::format(C_("RomData", "Unknown ({:0>2X} {:0>2X})"),
|
||||
return fmt::format(FRUN(C_("RomData", "Unknown ({:0>2X} {:0>2X})")),
|
||||
static_cast<uint8_t>(xbeCertificate.title_id.a),
|
||||
static_cast<uint8_t>(xbeCertificate.title_id.b));
|
||||
}
|
||||
@ -701,7 +701,7 @@ int Xbox_XBE::loadFieldData(void)
|
||||
|
||||
d->fields.addField_string(s_title_id_desc,
|
||||
// tr: Xbox title ID (32-bit hex, then two letters followed by a 3-digit decimal number)
|
||||
fmt::format(C_("Xbox_XBE", "{0:0>8X} ({1:s}-{2:0>3d})"),
|
||||
fmt::format(FRUN(C_("Xbox_XBE", "{0:0>8X} ({1:s}-{2:0>3d})")),
|
||||
le32_to_cpu(xbeCertificate->title_id.u32),
|
||||
tid_str.c_str(),
|
||||
le16_to_cpu(xbeCertificate->title_id.u16)),
|
||||
|
@ -544,9 +544,9 @@ string DMGPrivate::getPublisher(void) const
|
||||
romHeader.new_publisher_code[1],
|
||||
'\0'
|
||||
}};
|
||||
s_publisher = fmt::format(C_("RomData", "Unknown ({:s})"), s_company.data());
|
||||
s_publisher = fmt::format(FRUN(C_("RomData", "Unknown ({:s})")), s_company.data());
|
||||
} else {
|
||||
s_publisher = fmt::format(C_("RomData", "Unknown ({:0>2X} {:0>2X})"),
|
||||
s_publisher = fmt::format(FRUN(C_("RomData", "Unknown ({:0>2X} {:0>2X})")),
|
||||
static_cast<uint8_t>(romHeader.new_publisher_code[0]),
|
||||
static_cast<uint8_t>(romHeader.new_publisher_code[1]));
|
||||
}
|
||||
@ -557,7 +557,7 @@ string DMGPrivate::getPublisher(void) const
|
||||
if (publisher) {
|
||||
s_publisher = publisher;
|
||||
} else {
|
||||
s_publisher = fmt::format(C_("RomData", "Unknown ({:0>2X})"),
|
||||
s_publisher = fmt::format(FRUN(C_("RomData", "Unknown ({:0>2X})")),
|
||||
romHeader.old_publisher_code);
|
||||
}
|
||||
}
|
||||
@ -698,12 +698,12 @@ void DMGPrivate::addFields_romHeader(const DMG_RomHeader *pRomHeader)
|
||||
if (rom_size > 32) {
|
||||
const int banks = rom_size / 16;
|
||||
fields.addField_string(rom_size_title,
|
||||
fmt::format(NC_("DMG", "{0:d} KiB ({1:d} bank)", "{0:d} KiB ({1:d} banks)", banks),
|
||||
fmt::format(FRUN(NC_("DMG", "{0:d} KiB ({1:d} bank)", "{0:d} KiB ({1:d} banks)", banks)),
|
||||
static_cast<unsigned int>(rom_size),
|
||||
static_cast<unsigned int>(banks)));
|
||||
} else {
|
||||
fields.addField_string(rom_size_title,
|
||||
fmt::format(C_("DMG", "{:d} KiB"), static_cast<unsigned int>(rom_size)));
|
||||
fmt::format(FRUN(C_("DMG", "{:d} KiB")), static_cast<unsigned int>(rom_size)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -721,12 +721,12 @@ void DMGPrivate::addFields_romHeader(const DMG_RomHeader *pRomHeader)
|
||||
if (ram_size > 8) {
|
||||
const int banks = ram_size / 8;
|
||||
fields.addField_string(ram_size_title,
|
||||
fmt::format(NC_("DMG", "{0:d} KiB ({1:d} bank)", "{0:d} KiB ({1:d} banks)", banks),
|
||||
fmt::format(FRUN(NC_("DMG", "{0:d} KiB ({1:d} bank)", "{0:d} KiB ({1:d} banks)", banks)),
|
||||
static_cast<unsigned int>(ram_size),
|
||||
static_cast<unsigned int>(banks)));
|
||||
} else {
|
||||
fields.addField_string(ram_size_title,
|
||||
fmt::format(C_("DMG", "{:d} KiB"), static_cast<unsigned int>(ram_size)));
|
||||
fmt::format(FRUN(C_("DMG", "{:d} KiB")), static_cast<unsigned int>(ram_size)));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -747,7 +747,7 @@ void DMGPrivate::addFields_romHeader(const DMG_RomHeader *pRomHeader)
|
||||
default:
|
||||
// Invalid value.
|
||||
fields.addField_string(region_code_title,
|
||||
fmt::format(C_("DMG", "0x{:0>2X} (INVALID)"), pRomHeader->region));
|
||||
fmt::format(FRUN(C_("DMG", "0x{:0>2X} (INVALID)")), pRomHeader->region));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -768,11 +768,11 @@ void DMGPrivate::addFields_romHeader(const DMG_RomHeader *pRomHeader)
|
||||
const char *const checksum_title = C_("RomData", "Checksum");
|
||||
if (checksum - pRomHeader->header_checksum != 0) {
|
||||
fields.addField_string(checksum_title,
|
||||
fmt::format(C_("DMG", "0x{0:0>2X} (INVALID; should be 0x{1:0>2X})"),
|
||||
fmt::format(FRUN(C_("DMG", "0x{0:0>2X} (INVALID; should be 0x{1:0>2X})")),
|
||||
pRomHeader->header_checksum, checksum));
|
||||
} else {
|
||||
fields.addField_string(checksum_title,
|
||||
fmt::format(C_("DMG", "0x{:0>2X} (valid)"), checksum));
|
||||
fmt::format(FRUN(C_("DMG", "0x{:0>2X} (valid)")), checksum));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,9 +116,9 @@ string GameBoyAdvancePrivate::getPublisher(void) const
|
||||
romHeader.company[1],
|
||||
'\0'
|
||||
}};
|
||||
s_publisher = fmt::format(C_("RomData", "Unknown ({:s})"), s_company.data());
|
||||
s_publisher = fmt::format(FRUN(C_("RomData", "Unknown ({:s})")), s_company.data());
|
||||
} else {
|
||||
s_publisher = fmt::format(C_("RomData", "Unknown ({:0>2X} {:0>2X})"),
|
||||
s_publisher = fmt::format(FRUN(C_("RomData", "Unknown ({:0>2X} {:0>2X})")),
|
||||
static_cast<uint8_t>(romHeader.company[0]),
|
||||
static_cast<uint8_t>(romHeader.company[1]));
|
||||
}
|
||||
|
@ -344,7 +344,7 @@ int NGPC::loadFieldData(void)
|
||||
d->fields.addField_string(C_("NGPC", "Debug Mode"), s_debug);
|
||||
} else {
|
||||
d->fields.addField_string(C_("NGPC", "Debug Mode"),
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), entry_point >> 24));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), entry_point >> 24));
|
||||
}
|
||||
|
||||
// Finished reading the field data.
|
||||
|
@ -1894,7 +1894,7 @@ int Nintendo3DS::loadFieldData(void)
|
||||
media_type_tbl[media_type]);
|
||||
} else {
|
||||
d->fields.addField_string(media_type_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), media_type));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), media_type));
|
||||
}
|
||||
|
||||
if (ncsd_header->cci.partition_flags[N3DS_NCSD_PARTITION_FLAG_MEDIA_TYPE_INDEX] == N3DS_NCSD_MEDIA_TYPE_CARD2) {
|
||||
@ -1929,7 +1929,7 @@ int Nintendo3DS::loadFieldData(void)
|
||||
} else {
|
||||
d->fields.addField_string(card_device_title,
|
||||
// tr: Unrecognized card device (the raw SDK2 and SDK3 values are shown)
|
||||
fmt::format(C_("Nintendo3DS|CDev", "Unknown (SDK2=0x{0:0>2X}, SDK3=0x{1:0>2X})"),
|
||||
fmt::format(FRUN(C_("Nintendo3DS|CDev", "Unknown (SDK2=0x{0:0>2X}, SDK3=0x{1:0>2X})")),
|
||||
ncsd_header->cci.partition_flags[N3DS_NCSD_PARTITION_FLAG_MEDIA_CARD_DEVICE_SDK2],
|
||||
ncsd_header->cci.partition_flags[N3DS_NCSD_PARTITION_FLAG_MEDIA_CARD_DEVICE_SDK3]));
|
||||
}
|
||||
@ -2281,7 +2281,7 @@ int Nintendo3DS::loadFieldData(void)
|
||||
pgettext_expr("Nintendo3DS|ApplType", appl_type_tbl[appl_type]));
|
||||
} else {
|
||||
d->fields.addField_string(type_title,
|
||||
fmt::format(C_("Nintendo3DS", "Invalid (0x{:0>2X})"), appl_type));
|
||||
fmt::format(FRUN(C_("Nintendo3DS", "Invalid (0x{:0>2X})")), appl_type));
|
||||
}
|
||||
|
||||
// Flags.
|
||||
@ -2320,10 +2320,10 @@ int Nintendo3DS::loadFieldData(void)
|
||||
const auto &ptbl = old3ds_sys_mode_tbl[old3ds_sys_mode];
|
||||
d->fields.addField_string(old3ds_sys_mode_title,
|
||||
// tr: {0:s} == Old3DS system mode; {1:d} == RAM allocation, in megabytes
|
||||
fmt::format(C_("Nintendo3DS", "{0:s} ({1:d} MiB)"), ptbl.name, ptbl.mb));
|
||||
fmt::format(FRUN(C_("Nintendo3DS", "{0:s} ({1:d} MiB)")), ptbl.name, ptbl.mb));
|
||||
} else {
|
||||
d->fields.addField_string(old3ds_sys_mode_title,
|
||||
fmt::format(C_("Nintendo3DS", "Invalid (0x{:0>2X})"), old3ds_sys_mode));
|
||||
fmt::format(FRUN(C_("Nintendo3DS", "Invalid (0x{:0>2X})")), old3ds_sys_mode));
|
||||
}
|
||||
|
||||
// New3DS System Mode
|
||||
@ -2341,10 +2341,10 @@ int Nintendo3DS::loadFieldData(void)
|
||||
const auto &ptbl = new3ds_sys_mode_tbl[new3ds_sys_mode];
|
||||
d->fields.addField_string(new3ds_sys_mode_title,
|
||||
// tr: {0:s} == New3DS system mode; {1:d} == RAM allocation, in megabytes
|
||||
fmt::format(C_("Nintendo3DS", "{0:s} ({1:d} MiB)"), ptbl.name, ptbl.mb));
|
||||
fmt::format(FRUN(C_("Nintendo3DS", "{0:s} ({1:d} MiB)")), ptbl.name, ptbl.mb));
|
||||
} else {
|
||||
d->fields.addField_string(new3ds_sys_mode_title,
|
||||
fmt::format(C_("Nintendo3DS", "Invalid (0x{:0>2X})"), new3ds_sys_mode));
|
||||
fmt::format(FRUN(C_("Nintendo3DS", "Invalid (0x{:0>2X})")), new3ds_sys_mode));
|
||||
}
|
||||
|
||||
// New3DS CPU Mode
|
||||
|
@ -698,10 +698,10 @@ int NintendoDS::loadFieldData(void)
|
||||
'\0'
|
||||
}};
|
||||
d->fields.addField_string(publisher_title,
|
||||
fmt::format(C_("RomData", "Unknown ({:s})"), s_company.data()));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:s})")), s_company.data()));
|
||||
} else {
|
||||
d->fields.addField_string(publisher_title,
|
||||
fmt::format(C_("RomData", "Unknown ({:0>2X} {:0>2X})"),
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:0>2X} {:0>2X})")),
|
||||
static_cast<unsigned int>(romHeader->company[0]),
|
||||
static_cast<unsigned int>(romHeader->company[1])));
|
||||
}
|
||||
@ -792,7 +792,7 @@ int NintendoDS::loadFieldData(void)
|
||||
// Title ID
|
||||
const uint32_t tid_hi = le32_to_cpu(romHeader->dsi.title_id.hi);
|
||||
d->fields.addField_string(C_("Nintendo", "Title ID"),
|
||||
fmt::format("{:0>8X}-{:0>8X}",
|
||||
fmt::format(FSTR("{:0>8X}-{:0>8X}"),
|
||||
tid_hi, le32_to_cpu(romHeader->dsi.title_id.lo)));
|
||||
|
||||
// DSi filetype
|
||||
@ -833,7 +833,7 @@ int NintendoDS::loadFieldData(void)
|
||||
} else {
|
||||
// Invalid file type.
|
||||
d->fields.addField_string(dsi_rom_type_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), dsi_filetype));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), dsi_filetype));
|
||||
}
|
||||
|
||||
// Key index. Determined by title ID.
|
||||
@ -1028,10 +1028,10 @@ int NintendoDS::loadMetaData(void)
|
||||
'\0'
|
||||
}};
|
||||
d->metaData.addMetaData_string(Property::Publisher,
|
||||
fmt::format(C_("RomData", "Unknown ({:s})"), s_company.data()));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:s})")), s_company.data()));
|
||||
} else {
|
||||
d->metaData.addMetaData_string(Property::Publisher,
|
||||
fmt::format(C_("RomData", "Unknown ({:0>2X} {:0>2X})"),
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:0>2X} {:0>2X})")),
|
||||
static_cast<unsigned int>(romHeader->company[0]),
|
||||
static_cast<unsigned int>(romHeader->company[1])));
|
||||
}
|
||||
|
@ -427,7 +427,7 @@ int NintendoDS::doRomOp_int(int id, RomOpParams *pParams)
|
||||
#endif /* ENABLE_DSi_SECURE_AREA */
|
||||
if (ret < 0) {
|
||||
pParams->status = ret;
|
||||
pParams->msg = fmt::format(C_("RomData", "Could not open '{0:s}': {1:s}"),
|
||||
pParams->msg = fmt::format(FRUN(C_("RomData", "Could not open '{0:s}': {1:s}")),
|
||||
filename, strerror(-ret));
|
||||
break;
|
||||
} else if (ret > 0) {
|
||||
@ -435,13 +435,13 @@ int NintendoDS::doRomOp_int(int id, RomOpParams *pParams)
|
||||
switch (ret) {
|
||||
case 1: {
|
||||
// TODO: Show the actual file size?
|
||||
pParams->msg = fmt::format(C_("NintendoDS", "File '{0:s}' has the wrong size. (should be {1:Ld} bytes)"),
|
||||
pParams->msg = fmt::format(FRUN(C_("NintendoDS", "File '{0:s}' has the wrong size. (should be {1:Ld} bytes)")),
|
||||
filename, NDS_BLOWFISH_SIZE);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
// Wrong hash.
|
||||
pParams->msg = fmt::format(C_("NintendoDS", "File '{:s}' has the wrong MD5 hash."), filename);
|
||||
pParams->msg = fmt::format(FRUN(C_("NintendoDS", "File '{:s}' has the wrong MD5 hash.")), filename);
|
||||
break;
|
||||
default:
|
||||
assert(!"Unhandled NDS Blowfish error code.");
|
||||
|
@ -338,9 +338,9 @@ int VirtualBoy::loadFieldData(void)
|
||||
romFooter->publisher[1],
|
||||
'\0'
|
||||
}};
|
||||
s_publisher = fmt::format(C_("RomData", "Unknown ({:s})"), s_company.data());
|
||||
s_publisher = fmt::format(FRUN(C_("RomData", "Unknown ({:s})")), s_company.data());
|
||||
} else {
|
||||
s_publisher = fmt::format(C_("RomData", "Unknown ({:0>2X} {:0>2X})"),
|
||||
s_publisher = fmt::format(FRUN(C_("RomData", "Unknown ({:0>2X} {:0>2X})")),
|
||||
static_cast<uint8_t>(romFooter->publisher[0]),
|
||||
static_cast<uint8_t>(romFooter->publisher[1]));
|
||||
}
|
||||
@ -368,7 +368,7 @@ int VirtualBoy::loadFieldData(void)
|
||||
d->fields.addField_string(C_("RomData", "Region Code"), s_region);
|
||||
} else {
|
||||
d->fields.addField_string(C_("RomData", "Region Code"),
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"),
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")),
|
||||
static_cast<uint8_t>(romFooter->gameid[3])));
|
||||
}
|
||||
|
||||
@ -418,9 +418,9 @@ int VirtualBoy::loadMetaData(void)
|
||||
romFooter->publisher[1],
|
||||
'\0'
|
||||
}};
|
||||
s_publisher = fmt::format(C_("RomData", "Unknown ({:s})"), s_company.data());
|
||||
s_publisher = fmt::format(FRUN(C_("RomData", "Unknown ({:s})")), s_company.data());
|
||||
} else {
|
||||
s_publisher = fmt::format(C_("RomData", "Unknown ({:0>2X} {:0>2X})"),
|
||||
s_publisher = fmt::format(FRUN(C_("RomData", "Unknown ({:0>2X} {:0>2X})")),
|
||||
static_cast<uint8_t>(romFooter->publisher[0]),
|
||||
static_cast<uint8_t>(romFooter->publisher[1]));
|
||||
}
|
||||
|
@ -545,7 +545,7 @@ int WonderSwan::loadFieldData(void)
|
||||
if (publisher) {
|
||||
s_publisher = publisher;
|
||||
} else {
|
||||
s_publisher = fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), romFooter->publisher);
|
||||
s_publisher = fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), romFooter->publisher);
|
||||
}
|
||||
d->fields.addField_string(C_("RomData", "Publisher"), s_publisher);
|
||||
|
||||
@ -571,7 +571,7 @@ int WonderSwan::loadFieldData(void)
|
||||
formatFileSizeKiB(rom_size_tbl[romFooter->rom_size]));
|
||||
} else {
|
||||
d->fields.addField_string(rom_size_title,
|
||||
fmt::format(C_("RomData", "Unknown ({:d})"), romFooter->publisher));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:d})")), romFooter->publisher));
|
||||
}
|
||||
|
||||
// Save size and type
|
||||
@ -584,7 +584,7 @@ int WonderSwan::loadFieldData(void)
|
||||
} else if (romFooter->save_type < sram_size_tbl.size()) {
|
||||
d->fields.addField_string(save_memory_title,
|
||||
// tr: Parameter 2 indicates the save type, e.g. "SRAM" or "EEPROM".
|
||||
fmt::format(C_("WonderSwan|SaveMemory", "{0:d} KiB ({1:s})"),
|
||||
fmt::format(FRUN(C_("WonderSwan|SaveMemory", "{0:d} KiB ({1:s})")),
|
||||
sram_size_tbl[romFooter->save_type],
|
||||
C_("WonderSwan|SaveMemory", "SRAM")));
|
||||
} else {
|
||||
@ -609,7 +609,7 @@ int WonderSwan::loadFieldData(void)
|
||||
fmtstr = C_("WonderSwan|SaveMemory", "{0:d} bytes ({1:s})");
|
||||
}
|
||||
d->fields.addField_string(save_memory_title,
|
||||
fmt::format(fmtstr, eeprom_bytes, C_("WonderSwan|SaveMemory", "EEPROM")));
|
||||
fmt::format(FRUN(fmtstr), eeprom_bytes, C_("WonderSwan|SaveMemory", "EEPROM")));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -455,7 +455,7 @@ void ISOPrivate::addPVDCommon(const T *pvd)
|
||||
const char *const disc_number_title = C_("RomData", "Disc #");
|
||||
fields.addField_string(disc_number_title,
|
||||
// tr: Disc X of Y (for multi-disc games)
|
||||
fmt::format(C_("RomData|Disc", "{0:d} of {1:d}"),
|
||||
fmt::format(FRUN(C_("RomData|Disc", "{0:d} of {1:d}")),
|
||||
volume_seq_number, volume_set_size));
|
||||
}
|
||||
|
||||
|
@ -398,7 +398,7 @@ int WimPrivate::addFields_XML()
|
||||
if (archstring) {
|
||||
data_row.emplace_back(archstring);
|
||||
} else {
|
||||
data_row.push_back(fmt::format(C_("RomData", "Unknown ({:d})"),
|
||||
data_row.push_back(fmt::format(FRUN(C_("RomData", "Unknown ({:d})")),
|
||||
static_cast<int>(windowsinfo.arch)));
|
||||
}
|
||||
data_row.push_back(windowsinfo.languages.language);
|
||||
|
@ -384,7 +384,7 @@ int Amiibo::loadFieldData(void)
|
||||
// tr: amiibo ID. Represents the character and amiibo series.
|
||||
// TODO: Link to https://amiibo.life/nfc/{:0>8X}-{:0>8X}
|
||||
d->fields.addField_string(C_("Amiibo", "amiibo ID"),
|
||||
fmt::format("{:0>8X}-{:0>8X}", char_id, amiibo_id),
|
||||
fmt::format(FSTR("{:0>8X}-{:0>8X}"), char_id, amiibo_id),
|
||||
RomFields::STRF_MONOSPACE);
|
||||
|
||||
// tr: amiibo type.
|
||||
@ -405,7 +405,7 @@ int Amiibo::loadFieldData(void)
|
||||
} else {
|
||||
// Invalid amiibo type.
|
||||
d->fields.addField_string(amiibo_type_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), (char_id & 0xFF)));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), (char_id & 0xFF)));
|
||||
}
|
||||
|
||||
// Get the AmiiboData instance.
|
||||
@ -444,7 +444,7 @@ int Amiibo::loadFieldData(void)
|
||||
|
||||
// tr: Credits for amiibo image downloads.
|
||||
const string credits = fmt::format(
|
||||
C_("Amiibo", "amiibo images provided by {:s},\nthe Unofficial amiibo Database."),
|
||||
FRUN(C_("Amiibo", "amiibo images provided by {:s},\nthe Unofficial amiibo Database.")),
|
||||
"<a href=\"https://amiibo.life/\">amiibo.life</a>");
|
||||
d->fields.addField_string(C_("Amiibo", "Credits"), credits, RomFields::STRF_CREDITS);
|
||||
|
||||
|
@ -1525,7 +1525,7 @@ int ELF::loadFieldData(void)
|
||||
d->fields.addField_string(cpu_title, cpu);
|
||||
} else {
|
||||
d->fields.addField_string(cpu_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>4X})"), primary->e_machine));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>4X})")), primary->e_machine));
|
||||
}
|
||||
|
||||
// CPU flags.
|
||||
@ -1633,7 +1633,7 @@ int ELF::loadFieldData(void)
|
||||
d->fields.addField_string(cpu_level_title, mips_levels[level]);
|
||||
} else {
|
||||
d->fields.addField_string(cpu_level_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), level));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), level));
|
||||
}
|
||||
|
||||
// MIPS CPU flags
|
||||
@ -2062,7 +2062,7 @@ int ELF::loadFieldData(void)
|
||||
d->fields.addField_string(osabi_title, osabi);
|
||||
} else {
|
||||
d->fields.addField_string(osabi_title,
|
||||
fmt::format(C_("RomData", "Unknown ({:d})"), primary->e_osabi));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:d})")), primary->e_osabi));
|
||||
}
|
||||
|
||||
// ABI version.
|
||||
@ -2102,7 +2102,7 @@ int ELF::loadFieldData(void)
|
||||
}
|
||||
if (d->isPie) {
|
||||
// tr: Entry point, then "Position-Independent".
|
||||
entry_point = fmt::format(C_("ELF", "{:s} (Position-Independent)"), entry_point);
|
||||
entry_point = fmt::format(FRUN(C_("ELF", "{:s} (Position-Independent)")), entry_point);
|
||||
}
|
||||
d->fields.addField_string(C_("RomData", "Entry Point"), entry_point);
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ void EXEPrivate::addFields_VS_VERSION_INFO(const VS_FIXEDFILEINFO *pVsFfi, const
|
||||
fields.addField_string(fileOS_title, s_fileOS);
|
||||
} else {
|
||||
fields.addField_string(fileOS_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>8X})"), dwFileOS));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>8X})")), dwFileOS));
|
||||
}
|
||||
|
||||
// File type
|
||||
@ -219,7 +219,7 @@ void EXEPrivate::addFields_VS_VERSION_INFO(const VS_FIXEDFILEINFO *pVsFfi, const
|
||||
fields.addField_string(fileType_title, C_("RomData", "Unknown"));
|
||||
} else {
|
||||
fields.addField_string(fileType_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>8X})"), pVsFfi->dwFileType));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>8X})")), pVsFfi->dwFileType));
|
||||
}
|
||||
}
|
||||
|
||||
@ -292,7 +292,7 @@ void EXEPrivate::addFields_VS_VERSION_INFO(const VS_FIXEDFILEINFO *pVsFfi, const
|
||||
pgettext_expr("EXE|FileSubType", fileSubtype));
|
||||
} else {
|
||||
fields.addField_string(fileSubType_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), pVsFfi->dwFileSubtype));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), pVsFfi->dwFileSubtype));
|
||||
}
|
||||
}
|
||||
|
||||
@ -458,7 +458,7 @@ void EXEPrivate::addFields_LE(void)
|
||||
fields.addField_string(cpu_title, cpu);
|
||||
} else {
|
||||
fields.addField_string(cpu_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>4X})"), cpu_type));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>4X})")), cpu_type));
|
||||
}
|
||||
|
||||
// Target OS
|
||||
@ -469,7 +469,7 @@ void EXEPrivate::addFields_LE(void)
|
||||
fields.addField_string(targetOS_title, NE_TargetOSes[targOS]);
|
||||
} else {
|
||||
fields.addField_string(targetOS_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), targOS));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), targOS));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -282,7 +282,7 @@ int EXEPrivate::findNERuntimeDLL(string &refDesc, string &refLink, bool &refHasK
|
||||
for (const auto &p : msvb_dll_tbl) {
|
||||
if (!strncasecmp(pDllName, p.dll_name, sizeof(p.dll_name))) {
|
||||
// Found a matching version.
|
||||
refDesc = fmt::format(C_("EXE|Runtime", "Microsoft Visual Basic {:d}.{:d} Runtime"),
|
||||
refDesc = fmt::format(FRUN(C_("EXE|Runtime", "Microsoft Visual Basic {:d}.{:d} Runtime")),
|
||||
p.ver_major, p.ver_minor);
|
||||
if (p.url) {
|
||||
refLink = p.url;
|
||||
@ -347,7 +347,7 @@ void EXEPrivate::addFields_NE(void)
|
||||
fields.addField_string(targetOS_title, targetOS);
|
||||
} else {
|
||||
fields.addField_string(targetOS_title,
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>2X})"), hdr.ne.targOS));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>2X})")), hdr.ne.targOS));
|
||||
}
|
||||
|
||||
// DGroup type.
|
||||
@ -712,11 +712,11 @@ int EXEPrivate::addFields_NE_Entry(void)
|
||||
row.emplace_back(s_no_name);
|
||||
}
|
||||
if (ent.is_movable) {
|
||||
row.push_back(fmt::format(s_address_mf, ent.segment, ent.offset, s_address_movable));
|
||||
row.push_back(fmt::format(FRUN(s_address_mf), ent.segment, ent.offset, s_address_movable));
|
||||
} else if (ent.segment != 0xFE) {
|
||||
row.push_back(fmt::format(s_address_mf, ent.segment, ent.offset, s_address_fixed));
|
||||
row.push_back(fmt::format(FRUN(s_address_mf), ent.segment, ent.offset, s_address_fixed));
|
||||
} else {
|
||||
row.push_back(fmt::format(s_address_constant, ent.offset));
|
||||
row.push_back(fmt::format(FRUN(s_address_constant), ent.offset));
|
||||
}
|
||||
row.push_back(std::move(flags));
|
||||
}
|
||||
|
@ -476,7 +476,7 @@ int EXEPrivate::findPERuntimeDLL(string &refDesc, string &refLink)
|
||||
if (!strcasecmp(dll_name, "vcruntime140.dll")) {
|
||||
// TODO: If host OS is Windows XP or earlier, limit it to 2017?
|
||||
refDesc = fmt::format(
|
||||
C_("EXE|Runtime", "Microsoft Visual C++ {:s} Runtime"), "2015-2022");
|
||||
FRUN(C_("EXE|Runtime", "Microsoft Visual C++ {:s} Runtime")), "2015-2022");
|
||||
switch (le16_to_cpu(hdr.pe.FileHeader.Machine)) {
|
||||
case IMAGE_FILE_MACHINE_I386:
|
||||
refLink = "https://aka.ms/vs/17/release/VC_redist.x86.exe";
|
||||
@ -493,7 +493,7 @@ int EXEPrivate::findPERuntimeDLL(string &refDesc, string &refLink)
|
||||
break;
|
||||
} else if (!strcasecmp(dll_name, "vcruntime140d.dll")) {
|
||||
refDesc = fmt::format(
|
||||
C_("EXE|Runtime", "Microsoft Visual C++ {:s} Debug Runtime"), "2015-2022");
|
||||
FRUN(C_("EXE|Runtime", "Microsoft Visual C++ {:s} Debug Runtime")), "2015-2022");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -511,7 +511,7 @@ int EXEPrivate::findPERuntimeDLL(string &refDesc, string &refLink)
|
||||
if (p.dll_name_version == dll_name_version) {
|
||||
// Found a matching version.
|
||||
refDesc = fmt::format(
|
||||
C_("EXE|Runtime", "Microsoft Visual C++ {:s} Debug Runtime"),
|
||||
FRUN(C_("EXE|Runtime", "Microsoft Visual C++ {:s} Debug Runtime")),
|
||||
p.display_version);
|
||||
found = true;
|
||||
break;
|
||||
@ -528,7 +528,7 @@ int EXEPrivate::findPERuntimeDLL(string &refDesc, string &refLink)
|
||||
if (p.dll_name_version == dll_name_version) {
|
||||
// Found a matching version.
|
||||
refDesc = fmt::format(
|
||||
C_("EXE|Runtime", "Microsoft Visual C++ {:s} Runtime"),
|
||||
FRUN(C_("EXE|Runtime", "Microsoft Visual C++ {:s} Runtime")),
|
||||
p.display_version);
|
||||
if (is64) {
|
||||
if (p.url_amd64) {
|
||||
@ -556,7 +556,7 @@ int EXEPrivate::findPERuntimeDLL(string &refDesc, string &refLink)
|
||||
break;
|
||||
} else if (!strcasecmp(dll_name, "msvcrtd.dll")) {
|
||||
refDesc = fmt::format(
|
||||
C_("EXE|Runtime", "Microsoft Visual C++ {:s} Debug Runtime"), "6.0");
|
||||
FRUN(C_("EXE|Runtime", "Microsoft Visual C++ {:s} Debug Runtime")), "6.0");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -566,7 +566,7 @@ int EXEPrivate::findPERuntimeDLL(string &refDesc, string &refLink)
|
||||
for (const auto &p : msvb_dll_tbl) {
|
||||
if (!strcasecmp(dll_name, p.dll_name)) {
|
||||
// Found a matching version.
|
||||
refDesc = fmt::format(C_("EXE|Runtime", "Microsoft Visual Basic {:d}.{:d} Runtime"),
|
||||
refDesc = fmt::format(FRUN(C_("EXE|Runtime", "Microsoft Visual Basic {:d}.{:d} Runtime")),
|
||||
p.ver_major, p.ver_minor);
|
||||
refLink = p.url;
|
||||
break;
|
||||
@ -645,7 +645,7 @@ void EXEPrivate::addFields_PE(void)
|
||||
if (cpu != nullptr) {
|
||||
s_cpu = cpu;
|
||||
} else {
|
||||
s_cpu = fmt::format(C_("RomData", "Unknown (0x{:0>4X})"), machine);
|
||||
s_cpu = fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>4X})")), machine);
|
||||
}
|
||||
}
|
||||
if (dotnet) {
|
||||
@ -954,10 +954,11 @@ int EXEPrivate::addFields_PE_Export(void)
|
||||
row.emplace_back();
|
||||
} else {
|
||||
row.push_back(fmt::format(FSTR("0x{:0>8X}"), ent.vaddr));
|
||||
if (ent.paddr)
|
||||
row.push_back(fmt::format("0x{:0>8X}", ent.paddr));
|
||||
else
|
||||
if (ent.paddr) {
|
||||
row.push_back(fmt::format(FSTR("0x{:0>8X}"), ent.paddr));
|
||||
} else {
|
||||
row.emplace_back(); // it's probably in the bss section
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1141,7 +1142,7 @@ int EXEPrivate::addFields_PE_Import(void)
|
||||
auto &row = vv_data->back();
|
||||
row.reserve(3);
|
||||
if (it.is_ordinal) {
|
||||
row.push_back(fmt::format(C_("EXE|Exports", "Ordinal #{:d}"), it.value));
|
||||
row.push_back(fmt::format(FRUN(C_("EXE|Exports", "Ordinal #{:d}")), it.value));
|
||||
row.push_back(fmt::to_string(it.value));
|
||||
} else {
|
||||
// RVA to hint number followed by NUL terminated name.
|
||||
|
@ -511,7 +511,7 @@ int MachO::loadFieldData(void)
|
||||
d->fields.addField_string(cpu_title, s_cpu);
|
||||
} else {
|
||||
d->fields.addField_string(cpu_title,
|
||||
fmt::format(C_("RomData", "Unknown ({:d})"), machHeader->cputype & 0xFFFFFF));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:d})")), machHeader->cputype & 0xFFFFFF));
|
||||
}
|
||||
|
||||
// CPU subtype.
|
||||
|
@ -752,7 +752,7 @@ int NintendoBadge::loadFieldData(void)
|
||||
} else {
|
||||
// Title ID is present.
|
||||
d->fields.addField_string(launch_title_id_title,
|
||||
fmt::format("{:0>8X}-{:0>8X}",
|
||||
fmt::format(FSTR("{:0>8X}-{:0>8X}"),
|
||||
le32_to_cpu(prbs->title_id.hi),
|
||||
le32_to_cpu(prbs->title_id.lo)));
|
||||
|
||||
@ -768,15 +768,15 @@ int NintendoBadge::loadFieldData(void)
|
||||
if (isN3DS) {
|
||||
if (region) {
|
||||
// tr: {0:s} == Title name, {1:s} == Region
|
||||
str = fmt::format(C_("NintendoBadge", "{0:s} (New3DS) ({1:s})"), title, region);
|
||||
str = fmt::format(FRUN(C_("NintendoBadge", "{0:s} (New3DS) ({1:s})")), title, region);
|
||||
} else {
|
||||
// tr: Title name
|
||||
str = fmt::format(C_("NintendoBadge", "{:s} (New3DS)"), title);
|
||||
str = fmt::format(FRUN(C_("NintendoBadge", "{:s} (New3DS)")), title);
|
||||
}
|
||||
} else {
|
||||
if (region) {
|
||||
// tr: {0:s} == Title name, {1:s} == Region
|
||||
str = fmt::format(C_("NintendoBadge", "{0:s} ({1:s})"), title, region);
|
||||
str = fmt::format(FRUN(C_("NintendoBadge", "{0:s} ({1:s})")), title, region);
|
||||
} else {
|
||||
str = title;
|
||||
}
|
||||
|
@ -218,9 +218,9 @@ int fstPrint(IFst *fst, ostream &os, bool pt)
|
||||
|
||||
os << '\n' <<
|
||||
// tr: {:Ld} == number of directories processed
|
||||
fmt::format(NC_("FstPrint", "{:Ld} directory", "{:Ld} directories", fc.dirs), fc.dirs) << ", " <<
|
||||
fmt::format(FRUN(NC_("FstPrint", "{:Ld} directory", "{:Ld} directories", fc.dirs)), fc.dirs) << ", " <<
|
||||
// tr: {:Ld} == number of files processed
|
||||
fmt::format(NC_("FstPrint", "{:Ld} file", "{:Ld} files", fc.files), fc.files) << '\n';
|
||||
fmt::format(FRUN(NC_("FstPrint", "{:Ld} file", "{:Ld} files", fc.files)), fc.files) << '\n';
|
||||
|
||||
os.flush();
|
||||
return 0;
|
||||
|
@ -67,7 +67,7 @@ int RP_C_API main(int argc, char *argv[])
|
||||
rp_i18n_init();
|
||||
|
||||
if (argc < 2 || argc > 3) {
|
||||
fmt::print(stderr, C_("GcnFstPrint", "Syntax: {:s} fst.bin [offsetShift]"), argv[0]);
|
||||
fmt::print(stderr, FRUN(C_("GcnFstPrint", "Syntax: {:s} fst.bin [offsetShift]")), argv[0]);
|
||||
fputc('\n', stderr);
|
||||
fputs(C_("GcnFstPrint", "offsetShift should be 0 for GameCube, 2 for Wii. (default is 0)"), stderr);
|
||||
fputc('\n', stderr);
|
||||
@ -80,7 +80,7 @@ int RP_C_API main(int argc, char *argv[])
|
||||
char *endptr = nullptr;
|
||||
long ltmp = strtol(argv[2], &endptr, 10);
|
||||
if (*endptr != '\0' || (ltmp != 0 && ltmp != 2)) {
|
||||
fmt::print(stderr, C_("GcnFstPrint", "Invalid offset shift '{:s}' specified."), argv[2]);
|
||||
fmt::print(stderr, FRUN(C_("GcnFstPrint", "Invalid offset shift '{:s}' specified.")), argv[2]);
|
||||
fputc('\n', stderr);
|
||||
fputs(C_("GcnFstPrint", "offsetShift should be 0 for GameCube, 2 for Wii. (default is 0)"), stderr);
|
||||
fputc('\n', stderr);
|
||||
@ -93,7 +93,7 @@ int RP_C_API main(int argc, char *argv[])
|
||||
FILE *f = fopen(argv[1], "rb");
|
||||
if (!f) {
|
||||
// tr: {0:s} == filename, {1:s} == error message
|
||||
fmt::print(stderr, C_("GcnFstPrint", "Error opening '{0:s}': '{1:s}'"), argv[1], strerror(errno));
|
||||
fmt::print(stderr, FRUN(C_("GcnFstPrint", "Error opening '{0:s}': '{1:s}'")), argv[1], strerror(errno));
|
||||
fputc('\n', stderr);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -116,7 +116,7 @@ int RP_C_API main(int argc, char *argv[])
|
||||
fclose(f);
|
||||
if (rd_size != fileSize) {
|
||||
// tr: {0:d} == number of bytes read, {1:d} == number of bytes expected to read
|
||||
fmt::print(stderr, C_("GcnFstPrint", "ERROR: Read {0:Ld} bytes, expected {1:Ld} bytes."),
|
||||
fmt::print(stderr, FRUN(C_("GcnFstPrint", "ERROR: Read {0:Ld} bytes, expected {1:Ld} bytes.")),
|
||||
rd_size, fileSize);
|
||||
fputc('\n', stderr);
|
||||
return EXIT_FAILURE;
|
||||
@ -140,7 +140,7 @@ int RP_C_API main(int argc, char *argv[])
|
||||
unique_ptr<IFst> fst(new GcnFst(&fstData[fst_start_offset],
|
||||
static_cast<uint32_t>(fileSize - fst_start_offset), offsetShift));
|
||||
if (!fst->isOpen()) {
|
||||
fmt::print(stderr, C_("GcnFstPrint", "*** ERROR: Could not parse '{:s}' as GcnFst."), argv[1]);
|
||||
fmt::print(stderr, FRUN(C_("GcnFstPrint", "*** ERROR: Could not parse '{:s}' as GcnFst.")), argv[1]);
|
||||
fputc('\n', stderr);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ int RP_C_API main(int argc, char *argv[])
|
||||
rp_i18n_init();
|
||||
|
||||
if (argc < 2 || argc > 3) {
|
||||
fmt::print(stderr, C_("WiiUFstPrint", "Syntax: {:s} fst.bin"), argv[0]);
|
||||
fmt::print(stderr, FRUN(C_("WiiUFstPrint", "Syntax: {:s} fst.bin")), argv[0]);
|
||||
fputc('\n', stderr);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -77,7 +77,7 @@ int RP_C_API main(int argc, char *argv[])
|
||||
FILE *f = fopen(argv[1], "rb");
|
||||
if (!f) {
|
||||
// tr: {0:s} == filename, {1:s} == error message
|
||||
fmt::print(stderr, C_("GcnFstPrint", "Error opening '{0:s}': '{1:s}'"), argv[1], strerror(errno));
|
||||
fmt::print(stderr, FRUN(C_("GcnFstPrint", "Error opening '{0:s}': '{1:s}'")), argv[1], strerror(errno));
|
||||
fputc('\n', stderr);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -86,7 +86,7 @@ int RP_C_API main(int argc, char *argv[])
|
||||
fseeko(f, 0, SEEK_END);
|
||||
const off64_t fileSize_o = ftello(f);
|
||||
if (fileSize_o > (16*1024*1024)) {
|
||||
fmt::print(stderr, C_("GcnFstPrint", "ERROR: FST is too big. (Maximum of 16 MB.)"));
|
||||
fputs(C_("GcnFstPrint", "ERROR: FST is too big. (Maximum of 16 MB.)"), stderr);
|
||||
fputc('\n', stderr);
|
||||
fclose(f);
|
||||
return EXIT_FAILURE;
|
||||
@ -100,7 +100,7 @@ int RP_C_API main(int argc, char *argv[])
|
||||
fclose(f);
|
||||
if (rd_size != fileSize) {
|
||||
// tr: {0:Ld} == number of bytes read, {1:Ld} == number of bytes expected to read
|
||||
fmt::print(stderr, C_("GcnFstPrint", "ERROR: Read {0:Ld} bytes, expected {1:Ld} bytes."),
|
||||
fmt::print(stderr, FRUN(C_("GcnFstPrint", "ERROR: Read {0:Ld} bytes, expected {1:Ld} bytes.")),
|
||||
rd_size, fileSize);
|
||||
fputc('\n', stderr);
|
||||
return EXIT_FAILURE;
|
||||
@ -111,7 +111,7 @@ int RP_C_API main(int argc, char *argv[])
|
||||
// "look" like an FST?
|
||||
unique_ptr<IFst> fst(new WiiUFst(fstData.get(), static_cast<uint32_t>(fileSize)));
|
||||
if (!fst->isOpen()) {
|
||||
fmt::print(stderr, C_("WiiUFstPrint", "*** ERROR: Could not parse '{:s}' as WiiUFst."), argv[1]);
|
||||
fmt::print(stderr, FRUN(C_("WiiUFstPrint", "*** ERROR: Could not parse '{:s}' as WiiUFst.")), argv[1]);
|
||||
fputc('\n', stderr);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@ -138,7 +138,7 @@ int RP_C_API main(int argc, char *argv[])
|
||||
|
||||
if (fst->hasErrors()) {
|
||||
fputc('\n', stderr);
|
||||
fmt::print(stderr, C_("WiiUFstPrint", "*** WARNING: FST has errors and may be unusable."));
|
||||
fputs(C_("WiiUFstPrint", "*** WARNING: FST has errors and may be unusable."), stderr);
|
||||
fputc('\n', stderr);
|
||||
}
|
||||
|
||||
|
@ -879,7 +879,7 @@ public:
|
||||
if (name) {
|
||||
os << name;
|
||||
} else {
|
||||
os << fmt::format(C_("TextOut", "(tab {:d})"), tabIdx);
|
||||
os << fmt::format(FRUN(C_("TextOut", "(tab {:d})")), tabIdx);
|
||||
}
|
||||
os << " -----" << '\n';
|
||||
}
|
||||
@ -938,7 +938,7 @@ std::ostream& operator<<(std::ostream& os, const ROMOutput& fo) {
|
||||
// NOTE: RomDataView context is used for the "unknown" strings.
|
||||
{
|
||||
// tr: "[System] [FileType] detected."
|
||||
const string detectMsg = fmt::format(C_("TextOut", "{0:s} {1:s} detected"),
|
||||
const string detectMsg = fmt::format(FRUN(C_("TextOut", "{0:s} {1:s} detected")),
|
||||
(systemName ? systemName : C_("RomDataView", "(unknown system)")),
|
||||
(fileType ? fileType : C_("RomDataView", "(unknown filetype)")));
|
||||
|
||||
@ -964,7 +964,7 @@ std::ostream& operator<<(std::ostream& os, const ROMOutput& fo) {
|
||||
auto image = romdata->image(static_cast<RomData::ImageType>(i));
|
||||
if (image && image->isValid()) {
|
||||
// tr: Image Type name, followed by Image Type ID
|
||||
os << "-- " << fmt::format(C_("TextOut", "{0:s} is present (use -x{1:d} to extract)"),
|
||||
os << "-- " << fmt::format(FRUN(C_("TextOut", "{0:s} is present (use -x{1:d} to extract)")),
|
||||
RomData::getImageTypeName(static_cast<RomData::ImageType>(i)), i) << '\n';
|
||||
// TODO: After localizing, add enough spaces for alignment.
|
||||
os << " Format : " << rp_image::getFormatName(image->format()) << '\n';
|
||||
|
@ -401,7 +401,7 @@ string formatFileSize(off64_t size, BinaryUnitDialect dialect)
|
||||
|
||||
if (suffix) {
|
||||
// tr: {0:s} == localized value, {1:s} == suffix (e.g. MiB)
|
||||
return fmt::format(C_("LibRpText|FileSize", "{0:s} {1:s}"),
|
||||
return fmt::format(FRUN(C_("LibRpText|FileSize", "{0:s} {1:s}")),
|
||||
s_value.str(), suffix);
|
||||
}
|
||||
|
||||
@ -444,7 +444,7 @@ std::string formatFileSizeKiB(unsigned int size, BinaryUnitDialect dialect)
|
||||
}
|
||||
|
||||
// tr: {0:Ld} == localized value, {1:s} == suffix (e.g. MiB)
|
||||
return fmt::format(C_("LibRpText|FileSize", "{0:Ld} {1:s}"), size, suffix);
|
||||
return fmt::format(FRUN(C_("LibRpText|FileSize", "{0:Ld} {1:s}")), size, suffix);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -508,7 +508,7 @@ std::string formatFrequency(uint32_t frequency)
|
||||
|
||||
if (suffix) {
|
||||
// tr: {0:s} == localized value, {1:s} == suffix (e.g. MHz)
|
||||
return fmt::format(C_("LibRpText|Frequency", "{0:s} {1:s}"),
|
||||
return fmt::format(FRUN(C_("LibRpText|Frequency", "{0:s} {1:s}")),
|
||||
s_value.str(), suffix);
|
||||
}
|
||||
|
||||
|
@ -437,7 +437,7 @@ const char *DidjTex::pixelFormat(void) const
|
||||
// Store an error message instead.
|
||||
if (d->invalid_pixel_format.empty()) {
|
||||
d->invalid_pixel_format = fmt::format(
|
||||
C_("RomData", "Unknown (0x{:0>8X})"),
|
||||
FRUN(C_("RomData", "Unknown (0x{:0>8X})")),
|
||||
d->texHeader.px_format);
|
||||
}
|
||||
return d->invalid_pixel_format.c_str();
|
||||
|
@ -1281,24 +1281,24 @@ const char *DirectDrawSurface::pixelFormat(void) const
|
||||
if (ddspf.dwFlags & DDPF_RGB) {
|
||||
// Uncompressed RGB data
|
||||
d->pixel_format = fmt::format(
|
||||
C_("DirectDrawSurface", "RGB ({:d}-bit)"), ddspf.dwRGBBitCount);
|
||||
FRUN(C_("DirectDrawSurface", "RGB ({:d}-bit)")), ddspf.dwRGBBitCount);
|
||||
} else if (ddspf.dwFlags & DDPF_ALPHA) {
|
||||
// Alpha channel
|
||||
d->pixel_format = fmt::format(
|
||||
C_("DirectDrawSurface", "Alpha ({:d}-bit)"), ddspf.dwRGBBitCount);
|
||||
FRUN(C_("DirectDrawSurface", "Alpha ({:d}-bit)")), ddspf.dwRGBBitCount);
|
||||
} else if (ddspf.dwFlags & DDPF_YUV) {
|
||||
// YUV (TODO: Determine the format.)
|
||||
d->pixel_format = fmt::format(
|
||||
C_("DirectDrawSurface", "YUV ({:d}-bit)"), ddspf.dwRGBBitCount);
|
||||
FRUN(C_("DirectDrawSurface", "YUV ({:d}-bit)")), ddspf.dwRGBBitCount);
|
||||
} else if (ddspf.dwFlags & DDPF_LUMINANCE) {
|
||||
// Luminance
|
||||
if (ddspf.dwFlags & DDPF_ALPHAPIXELS) {
|
||||
d->pixel_format = fmt::format(
|
||||
C_("DirectDrawSurface", "Luminance + Alpha ({:d}-bit)"),
|
||||
FRUN(C_("DirectDrawSurface", "Luminance + Alpha ({:d}-bit)")),
|
||||
ddspf.dwRGBBitCount);
|
||||
} else {
|
||||
d->pixel_format = fmt::format(
|
||||
C_("DirectDrawSurface", "Luminance ({:d}-bit)"),
|
||||
FRUN(C_("DirectDrawSurface", "Luminance ({:d}-bit)")),
|
||||
ddspf.dwRGBBitCount);
|
||||
}
|
||||
} else {
|
||||
@ -1347,7 +1347,7 @@ int DirectDrawSurface::getFields(RomFields *fields) const
|
||||
const char *const texFormat = DX10Formats::lookup_dxgiFormat(d->dxgi_format);
|
||||
fields->addField_string(C_("DirectDrawSurface", "DX10 Format"),
|
||||
(texFormat ? texFormat :
|
||||
fmt::format(C_("RomData", "Unknown (0x{:0>8X})"), d->dxgi_format)));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown (0x{:0>8X})")), d->dxgi_format)));
|
||||
}
|
||||
|
||||
// nVidia Texture Tools header
|
||||
|
@ -1110,7 +1110,7 @@ const char *GodotSTEX::pixelFormat(void) const
|
||||
// Store an error message instead.
|
||||
if (d->invalid_pixel_format.empty()) {
|
||||
d->invalid_pixel_format = fmt::format(
|
||||
C_("RomData", "Unknown ({:d})"),
|
||||
FRUN(C_("RomData", "Unknown ({:d})")),
|
||||
static_cast<int>(d->pixelFormat));
|
||||
}
|
||||
return d->invalid_pixel_format.c_str();
|
||||
@ -1196,7 +1196,7 @@ int GodotSTEX::getFields(RomFields *fields) const
|
||||
data_format_tbl[d->stexHeader.v4.data_format]));
|
||||
} else {
|
||||
fields->addField_string(s_title,
|
||||
fmt::format(C_("RomData", "Unknown ({:d})"),
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:d})")),
|
||||
d->stexHeader.v4.data_format));
|
||||
}
|
||||
break;
|
||||
|
@ -1000,7 +1000,7 @@ const char *KhronosKTX::pixelFormat(void) const
|
||||
// Store an error message instead.
|
||||
if (d->invalid_pixel_format.empty()) {
|
||||
d->invalid_pixel_format = fmt::format(
|
||||
C_("RomData", "Unknown (0x{:0>8X})"),
|
||||
FRUN(C_("RomData", "Unknown (0x{:0>8X})")),
|
||||
d->ktxHeader.glInternalFormat);
|
||||
}
|
||||
return d->invalid_pixel_format.c_str();
|
||||
|
@ -943,7 +943,7 @@ const char *KhronosKTX2::pixelFormat(void) const
|
||||
if (d->invalid_pixel_format.empty()) {
|
||||
// TODO: Localization?
|
||||
d->invalid_pixel_format = fmt::format(
|
||||
C_("RomData", "Unknown ({:d})"),
|
||||
FRUN(C_("RomData", "Unknown ({:d})")),
|
||||
d->ktx2Header.vkFormat);
|
||||
}
|
||||
return d->invalid_pixel_format.c_str();
|
||||
@ -985,7 +985,7 @@ int KhronosKTX2::getFields(RomFields *fields) const
|
||||
supercompression_tbl[ktx2Header->supercompressionScheme]);
|
||||
} else {
|
||||
fields->addField_string(C_("KhronosKTX2", "Supercompression"),
|
||||
fmt::format(C_("RomData", "Unknown ({:d})"),
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:d})")),
|
||||
ktx2Header->supercompressionScheme));
|
||||
}
|
||||
|
||||
|
@ -1259,7 +1259,7 @@ const char *PowerVR3::pixelFormat(void) const
|
||||
|
||||
// Not valid.
|
||||
d->invalid_pixel_format = fmt::format(
|
||||
C_("PowerVR3", "Unknown (Compressed: 0x{:0>8X})"),
|
||||
FRUN(C_("PowerVR3", "Unknown (Compressed: 0x{:0>8X})")),
|
||||
d->pvr3Header.pixel_format);
|
||||
return d->invalid_pixel_format.c_str();
|
||||
}
|
||||
|
@ -1471,7 +1471,7 @@ const char *SegaPVR::pixelFormat(void) const
|
||||
}
|
||||
|
||||
d->invalid_pixel_format = fmt::format(
|
||||
C_("RomData", "Unknown (0x{:0>2X})"), val);
|
||||
FRUN(C_("RomData", "Unknown (0x{:0>2X})")), val);
|
||||
}
|
||||
return d->invalid_pixel_format.c_str();
|
||||
}
|
||||
|
@ -738,7 +738,7 @@ const char *ValveVTF::pixelFormat(void) const
|
||||
// Store an error message instead.
|
||||
if (d->invalid_pixel_format.empty()) {
|
||||
d->invalid_pixel_format = fmt::format(
|
||||
C_("RomData", "Unknown ({:d})"), fmt);
|
||||
FRUN(C_("RomData", "Unknown ({:d})")), fmt);
|
||||
}
|
||||
return d->invalid_pixel_format.c_str();
|
||||
}
|
||||
@ -884,7 +884,7 @@ int ValveVTF::getFields(RomFields *fields) const
|
||||
vtfHeader->lowResImageHeight);
|
||||
} else {
|
||||
fields->addField_string(low_res_image_format_title,
|
||||
fmt::format(C_("RomData", "Unknown ({:d})"), vtfHeader->lowResImageFormat));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:d})")), vtfHeader->lowResImageFormat));
|
||||
}
|
||||
|
||||
if (vtfHeader->version[0] > 7 ||
|
||||
|
@ -704,7 +704,7 @@ const char *XboxXPR::pixelFormat(void) const
|
||||
// Store an error message instead.
|
||||
if (d->invalid_pixel_format.empty()) {
|
||||
d->invalid_pixel_format = fmt::format(
|
||||
C_("RomData", "Unknown (0x{:0>2X})"),
|
||||
FRUN(C_("RomData", "Unknown (0x{:0>2X})")),
|
||||
d->xpr0Header.pixel_format);
|
||||
}
|
||||
return d->invalid_pixel_format.c_str();
|
||||
@ -742,7 +742,7 @@ int XboxXPR::getFields(RomFields *fields) const
|
||||
fields->addField_string(s_type_title, type_tbl[static_cast<size_t>(d->xprType)]);
|
||||
} else {
|
||||
fields->addField_string(s_type_title,
|
||||
fmt::format(C_("RomData", "Unknown ({:d})"), static_cast<int>(d->xprType)));
|
||||
fmt::format(FRUN(C_("RomData", "Unknown ({:d})")), static_cast<int>(d->xprType)));
|
||||
}
|
||||
|
||||
// Finished reading the field data.
|
||||
|
@ -22,7 +22,17 @@
|
||||
#endif /* FMT_VERSION < 70100 */
|
||||
|
||||
// Our own FSTR() macro
|
||||
#define FSTR(x) FMT_STRING(x)
|
||||
#if __cplusplus >= 202002L
|
||||
// C++20 or later: FMT_STRING isn't needed.
|
||||
# define FSTR(x) x
|
||||
#else /* __cplusplus < 202002L */
|
||||
// C++17 or earlier: FMT_STRING *is* needed.
|
||||
# define FSTR(x) FMT_STRING(x)
|
||||
#endif /* __cplusplus >= 202002L */
|
||||
|
||||
// FRUN() for runtime-only format strings.
|
||||
// Needed for gettext.
|
||||
#define FRUN(x) fmt::runtime(x)
|
||||
|
||||
// Windows: xchar.h for better Unicode support [libfmt-8.0.0]
|
||||
#ifdef _WIN32
|
||||
|
@ -67,7 +67,7 @@ ostream& operator<<(ostream& os, const ScsiInquiry& si)
|
||||
int ret = si.file->scsi_inquiry(&resp);
|
||||
if (ret != 0) {
|
||||
// TODO: Decode the error.
|
||||
os << "-- " << fmt::format(C_("rpcli", "SCSI INQUIRY failed: {:0>8X}"),
|
||||
os << "-- " << fmt::format(FRUN(C_("rpcli", "SCSI INQUIRY failed: {:0>8X}")),
|
||||
static_cast<unsigned int>(ret)) << '\n';
|
||||
return os;
|
||||
}
|
||||
@ -175,7 +175,7 @@ ostream& operator<<(ostream& os, const AtaIdentifyDevice& si)
|
||||
|
||||
if (ret != 0) {
|
||||
// TODO: Decode the error.
|
||||
os << "-- " << fmt::format(C_("rpcli", "ATA {:s} failed: {:0>8X}"),
|
||||
os << "-- " << fmt::format(FRUN(C_("rpcli", "ATA {:s} failed: {:0>8X}")),
|
||||
(si.packet ? "IDENTIFY PACKET DEVICE" : "IDENTIFY DEVICE"),
|
||||
static_cast<unsigned int>(ret)) << '\n';
|
||||
return os;
|
||||
|
@ -153,20 +153,20 @@ static void ExtractImages(const RomData *romData, const vector<ExtractParam> &ex
|
||||
if (likely(!isMipmap)) {
|
||||
cerr << "-- " <<
|
||||
// tr: {0:s} == image type name, {1:s} == output filename
|
||||
fmt::format(C_("rpcli", "Extracting {0:s} into '{1:s}'"),
|
||||
fmt::format(FRUN(C_("rpcli", "Extracting {0:s} into '{1:s}'")),
|
||||
RomData::getImageTypeName(imageType),
|
||||
T2U8c(p.filename)) << '\n';
|
||||
} else {
|
||||
cerr << "-- " <<
|
||||
// tr: {0:d} == mipmap level, {1:s} == output filename
|
||||
fmt::format(C_("rpcli", "Extracting mipmap level {0:d} into '{1:s}'"),
|
||||
fmt::format(FRUN(C_("rpcli", "Extracting mipmap level {0:d} into '{1:s}'")),
|
||||
p.mipmapLevel, T2U8c(p.filename)) << '\n';
|
||||
}
|
||||
cerr.flush();
|
||||
int errcode = RpPng::save(p.filename, image);
|
||||
if (errcode != 0) {
|
||||
// tr: {0:s} == filename, {1:s} == error message
|
||||
cerr << fmt::format(C_("rpcli", "Couldn't create file '{0:s}': {1:s}"),
|
||||
cerr << fmt::format(FRUN(C_("rpcli", "Couldn't create file '{0:s}': {1:s}")),
|
||||
T2U8c(p.filename), strerror(-errcode)) << '\n';
|
||||
} else {
|
||||
cerr << " " << C_("rpcli", "Done") << '\n';
|
||||
@ -178,7 +178,7 @@ static void ExtractImages(const RomData *romData, const vector<ExtractParam> &ex
|
||||
auto iconAnimData = romData->iconAnimData();
|
||||
if (iconAnimData && iconAnimData->count != 0 && iconAnimData->seq_count != 0) {
|
||||
found = true;
|
||||
cerr << "-- " << fmt::format(C_("rpcli", "Extracting animated icon into '{:s}'"), T2U8c(p.filename)) << '\n';
|
||||
cerr << "-- " << fmt::format(FRUN(C_("rpcli", "Extracting animated icon into '{:s}'")), T2U8c(p.filename)) << '\n';
|
||||
cerr.flush();
|
||||
int errcode = RpPng::save(p.filename, iconAnimData);
|
||||
if (errcode == -ENOTSUP) {
|
||||
@ -189,7 +189,7 @@ static void ExtractImages(const RomData *romData, const vector<ExtractParam> &ex
|
||||
}
|
||||
if (errcode != 0) {
|
||||
cerr << " " <<
|
||||
fmt::format(C_("rpcli", "Couldn't create file '{0:s}': {1:s}"),
|
||||
fmt::format(FRUN(C_("rpcli", "Couldn't create file '{0:s}': {1:s}")),
|
||||
T2U8c(p.filename), strerror(-errcode)) << '\n';
|
||||
} else {
|
||||
cerr << " " << C_("rpcli", "Done") << '\n';
|
||||
@ -204,12 +204,12 @@ static void ExtractImages(const RomData *romData, const vector<ExtractParam> &ex
|
||||
cerr << "-- " << C_("rpcli", "Animated icon not found") << '\n';
|
||||
} else if (p.mipmapLevel >= 0) {
|
||||
cerr << "-- " <<
|
||||
fmt::format(C_("rpcli", "Mipmap level {:d} not found"), p.mipmapLevel) << '\n';
|
||||
fmt::format(FRUN(C_("rpcli", "Mipmap level {:d} not found")), p.mipmapLevel) << '\n';
|
||||
} else {
|
||||
const RomData::ImageType imageType =
|
||||
static_cast<RomData::ImageType>(p.imageType);
|
||||
cerr << "-- " <<
|
||||
fmt::format(C_("rpcli", "Image '{:s}' not found"),
|
||||
fmt::format(FRUN(C_("rpcli", "Image '{:s}' not found")),
|
||||
RomData::getImageTypeName(imageType)) << '\n';
|
||||
}
|
||||
cerr.flush();
|
||||
@ -235,7 +235,7 @@ static void DoFile(const TCHAR *filename, bool json, const vector<ExtractParam>
|
||||
|
||||
// FIXME: Make T2U8c() unnecessary here.
|
||||
fputs("== ", stderr);
|
||||
fmt::print(stderr, C_("rpcli", "Reading file '{:s}'..."), T2U8c(filename));
|
||||
fmt::print(stderr, FRUN(C_("rpcli", "Reading file '{:s}'...")), T2U8c(filename));
|
||||
fputc('\n', stderr);
|
||||
fflush(stderr);
|
||||
|
||||
@ -243,7 +243,7 @@ static void DoFile(const TCHAR *filename, bool json, const vector<ExtractParam>
|
||||
if (!file->isOpen()) {
|
||||
// TODO: Return an error code?
|
||||
fputs("-- ", stderr);
|
||||
fmt::print(stderr, C_("rpcli", "Couldn't open file: {:s}"), strerror(file->lastError()));
|
||||
fmt::print(stderr, FRUN(C_("rpcli", "Couldn't open file: {:s}")), strerror(file->lastError()));
|
||||
fputc('\n', stderr);
|
||||
fflush(stderr);
|
||||
if (json) {
|
||||
@ -259,7 +259,7 @@ static void DoFile(const TCHAR *filename, bool json, const vector<ExtractParam>
|
||||
|
||||
// FIXME: Make T2U8c() unnecessary here.
|
||||
fputs("== ", stderr);
|
||||
fmt::print(stderr, C_("rpcli", "Reading directory '{:s}'..."), T2U8c(filename));
|
||||
fmt::print(stderr, FRUN(C_("rpcli", "Reading directory '{:s}'...")), T2U8c(filename));
|
||||
fputc('\n', stderr);
|
||||
fflush(stderr);
|
||||
|
||||
@ -308,7 +308,7 @@ static void PrintSystemRegion(void)
|
||||
buf += static_cast<char>(lc & 0xFF);
|
||||
}
|
||||
}
|
||||
fmt::print(C_("rpcli", "System language code: {:s}"),
|
||||
fmt::print(FRUN(C_("rpcli", "System language code: {:s}")),
|
||||
(!buf.empty() ? buf.c_str() : C_("rpcli", "0 (this is a bug!)")));
|
||||
putchar('\n');
|
||||
|
||||
@ -321,7 +321,7 @@ static void PrintSystemRegion(void)
|
||||
buf += static_cast<char>(cc & 0xFF);
|
||||
}
|
||||
}
|
||||
fmt::print(C_("rpcli", "System country code: {:s}"),
|
||||
fmt::print(FRUN(C_("rpcli", "System country code: {:s}")),
|
||||
(!buf.empty() ? buf.c_str() : C_("rpcli", "0 (this is a bug!)")));
|
||||
putchar('\n');
|
||||
|
||||
@ -364,7 +364,7 @@ static void DoScsiInquiry(const TCHAR *filename, bool json)
|
||||
{
|
||||
// FIXME: Make T2U8c() unnecessary here.
|
||||
fputs("== ", stderr);
|
||||
fmt::print(stderr, C_("rpcli", "Opening device file '{:s}'..."), T2U8c(filename));
|
||||
fmt::print(stderr, FRUN(C_("rpcli", "Opening device file '{:s}'...")), T2U8c(filename));
|
||||
fputc('\n', stderr);
|
||||
fflush(stderr);
|
||||
|
||||
@ -372,7 +372,7 @@ static void DoScsiInquiry(const TCHAR *filename, bool json)
|
||||
if (!file->isOpen()) {
|
||||
// TODO: Return an error code?
|
||||
fputs("-- ", stderr);
|
||||
fmt::print(stderr, C_("rpcli", "Couldn't open file: {:s}"), strerror(file->lastError()));
|
||||
fmt::print(stderr, FRUN(C_("rpcli", "Couldn't open file: {:s}")), strerror(file->lastError()));
|
||||
fputc('\n', stderr);
|
||||
fflush(stderr);
|
||||
|
||||
@ -423,7 +423,7 @@ static void DoAtaIdentifyDevice(const TCHAR *filename, bool json, bool packet)
|
||||
{
|
||||
// FIXME: Make T2U8c() unnecessary here.
|
||||
fputs("== ", stderr);
|
||||
fmt::print(stderr, C_("rpcli", "Opening device file '{:s}'..."), T2U8c(filename));
|
||||
fmt::print(stderr, FRUN(C_("rpcli", "Opening device file '{:s}'...")), T2U8c(filename));
|
||||
fputc('\n', stderr);
|
||||
fflush(stderr);
|
||||
|
||||
@ -431,7 +431,7 @@ static void DoAtaIdentifyDevice(const TCHAR *filename, bool json, bool packet)
|
||||
if (!file->isOpen()) {
|
||||
// TODO: Return an error code?
|
||||
fputs("-- ", stderr);
|
||||
fmt::print(stderr, C_("rpcli", "Couldn't open file: {:s}"), strerror(file->lastError()));
|
||||
fmt::print(stderr, FRUN(C_("rpcli", "Couldn't open file: {:s}")), strerror(file->lastError()));
|
||||
fputc('\n', stderr);
|
||||
fflush(stderr);
|
||||
|
||||
@ -706,7 +706,7 @@ int RP_C_API _tmain(int argc, TCHAR *argv[])
|
||||
}
|
||||
if (pos == 4 && s_lang[pos] != _T('\0')) {
|
||||
// Invalid language code.
|
||||
fmt::print(stderr, C_("rpcli", "Warning: ignoring invalid language code '{:s}'"), T2U8c(s_lang));
|
||||
fmt::print(stderr, FRUN(C_("rpcli", "Warning: ignoring invalid language code '{:s}'")), T2U8c(s_lang));
|
||||
fputc('\n', stderr);
|
||||
fflush(stderr);
|
||||
break;
|
||||
@ -730,7 +730,7 @@ int RP_C_API _tmain(int argc, TCHAR *argv[])
|
||||
// TODO: Switch from _ttol() to _tcstol() and implement better error checking?
|
||||
const long num = _ttol(argv[i] + 2);
|
||||
if (num < RomData::IMG_INT_MIN || num > RomData::IMG_INT_MAX) {
|
||||
fmt::print(stderr, C_("rpcli", "Warning: skipping unknown image type {:d}"), num);
|
||||
fmt::print(stderr, FRUN(C_("rpcli", "Warning: skipping unknown image type {:d}")), num);
|
||||
fputc('\n', stderr);
|
||||
fflush(stderr);
|
||||
i++; continue;
|
||||
@ -742,7 +742,7 @@ int RP_C_API _tmain(int argc, TCHAR *argv[])
|
||||
// TODO: Switch from _ttol() to _tcstol() and implement better error checking?
|
||||
const long num = _ttol(argv[i] + 2);
|
||||
if (num < -1 || num > 1024) {
|
||||
fmt::print(stderr, C_("rpcli", "Warning: skipping invalid mipmap level {:d}"), num);
|
||||
fmt::print(stderr, FRUN(C_("rpcli", "Warning: skipping invalid mipmap level {:d}")), num);
|
||||
fputc('\n', stderr);
|
||||
fflush(stderr);
|
||||
i++; continue;
|
||||
@ -778,7 +778,7 @@ int RP_C_API _tmain(int argc, TCHAR *argv[])
|
||||
fputc('\n', stderr);
|
||||
} else {
|
||||
// FIXME: Unicode character on Windows.
|
||||
fmt::print(stderr, C_("rpcli", "Warning: skipping unknown inquiry request '{:c}'"), (char)argv[i][2]);
|
||||
fmt::print(stderr, FRUN(C_("rpcli", "Warning: skipping unknown inquiry request '{:c}'")), (char)argv[i][2]);
|
||||
fputc('\n', stderr);
|
||||
}
|
||||
fflush(stderr);
|
||||
@ -788,7 +788,7 @@ int RP_C_API _tmain(int argc, TCHAR *argv[])
|
||||
#endif /* RP_OS_SCSI_SUPPORTED */
|
||||
default:
|
||||
// FIXME: Unicode character on Windows.
|
||||
fmt::print(stderr, C_("rpcli", "Warning: skipping unknown switch '{:c}'"), (char)argv[i][1]);
|
||||
fmt::print(stderr, FRUN(C_("rpcli", "Warning: skipping unknown switch '{:c}'")), (char)argv[i][1]);
|
||||
fputc('\n', stderr);
|
||||
fflush(stderr);
|
||||
break;
|
||||
|
@ -60,7 +60,7 @@ int VerifyKeys(void)
|
||||
printedOne = true;
|
||||
|
||||
fputs("*** ", stdout);
|
||||
fmt::print(C_("rpcli", "Checking encryption keys: {:s}"), keyStore->sectName(sectIdx));
|
||||
fmt::print(FRUN(C_("rpcli", "Checking encryption keys: {:s}")), keyStore->sectName(sectIdx));
|
||||
putchar('\n');
|
||||
|
||||
const int keyCount = keyStore->keyCount(sectIdx);
|
||||
@ -68,14 +68,14 @@ int VerifyKeys(void)
|
||||
const KeyStoreUI::Key *const key = keyStore->getKey(sectIdx, keyIdx);
|
||||
assert(key != nullptr);
|
||||
if (!key) {
|
||||
fmt::print(C_("rpcli", "WARNING: Key [{:d},{:d}] has no Key object. Skipping..."), sectIdx, keyIdx);
|
||||
fmt::print(FRUN(C_("rpcli", "WARNING: Key [{:d},{:d}] has no Key object. Skipping...")), sectIdx, keyIdx);
|
||||
putchar('\n');
|
||||
ret = 1;
|
||||
continue;
|
||||
}
|
||||
assert(!key->name.empty());
|
||||
if (key->name.empty()) {
|
||||
fmt::print(C_("rpcli", "WARNING: Key [{:d},{:d}] has no name. Skipping..."), sectIdx, keyIdx);
|
||||
fmt::print(FRUN(C_("rpcli", "WARNING: Key [{:d},{:d}] has no name. Skipping...")), sectIdx, keyIdx);
|
||||
putchar('\n');
|
||||
ret = 1;
|
||||
continue;
|
||||
@ -110,7 +110,7 @@ int VerifyKeys(void)
|
||||
if (isOK) {
|
||||
fmt::print(FSTR("{:s}\n"), s_err);
|
||||
} else {
|
||||
fmt::print(C_("rpcli", "ERROR: {:s}"), s_err);
|
||||
fmt::print(FRUN(C_("rpcli", "ERROR: {:s}")), s_err);
|
||||
putchar('\n');
|
||||
ret = 1;
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ int RP_ShellPropSheetExt_Private::createHeaderRow(_In_ POINT pt_start, _In_ SIZE
|
||||
const tstring ts_sysInfo =
|
||||
LibWin32UI::unix2dos(U82T_s(fmt::format(
|
||||
// tr: {0:s} == system name, {1:s} == file type
|
||||
C_("RomDataView", "{0:s}\n{1:s}"), systemName, fileType)));
|
||||
FRUN(C_("RomDataView", "{0:s}\n{1:s}")), systemName, fileType)));
|
||||
|
||||
if (!ts_sysInfo.empty()) {
|
||||
// Determine the appropriate label size.
|
||||
@ -1709,7 +1709,7 @@ void RP_ShellPropSheetExt_Private::initDialog(void)
|
||||
if (!field.isValid())
|
||||
continue;
|
||||
|
||||
tstring desc_text = U82T_s(fmt::format(desc_label_fmt, field.name));
|
||||
tstring desc_text = U82T_s(fmt::format(FRUN(desc_label_fmt), field.name));
|
||||
|
||||
// Get the width of this specific entry.
|
||||
// TODO: Use measureTextSize()?
|
||||
|
@ -413,7 +413,7 @@ void RP_ShellPropSheetExt_Private::btnOptions_action_triggered(int menuId)
|
||||
const uint32_t lc = cboLanguage
|
||||
? LanguageComboBox_GetSelectedLC(cboLanguage)
|
||||
: 0;
|
||||
ofs << "== " << fmt::format(C_("RomDataView", "File: '{:s}'"), rom_filename) << '\n';
|
||||
ofs << "== " << fmt::format(FRUN(C_("RomDataView", "File: '{:s}'")), rom_filename) << '\n';
|
||||
ROMOutput ro(romData.get(), lc);
|
||||
ofs << ro;
|
||||
ofs.flush();
|
||||
@ -432,7 +432,7 @@ void RP_ShellPropSheetExt_Private::btnOptions_action_triggered(int menuId)
|
||||
? LanguageComboBox_GetSelectedLC(cboLanguage)
|
||||
: 0;
|
||||
ostringstream oss;
|
||||
oss << "== " << fmt::format(C_("RomDataView", "File: '{:s}'"), rom_filename) << '\n';
|
||||
oss << "== " << fmt::format(FRUN(C_("RomDataView", "File: '{:s}'")), rom_filename) << '\n';
|
||||
ROMOutput ro(romData.get(), lc);
|
||||
oss << ro;
|
||||
oss.flush();
|
||||
|
@ -684,7 +684,7 @@ void AboutTabPrivate::updChecker_retrieved(void)
|
||||
|
||||
sVersionLabel += RTF_ALIGN_RIGHT;
|
||||
|
||||
const string s_latest_version = fmt::format(C_("AboutTab", "Latest version: {:s}"), sUpdVersion);
|
||||
const string s_latest_version = fmt::format(FRUN(C_("AboutTab", "Latest version: {:s}")), sUpdVersion);
|
||||
sVersionLabel += rtfEscape(s_latest_version.c_str());
|
||||
if (updateVersion > ourVersion) {
|
||||
sVersionLabel += RTF_BR RTF_BR RTF_BOLD_ON;
|
||||
@ -881,7 +881,7 @@ void AboutTabPrivate::initProgramTitleText(void)
|
||||
const char *const gitVersion =
|
||||
AboutTabText::getProgramInfoString(AboutTabText::ProgramInfoStringID::GitVersion);
|
||||
|
||||
string s_version = fmt::format(C_("AboutTab", "Version {:s}"), programVersion);
|
||||
string s_version = fmt::format(FRUN(C_("AboutTab", "Version {:s}")), programVersion);
|
||||
s_version.reserve(1024);
|
||||
if (gitVersion) {
|
||||
s_version += "\r\n";
|
||||
@ -995,7 +995,7 @@ void AboutTabPrivate::initCreditsTab(void)
|
||||
sCredits += RTF_BR RTF_BR;
|
||||
sCredits += fmt::format(
|
||||
// tr: {:s} is the name of the license.
|
||||
rtfEscape(C_("AboutTab|Credits", "This program is licensed under the {:s} or later.")),
|
||||
FRUN(rtfEscape(C_("AboutTab|Credits", "This program is licensed under the {:s} or later."))),
|
||||
rtfFriendlyLink(
|
||||
"https://www.gnu.org/licenses/gpl-2.0.html",
|
||||
C_("AboutTabl|Credits", "GNU GPL v2")));
|
||||
@ -1050,7 +1050,7 @@ void AboutTabPrivate::initCreditsTab(void)
|
||||
}
|
||||
if (creditsData->sub) {
|
||||
// tr: Sub-credit
|
||||
sCredits += fmt::format(rtfEscape(C_("AboutTab|Credits", " ({:s})")),
|
||||
sCredits += fmt::format(FRUN(rtfEscape(C_("AboutTab|Credits", " ({:s})"))),
|
||||
rtfEscape(creditsData->sub));
|
||||
}
|
||||
|
||||
@ -1102,15 +1102,15 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
sZlibVersion += RpPng::zlib_version_string();
|
||||
|
||||
#if defined(USE_INTERNAL_ZLIB) && !defined(USE_INTERNAL_ZLIB_DLL)
|
||||
sLibraries += fmt::format(sIntCopyOf, sZlibVersion);
|
||||
sLibraries += fmt::format(FRUN(sIntCopyOf), sZlibVersion);
|
||||
#else
|
||||
# ifdef ZLIBNG_VERSION
|
||||
sLibraries += fmt::format(sCompiledWith, "zlib-ng " ZLIBNG_VERSION);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), "zlib-ng " ZLIBNG_VERSION);
|
||||
# else /* !ZLIBNG_VERSION */
|
||||
sLibraries += fmt::format(sCompiledWith, "zlib " ZLIB_VERSION);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), "zlib " ZLIB_VERSION);
|
||||
# endif /* ZLIBNG_VERSION */
|
||||
sLibraries += RTF_BR;
|
||||
sLibraries += fmt::format(sUsingDll, sZlibVersion);
|
||||
sLibraries += fmt::format(FRUN(sUsingDll), sZlibVersion);
|
||||
#endif
|
||||
sLibraries += RTF_BR
|
||||
"Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler." RTF_BR
|
||||
@ -1119,7 +1119,7 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
// TODO: Also if zlibVersion() contains "zlib-ng"?
|
||||
sLibraries += "https://github.com/zlib-ng/zlib-ng" RTF_BR;
|
||||
# endif /* ZLIBNG_VERSION */
|
||||
sLibraries += fmt::format(sLicense, "zlib license");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "zlib license");
|
||||
#endif /* HAVE_ZLIB */
|
||||
|
||||
/** libpng **/
|
||||
@ -1136,7 +1136,7 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
|
||||
sLibraries += RTF_BR RTF_BR;
|
||||
#if defined(USE_INTERNAL_PNG) && !defined(USE_INTERNAL_ZLIB_DLL)
|
||||
sLibraries += fmt::format(sIntCopyOf, pngVersion);
|
||||
sLibraries += fmt::format(FRUN(sIntCopyOf), pngVersion);
|
||||
#else
|
||||
// NOTE: Gentoo's libpng has "+apng" at the end of
|
||||
// PNG_LIBPNG_VER_STRING if APNG is enabled.
|
||||
@ -1158,9 +1158,9 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
fullPngVersionCompiled = fmt::format(FSTR("{:s} (No APNG support)"), pngVersionCompiled);
|
||||
}
|
||||
|
||||
sLibraries += fmt::format(sCompiledWith, fullPngVersionCompiled);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), fullPngVersionCompiled);
|
||||
sLibraries += RTF_BR;
|
||||
sLibraries += fmt::format(sUsingDll, pngVersion);
|
||||
sLibraries += fmt::format(FRUN(sUsingDll), pngVersion);
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -1182,7 +1182,7 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
sLibraries += rtfEscape(C_("AboutTab|Libraries", "APNG patch:"));
|
||||
sLibraries += " https://sourceforge.net/projects/libpng-apng/" RTF_BR;
|
||||
}
|
||||
sLibraries += fmt::format(sLicense, "libpng license");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "libpng license");
|
||||
#endif /* HAVE_PNG */
|
||||
|
||||
/** TinyXML2 **/
|
||||
@ -1194,11 +1194,11 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
|
||||
// FIXME: Runtime version?
|
||||
sLibraries += RTF_BR RTF_BR;
|
||||
sLibraries += fmt::format(sCompiledWith, tinyXml2Version);
|
||||
sLibraries += fmt::format(FRUN(sCompiledWith), tinyXml2Version);
|
||||
sLibraries += RTF_BR
|
||||
"Copyright (C) 2000-2021 Lee Thomason" RTF_BR
|
||||
"http://www.grinninglizard.com/" RTF_BR;
|
||||
sLibraries += fmt::format(sLicense, "zlib license");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "zlib license");
|
||||
#endif /* ENABLE_XML */
|
||||
|
||||
/** GNU gettext **/
|
||||
@ -1219,11 +1219,11 @@ void AboutTabPrivate::initLibrariesTab(void)
|
||||
|
||||
sLibraries += RTF_BR RTF_BR;
|
||||
// NOTE: Not actually an "internal copy"...
|
||||
sLibraries += fmt::format(sIntCopyOf, gettextVersion);
|
||||
sLibraries += fmt::format(FRUN(sIntCopyOf), gettextVersion);
|
||||
sLibraries += RTF_BR
|
||||
"Copyright (C) 1995-1997, 2000-2016, 2018-2020 Free Software Foundation, Inc." RTF_BR
|
||||
"https://www.gnu.org/software/gettext/" RTF_BR;
|
||||
sLibraries += fmt::format(sLicense, "GNU LGPL v2.1+");
|
||||
sLibraries += fmt::format(FRUN(sLicense), "GNU LGPL v2.1+");
|
||||
#endif /* HAVE_GETTEXT && LIBINTL_VERSION */
|
||||
|
||||
sLibraries += '}';
|
||||
|
@ -378,7 +378,7 @@ int CacheTabPrivate::clearThumbnailCacheVista(void)
|
||||
// this is only run on Vista+.
|
||||
DWORD dwErr = GetLastError();
|
||||
SetWindowText(hStatusLabel, fmt::format(
|
||||
TC_("CacheTab|Win32", "ERROR: GetLogicalDrives() failed. (GetLastError() == 0x{:0>8X})"),
|
||||
FRUN(TC_("CacheTab|Win32", "ERROR: GetLogicalDrives() failed. (GetLastError() == 0x{:0>8X})")),
|
||||
static_cast<unsigned int>(dwErr)).c_str());
|
||||
SendMessage(hProgressBar, PBM_SETSTATE, PBST_ERROR, 0);
|
||||
return 1;
|
||||
@ -413,7 +413,7 @@ int CacheTabPrivate::clearThumbnailCacheVista(void)
|
||||
if (!hKey.isOpen()) {
|
||||
// Failed to open the registry key.
|
||||
SetWindowText(hStatusLabel, fmt::format(
|
||||
TC_("CacheTab|Win32", "ERROR: Thumbnail Cache cleaner not found. (res == {:d})"),
|
||||
FRUN(TC_("CacheTab|Win32", "ERROR: Thumbnail Cache cleaner not found. (res == {:d})")),
|
||||
hKey.lOpenRes()).c_str());
|
||||
SendMessage(hProgressBar, PBM_SETSTATE, PBST_ERROR, 0);
|
||||
return 3;
|
||||
@ -447,7 +447,7 @@ int CacheTabPrivate::clearThumbnailCacheVista(void)
|
||||
if (FAILED(hr)) {
|
||||
// Failed...
|
||||
SetWindowText(hStatusLabel, fmt::format(
|
||||
TC_("CacheTab|Win32", "ERROR: CoCreateInstance() failed. (hr == 0x{:0>8X})"),
|
||||
FRUN(TC_("CacheTab|Win32", "ERROR: CoCreateInstance() failed. (hr == 0x{:0>8X})")),
|
||||
static_cast<unsigned int>(hr)).c_str());
|
||||
SendMessage(hProgressBar, PBM_SETSTATE, PBST_ERROR, 0);
|
||||
return 6;
|
||||
@ -500,7 +500,7 @@ int CacheTabPrivate::clearThumbnailCacheVista(void)
|
||||
// Some error occurred.
|
||||
// TODO: Continue with other drives?
|
||||
SetWindowText(hStatusLabel, fmt::format(
|
||||
TC_("CacheTab|Win32", "ERROR: IEmptyVolumeCache::Initialize() failed on drive {:c}. (hr == 0x{:0>8X})"),
|
||||
FRUN(TC_("CacheTab|Win32", "ERROR: IEmptyVolumeCache::Initialize() failed on drive {:c}. (hr == 0x{:0>8X})")),
|
||||
szDrivePath[0], static_cast<unsigned int>(hr)).c_str());
|
||||
SendMessage(hProgressBar, PBM_SETSTATE, PBST_ERROR, 0);
|
||||
pCallback->Release();
|
||||
@ -516,7 +516,7 @@ int CacheTabPrivate::clearThumbnailCacheVista(void)
|
||||
if (FAILED(hr)) {
|
||||
// Cleanup failed. (TODO: Figure out why!)
|
||||
SetWindowText(hStatusLabel, fmt::format(
|
||||
TC_("CacheTab|Win32", "ERROR: IEmptyVolumeCache::Purge() failed on drive {:c}. (hr == 0x{:0>8X})"),
|
||||
FRUN(TC_("CacheTab|Win32", "ERROR: IEmptyVolumeCache::Purge() failed on drive {:c}. (hr == 0x{:0>8X})")),
|
||||
szDrivePath[0], static_cast<unsigned int>(hr)).c_str());
|
||||
SendMessage(hProgressBar, PBM_SETSTATE, PBST_ERROR, 0);
|
||||
pCallback->Release();
|
||||
@ -573,7 +573,7 @@ int CacheTabPrivate::clearRomPropertiesCache(void)
|
||||
[](TCHAR chr) noexcept -> bool { return (chr == L'\\'); });
|
||||
|
||||
if (cacheDir.size() < 8 || bscount < 6) {
|
||||
const string s_err = fmt::format(C_("CacheTab", "ERROR: {:s}"),
|
||||
const string s_err = fmt::format(FRUN(C_("CacheTab", "ERROR: {:s}")),
|
||||
C_("CacheCleaner", "Unable to get the rom-properties cache directory."));
|
||||
SetWindowText(hStatusLabel, U82T_s(s_err));
|
||||
SendMessage(hProgressBar, PBM_SETRANGE, 0, MAKELONG(0, 1));
|
||||
@ -628,7 +628,7 @@ int CacheTabPrivate::clearRomPropertiesCache(void)
|
||||
int ret = recursiveScan(cacheDirT.c_str(), rlist);
|
||||
if (ret != 0) {
|
||||
// Non-image file found.
|
||||
const string s_err = fmt::format(C_("CacheTab", "ERROR: {:s}"),
|
||||
const string s_err = fmt::format(FRUN(C_("CacheTab", "ERROR: {:s}")),
|
||||
C_("CacheCleaner", "rom-properties cache has unexpected files. Not clearing it."));
|
||||
SetWindowText(hStatusLabel, U82T_s(s_err));
|
||||
SendMessage(hProgressBar, PBM_SETRANGE, 0, MAKELONG(0, 1));
|
||||
@ -713,8 +713,8 @@ int CacheTabPrivate::clearRomPropertiesCache(void)
|
||||
|
||||
if (dirErrs > 0 || fileErrs > 0) {
|
||||
// FIXME: MinGW-w64 11.0.0 doesn't have _swprintf_p() implemented.
|
||||
const string s_err = fmt::format(C_("CacheTab", "ERROR: {:s}"),
|
||||
fmt::format(C_("CacheTab", "Unable to delete {0:Ld} file(s) and/or {1:Ld} dir(s)."),
|
||||
const string s_err = fmt::format(FRUN(C_("CacheTab", "ERROR: {:s}")),
|
||||
fmt::format(FRUN(C_("CacheTab", "Unable to delete {0:Ld} file(s) and/or {1:Ld} dir(s).")),
|
||||
fileErrs, dirErrs));
|
||||
SetWindowText(hStatusLabel, U82T_s(s_err));
|
||||
MessageBeep(MB_ICONWARNING);
|
||||
|
@ -1599,13 +1599,13 @@ void KeyManagerTabPrivate::showKeyImportReturnStatus(
|
||||
case KeyStoreUI::ImportStatus::OpenError:
|
||||
if (iret.error_code != 0) {
|
||||
// tr: {0:s} == filename, {1:s} == error message
|
||||
msg = fmt::format(TC_("KeyManagerTab",
|
||||
"An error occurred while opening '{0:s}': {1:s}"),
|
||||
msg = fmt::format(FRUN(TC_("KeyManagerTab",
|
||||
"An error occurred while opening '{0:s}': {1:s}")),
|
||||
fileNoPath, _wcserror(iret.error_code));
|
||||
} else {
|
||||
// tr: {:s} == filename
|
||||
msg = fmt::format(TC_("KeyManagerTab",
|
||||
"An error occurred while opening '{:s}'."),
|
||||
msg = fmt::format(FRUN(TC_("KeyManagerTab",
|
||||
"An error occurred while opening '{:s}'.")),
|
||||
fileNoPath);
|
||||
}
|
||||
type = MB_ICONSTOP;
|
||||
@ -1615,13 +1615,13 @@ void KeyManagerTabPrivate::showKeyImportReturnStatus(
|
||||
// TODO: Error code for short reads.
|
||||
if (iret.error_code != 0) {
|
||||
// tr: {0:s} == filename, {1:s} == error message
|
||||
msg = fmt::format(TC_("KeyManagerTab",
|
||||
"An error occurred while reading '{0:s}': {1:s}"),
|
||||
msg = fmt::format(FRUN(TC_("KeyManagerTab",
|
||||
"An error occurred while reading '{0:s}': {1:s}")),
|
||||
fileNoPath, _wcserror(iret.error_code));
|
||||
} else {
|
||||
// tr: {:s} == filename
|
||||
msg = fmt::format(TC_("KeyManagerTab",
|
||||
"An error occurred while reading '{:s}'."),
|
||||
msg = fmt::format(FRUN(TC_("KeyManagerTab",
|
||||
"An error occurred while reading '{:s}'.")),
|
||||
fileNoPath);
|
||||
}
|
||||
type = MB_ICONSTOP;
|
||||
@ -1629,16 +1629,16 @@ void KeyManagerTabPrivate::showKeyImportReturnStatus(
|
||||
|
||||
case KeyStoreUI::ImportStatus::InvalidFile:
|
||||
// tr: {0:s} == filename, {1:s} == type of file
|
||||
msg = fmt::format(TC_("KeyManagerTab",
|
||||
"The file '{0:s}' is not a valid {1:s} file."),
|
||||
msg = fmt::format(FRUN(TC_("KeyManagerTab",
|
||||
"The file '{0:s}' is not a valid {1:s} file.")),
|
||||
fileNoPath, keyType);
|
||||
type = MB_ICONWARNING;
|
||||
break;
|
||||
|
||||
case KeyStoreUI::ImportStatus::NoKeysImported:
|
||||
// tr: {:s} == filename
|
||||
msg = fmt::format(TC_("KeyManagerTab",
|
||||
"No keys were imported from '{:s}'."),
|
||||
msg = fmt::format(FRUN(TC_("KeyManagerTab",
|
||||
"No keys were imported from '{:s}'.")),
|
||||
fileNoPath);
|
||||
type = MB_ICONINFORMATION;
|
||||
showKeyStats = true;
|
||||
@ -1647,10 +1647,10 @@ void KeyManagerTabPrivate::showKeyImportReturnStatus(
|
||||
case KeyStoreUI::ImportStatus::KeysImported: {
|
||||
const unsigned int keyCount = iret.keysImportedVerify + iret.keysImportedNoVerify;
|
||||
// tr: {0:Ld} == number of keys, {1:s} == filename
|
||||
msg = fmt::format(TNC_("KeyManagerTab",
|
||||
msg = fmt::format(FRUN(TNC_("KeyManagerTab",
|
||||
"{0:Ld} key was imported from '{1:s}'.",
|
||||
"{0:Ld} keys were imported from '{1:s}'.",
|
||||
keyCount),
|
||||
keyCount)),
|
||||
keyCount, fileNoPath);
|
||||
type = MB_ICONINFORMATION;
|
||||
showKeyStats = true;
|
||||
@ -1670,54 +1670,54 @@ void KeyManagerTabPrivate::showKeyImportReturnStatus(
|
||||
if (iret.keysExist > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(TNC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(TNC_("KeyManagerTab",
|
||||
"{:Ld} key already exists in the Key Manager.",
|
||||
"{:Ld} keys already exist in the Key Manager.",
|
||||
iret.keysExist),
|
||||
iret.keysExist)),
|
||||
iret.keysExist);
|
||||
}
|
||||
if (iret.keysInvalid > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(TNC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(TNC_("KeyManagerTab",
|
||||
"{:Ld} key was not imported because it is incorrect.",
|
||||
"{:Ld} keys were not imported because they are incorrect.",
|
||||
iret.keysInvalid),
|
||||
iret.keysInvalid)),
|
||||
iret.keysInvalid);
|
||||
}
|
||||
if (iret.keysNotUsed > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(TNC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(TNC_("KeyManagerTab",
|
||||
"{:Ld} key was not imported because it isn't used by rom-properties.",
|
||||
"{:Ld} keys were not imported because they aren't used by rom-properties.",
|
||||
iret.keysNotUsed),
|
||||
iret.keysNotUsed)),
|
||||
iret.keysNotUsed);
|
||||
}
|
||||
if (iret.keysCantDecrypt > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(TNC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(TNC_("KeyManagerTab",
|
||||
"{:Ld} key was not imported because it is encrypted and the master key isn't available.",
|
||||
"{:Ld} keys were not imported because they are encrypted and the master key isn't available.",
|
||||
iret.keysCantDecrypt),
|
||||
iret.keysCantDecrypt)),
|
||||
iret.keysCantDecrypt);
|
||||
}
|
||||
if (iret.keysImportedVerify > 0) {
|
||||
msg += nl_bullet;
|
||||
// tr: {:Ld} == number of keys
|
||||
msg += fmt::format(TNC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(TNC_("KeyManagerTab",
|
||||
"{:Ld} key has been imported and verified as correct.",
|
||||
"{:Ld} keys have been imported and verified as correct.",
|
||||
iret.keysImportedVerify),
|
||||
iret.keysImportedVerify)),
|
||||
iret.keysImportedVerify);
|
||||
}
|
||||
if (iret.keysImportedNoVerify > 0) {
|
||||
msg += nl_bullet;
|
||||
msg += fmt::format(TNC_("KeyManagerTab",
|
||||
msg += fmt::format(FRUN(TNC_("KeyManagerTab",
|
||||
"{:Ld} key has been imported without verification.",
|
||||
"{:Ld} keys have been imported without verification.",
|
||||
iret.keysImportedNoVerify),
|
||||
iret.keysImportedNoVerify)),
|
||||
iret.keysImportedNoVerify);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user