mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
refactor: Avoid concatenation of format strings
Instead just concatenate already formatted strings. This allows untranslated format strings to be checked at compile time now, and translated format strings to be checked at compile time in #31061.
This commit is contained in:
@@ -886,7 +886,7 @@ bool AppInitParameterInteraction(const ArgsManager& args)
|
||||
}
|
||||
bilingual_str errors;
|
||||
for (const auto& arg : args.GetUnsuitableSectionOnlyArgs()) {
|
||||
errors += strprintf(_("Config setting for %s only applied on %s network when in [%s] section.") + Untranslated("\n"), arg, ChainTypeToString(chain), ChainTypeToString(chain));
|
||||
errors += strprintf(_("Config setting for %s only applied on %s network when in [%s] section."), arg, ChainTypeToString(chain), ChainTypeToString(chain)) + Untranslated("\n");
|
||||
}
|
||||
|
||||
if (!errors.empty()) {
|
||||
@@ -901,7 +901,7 @@ bool AppInitParameterInteraction(const ArgsManager& args)
|
||||
// Warn if unrecognized section name are present in the config file.
|
||||
bilingual_str warnings;
|
||||
for (const auto& section : args.GetUnrecognizedSections()) {
|
||||
warnings += strprintf(Untranslated("%s:%i ") + _("Section [%s] is not recognized.") + Untranslated("\n"), section.m_file, section.m_line, section.m_name);
|
||||
warnings += Untranslated(strprintf("%s:%i ", section.m_file, section.m_line)) + strprintf(_("Section [%s] is not recognized."), section.m_name) + Untranslated("\n");
|
||||
}
|
||||
|
||||
if (!warnings.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user