Cycles: svn merge -r41266:41467 ^/trunk/blender
[blender-staging.git] / po / update_msg.py
index ca19e0366376d14a1d05114b34e4e891795cbe4a..21d727922d40f3dabb0c283bce83235fc01290bf 100644 (file)
@@ -1,4 +1,3 @@
-# $Id$
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
 # This program is free software; you can redistribute it and/or
@@ -123,8 +122,10 @@ def dump_messages_rna(messages):
                 continue
 
             msgsrc = "bpy.types.%s.%s" % (bl_rna.identifier, prop.identifier)
-            messages.setdefault(prop.name, []).append(msgsrc)
-            messages.setdefault(prop.description, []).append(msgsrc)
+            if prop.name and prop.name != prop.identifier:
+                messages.setdefault(prop.name, []).append(msgsrc)
+            if prop.description:
+                messages.setdefault(prop.description, []).append(msgsrc)
 
             if isinstance(prop, bpy.types.EnumProperty):
                 for item in prop.enum_items:
@@ -132,8 +133,13 @@ def dump_messages_rna(messages):
                                                         prop.identifier,
                                                         item.identifier,
                                                         )
-                    messages.setdefault(item.name, []).append(msgsrc)
-                    messages.setdefault(item.description, []).append(msgsrc)
+                    # Here identifier and name can be the same!
+                    if item.name:  # and item.name != item.identifier:
+                        messages.setdefault(item.name,
+                                            []).append(msgsrc)
+                    if item.description:
+                        messages.setdefault(item.description,
+                                            []).append(msgsrc)
 
     def walkRNA(bl_rna):