From 134bf10e4d3bc3ab629c38c618fed467aa817891 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 13 Apr 2012 20:25:05 +0000 Subject: i18n: "labels" of multi-section enums need to be marked for gettext (N_()), as they are not available from python... --- source/blender/editors/sculpt_paint/paint_hide.c | 13 +++++-------- source/blender/makesrna/intern/rna_constraint.c | 10 ++++++---- source/blender/makesrna/intern/rna_modifier.c | 10 ++++++---- source/blender/makesrna/intern/rna_scene.c | 7 +++++-- source/blender/makesrna/intern/rna_space.c | 10 ++++++---- source/blender/makesrna/intern/rna_userdef.c | 5 +++-- 6 files changed, 31 insertions(+), 24 deletions(-) diff --git a/source/blender/editors/sculpt_paint/paint_hide.c b/source/blender/editors/sculpt_paint/paint_hide.c index a3acce33683..43bb4d33212 100644 --- a/source/blender/editors/sculpt_paint/paint_hide.c +++ b/source/blender/editors/sculpt_paint/paint_hide.c @@ -355,16 +355,13 @@ void PAINT_OT_hide_show(struct wmOperatorType *ot) static EnumPropertyItem action_items[] = { {PARTIALVIS_HIDE, "HIDE", 0, "Hide", "Hide vertices"}, {PARTIALVIS_SHOW, "SHOW", 0, "Show", "Show vertices"}, - {0}}; + {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem area_items[] = { - {PARTIALVIS_OUTSIDE, "OUTSIDE", 0, "Outside", - "Hide or show vertices outside the selection"}, - {PARTIALVIS_INSIDE, "INSIDE", 0, "Inside", - "Hide or show vertices inside the selection"}, - {PARTIALVIS_ALL, "ALL", 0, "All", - "Hide or show all vertices"}, - {0}}; + {PARTIALVIS_OUTSIDE, "OUTSIDE", 0, "Outside", "Hide or show vertices outside the selection"}, + {PARTIALVIS_INSIDE, "INSIDE", 0, "Inside", "Hide or show vertices inside the selection"}, + {PARTIALVIS_ALL, "ALL", 0, "All", "Hide or show all vertices"}, + {0, NULL, 0, NULL, NULL}}; /* identifiers */ ot->name = "Hide/Show"; diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 6519b9ad5a0..325d6721cd4 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -33,6 +33,8 @@ #include "BLI_math.h" +#include "BLF_translation.h" + #include "DNA_action_types.h" #include "DNA_constraint_types.h" #include "DNA_modifier_types.h" @@ -43,11 +45,11 @@ #include "WM_types.h" EnumPropertyItem constraint_type_items[] = { - {0, "", 0, "Motion Tracking", ""}, + {0, "", 0, N_("Motion Tracking"), ""}, {CONSTRAINT_TYPE_CAMERASOLVER, "CAMERA_SOLVER", ICON_CONSTRAINT_DATA, "Camera Solver", ""}, {CONSTRAINT_TYPE_OBJECTSOLVER, "OBJECT_SOLVER", ICON_CONSTRAINT_DATA, "Object Solver", ""}, {CONSTRAINT_TYPE_FOLLOWTRACK, "FOLLOW_TRACK", ICON_CONSTRAINT_DATA, "Follow Track", ""}, - {0, "", 0, "Transform", ""}, + {0, "", 0, N_("Transform"), ""}, {CONSTRAINT_TYPE_LOCLIKE, "COPY_LOCATION", ICON_CONSTRAINT_DATA, "Copy Location", ""}, {CONSTRAINT_TYPE_ROTLIKE, "COPY_ROTATION", ICON_CONSTRAINT_DATA, "Copy Rotation", ""}, {CONSTRAINT_TYPE_SIZELIKE, "COPY_SCALE", ICON_CONSTRAINT_DATA, "Copy Scale", ""}, @@ -58,7 +60,7 @@ EnumPropertyItem constraint_type_items[] = { {CONSTRAINT_TYPE_SIZELIMIT, "LIMIT_SCALE", ICON_CONSTRAINT_DATA, "Limit Scale", ""}, {CONSTRAINT_TYPE_SAMEVOL, "MAINTAIN_VOLUME", ICON_CONSTRAINT_DATA, "Maintain Volume", ""}, {CONSTRAINT_TYPE_TRANSFORM, "TRANSFORM", ICON_CONSTRAINT_DATA, "Transformation", ""}, - {0, "", 0, "Tracking", ""}, + {0, "", 0, N_("Tracking"), ""}, {CONSTRAINT_TYPE_CLAMPTO, "CLAMP_TO", ICON_CONSTRAINT_DATA, "Clamp To", ""}, {CONSTRAINT_TYPE_DAMPTRACK, "DAMPED_TRACK", ICON_CONSTRAINT_DATA, "Damped Track", "Tracking by taking the shortest path"}, @@ -69,7 +71,7 @@ EnumPropertyItem constraint_type_items[] = { {CONSTRAINT_TYPE_STRETCHTO, "STRETCH_TO",ICON_CONSTRAINT_DATA, "Stretch To", ""}, {CONSTRAINT_TYPE_TRACKTO, "TRACK_TO", ICON_CONSTRAINT_DATA, "Track To", "Legacy tracking constraint prone to twisting artifacts"}, - {0, "", 0, "Relationship", ""}, + {0, "", 0, N_("Relationship"), ""}, {CONSTRAINT_TYPE_ACTION, "ACTION", ICON_CONSTRAINT_DATA, "Action", ""}, {CONSTRAINT_TYPE_CHILDOF, "CHILD_OF", ICON_CONSTRAINT_DATA, "Child Of", ""}, {CONSTRAINT_TYPE_MINMAX, "FLOOR", ICON_CONSTRAINT_DATA, "Floor", ""}, diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 42849fbfa16..c2616e8655e 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -45,6 +45,8 @@ #include "BLI_math.h" +#include "BLF_translation.h" + #include "BKE_animsys.h" #include "BKE_bmesh.h" /* For BevelModifierData */ #include "BKE_dynamicpaint.h" @@ -55,13 +57,13 @@ #include "WM_types.h" EnumPropertyItem modifier_type_items[] = { - {0, "", 0, "Modify", ""}, + {0, "", 0, N_("Modify"), ""}, {eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""}, {eModifierType_WeightVGEdit, "VERTEX_WEIGHT_EDIT", ICON_MOD_VERTEX_WEIGHT, "Vertex Weight Edit", ""}, {eModifierType_WeightVGMix, "VERTEX_WEIGHT_MIX", ICON_MOD_VERTEX_WEIGHT, "Vertex Weight Mix", ""}, {eModifierType_WeightVGProximity, "VERTEX_WEIGHT_PROXIMITY", ICON_MOD_VERTEX_WEIGHT, "Vertex Weight Proximity", ""}, - {0, "", 0, "Generate", ""}, + {0, "", 0, N_("Generate"), ""}, {eModifierType_Array, "ARRAY", ICON_MOD_ARRAY, "Array", ""}, {eModifierType_Bevel, "BEVEL", ICON_MOD_BEVEL, "Bevel", ""}, {eModifierType_Boolean, "BOOLEAN", ICON_MOD_BOOLEAN, "Boolean", ""}, @@ -75,7 +77,7 @@ EnumPropertyItem modifier_type_items[] = { {eModifierType_Screw, "SCREW", ICON_MOD_SCREW, "Screw", ""}, {eModifierType_Solidify, "SOLIDIFY", ICON_MOD_SOLIDIFY, "Solidify", ""}, {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""}, - {0, "", 0, "Deform", ""}, + {0, "", 0, N_("Deform"), ""}, {eModifierType_Armature, "ARMATURE", ICON_MOD_ARMATURE, "Armature", ""}, {eModifierType_Cast, "CAST", ICON_MOD_CAST, "Cast", ""}, {eModifierType_Curve, "CURVE", ICON_MOD_CURVE, "Curve", ""}, @@ -88,7 +90,7 @@ EnumPropertyItem modifier_type_items[] = { {eModifierType_Smooth, "SMOOTH", ICON_MOD_SMOOTH, "Smooth", ""}, {eModifierType_Warp, "WARP", ICON_MOD_WARP, "Warp", ""}, {eModifierType_Wave, "WAVE", ICON_MOD_WAVE, "Wave", ""}, - {0, "", 0, "Simulate", ""}, + {0, "", 0, N_("Simulate"), ""}, {eModifierType_Cloth, "CLOTH", ICON_MOD_CLOTH, "Cloth", ""}, {eModifierType_Collision, "COLLISION", ICON_MOD_PHYSICS, "Collision", ""}, {eModifierType_DynamicPaint, "DYNAMIC_PAINT", ICON_MOD_DYNAMICPAINT, "Dynamic Paint", ""}, diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 792b11d8e5b..410756ff5ea 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -37,8 +37,11 @@ #include "DNA_particle_types.h" #include "DNA_scene_types.h" #include "DNA_userdef_types.h" + #include "BLI_math.h" +#include "BLF_translation.h" + #include "BKE_tessmesh.h" /* Include for Bake Options */ @@ -204,11 +207,11 @@ EnumPropertyItem image_only_type_items[] = { {0, NULL, 0, NULL, NULL}}; EnumPropertyItem image_type_items[] = { - {0, "", 0, "Image", NULL}, + {0, "", 0, N_("Image"), NULL}, IMAGE_TYPE_ITEMS_IMAGE_ONLY - {0, "", 0, "Movie", NULL}, + {0, "", 0, N_("Movie"), NULL}, #ifdef _WIN32 /* XXX Missing codec menu */ {R_IMF_IMTYPE_AVICODEC, "AVICODEC", ICON_FILE_MOVIE, "AVI Codec", "Output video in AVI format"}, diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 0143473f7db..5e0a20c51ad 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -34,6 +34,8 @@ #include "rna_internal.h" +#include "BLF_translation.h" + #include "BKE_key.h" #include "BKE_movieclip.h" @@ -1248,19 +1250,19 @@ static void rna_def_background_image(BlenderRNA *brna) /* note: combinations work but don't flip so arnt that useful */ static EnumPropertyItem bgpic_axis_items[] = { - {0, "", 0, "X Axis", ""}, + {0, "", 0, N_("X Axis"), ""}, {(1<