More UI message i18n fixes and improvements...

Fix for keyingsets tips, and make them (and a few others) findable by i18n messages extracting code (for some reasons, their bl_rna.description are void???).
This commit is contained in:
Bastien Montagne 2013-03-10 17:42:08 +00:00
parent 4760e002dd
commit 6da449b86c
4 changed files with 24 additions and 43 deletions

@ -356,6 +356,8 @@ def dump_messages_rna(msgs, reports, settings):
if bl_rna.description:
process_msg(msgs, default_context, bl_rna.description, msgsrc, reports, check_ctxt_rna_tip, settings)
elif cls.__doc__: # XXX Some classes (like KeyingSetInfo subclasses) have void description... :(
process_msg(msgs, default_context, cls.__doc__, msgsrc, reports, check_ctxt_rna_tip, settings)
if hasattr(bl_rna, 'bl_label') and bl_rna.bl_label:
process_msg(msgs, msgctxt, bl_rna.bl_label, msgsrc, reports, check_ctxt_rna, settings)

@ -1209,7 +1209,7 @@ class VIEW3D_MT_tools_projectpaint_stencil(Menu):
class VIEW3D_PT_tools_particlemode(View3DPanel, Panel):
"""default tools for particle mode"""
"""Default tools for particle mode"""
bl_context = "particlemode"
bl_label = "Options"

@ -20,14 +20,11 @@
"""
Built-In Keying Sets
None of these Keying Sets should be removed, as these
are needed by various parts of Blender in order for them
None of these Keying Sets should be removed, as these are needed by various parts of Blender in order for them
to work correctly.
Beware also about changing the order that these are defined
here, since this can result in old files referring to the
wrong Keying Set as the active one, potentially resulting
in lost (i.e. unkeyed) animation.
Beware also about changing the order that these are defined here, since this can result in old files referring to the
wrong Keying Set as the active one, potentially resulting in lost (i.e. unkeyed) animation.
"""
import bpy
@ -138,9 +135,7 @@ class BUILTIN_KSI_LocScale(KeyingSetInfo):
# LocRotScale
class BUILTIN_KSI_LocRotScale(KeyingSetInfo):
"""
Insert a keyframe on each of the location, rotation, and scale channels
"""
"""Insert a keyframe on each of the location, rotation, and scale channels"""
bl_idname = ANIM_KS_LOC_ROT_SCALE_ID
bl_label = "LocRotScale"
@ -183,10 +178,8 @@ class BUILTIN_KSI_RotScale(KeyingSetInfo):
# VisualLocation
class BUILTIN_KSI_VisualLoc(KeyingSetInfo):
"""
Insert a keyframe on each of the location channels, taking into account
effects of constraints and relationships
"""
"""Insert a keyframe on each of the location channels, taking into account effects of constraints """
"""and relationships"""
bl_label = "Visual Location"
bl_options = {'INSERTKEY_VISUAL'}
@ -203,10 +196,8 @@ class BUILTIN_KSI_VisualLoc(KeyingSetInfo):
# VisualRotation
class BUILTIN_KSI_VisualRot(KeyingSetInfo):
"""
Insert a keyframe on each of the rotation channels, taking into account
effects of constraints and relationships
"""
"""Insert a keyframe on each of the rotation channels, taking into account effects of constraints """
"""and relationships"""
bl_label = "Visual Rotation"
bl_options = {'INSERTKEY_VISUAL'}
@ -223,10 +214,8 @@ class BUILTIN_KSI_VisualRot(KeyingSetInfo):
# VisualScaling
class BUILTIN_KSI_VisualScaling(KeyingSetInfo):
"""
Insert a keyframe on each of the scale channels, taking into account
effects of constraints and relationships
"""
"""Insert a keyframe on each of the scale channels, taking into account effects of constraints """
"""and relationships"""
bl_label = "Visual Scaling"
bl_options = {'INSERTKEY_VISUAL'}
@ -243,10 +232,8 @@ class BUILTIN_KSI_VisualScaling(KeyingSetInfo):
# VisualLocRot
class BUILTIN_KSI_VisualLocRot(KeyingSetInfo):
"""
Insert a keyframe on each of the location and rotation channels,
taking into account effects of constraints and relationships
"""
"""Insert a keyframe on each of the location and rotation channels, taking into account effects of constraints """
"""and relationships"""
bl_label = "Visual LocRot"
bl_options = {'INSERTKEY_VISUAL'}
@ -267,10 +254,8 @@ class BUILTIN_KSI_VisualLocRot(KeyingSetInfo):
# VisualLocScale
class BUILTIN_KSI_VisualLocScale(KeyingSetInfo):
"""
Insert a keyframe on each of the location and scaling channels,
taking into account effects of constraints and relationships
"""
"""Insert a keyframe on each of the location and scaling channels, taking into account effects of constraints """
"""and relationships"""
bl_label = "Visual LocScale"
bl_options = {'INSERTKEY_VISUAL'}
@ -291,10 +276,8 @@ class BUILTIN_KSI_VisualLocScale(KeyingSetInfo):
# VisualLocRotScale
class BUILTIN_KSI_VisualLocRotScale(KeyingSetInfo):
"""
Insert a keyframe on each of the location, rotation and scaling channels,
taking into account effects of constraints and relationships
"""
"""Insert a keyframe on each of the location, rotation and scaling channels, taking into account effects """
"""of constraints and relationships"""
bl_label = "Visual LocRotScale"
bl_options = {'INSERTKEY_VISUAL'}
@ -317,10 +300,8 @@ class BUILTIN_KSI_VisualLocRotScale(KeyingSetInfo):
# VisualRotScale
class BUILTIN_KSI_VisualRotScale(KeyingSetInfo):
"""
Insert a keyframe on each of the rotation and scaling channels,
taking into account effects of constraints and relationships
"""
"""Insert a keyframe on each of the rotation and scaling channels, taking into account effects of constraints """
"""and relationships"""
bl_label = "Visual RotScale"
bl_options = {'INSERTKEY_VISUAL'}
@ -367,10 +348,8 @@ class BUILTIN_KSI_Available(KeyingSetInfo):
# All properties that are likely to get animated in a character rig
class BUILTIN_KSI_WholeCharacter(KeyingSetInfo):
"""
Insert a keyframe for all properties that are likely to get animated in a
character rig (useful when blocking out a shot)
"""
"""Insert a keyframe for all properties that are likely to get animated in a character rig """
"""(useful when blocking out a shot)"""
bl_idname = ANIM_KS_WHOLE_CHARACTER_ID
bl_label = "Whole Character"

@ -1307,7 +1307,7 @@ static int insert_key_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e
uiLayout *layout;
/* call the menu, which will call this operator again, hence the canceled */
pup = uiPupMenuBegin(C, op->type->name, ICON_NONE);
pup = uiPupMenuBegin(C, RNA_struct_ui_name(op->type->srna), ICON_NONE);
layout = uiPupMenuLayout(pup);
uiItemsEnumO(layout, "ANIM_OT_keyframe_insert_menu", "type");
uiPupMenuEnd(C, pup);