Libraries upgrade:
[blender.git] / po / update_msg.py
index e91371c17551c00782d688d27a15d387a032b506..21d727922d40f3dabb0c283bce83235fc01290bf 100644 (file)
@@ -1,4 +1,3 @@
-# $Id$
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
 # This program is free software; you can redistribute it and/or
@@ -43,7 +42,8 @@ def dump_messages_rna(messages):
                                "BlendData",
                                # registerable classes
                                "Panel", "Menu", "Header", "RenderEngine",
-                               "Operator", "OperatorMacro", "UnknownType"
+                               "Operator", "OperatorMacro", "Macro",
+                               "KeyingSetInfo", "UnknownType",
                                # window classes
                                "WindowManager", "Window"
                                ]
@@ -122,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:
@@ -131,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):