From ced8281c32e5195580836fa9e76aa526bf2f42e8 Mon Sep 17 00:00:00 2001 From: Damien Picard Date: Tue, 19 Aug 2025 18:16:18 +0200 Subject: [PATCH] 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 --- source/blender/editors/animation/keyframing.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/source/blender/editors/animation/keyframing.cc b/source/blender/editors/animation/keyframing.cc index c6e3c1195c5..934586f7fd9 100644 --- a/source/blender/editors/animation/keyframing.cc +++ b/source/blender/editors/animation/keyframing.cc @@ -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;