mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 11:27:28 -03: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:
parent
17372d788e
commit
058021969b
1 changed files with 2 additions and 2 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue