Yes, mainly "terminator" item was not as everywhere else in blender.
And no, no need of N_() here, the po i18n tools have access to enum’s items names (from bpy). However, bpy has no access to multi-column separators’ names (like in constraints or modifiers enums), hence the need to mark those with gettext macro... Le dimanche 15 avril 2012 18:10:37, Nicholas Bishop a écrit : > Checking paint_hide.c, looks like only formatting changes were made. > Does this not need N_()? > > On Fri, Apr 13, 2012 at 4:25 PM, Bastien Montagne<[email protected]> > wrote: >> Revision: 45614 >> >> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45614 >> Author: mont29 >> Date: 2012-04-13 20:25:05 +0000 (Fri, 13 Apr 2012) >> Log Message: >> ----------- >> i18n: "labels" of multi-section enums need to be marked for gettext (N_()), >> as they are not available from python... >> >> Modified Paths: >> -------------- >> trunk/blender/source/blender/editors/sculpt_paint/paint_hide.c >> trunk/blender/source/blender/makesrna/intern/rna_constraint.c >> trunk/blender/source/blender/makesrna/intern/rna_modifier.c >> trunk/blender/source/blender/makesrna/intern/rna_scene.c >> trunk/blender/source/blender/makesrna/intern/rna_space.c >> trunk/blender/source/blender/makesrna/intern/rna_userdef.c >> >> Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_hide.c >> =================================================================== >> --- trunk/blender/source/blender/editors/sculpt_paint/paint_hide.c >> 2012-04-13 19:59:29 UTC (rev 45613) >> +++ trunk/blender/source/blender/editors/sculpt_paint/paint_hide.c >> 2012-04-13 20:25:05 UTC (rev 45614) >> @@ -355,16 +355,13 @@ >> 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"; >> >> Modified: trunk/blender/source/blender/makesrna/intern/rna_constraint.c >> =================================================================== >> --- trunk/blender/source/blender/makesrna/intern/rna_constraint.c >> 2012-04-13 19:59:29 UTC (rev 45613) >> +++ trunk/blender/source/blender/makesrna/intern/rna_constraint.c >> 2012-04-13 20:25:05 UTC (rev 45614) >> @@ -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 @@ >> {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 @@ >> {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", ""}, >> >> Modified: trunk/blender/source/blender/makesrna/intern/rna_modifier.c >> =================================================================== >> --- trunk/blender/source/blender/makesrna/intern/rna_modifier.c 2012-04-13 >> 19:59:29 UTC (rev 45613) >> +++ trunk/blender/source/blender/makesrna/intern/rna_modifier.c 2012-04-13 >> 20:25:05 UTC (rev 45614) >> @@ -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 @@ >> {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 @@ >> {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", ""}, >> >> Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c >> =================================================================== >> --- trunk/blender/source/blender/makesrna/intern/rna_scene.c 2012-04-13 >> 19:59:29 UTC (rev 45613) >> +++ trunk/blender/source/blender/makesrna/intern/rna_scene.c 2012-04-13 >> 20:25:05 UTC (rev 45614) >> @@ -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 @@ >> {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"}, >> >> Modified: trunk/blender/source/blender/makesrna/intern/rna_space.c >> =================================================================== >> --- trunk/blender/source/blender/makesrna/intern/rna_space.c 2012-04-13 >> 19:59:29 UTC (rev 45613) >> +++ trunk/blender/source/blender/makesrna/intern/rna_space.c 2012-04-13 >> 20:25:05 UTC (rev 45614) >> @@ -34,6 +34,8 @@ >> >> #include "rna_internal.h" >> >> +#include "BLF_translation.h" >> + >> #include "BKE_key.h" >> #include "BKE_movieclip.h" >> >> @@ -1248,19 +1250,19 @@ >> >> /* 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<<RV3D_VIEW_LEFT), "LEFT", 0, "Left", "Show background >> image while looking to the left"}, >> {(1<<RV3D_VIEW_RIGHT), "RIGHT", 0, "Right", "Show background >> image while looking to the right"}, >> /*{(1<<RV3D_VIEW_LEFT)|(1<<RV3D_VIEW_RIGHT), "LEFT_RIGHT", >> 0, "Left/Right", ""},*/ >> - {0, "", 0, "Y Axis", ""}, >> + {0, "", 0, N_("Y Axis"), ""}, >> {(1<<RV3D_VIEW_BACK), "BACK", 0, "Back", "Show background >> image in back view"}, >> {(1<<RV3D_VIEW_FRONT), "FRONT", 0, "Front", "Show background >> image in front view"}, >> /*{(1<<RV3D_VIEW_BACK)|(1<<RV3D_VIEW_FRONT), "BACK_FRONT", >> 0, "Back/Front", ""},*/ >> - {0, "", 0, "Z Axis", ""}, >> + {0, "", 0, N_("Z Axis"), ""}, >> {(1<<RV3D_VIEW_BOTTOM), "BOTTOM", 0, "Bottom", "Show >> background image in bottom view"}, >> {(1<<RV3D_VIEW_TOP), "TOP", 0, "Top", "Show background image >> in top view"}, >> /*{(1<<RV3D_VIEW_BOTTOM)|(1<<RV3D_VIEW_TOP), "BOTTOM_TOP", >> 0, "Top/Bottom", ""},*/ >> - {0, "", 0, "Other", ""}, >> + {0, "", 0, N_("Other"), ""}, >> {0, "ALL", 0, "All Views", "Show background image in all >> views"}, >> {(1<<RV3D_VIEW_CAMERA), "CAMERA", 0, "Camera", "Show >> background image in camera view"}, >> {0, NULL, 0, NULL, NULL}}; >> >> Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c >> =================================================================== >> --- trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2012-04-13 >> 19:59:29 UTC (rev 45613) >> +++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2012-04-13 >> 20:25:05 UTC (rev 45614) >> @@ -43,6 +43,7 @@ >> #include "WM_types.h" >> >> #include "BLI_utildefines.h" >> + >> #include "BLF_translation.h" >> >> #include "BKE_sound.h" >> @@ -2860,7 +2861,7 @@ >> /* Note: As this list is in alphabetical order, and not defined >> order, >> * here is the highest define currently in use: 30 (turkish). >> */ >> static EnumPropertyItem language_items[] = { >> - { 0, "", 0, "Nearly done", ""}, >> + { 0, "", 0, N_("Nearly done"), ""}, >> { 0, "DEFAULT", 0, "Default (Default)", ""}, >> { 1, "ENGLISH", 0, "English (English)", "en_US"}, >> { 8, "FRENCH", 0, "French (Français)", "fr_FR"}, >> @@ -2869,7 +2870,7 @@ >> {13, "SIMPLIFIED_CHINESE", 0, "Simplified Chinese (简体中文)", >> "zh_CN"}, >> { 9, "SPANISH", 0, "Spanish (Español)", "es"}, >> {14, "TRADITIONAL_CHINESE", 0, "Traditional Chinese (繁體中文)", >> "zh_TW"}, >> - { 0, "", 0, "In progress", ""}, >> + { 0, "", 0, N_("In progress"), ""}, >> /* using the utf8 flipped form of Arabic (العربية) */ >> {21, "ARABIC", 0, "Arabic (ﺔﻴﺑﺮﻌﻟﺍ)", "ar_EG"}, >> {22, "BULGARIAN", 0, "Bulgarian (Български)", "bg_BG"}, >> >> _______________________________________________ >> Bf-blender-cvs mailing list >> [email protected] >> http://lists.blender.org/mailman/listinfo/bf-blender-cvs > _______________________________________________ > Bf-committers mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-committers _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
