I18n: Allow translation of two formatted reports using dynamic types

Two formatted reports introduced in e239c7f43c used a type defined at
compile time using the PRId64 macro. Translation failed for these
messages, because the message was extracted as:

"No keyframes removed from % strip(s)"

and the type was lost at the time formatting happened.

This commit instead uses fmt to format the message, which deals with
using the proper int type depending on the platform.

Pull Request: https://projects.blender.org/blender/blender/pulls/144374
This commit is contained in:
Damien Picard
2025-08-19 18:16:18 +02:00
committed by Bastien Montagne
parent 59201ddc28
commit ced8281c32

View File

@@ -1064,18 +1064,18 @@ static wmOperatorStatus delete_key_vse_without_keying_set(bContext *C, wmOperato
if (confirm) {
/* If called by invoke (from the UI), make a note that we've removed keyframes. */
if (modified_strips.is_empty()) {
BKE_reportf(op->reports,
RPT_WARNING,
"No keyframes removed from %" PRId64 " strip(s)",
selected_strips_rna_paths.size());
const std::string msg = fmt::format(
fmt::runtime(RPT_("No keyframes removed from {} strip(s)")),
selected_strips_rna_paths.size());
BKE_report(op->reports, RPT_WARNING, msg.c_str());
return OPERATOR_CANCELLED;
}
BKE_reportf(op->reports,
RPT_INFO,
"%" PRId64 " strip(s) successfully had %" PRId64 " keyframes removed",
modified_strips.size(),
modified_fcurves.size());
const std::string msg = fmt::format(
fmt::runtime(RPT_("{} strip(s) successfully had {} keyframes removed")),
modified_strips.size(),
modified_fcurves.size());
BKE_report(op->reports, RPT_INFO, msg.c_str());
}
return OPERATOR_FINISHED;