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.
This commit is contained in:
Bastien Montagne 2022-05-09 12:40:26 +02:00
parent 025959da23
commit b8432c2c8e
1 changed files with 2 additions and 1 deletions

View File

@ -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: