Fix T49158: Untranslatable elements in UI.

We cannot skip 'collections clesse' when generating i18n messages from RNA, some of them
are visible and UI...
This commit is contained in:
Bastien Montagne 2016-08-26 15:44:37 +02:00
parent fcffb14d7b
commit 1a1bcad43a
Notes: blender-bot 2023-02-14 10:11:54 +01:00
Referenced by issue #49158, Untranslatable elements in UI
1 changed files with 7 additions and 6 deletions

View File

@ -230,12 +230,13 @@ def dump_rna_messages(msgs, reports, settings, verbose=False):
_rna = {getattr(bpy.types, cls) for cls in dir(bpy.types)}
# Classes which are attached to collections can be skipped too, these are api access only.
for cls in _rna:
for prop in cls.bl_rna.properties:
if prop.type == 'COLLECTION':
prop_cls = prop.srna
if prop_cls is not None:
blacklist_rna_class.add(prop_cls.__class__)
# XXX This is not true, some of those show in UI, see e.g. tooltip of KeyingSets.active...
#~ for cls in _rna:
#~ for prop in cls.bl_rna.properties:
#~ if prop.type == 'COLLECTION':
#~ prop_cls = prop.srna
#~ if prop_cls is not None:
#~ blacklist_rna_class.add(prop_cls.__class__)
# Now here is the *ugly* hack!
# Unfortunately, all classes we want to access are not available from bpy.types (OperatorProperties subclasses