[Bf-blender-cvs] [1a1bcad] master: Fix T49158: Untranslatable elements in UI.

Bastien Montagne noreply at git.blender.org
Fri Aug 26 15:47:06 CEST 2016


Commit: 1a1bcad43abcd401943da4603b2fd27ab8273a1b
Author: Bastien Montagne
Date:   Fri Aug 26 15:44:37 2016 +0200
Branches: master
https://developer.blender.org/rB1a1bcad43abcd401943da4603b2fd27ab8273a1b

Fix T49158: Untranslatable elements in UI.

We cannot skip 'collections clesse' when generating i18n messages from RNA, some of them
are visible and UI...

===================================================================

M	release/scripts/modules/bl_i18n_utils/bl_extract_messages.py

===================================================================

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 dc1ddbf..3b7eff6 100644
--- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
+++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
@@ -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




More information about the Bf-blender-cvs mailing list