diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-04-12 16:19:50 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-04-12 16:19:50 +0400 |
commit | 0e4b092c2dccf8889ab159f360f152f5428fea33 (patch) | |
tree | a3448cd26286e3efe5fc13ab2567cd1d87ec0250 /release/scripts/modules/bl_i18n_utils/bl_extract_messages.py | |
parent | c83925599abbf4e88e4703ee906dc5775467da3c (diff) |
More fixes for addon i18n messages management.
Diffstat (limited to 'release/scripts/modules/bl_i18n_utils/bl_extract_messages.py')
-rw-r--r-- | release/scripts/modules/bl_i18n_utils/bl_extract_messages.py | 13 |
1 files changed, 10 insertions, 3 deletions
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 25f8d0c7ebb..3d00815b70e 100644 --- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py +++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py @@ -207,7 +207,7 @@ def process_msg(msgs, msgctxt, msgid, msgsrc, reports, check_ctxt, settings): ##### RNA ##### -def dump_rna_messages(msgs, reports, settings): +def dump_rna_messages(msgs, reports, settings, verbose=False): """ Dump into messages dict all RNA-defined UI messages (labels en tooltips). """ @@ -361,16 +361,23 @@ def dump_rna_messages(msgs, reports, settings): return def full_class_id(cls): - """ gives us 'ID.Lamp.AreaLamp' which is best for sorting.""" + """Gives us 'ID.Lamp.AreaLamp' which is best for sorting.""" + # Always the same issue, some classes listed in blacklist should actually no more exist (they have been + # unregistered), but are still listed by __subclasses__() calls... :/ + if cls in blacklist_rna_class: + return cls.__name__ cls_id = "" bl_rna = cls.bl_rna while bl_rna: cls_id = bl_rna.identifier + "." + cls_id bl_rna = bl_rna.base return cls_id - + if verbose: + print(cls_list) cls_list.sort(key=full_class_id) for cls in cls_list: + if verbose: + print(cls) reports["rna_structs"].append(cls) # Ignore those Operator sub-classes (anyway, will get the same from OperatorProperties sub-classes!)... if (cls in blacklist_rna_class) or issubclass(cls, bpy.types.Operator): |