mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-10 23:58:17 +02:00
scripted-diff: Replace strprintf(Untranslated) with Untranslated(strprintf)
This makes code more consistent and makes it easier to add compile-time checking to enforce that format strings contain the right specifiers, because it stops using Untranslated() to create the format string, so the Untranslated() function will not need to get involved in formatting. -BEGIN VERIFY SCRIPT- quote='"[^"]+"' quotes="(?:$quote|\\s)*" nonparens="[^()]*" single_level_paren="\($nonparens\)" double_level_paren="\($nonparens\($nonparens\)$nonparens\)" exprs="(?:$double_level_paren|$single_level_paren|$nonparens)*" git grep -l 'Untranslated' | xargs perl -0777 -i -pe "s/strprintf\((\\W*)Untranslated\(($quotes)\)($exprs)(\))/Untranslated(\1strprintf(\2\3))/gs" -END VERIFY SCRIPT-
This commit is contained in:
@@ -529,7 +529,7 @@ int GuiMain(int argc, char* argv[])
|
||||
SetupUIArgs(gArgs);
|
||||
std::string error;
|
||||
if (!gArgs.ParseParameters(argc, argv, error)) {
|
||||
InitError(strprintf(Untranslated("Error parsing command line arguments: %s"), error));
|
||||
InitError(Untranslated(strprintf("Error parsing command line arguments: %s", error)));
|
||||
// Create a message box, because the gui has neither been created nor has subscribed to core signals
|
||||
QMessageBox::critical(nullptr, CLIENT_NAME,
|
||||
// message cannot be translated because translations have not been initialized
|
||||
|
||||
Reference in New Issue
Block a user