From b8432c2c8ec2116c08c7ef2e92b181731b74a679 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 9 May 2022 12:40:26 +0200 Subject: Tweak i18n messages extraction script to avoid unwanted messages. Code would add a bit too often the identifier of an RNA class to translated messages, this is only needed if there is no valid label available for it. --- release/scripts/modules/bl_i18n_utils/bl_extract_messages.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'release/scripts') diff --git a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py index 87d54213d1b..604a577eec9 100644 --- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py +++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py @@ -341,7 +341,8 @@ def dump_rna_messages(msgs, reports, settings, verbose=False): msgsrc = "bpy.types." + bl_rna.identifier msgctxt = bl_rna.translation_context or default_context - if bl_rna.name and (bl_rna.name != bl_rna.identifier or msgctxt != default_context): + if bl_rna.name and (bl_rna.name != bl_rna.identifier or + (msgctxt != default_context and not hasattr(bl_rna, 'bl_label'))): process_msg(msgs, msgctxt, bl_rna.name, msgsrc, reports, check_ctxt_rna, settings) if bl_rna.description: -- cgit v1.2.3