More new data names translation (most cases should be covered now).
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 25 Mar 2013 08:29:06 +0000 (08:29 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 25 Mar 2013 08:29:06 +0000 (08:29 +0000)
Also done a few cleanup here and there...

44 files changed:
source/blender/blenfont/BLF_translation.h
source/blender/blenkernel/BKE_library.h
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/deform.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/fcurve.c
source/blender/blenkernel/intern/gpencil.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/mask.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/nla.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/seqmodifier.c
source/blender/blenkernel/intern/tracking.c
source/blender/collada/AnimationImporter.cpp
source/blender/collada/CMakeLists.txt
source/blender/collada/SConscript
source/blender/editors/armature/armature_naming.c
source/blender/editors/armature/pose_lib.c
source/blender/editors/curve/editcurve.c
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/editors/render/render_shading.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/transform/transform_orientations.c
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_controller.c
source/blender/makesrna/intern/rna_gpencil.c
source/blender/makesrna/intern/rna_key.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_sensor.c

index f59d3409b6520da2f48577456fd94a71b3404486..f7d2a306315ddcccd9c80ec1d3b617a0b85434c3 100644 (file)
 
 #define TEXT_DOMAIN_NAME "blender"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* blf_lang.c */
 
 /* Search the path directory to the locale files, this try all
@@ -218,4 +222,8 @@ typedef struct
        {NULL, NULL, NULL}                                                                                                 \
 }
 
+#ifdef __cplusplus
+};
+#endif
+
 #endif /* __BLF_TRANSLATION_H__ */
index 816fb2d1b3585005521c7221318f50e4f537761c..944b6e9b8c0cd0984edf5aedd99f2fdc01e99a4c 100644 (file)
@@ -119,7 +119,7 @@ void recalc_all_library_objects(struct Main *main);
 void set_free_windowmanager_cb(void (*func)(struct bContext *, struct wmWindowManager *) );
 
 /* use when "" is given to new_id() */
-#define ID_FALLBACK_NAME "Untitled"
+#define ID_FALLBACK_NAME N_("Untitled")
 
 #define IS_TAGGED(_id) ((_id) && (((ID *)_id)->flag & LIB_DOIT))
 
index 509442b1d4ee39eaf8cc74f94f5172f5f1ee9cb6..fa85f6e4f86e8d214992df23b5a57b5990c9a00f 100644 (file)
 #include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 
-#include "BKE_animsys.h"
+#include "BLF_translation.h"
+
 #include "BKE_action.h"
 #include "BKE_anim.h"
+#include "BKE_animsys.h"
 #include "BKE_constraint.h"
-#include "BKE_global.h"
 #include "BKE_fcurve.h"
+#include "BKE_global.h"
+#include "BKE_idprop.h"
 #include "BKE_library.h"
 #include "BKE_main.h"
 #include "BKE_object.h"
 
-#include "BKE_idprop.h"
-
 #include "BIK_api.h"
 
 #include "RNA_access.h"
@@ -296,11 +297,11 @@ bActionGroup *action_groups_add_new(bAction *act, const char name[])
        
        /* make it selected, with default name */
        agrp->flag = AGRP_SELECTED;
-       BLI_strncpy(agrp->name, name[0] ? name : "Group", sizeof(agrp->name));
+       BLI_strncpy(agrp->name, name[0] ? name : DATA_("Group"), sizeof(agrp->name));
        
        /* add to action, and validate */
        BLI_addtail(&act->groups, agrp);
-       BLI_uniquename(&act->groups, agrp, "Group", '.', offsetof(bActionGroup, name), sizeof(agrp->name));
+       BLI_uniquename(&act->groups, agrp, DATA_("Group"), '.', offsetof(bActionGroup, name), sizeof(agrp->name));
        
        /* return the new group */
        return agrp;
@@ -825,9 +826,9 @@ void BKE_pose_add_group(Object *ob)
                return;
        
        grp = MEM_callocN(sizeof(bActionGroup), "PoseGroup");
-       BLI_strncpy(grp->name, "Group", sizeof(grp->name));
+       BLI_strncpy(grp->name, DATA_("Group"), sizeof(grp->name));
        BLI_addtail(&pose->agroups, grp);
-       BLI_uniquename(&pose->agroups, grp, "Group", '.', offsetof(bActionGroup, name), sizeof(grp->name));
+       BLI_uniquename(&pose->agroups, grp, DATA_("Group"), '.', offsetof(bActionGroup, name), sizeof(grp->name));
        
        pose->active_group = BLI_countlist(&pose->agroups);
 }
index d9089a58f0359f6e2745ebf3283c0941367a1f1d..2c7339122f4bd00389f6655090c783d1af9eebf4 100644 (file)
@@ -42,6 +42,8 @@
 #include "BLI_dynstr.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "DNA_anim_types.h"
 #include "DNA_lamp_types.h"
 #include "DNA_material_types.h"
@@ -973,8 +975,8 @@ KeyingSet *BKE_keyingset_add(ListBase *list, const char idname[], const char nam
        /* allocate new KeyingSet */
        ks = MEM_callocN(sizeof(KeyingSet), "KeyingSet");
 
-       BLI_strncpy(ks->idname, (idname) ? idname : (name) ? name     : "KeyingSet",  sizeof(ks->idname));
-       BLI_strncpy(ks->name,   (name) ? name     : (idname) ? idname : "Keying Set", sizeof(ks->name));
+       BLI_strncpy(ks->idname, (idname) ? idname : (name) ? name     : DATA_("KeyingSet"),  sizeof(ks->idname));
+       BLI_strncpy(ks->name,   (name) ? name     : (idname) ? idname : DATA_("Keying Set"), sizeof(ks->name));
 
        ks->flag = flag;
        ks->keyingflag = keyingflag;
@@ -983,10 +985,10 @@ KeyingSet *BKE_keyingset_add(ListBase *list, const char idname[], const char nam
        BLI_addtail(list, ks);
        
        /* Make sure KeyingSet has a unique idname */
-       BLI_uniquename(list, ks, "KeyingSet", '.', offsetof(KeyingSet, idname), sizeof(ks->idname));
+       BLI_uniquename(list, ks, DATA_("KeyingSet"), '.', offsetof(KeyingSet, idname), sizeof(ks->idname));
        
        /* Make sure KeyingSet has a unique label (this helps with identification) */
-       BLI_uniquename(list, ks, "Keying Set", '.', offsetof(KeyingSet, name), sizeof(ks->name));
+       BLI_uniquename(list, ks, DATA_("Keying Set"), '.', offsetof(KeyingSet, name), sizeof(ks->name));
        
        /* return new KeyingSet for further editing */
        return ks;
index dc47ff4086348b87ac4b2dd2afb5fc1f84d0e55a..4d9f0fc769cc1200220fe228cf4886dfdfae4eb2 100644 (file)
 /* Find the first available, non-duplicate name for a given constraint */
 void BKE_unique_constraint_name(bConstraint *con, ListBase *list)
 {
-       BLI_uniquename(list, con, "Const", '.', offsetof(bConstraint, name), sizeof(con->name));
+       BLI_uniquename(list, con, DATA_("Const"), '.', offsetof(bConstraint, name), sizeof(con->name));
 }
 
 /* ----------------- Evaluation Loop Preparation --------------- */
index 1f9c067e4a6cafd51f8d41b273b9a06fc02b27a3..74ad1ab4c0b7ad70e073e3cb34e6e0f1336e5d6f 100644 (file)
@@ -51,6 +51,8 @@
 #include "BLI_mempool.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_customdata.h"
 #include "BKE_customdata_file.h"
 #include "BKE_global.h"
@@ -1051,11 +1053,11 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
        /* 4: CD_MFACE */
        {sizeof(MFace), "MFace", 1, NULL, NULL, NULL, NULL, NULL, NULL},
        /* 5: CD_MTFACE */
-       {sizeof(MTFace), "MTFace", 1, "UVMap", layerCopy_tface, NULL,
+       {sizeof(MTFace), "MTFace", 1, N_("UVMap"), layerCopy_tface, NULL,
         layerInterp_tface, layerSwap_tface, layerDefault_tface},
        /* 6: CD_MCOL */
        /* 4 MCol structs per face */
-       {sizeof(MCol) * 4, "MCol", 4, "Col", NULL, NULL, layerInterp_mcol,
+       {sizeof(MCol) * 4, "MCol", 4, N_("Col"), NULL, NULL, layerInterp_mcol,
         layerSwap_mcol, layerDefault_mcol},
        /* 7: CD_ORIGINDEX */
        {sizeof(int), "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
@@ -1065,25 +1067,25 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
        /* 9: CD_POLYINDEX (deprecated) */
        {sizeof(int), "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
        /* 10: CD_PROP_FLT */
-       {sizeof(MFloatProperty), "MFloatProperty", 1, "Float", layerCopy_propFloat, NULL, NULL, NULL},
+       {sizeof(MFloatProperty), "MFloatProperty", 1, N_("Float"), layerCopy_propFloat, NULL, NULL, NULL},
        /* 11: CD_PROP_INT */
-       {sizeof(MIntProperty), "MIntProperty", 1, "Int", layerCopy_propInt, NULL, NULL, NULL},
+       {sizeof(MIntProperty), "MIntProperty", 1, N_("Int"), layerCopy_propInt, NULL, NULL, NULL},
        /* 12: CD_PROP_STR */
-       {sizeof(MStringProperty), "MStringProperty", 1, "String", layerCopy_propString, NULL, NULL, NULL},
+       {sizeof(MStringProperty), "MStringProperty", 1, N_("String"), layerCopy_propString, NULL, NULL, NULL},
        /* 13: CD_ORIGSPACE */
-       {sizeof(OrigSpaceFace), "OrigSpaceFace", 1, "UVMap", layerCopy_origspace_face, NULL,
+       {sizeof(OrigSpaceFace), "OrigSpaceFace", 1, N_("UVMap"), layerCopy_origspace_face, NULL,
         layerInterp_origspace_face, layerSwap_origspace_face, layerDefault_origspace_face},
        /* 14: CD_ORCO */
        {sizeof(float) * 3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
        /* 15: CD_MTEXPOLY */
        /* note, when we expose the UV Map / TexFace split to the user, change this back to face Texture */
-       {sizeof(MTexPoly), "MTexPoly", 1, "UVMap" /* "Face Texture" */, NULL, NULL, NULL, NULL, NULL},
+       {sizeof(MTexPoly), "MTexPoly", 1, N_("UVMap") /* "Face Texture" */, NULL, NULL, NULL, NULL, NULL},
        /* 16: CD_MLOOPUV */
-       {sizeof(MLoopUV), "MLoopUV", 1, "UV coord", NULL, NULL, layerInterp_mloopuv, NULL, NULL,
+       {sizeof(MLoopUV), "MLoopUV", 1, N_("UV coord"), NULL, NULL, layerInterp_mloopuv, NULL, NULL,
         layerEqual_mloopuv, layerMultiply_mloopuv, layerInitMinMax_mloopuv, 
         layerAdd_mloopuv, layerDoMinMax_mloopuv, layerCopyValue_mloopuv},
        /* 17: CD_MLOOPCOL */
-       {sizeof(MLoopCol), "MLoopCol", 1, "Col", NULL, NULL, layerInterp_mloopcol, NULL,
+       {sizeof(MLoopCol), "MLoopCol", 1, N_("Col"), NULL, NULL, layerInterp_mloopcol, NULL,
         layerDefault_mloopcol, layerEqual_mloopcol, layerMultiply_mloopcol, layerInitMinMax_mloopcol, 
         layerAdd_mloopcol, layerDoMinMax_mloopcol, layerCopyValue_mloopcol},
        /* 18: CD_TANGENT */
@@ -1094,38 +1096,38 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
         NULL, NULL, NULL, NULL, NULL, NULL, 
         layerRead_mdisps, layerWrite_mdisps, layerFilesize_mdisps},
        /* 20: CD_PREVIEW_MCOL */
-       {sizeof(MCol) * 4, "MCol", 4, "PreviewCol", NULL, NULL, layerInterp_mcol,
+       {sizeof(MCol) * 4, "MCol", 4, N_("PreviewCol"), NULL, NULL, layerInterp_mcol,
         layerSwap_mcol, layerDefault_mcol},
        /* 21: CD_ID_MCOL */
-       {sizeof(MCol) * 4, "MCol", 4, "IDCol", NULL, NULL, layerInterp_mcol,
+       {sizeof(MCol) * 4, "MCol", 4, N_("IDCol"), NULL, NULL, layerInterp_mcol,
         layerSwap_mcol, layerDefault_mcol},
        /* 22: CD_TEXTURE_MCOL */
-       {sizeof(MCol) * 4, "MCol", 4, "TexturedCol", NULL, NULL, layerInterp_mcol,
+       {sizeof(MCol) * 4, "MCol", 4, N_("TexturedCol"), NULL, NULL, layerInterp_mcol,
         layerSwap_mcol, layerDefault_mcol},
        /* 23: CD_CLOTH_ORCO */
        {sizeof(float) * 3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
        /* 24: CD_RECAST */
-       {sizeof(MRecast), "MRecast", 1, "Recast", NULL, NULL, NULL, NULL},
+       {sizeof(MRecast), "MRecast", 1, N_("Recast"), NULL, NULL, NULL, NULL},
 
 /* BMESH ONLY */
        /* 25: CD_MPOLY */
-       {sizeof(MPoly), "MPoly", 1, "NGon Face", NULL, NULL, NULL, NULL, NULL},
+       {sizeof(MPoly), "MPoly", 1, N_("NGon Face"), NULL, NULL, NULL, NULL, NULL},
        /* 26: CD_MLOOP */
-       {sizeof(MLoop), "MLoop", 1, "NGon Face-Vertex", NULL, NULL, NULL, NULL, NULL},
+       {sizeof(MLoop), "MLoop", 1, N_("NGon Face-Vertex"), NULL, NULL, NULL, NULL, NULL},
        /* 27: CD_SHAPE_KEYINDEX */
        {sizeof(int), "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
        /* 28: CD_SHAPEKEY */
-       {sizeof(float) * 3, "", 0, "ShapeKey", NULL, NULL, layerInterp_shapekey},
+       {sizeof(float) * 3, "", 0, N_("ShapeKey"), NULL, NULL, layerInterp_shapekey},
        /* 29: CD_BWEIGHT */
-       {sizeof(float), "", 0, "BevelWeight", NULL, NULL, layerInterp_bweight},
+       {sizeof(float), "", 0, N_("BevelWeight"), NULL, NULL, layerInterp_bweight},
        /* 30: CD_CREASE */
-       {sizeof(float), "", 0, "SubSurfCrease", NULL, NULL, layerInterp_bweight},
+       {sizeof(float), "", 0, N_("SubSurfCrease"), NULL, NULL, layerInterp_bweight},
        /* 31: CD_ORIGSPACE_MLOOP */
-       {sizeof(OrigSpaceLoop), "OrigSpaceLoop", 1, "OS Loop", NULL, NULL, layerInterp_mloop_origspace, NULL, NULL,
+       {sizeof(OrigSpaceLoop), "OrigSpaceLoop", 1, N_("OS Loop"), NULL, NULL, layerInterp_mloop_origspace, NULL, NULL,
         layerEqual_mloop_origspace, layerMultiply_mloop_origspace, layerInitMinMax_mloop_origspace,
         layerAdd_mloop_origspace, layerDoMinMax_mloop_origspace, layerCopyValue_mloop_origspace},
        /* 32: CD_PREVIEW_MLOOPCOL */
-       {sizeof(MLoopCol), "MLoopCol", 1, "PreviewLoopCol", NULL, NULL, layerInterp_mloopcol, NULL,
+       {sizeof(MLoopCol), "MLoopCol", 1, N_("PreviewLoopCol"), NULL, NULL, layerInterp_mloopcol, NULL,
         layerDefault_mloopcol, layerEqual_mloopcol, layerMultiply_mloopcol, layerInitMinMax_mloopcol,
         layerAdd_mloopcol, layerDoMinMax_mloopcol, layerCopyValue_mloopcol},
        /* 33: CD_BM_ELEM_PYPTR */
@@ -1221,8 +1223,8 @@ void customData_mask_layers__print(CustomDataMask mask)
 /********************* CustomData functions *********************/
 static void customData_update_offsets(CustomData *data);
 
-static CustomDataLayer *customData_add_layer__internal(CustomData *data,
-                                                       int type, int alloctype, void *layerdata, int totelem, const char *name);
+static CustomDataLayer *customData_add_layer__internal(CustomData *data, int type, int alloctype, void *layerdata,
+                                                       int totelem, const char *name);
 
 void CustomData_update_typemap(CustomData *data)
 {
@@ -1592,8 +1594,8 @@ static int customData_resize(CustomData *data, int amount)
        return 1;
 }
 
-static CustomDataLayer *customData_add_layer__internal(CustomData *data,
-                                                       int type, int alloctype, void *layerdata, int totelem, const char *name)
+static CustomDataLayer *customData_add_layer__internal(CustomData *data, int type, int alloctype, void *layerdata,
+                                                       int totelem, const char *name)
 {
        const LayerTypeInfo *typeInfo = layerType_getInfo(type);
        int size = typeInfo->size * totelem, flag = 0, index = data->totlayer;
@@ -1649,7 +1651,7 @@ static CustomDataLayer *customData_add_layer__internal(CustomData *data,
        data->layers[index].flag = flag;
        data->layers[index].data = newlayerdata;
 
-       if (name || (name = typeInfo->defaultname)) {
+       if (name || (name = DATA_(typeInfo->defaultname))) {
                BLI_strncpy(data->layers[index].name, name, sizeof(data->layers[index].name));
                CustomData_set_layer_unique_name(data, index);
        }
@@ -2909,8 +2911,9 @@ void CustomData_set_layer_unique_name(CustomData *data, int index)
 
        if (!typeInfo->defaultname)
                return;
-       
-       BLI_uniquename_cb(customdata_unique_check, &data_arg, typeInfo->defaultname, '.', nlayer->name, sizeof(nlayer->name));
+
+       BLI_uniquename_cb(customdata_unique_check, &data_arg, DATA_(typeInfo->defaultname), '.', nlayer->name,
+                         sizeof(nlayer->name));
 }
 
 void CustomData_validate_layer_name(const CustomData *data, int type, const char *name, char *outname)
index 7543892f2e342947f63ced9c7d8d1f8501e9a2c4..ed665d44431f2fc2dc92156219676b43cbfe523e 100644 (file)
@@ -47,6 +47,8 @@
 #include "BLI_string.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_deform.h"  /* own include */
 
 void defgroup_copy_list(ListBase *outbase, ListBase *inbase)
@@ -459,7 +461,7 @@ void defgroup_unique_name(bDeformGroup *dg, Object *ob)
        data.ob = ob;
        data.dg = dg;
 
-       BLI_uniquename_cb(defgroup_unique_check, &data, "Group", '.', dg->name, sizeof(dg->name));
+       BLI_uniquename_cb(defgroup_unique_check, &data, DATA_("Group"), '.', dg->name, sizeof(dg->name));
 }
 
 static int is_char_sep(const char c)
index 5dfaba2ea93af74ef34b981ecc1bb4308c3f764e..812c0cf674bf7d6290ae54fc22797df8b5e70f91 100644 (file)
@@ -1024,7 +1024,8 @@ void dynamicPaint_Modifier_free(struct DynamicPaintModifierData *pmd)
 DynamicPaintSurface *dynamicPaint_createNewSurface(DynamicPaintCanvasSettings *canvas, Scene *scene)
 {
        DynamicPaintSurface *surface = MEM_callocN(sizeof(DynamicPaintSurface), "DynamicPaintSurface");
-       if (!surface) return NULL;
+       if (!surface)
+               return NULL;
 
        surface->canvas = canvas;
        surface->format = MOD_DPAINT_SURFACE_F_VERTEX;
@@ -1080,7 +1081,8 @@ DynamicPaintSurface *dynamicPaint_createNewSurface(DynamicPaintCanvasSettings *c
 
        modifier_path_init(surface->image_output_path, sizeof(surface->image_output_path), "cache_dynamicpaint");
 
-       dynamicPaintSurface_setUniqueName(surface, "Surface");
+       /* Using ID_BRUSH i18n context, as we have no physics/dpaint one for now... */
+       dynamicPaintSurface_setUniqueName(surface, CTX_DATA_(BLF_I18NCONTEXT_ID_BRUSH, "Surface"));
 
        surface->effector_weights = BKE_add_effector_weights(NULL);
 
index f63eb9f87e3da1987a2e4b4b0058dd115c520c35..3141d52e22a5e3233bb19564fca7a74ea7dbc32d 100644 (file)
@@ -47,6 +47,8 @@
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_fcurve.h"
 #include "BKE_animsys.h"
 #include "BKE_action.h"
@@ -1557,8 +1559,9 @@ DriverVar *driver_add_new_variable(ChannelDriver *driver)
        BLI_addtail(&driver->variables, dvar);
        
        /* give the variable a 'unique' name */
-       strcpy(dvar->name, "var");
-       BLI_uniquename(&driver->variables, dvar, "var", '_', offsetof(DriverVar, name), sizeof(dvar->name));
+       strcpy(dvar->name, CTX_DATA_(BLF_I18NCONTEXT_ID_ACTION, "var"));
+       BLI_uniquename(&driver->variables, dvar, CTX_DATA_(BLF_I18NCONTEXT_ID_ACTION, "var"), '_',
+                      offsetof(DriverVar, name), sizeof(dvar->name));
        
        /* set the default type to 'single prop' */
        driver_change_variable_type(dvar, DVAR_TYPE_SINGLE_PROP);
index 755030bd208e2176580fe559d14429778a8b7ac1..31dd79e762385959dd7cca9fe1ed51c7b3fb0f52 100644 (file)
@@ -39,6 +39,8 @@
 #include "BLI_blenlib.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "DNA_gpencil_types.h"
 
 #include "BKE_global.h"
@@ -184,7 +186,7 @@ bGPDlayer *gpencil_layer_addnew(bGPdata *gpd, const char *name, int setactive)
        
        /* auto-name */
        BLI_strncpy(gpl->info, name, sizeof(gpl->info));
-       BLI_uniquename(&gpd->layers, gpl, "GP_Layer", '.', offsetof(bGPDlayer, info), sizeof(gpl->info));
+       BLI_uniquename(&gpd->layers, gpl, DATA_("GP_Layer"), '.', offsetof(bGPDlayer, info), sizeof(gpl->info));
        
        /* make this one the active one */
        if (setactive)
index c5364744b2dba1568415842b8530fa010c6e846c..10226ade786c12d7e82cf52836d115721e2d56f5 100644 (file)
@@ -65,6 +65,7 @@
 #include "BLI_dynstr.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
 
 #include "BKE_ipo.h"
 #include "BKE_animsys.h"
@@ -1117,7 +1118,8 @@ static void fcurve_add_to_list(ListBase *groups, ListBase *list, FCurve *fcu, ch
                        BLI_strncpy(agrp->name, grpname, sizeof(agrp->name));
 
                        BLI_addtail(&tmp_act.groups, agrp);
-                       BLI_uniquename(&tmp_act.groups, agrp, "Group", '.', offsetof(bActionGroup, name), sizeof(agrp->name));
+                       BLI_uniquename(&tmp_act.groups, agrp, DATA_("Group"), '.', offsetof(bActionGroup, name),
+                                      sizeof(agrp->name));
                }
                
                /* add F-Curve to group */
index d123de224e91291d719d1d2a15a68050b0667482..864c5ef3f923e459c7a2c49f6c189e23df126bdf 100644 (file)
@@ -40,6 +40,8 @@
 #include "BLI_math_vector.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "DNA_anim_types.h"
 #include "DNA_key_types.h"
 #include "DNA_lattice_types.h"
@@ -1441,11 +1443,13 @@ KeyBlock *BKE_keyblock_add(Key *key, const char *name)
                BLI_strncpy(kb->name, name, sizeof(kb->name));
        }
        else {
-               if (tot == 1) BLI_strncpy(kb->name, "Basis", sizeof(kb->name));
-               else BLI_snprintf(kb->name, sizeof(kb->name), "Key %d", tot - 1);
+               if (tot == 1)
+                       BLI_strncpy(kb->name, DATA_("Basis"), sizeof(kb->name));
+               else
+                       BLI_snprintf(kb->name, sizeof(kb->name), DATA_("Key %d"), tot - 1);
        }
 
-       BLI_uniquename(&key->block, kb, "Key", '.', offsetof(KeyBlock, name), sizeof(kb->name));
+       BLI_uniquename(&key->block, kb, DATA_("Key"), '.', offsetof(KeyBlock, name), sizeof(kb->name));
 
        kb->uid = key->uidgen++;
 
index 4038dd2d1656d1ba9b6740812bbe48e167d73317..3f287a7c9cc181ce2f5550dc09d822f5ac910c54 100644 (file)
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
 #include "BLI_utildefines.h"
-#include "BKE_bpath.h"
+
+#include "BLF_translation.h"
 
 #include "BKE_action.h"
 #include "BKE_animsys.h"
 #include "BKE_armature.h"
+#include "BKE_bpath.h"
 #include "BKE_brush.h"
 #include "BKE_camera.h"
 #include "BKE_context.h"
@@ -1355,25 +1357,23 @@ bool new_id(ListBase *lb, ID *id, const char *tname)
        char name[MAX_ID_NAME - 2];
 
        /* if library, don't rename */
-       if (id->lib) return false;
+       if (id->lib)
+               return false;
 
        /* if no libdata given, look up based on ID */
-       if (lb == NULL) lb = which_libbase(G.main, GS(id->name));
+       if (lb == NULL)
+               lb = which_libbase(G.main, GS(id->name));
 
        /* if no name given, use name of current ID
         * else make a copy (tname args can be const) */
        if (tname == NULL)
                tname = id->name + 2;
 
-       strncpy(name, tname, sizeof(name) - 1);
-
-       /* if result > MAX_ID_NAME-3, strncpy don't put the final '\0' to name.
-        * easier to assign each time then to check if its needed */
-       name[sizeof(name) - 1] = 0;
+       BLI_strncpy(name, tname, sizeof(name));
 
        if (name[0] == '\0') {
                /* disallow empty names */
-               strcpy(name, ID_FALLBACK_NAME);
+               BLI_strncpy(name, DATA_(ID_FALLBACK_NAME), sizeof(name));
        }
        else {
                /* disallow non utf8 chars,
index a5241684e3a19a0042b03e9a60b0259ba94c923c..35a5ac7d94ab5ad1acfe7250d0b9b1ff3d6be1e7 100644 (file)
@@ -40,6 +40,8 @@
 #include "BLI_listbase.h"
 #include "BLI_math.h"
 
+#include "BLF_translation.h"
+
 #include "DNA_mask_types.h"
 #include "DNA_node_types.h"
 #include "DNA_screen_types.h"
@@ -187,7 +189,8 @@ void BKE_mask_layer_remove(Mask *mask, MaskLayer *masklay)
 
 void BKE_mask_layer_unique_name(Mask *mask, MaskLayer *masklay)
 {
-       BLI_uniquename(&mask->masklayers, masklay, "MaskLayer", '.', offsetof(MaskLayer, name), sizeof(masklay->name));
+       BLI_uniquename(&mask->masklayers, masklay, DATA_("MaskLayer"), '.', offsetof(MaskLayer, name),
+                      sizeof(masklay->name));
 }
 
 MaskLayer *BKE_mask_layer_copy(MaskLayer *masklay)
index 9b8101cdad4a9e43021c406e2520a80261216ad6..dda243eed5c2c610a2cd5bfe8128743f2613c82c 100644 (file)
@@ -122,8 +122,8 @@ void modifier_unique_name(ListBase *modifiers, ModifierData *md)
 {
        if (modifiers && md) {
                ModifierTypeInfo *mti = modifierType_getInfo(md->type);
-               
-               BLI_uniquename(modifiers, md, mti->name, '.', offsetof(ModifierData, name), sizeof(md->name));
+
+               BLI_uniquename(modifiers, md, DATA_(mti->name), '.', offsetof(ModifierData, name), sizeof(md->name));
        }
 }
 
index ccae1f606fc2dac44ee1758d4afff3706863f59d..72d5e73d67b52bf098a86eaf8716e80a79417507 100644 (file)
@@ -45,6 +45,8 @@
 #include "BLI_string.h"
 #include "BLI_ghash.h"
 
+#include "BLF_translation.h"
+
 #include "DNA_anim_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_sound_types.h"
@@ -264,7 +266,7 @@ NlaTrack *add_nlatrack(AnimData *adt, NlaTrack *prev)
        
        /* must have unique name, but we need to seed this */
        strcpy(nlt->name, "NlaTrack");
-       BLI_uniquename(&adt->nla_tracks, nlt, "NlaTrack", '.', offsetof(NlaTrack, name), sizeof(nlt->name));
+       BLI_uniquename(&adt->nla_tracks, nlt, DATA_("NlaTrack"), '.', offsetof(NlaTrack, name), sizeof(nlt->name));
        
        /* return the new track */
        return nlt;
@@ -1320,7 +1322,7 @@ void BKE_nlastrip_validate_name(AnimData *adt, NlaStrip *strip)
        /* if the hash-table has a match for this name, try other names... 
         *      - in an extreme case, it might not be able to find a name, but then everything else in Blender would fail too :)
         */
-       BLI_uniquename_cb(nla_editbone_name_check, (void *)gh, "NlaStrip", '.', strip->name, sizeof(strip->name));
+       BLI_uniquename_cb(nla_editbone_name_check, (void *)gh, DATA_("NlaStrip"), '.', strip->name, sizeof(strip->name));
 
        /* free the hash... */
        BLI_ghash_free(gh, NULL, NULL);
index 788b185c6eb179e5b86259fc5a19ab302a37f7c2..1c1102d91bae0fa2dbca88926bfc2365912d097f 100644 (file)
@@ -792,7 +792,7 @@ int nodeFindNode(bNodeTree *ntree, bNodeSocket *sock, bNode **nodep, int *sockin
 /* Find the first available, non-duplicate name for a given node */
 void nodeUniqueName(bNodeTree *ntree, bNode *node)
 {
-       BLI_uniquename(&ntree->nodes, node, "Node", '.', offsetof(bNode, name), sizeof(node->name));
+       BLI_uniquename(&ntree->nodes, node, DATA_("Node"), '.', offsetof(bNode, name), sizeof(node->name));
 }
 
 bNode *nodeAddNode(const struct bContext *C, bNodeTree *ntree, const char *idname)
index 131fb38e816002f3db46dc675faeff973af9bab8..0b6d641ca485dd25880bcd87708ddd73ccd8b7ab 100644 (file)
@@ -57,6 +57,8 @@
 #include "BLI_callbacks.h"
 #include "BLI_string.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_anim.h"
 #include "BKE_animsys.h"
 #include "BKE_action.h"
@@ -76,9 +78,8 @@
 #include "BKE_rigidbody.h"
 #include "BKE_scene.h"
 #include "BKE_sequencer.h"
-#include "BKE_world.h"
-
 #include "BKE_sound.h"
+#include "BKE_world.h"
 
 #include "RE_engine.h"
 
@@ -1262,11 +1263,11 @@ SceneRenderLayer *BKE_scene_add_render_layer(Scene *sce, const char *name)
        SceneRenderLayer *srl;
 
        if (!name)
-               name = "RenderLayer";
+               name = DATA_("RenderLayer");
 
        srl = MEM_callocN(sizeof(SceneRenderLayer), "new render layer");
        BLI_strncpy(srl->name, name, sizeof(srl->name));
-       BLI_uniquename(&sce->r.layers, srl, "RenderLayer", '.', offsetof(SceneRenderLayer, name), sizeof(srl->name));
+       BLI_uniquename(&sce->r.layers, srl, DATA_("RenderLayer"), '.', offsetof(SceneRenderLayer, name), sizeof(srl->name));
        BLI_addtail(&sce->r.layers, srl);
 
        /* note, this is also in render, pipeline.c, to make layer when scenedata doesnt have it */
index a64a4895e9b1edc3e24d6704c745ce0fce2256aa..595907ffb275850ba3fd768019f3148f4c77a557 100644 (file)
@@ -39,6 +39,8 @@
 #include "BLI_utildefines.h"
 #include "BLI_math.h"
 
+#include "BLF_translation.h"
+
 #include "DNA_sequence_types.h"
 
 #include "BKE_colortools.h"
@@ -162,13 +164,13 @@ static void colorBalance_apply(SequenceModifierData *smd, ImBuf *ibuf, ImBuf *ma
 }
 
 static SequenceModifierTypeInfo seqModifier_ColorBalance = {
-       "Color Balance",                   /* name */
-       "ColorBalanceModifierData",        /* struct_name */
-       sizeof(ColorBalanceModifierData),  /* struct_size */
-       colorBalance_init_data,            /* init_data */
-       NULL,                              /* free_data */
-       NULL,                              /* copy_data */
-       colorBalance_apply                 /* apply */
+       CTX_N_(BLF_I18NCONTEXT_ID_SEQUENCE, "Color Balance"),  /* name */
+       "ColorBalanceModifierData",                            /* struct_name */
+       sizeof(ColorBalanceModifierData),                      /* struct_size */
+       colorBalance_init_data,                                /* init_data */
+       NULL,                                                  /* free_data */
+       NULL,                                                  /* copy_data */
+       colorBalance_apply                                     /* apply */
 };
 
 /* **** Curves Modifier **** */
@@ -271,13 +273,13 @@ static void curves_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *m
 }
 
 static SequenceModifierTypeInfo seqModifier_Curves = {
-       "Curves",                    /* name */
-       "CurvesModifierData",        /* struct_name */
-       sizeof(CurvesModifierData),  /* struct_size */
-       curves_init_data,            /* init_data */
-       curves_free_data,            /* free_data */
-       curves_copy_data,            /* copy_data */
-       curves_apply                 /* apply */
+       CTX_N_(BLF_I18NCONTEXT_ID_SEQUENCE, "Curves"),   /* name */
+       "CurvesModifierData",                            /* struct_name */
+       sizeof(CurvesModifierData),                      /* struct_size */
+       curves_init_data,                                /* init_data */
+       curves_free_data,                                /* free_data */
+       curves_copy_data,                                /* copy_data */
+       curves_apply                                     /* apply */
 };
 
 /* **** Hue Correct Modifier **** */
@@ -379,13 +381,13 @@ static void hue_correct_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImB
 }
 
 static SequenceModifierTypeInfo seqModifier_HueCorrect = {
-       "Hue Correct",                    /* name */
-       "HueCorrectModifierData",         /* struct_name */
-       sizeof(HueCorrectModifierData),   /* struct_size */
-       hue_correct_init_data,            /* init_data */
-       hue_correct_free_data,            /* free_data */
-       hue_correct_copy_data,            /* copy_data */
-       hue_correct_apply                 /* apply */
+       CTX_N_(BLF_I18NCONTEXT_ID_SEQUENCE, "Hue Correct"),    /* name */
+       "HueCorrectModifierData",                              /* struct_name */
+       sizeof(HueCorrectModifierData),                        /* struct_size */
+       hue_correct_init_data,                                 /* init_data */
+       hue_correct_free_data,                                 /* free_data */
+       hue_correct_copy_data,                                 /* copy_data */
+       hue_correct_apply                                      /* apply */
 };
 
 /* **** Bright/Contrast Modifier **** */
@@ -476,13 +478,13 @@ static void brightcontrast_apply(struct SequenceModifierData *smd, ImBuf *ibuf,
 }
 
 static SequenceModifierTypeInfo seqModifier_BrightContrast = {
-       "Bright/Contrast",                   /* name */
-       "BrightContrastModifierData",        /* struct_name */
-       sizeof(BrightContrastModifierData),  /* struct_size */
-       NULL,                                /* init_data */
-       NULL,                                /* free_data */
-       NULL,                                /* copy_data */
-       brightcontrast_apply                 /* apply */
+       CTX_N_(BLF_I18NCONTEXT_ID_SEQUENCE, "Bright/Contrast"),   /* name */
+       "BrightContrastModifierData",                             /* struct_name */
+       sizeof(BrightContrastModifierData),                       /* struct_size */
+       NULL,                                                     /* init_data */
+       NULL,                                                     /* free_data */
+       NULL,                                                     /* copy_data */
+       brightcontrast_apply                                      /* apply */
 };
 
 /*********************** Modifier functions *************************/
@@ -572,7 +574,8 @@ void BKE_sequence_modifier_unique_name(Sequence *seq, SequenceModifierData *smd)
 {
        SequenceModifierTypeInfo *smti = BKE_sequence_modifier_type_info_get(smd->type);
 
-       BLI_uniquename(&seq->modifiers, smd, smti->name, '.', offsetof(SequenceModifierData, name), sizeof(smd->name));
+       BLI_uniquename(&seq->modifiers, smd, CTX_DATA_(BLF_I18NCONTEXT_ID_SEQUENCE, smti->name), '.',
+                      offsetof(SequenceModifierData, name), sizeof(smd->name));
 }
 
 SequenceModifierData *BKE_sequence_modifier_find_by_name(Sequence *seq, char *name)
index df10d1374bb0c7c7b7f00cddaabb2a621affee51..fe53f073ea6b95aa0e4d34aeda7a47812975290e 100644 (file)
@@ -535,7 +535,8 @@ MovieTrackingTrack *BKE_tracking_track_add(MovieTracking *tracking, ListBase *tr
 
 void BKE_tracking_track_unique_name(ListBase *tracksbase, MovieTrackingTrack *track)
 {
-       BLI_uniquename(tracksbase, track, "Track", '.', offsetof(MovieTrackingTrack, name), sizeof(track->name));
+       BLI_uniquename(tracksbase, track, CTX_DATA_(BLF_I18NCONTEXT_ID_MOVIECLIP, "Track"), '.',
+                      offsetof(MovieTrackingTrack, name), sizeof(track->name));
 }
 
 void BKE_tracking_track_free(MovieTrackingTrack *track)
@@ -1234,7 +1235,7 @@ int BKE_tracking_object_delete(MovieTracking *tracking, MovieTrackingObject *obj
 
 void BKE_tracking_object_unique_name(MovieTracking *tracking, MovieTrackingObject *object)
 {
-       BLI_uniquename(&tracking->objects, object, "Object", '.',
+       BLI_uniquename(&tracking->objects, object, DATA_("Object"), '.',
                       offsetof(MovieTrackingObject, name), sizeof(object->name));
 }
 
@@ -2095,7 +2096,8 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking)
                track->next = track->prev = NULL;
                BLI_addtail(&new_tracks, track);
 
-               BLI_uniquename(&new_tracks, track, "Track", '.', offsetof(MovieTrackingTrack, name), sizeof(track->name));
+               BLI_uniquename(&new_tracks, track, CTX_DATA_(BLF_I18NCONTEXT_ID_MOVIECLIP, "Track"), '.',
+                              offsetof(MovieTrackingTrack, name), sizeof(track->name));
 
                track = next;
        }
index 6018807183285c223148514a45a22340397449d4..e36a987357401865c12232b5f78a868de7a051e9 100644 (file)
@@ -38,6 +38,8 @@
 #include "BLI_path_util.h"
 #include "BLI_string.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_action.h"
 #include "BKE_armature.h"
 #include "BKE_fcurve.h"
@@ -217,7 +219,8 @@ void AnimationImporter::add_fcurves_to_object(Object *ob, std::vector<FCurve *>&
                                        BLI_strncpy(grp->name, bone_name, sizeof(grp->name));
                                        
                                        BLI_addtail(&act->groups, grp);
-                                       BLI_uniquename(&act->groups, grp, "Group", '.', offsetof(bActionGroup, name), 64);
+                                       BLI_uniquename(&act->groups, grp, CTX_DATA_(BLF_I18NCONTEXT_ID_ACTION, "Group"), '.',
+                                                      offsetof(bActionGroup, name), 64);
                                }
                                
                                /* add F-Curve to group */
@@ -1968,14 +1971,15 @@ void AnimationImporter::add_bone_fcurve(Object *ob, COLLADAFW::Node *node, FCurv
        if (grp == NULL) {
                /* Add a new group, and make it active */
                grp = (bActionGroup *)MEM_callocN(sizeof(bActionGroup), "bActionGroup");
-                                       
+
                grp->flag = AGRP_SELECTED;
                BLI_strncpy(grp->name, bone_name, sizeof(grp->name));
-                                       
+
                BLI_addtail(&act->groups, grp);
-               BLI_uniquename(&act->groups, grp, "Group", '.', offsetof(bActionGroup, name), 64);
+               BLI_uniquename(&act->groups, grp, CTX_DATA_(BLF_I18NCONTEXT_ID_ACTION, "Group"), '.',
+                              offsetof(bActionGroup, name), 64);
        }
-                               
+
        /* add F-Curve to group */
        action_groups_add_channel(act, grp, fcu);
 }
index 8747d2995f2308debdbc268281da0b5b604290e0..8b021f75f287a3b2a8759ea97356afc1441bb155 100644 (file)
@@ -29,6 +29,7 @@ set(INC
        .
        ../blenkernel
        ../blenlib
+       ../blenfont
        ../blenloader
        ../editors/include
        ../makesdna
@@ -107,6 +108,10 @@ if(WITH_BUILDINFO)
        add_definitions(-DWITH_BUILDINFO)
 endif()
 
+if(WITH_INTERNATIONAL)
+       add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
 if(CMAKE_COMPILER_IS_GNUCXX)
        # COLLADAFWArray.h gives error with gcc 4.5
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
index 4da99a21517d62a0fde98dbd4b9835e53eb65a87..e1ab774ffbea18e9558ee41212e92eae297dc6f7 100644 (file)
@@ -32,12 +32,42 @@ defs = []
 
 # TODO sanitize inc path building
 # relative paths to include dirs, space-separated, string
+incs = [
+    '../ikplugin',
+    '#/intern/iksolver/extern',
+    '../blenlib',
+    '../blenfont',
+    '../blenkernel',
+    '../windowmanager',
+    '../blenloader',
+    '../makesdna',
+    '../makesrna',
+    '../editors/include',
+    '../imbuf',
+    '../bmesh',
+    '#/intern/guardedalloc',
+]
 if  env['OURPLATFORM']=='darwin':
-    incs = '../ikplugin ../../../intern/iksolver/extern ../blenlib ../blenkernel ../windowmanager ../blenloader ../makesdna ../makesrna ../editors/include ../imbuf ../bmesh ../../../intern/guardedalloc [OPENCOLLADA]/COLLADAStreamWriter [OPENCOLLADA]/COLLADABaseUtils [OPENCOLLADA]/COLLADAFramework [OPENCOLLADA]/COLLADASaxFrameworkLoader [OPENCOLLADA]/GeneratedSaxParser '.replace('[OPENCOLLADA]', env['BF_OPENCOLLADA_INC'])
+    incs += [
+        env['BF_OPENCOLLADA_INC'] + '/COLLADAStreamWriter',
+        env['BF_OPENCOLLADA_INC'] + '/COLLADABaseUtils',
+        env['BF_OPENCOLLADA_INC'] + '/COLLADAFramework',
+        env['BF_OPENCOLLADA_INC'] + '/COLLADASaxFrameworkLoader',
+        env['BF_OPENCOLLADA_INC'] + '/GeneratedSaxParser',
+    ]
 else:
-    incs = '../ikplugin ../../../intern/iksolver/extern ../blenlib ../blenkernel ../windowmanager ../makesdna ../blenloader ../makesrna ../editors/include ../imbuf ../bmesh ../../../intern/guardedalloc [OPENCOLLADA]/COLLADAStreamWriter/include [OPENCOLLADA]/COLLADABaseUtils/include [OPENCOLLADA]/COLLADAFramework/include [OPENCOLLADA]/COLLADASaxFrameworkLoader/include [OPENCOLLADA]/GeneratedSaxParser/include '.replace('[OPENCOLLADA]', env['BF_OPENCOLLADA_INC'])
+    incs += [
+        env['BF_OPENCOLLADA_INC'] + '/COLLADAStreamWriter/include',
+        env['BF_OPENCOLLADA_INC'] + '/COLLADABaseUtils/include',
+        env['BF_OPENCOLLADA_INC'] + '/COLLADAFramework/include',
+        env['BF_OPENCOLLADA_INC'] + '/COLLADASaxFrameworkLoader/include',
+        env['BF_OPENCOLLADA_INC'] + '/GeneratedSaxParser/include',
+    ]
 
 if env['BF_BUILDINFO']:
     defs.append('WITH_BUILDINFO')
 
-env.BlenderLib ('bf_collada', sources, Split(incs), defs, libtype='core', priority=200 )
+if env['WITH_BF_INTERNATIONAL']:
+    defs.append('WITH_INTERNATIONAL')
+
+env.BlenderLib ('bf_collada', sources, incs, defs, libtype='core', priority=200 )
index 561e196bf415f786fd16d3f82cf158f4e64c4476..196b8064967bf5f50debf150d8645545c42f42f9 100644 (file)
@@ -38,6 +38,8 @@
 #include "BLI_blenlib.h"
 #include "BLI_ghash.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_animsys.h"
 #include "BKE_action.h"
 #include "BKE_armature.h"
@@ -85,7 +87,7 @@ void unique_editbone_name(ListBase *edbo, char *name, EditBone *bone)
        data.lb = edbo;
        data.bone = bone;
 
-       BLI_uniquename_cb(editbone_unique_check, &data, "Bone", '.', name, sizeof(bone->name));
+       BLI_uniquename_cb(editbone_unique_check, &data, DATA_("Bone"), '.', name, sizeof(bone->name));
 }
 
 /* ************************************************** */
@@ -98,7 +100,7 @@ static bool bone_unique_check(void *arg, const char *name)
 
 static void unique_bone_name(bArmature *arm, char *name)
 {
-       BLI_uniquename_cb(bone_unique_check, (void *)arm, "Bone", '.', name, sizeof(((Bone *)NULL)->name));
+       BLI_uniquename_cb(bone_unique_check, (void *)arm, DATA_("Bone"), '.', name, sizeof(((Bone *)NULL)->name));
 }
 
 /* helper call for armature_bone_rename */
index 09c0f7e9647ffbad4e2e79ae15e551de24dc27b3..cb7a699b522a57797c342062aacabfaec96f8832 100644 (file)
@@ -462,7 +462,7 @@ static int poselib_add_exec(bContext *C, wmOperator *op)
        }
        
        /* validate name */
-       BLI_uniquename(&act->markers, marker, "Pose", '.', offsetof(TimeMarker, name), sizeof(marker->name));
+       BLI_uniquename(&act->markers, marker, DATA_("Pose"), '.', offsetof(TimeMarker, name), sizeof(marker->name));
        
        /* use Keying Set to determine what to store for the pose */
        /* FIXME: in the past, the Keying Set respected selections (LocRotScale), but the current one doesn't
@@ -666,7 +666,7 @@ static int poselib_rename_exec(bContext *C, wmOperator *op)
        
        /* copy name and validate it */
        BLI_strncpy(marker->name, newname, sizeof(marker->name));
-       BLI_uniquename(&act->markers, marker, "Pose", '.', offsetof(TimeMarker, name), sizeof(marker->name));
+       BLI_uniquename(&act->markers, marker, DATA_("Pose"), '.', offsetof(TimeMarker, name), sizeof(marker->name));
        
        /* send notifiers for this - using keyframe editing notifiers, since action 
         * may be being shown in anim editors as active action 
index f95fbd1eacb4ba121cd9a51226b7ca71f19ed300..c001c17a27941ca2b814c416c4421b2a5445b569 100644 (file)
@@ -6150,20 +6150,20 @@ static const char *get_curve_defname(int type)
 
        if ((type & CU_TYPE) == CU_BEZIER) {
                switch (stype) {
-                       case CU_PRIM_CURVE: return DATA_("BezierCurve");
-                       case CU_PRIM_CIRCLE: return DATA_("BezierCircle");
-                       case CU_PRIM_PATH: return DATA_("CurvePath");
+                       case CU_PRIM_CURVE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "BezierCurve");
+                       case CU_PRIM_CIRCLE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "BezierCircle");
+                       case CU_PRIM_PATH: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "CurvePath");
                        default:
-                               return DATA_("Curve");
+                               return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "Curve");
                }
        }
        else {
                switch (stype) {
-                       case CU_PRIM_CURVE: return DATA_("NurbsCurve");
-                       case CU_PRIM_CIRCLE: return DATA_("NurbsCircle");
-                       case CU_PRIM_PATH: return DATA_("NurbsPath");
+                       case CU_PRIM_CURVE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "NurbsCurve");
+                       case CU_PRIM_CIRCLE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "NurbsCircle");
+                       case CU_PRIM_PATH: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "NurbsPath");
                        default:
-                               return DATA_("Curve");
+                               return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "Curve");
                }
        }
 }
@@ -6173,13 +6173,13 @@ static const char *get_surf_defname(int type)
        int stype = type & CU_PRIMITIVE;
 
        switch (stype) {
-               case CU_PRIM_CURVE: return DATA_("SurfCurve");
-               case CU_PRIM_CIRCLE: return DATA_("SurfCircle");
-               case CU_PRIM_PATCH: return DATA_("SurfPatch");
-               case CU_PRIM_SPHERE: return DATA_("SurfSphere");
-               case CU_PRIM_DONUT: return DATA_("SurfTorus");
+               case CU_PRIM_CURVE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfCurve");
+               case CU_PRIM_CIRCLE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfCircle");
+               case CU_PRIM_PATCH: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfPatch");
+               case CU_PRIM_SPHERE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfSphere");
+               case CU_PRIM_DONUT: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfTorus");
                default:
-                       return DATA_("Surface");
+                       return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "Surface");
        }
 }
 
index 1daf39d33197c2f8f650398a52872d5758d2d5bf..3117f45156d104405a782c67695e671feb2e4625 100644 (file)
@@ -108,7 +108,7 @@ static int add_primitive_plane_exec(bContext *C, wmOperator *op)
        unsigned int layer;
 
        ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
-       obedit = make_prim_init(C, DATA_("Plane"), &dia, mat, &state, loc, rot, layer);
+       obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Plane"), &dia, mat, &state, loc, rot, layer);
        em = BMEdit_FromObject(obedit);
 
        if (!EDBM_op_call_and_selectf(em, op, "verts.out",
@@ -149,7 +149,7 @@ static int add_primitive_cube_exec(bContext *C, wmOperator *op)
        unsigned int layer;
 
        ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
-       obedit = make_prim_init(C, DATA_("Cube"), &dia, mat, &state, loc, rot, layer);
+       obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Cube"), &dia, mat, &state, loc, rot, layer);
        em = BMEdit_FromObject(obedit);
 
        if (!EDBM_op_call_and_selectf(em, op, "verts.out", "create_cube matrix=%m4 size=%f", mat, dia * 2.0f)) {
@@ -198,7 +198,7 @@ static int add_primitive_circle_exec(bContext *C, wmOperator *op)
        cap_tri = (cap_end == 2);
 
        ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
-       obedit = make_prim_init(C, DATA_("Circle"), &dia, mat, &state, loc, rot, layer);
+       obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Circle"), &dia, mat, &state, loc, rot, layer);
        em = BMEdit_FromObject(obedit);
 
        if (!EDBM_op_call_and_selectf(em, op, "verts.out",
@@ -253,7 +253,7 @@ static int add_primitive_cylinder_exec(bContext *C, wmOperator *op)
        cap_tri = (cap_end == 2);
 
        ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
-       obedit = make_prim_init(C, DATA_("Cylinder"), &dia, mat, &state, loc, rot, layer);
+       obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Cylinder"), &dia, mat, &state, loc, rot, layer);
        em = BMEdit_FromObject(obedit);
 
        if (!EDBM_op_call_and_selectf(
@@ -314,7 +314,7 @@ static int add_primitive_cone_exec(bContext *C, wmOperator *op)
        cap_tri = (cap_end == 2);
 
        ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
-       obedit = make_prim_init(C, DATA_("Cone"), &dia, mat, &state, loc, rot, layer);
+       obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Cone"), &dia, mat, &state, loc, rot, layer);
        em = BMEdit_FromObject(obedit);
 
        if (!EDBM_op_call_and_selectf(
@@ -371,7 +371,7 @@ static int add_primitive_grid_exec(bContext *C, wmOperator *op)
        unsigned int layer;
 
        ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
-       obedit = make_prim_init(C, DATA_("Grid"), &dia, mat, &state, loc, rot, layer);
+       obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Grid"), &dia, mat, &state, loc, rot, layer);
        em = BMEdit_FromObject(obedit);
 
        if (!EDBM_op_call_and_selectf(em, op, "verts.out",
@@ -427,7 +427,7 @@ static int add_primitive_monkey_exec(bContext *C, wmOperator *op)
        if (!view_aligned)
                rot[0] += (float)M_PI / 2.0f;
 
-       obedit = make_prim_init(C, DATA_("Suzanne"), &dia, mat, &state, loc, rot, layer);
+       obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Suzanne"), &dia, mat, &state, loc, rot, layer);
        mat[0][0] *= dia;
        mat[1][1] *= dia;
        mat[2][2] *= dia;
@@ -470,7 +470,7 @@ static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op)
        unsigned int layer;
 
        ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
-       obedit = make_prim_init(C, DATA_("Sphere"), &dia, mat, &state, loc, rot, layer);
+       obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Sphere"), &dia, mat, &state, loc, rot, layer);
        em = BMEdit_FromObject(obedit);
 
        if (!EDBM_op_call_and_selectf(em, op, "verts.out",
@@ -522,7 +522,7 @@ static int add_primitive_icosphere_exec(bContext *C, wmOperator *op)
        unsigned int layer;
 
        ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
-       obedit = make_prim_init(C, DATA_("Icosphere"), &dia, mat, &state, loc, rot, layer);
+       obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Icosphere"), &dia, mat, &state, loc, rot, layer);
        em = BMEdit_FromObject(obedit);
 
        if (!EDBM_op_call_and_selectf(
index 63582feadb7bdebe08d7f8d2a3fb3bfb2dc166d3..b33c7212f0e3553594e3bac736c8eadb118bc376 100644 (file)
@@ -452,7 +452,7 @@ static int effector_add_exec(bContext *C, wmOperator *op)
                if (!ob)
                        return OPERATOR_CANCELLED;
 
-               rename_id(&ob->id, DATA_("CurveGuide"));
+               rename_id(&ob->id, CTX_DATA_(BLF_I18NCONTEXT_ID_OBJECT, "CurveGuide"));
                ((Curve *)ob->data)->flag |= CU_PATH | CU_3D;
                ED_object_editmode_enter(C, 0);
                ED_object_new_primitive_matrix(C, ob, loc, rot, mat, FALSE);
@@ -465,7 +465,7 @@ static int effector_add_exec(bContext *C, wmOperator *op)
                if (!ob)
                        return OPERATOR_CANCELLED;
 
-               rename_id(&ob->id, DATA_("Field"));
+               rename_id(&ob->id, CTX_DATA_(BLF_I18NCONTEXT_ID_OBJECT, "Field"));
                if (ELEM(type, PFIELD_WIND, PFIELD_VORTEX))
                        ob->empty_drawtype = OB_SINGLE_ARROW;
        }
@@ -822,13 +822,13 @@ void OBJECT_OT_drop_named_image(wmOperatorType *ot)
 static const char *get_lamp_defname(int type)
 {
        switch (type) {
-               case LA_LOCAL: return DATA_("Point");
-               case LA_SUN: return DATA_("Sun");
-               case LA_SPOT: return DATA_("Spot");
-               case LA_HEMI: return DATA_("Hemi");
-               case LA_AREA: return DATA_("Area");
+               case LA_LOCAL: return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Point");
+               case LA_SUN: return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Sun");
+               case LA_SPOT: return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Spot");
+               case LA_HEMI: return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Hemi");
+               case LA_AREA: return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Area");
                default:
-                       return DATA_("Lamp");
+                       return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Lamp");
        }
 }
 
index 5abbb7124c040495687f23a76b5ce4e06003366e..bdf04dcd20d509b1b3554dfc4f476fc6e944450b 100644 (file)
@@ -52,6 +52,8 @@
 #include "BLI_blenlib.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_context.h"
 #include "BKE_customdata.h"
 #include "BKE_deform.h"
@@ -135,7 +137,7 @@ bDeformGroup *ED_vgroup_add_name(Object *ob, const char *name)
 
 bDeformGroup *ED_vgroup_add(Object *ob) 
 {
-       return ED_vgroup_add_name(ob, "Group");
+       return ED_vgroup_add_name(ob, DATA_("Group"));
 }
 
 void ED_vgroup_delete(Object *ob, bDeformGroup *defgroup) 
index aa4652af0ba62bd8a52db3c3a200e2e4866f16de..05c3af40a2900469970c68618a4a2de804c54d4c 100644 (file)
@@ -66,12 +66,14 @@ static int surface_slot_add_exec(bContext *C, wmOperator *UNUSED(op))
 
        /* Make sure we're dealing with a canvas */
        pmd = (DynamicPaintModifierData *)modifiers_findByType(cObject, eModifierType_DynamicPaint);
-       if (!pmd || !pmd->canvas) return OPERATOR_CANCELLED;
+       if (!pmd || !pmd->canvas)
+               return OPERATOR_CANCELLED;
 
        canvas = pmd->canvas;
        surface = dynamicPaint_createNewSurface(canvas, CTX_data_scene(C));
 
-       if (!surface) return OPERATOR_CANCELLED;
+       if (!surface)
+               return OPERATOR_CANCELLED;
 
        /* set preview for this surface only and set active */
        canvas->active_sur = 0;
index 54f59a82adcb0f31aeace0fa9fccabfca04b2daa..dc26bde68619e5def1271241cefb6f75f067a234 100644 (file)
@@ -46,6 +46,8 @@
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_animsys.h"
 #include "BKE_context.h"
 #include "BKE_curve.h"
@@ -376,7 +378,7 @@ static int new_material_exec(bContext *C, wmOperator *UNUSED(op))
                ma = BKE_material_copy(ma);
        }
        else {
-               ma = BKE_material_add(bmain, "Material");
+               ma = BKE_material_add(bmain, DATA_("Material"));
 
                if (BKE_scene_use_new_shading_nodes(scene)) {
                        ED_node_shader_default(C, &ma->id);
@@ -429,7 +431,7 @@ static int new_texture_exec(bContext *C, wmOperator *UNUSED(op))
        if (tex)
                tex = BKE_texture_copy(tex);
        else
-               tex = add_texture(bmain, "Texture");
+               tex = add_texture(bmain, DATA_("Texture"));
 
        /* hook into UI */
        uiIDContextProperty(C, &ptr, &prop);
index d5d5add215ce6cf92f20c384f3661ac8b44664be..68dd6c65e36f54fde06271f6d749b30bc73a9011 100644 (file)
@@ -3520,7 +3520,7 @@ static int scene_new_exec(bContext *C, wmOperator *op)
        int type = RNA_enum_get(op->ptr, "type");
 
        if (type == SCE_COPY_NEW) {
-               newscene = BKE_scene_add(bmain, "Scene");
+               newscene = BKE_scene_add(bmain, DATA_("Scene"));
        }
        else { /* different kinds of copying */
                newscene = BKE_scene_copy(scene, type);
index 26a0d0a2fa822fd01c7004bbd879973eb206d75f..c8bed8ebf11d2bdda4738a2adfc4e831c192963d 100644 (file)
@@ -506,8 +506,8 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
                                        Object *ob = (Object *)tselem->id; // id = object
                                        bActionGroup *grp = te->directdata;
                                        
-                                       BLI_uniquename(&ob->pose->agroups, grp, "Group", '.', offsetof(bActionGroup, name),
-                                                      sizeof(grp->name));
+                                       BLI_uniquename(&ob->pose->agroups, grp, CTX_DATA_(BLF_I18NCONTEXT_ID_ACTION, "Group"), '.',
+                                                      offsetof(bActionGroup, name), sizeof(grp->name));
                                        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
                                }
                                break;
index 8b21364a1cc7a8b767155e031c3a08eeec4af322..374aa84dfde1e8cfdd65b2d561004419e4479561 100644 (file)
@@ -2690,7 +2690,7 @@ void VIEW3D_OT_view_center_pick(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name = "Center View to Mouse";
-       ot->description = "Center the view to the ZDepth Position under the Mouse Cursor";
+       ot->description = "Center the view to the Z-depth position under the mouse cursor";
        ot->idname = "VIEW3D_OT_view_center_pick";
 
        /* api callbacks */
index b12c0906fa0e4dc84d71ce1840c0a25e9cdb55c8..0c1f169935aef46f0c581e4459795804851499ad 100644 (file)
@@ -96,7 +96,8 @@ static bool uniqueOrientationNameCheck(void *arg, const char *name)
 
 static void uniqueOrientationName(ListBase *lb, char *name)
 {
-       BLI_uniquename_cb(uniqueOrientationNameCheck, lb, "Space", '.', name, sizeof(((TransformOrientation *)NULL)->name));
+       BLI_uniquename_cb(uniqueOrientationNameCheck, lb, CTX_DATA_(BLF_I18NCONTEXT_ID_SCENE, "Space"), '.', name,
+                         sizeof(((TransformOrientation *)NULL)->name));
 }
 
 void BIF_createTransformOrientation(bContext *C, ReportList *reports, char *name, int use, int overwrite)
index 2c022e80ddd90f1e0416246690a753463663c99e..d258c686b992f1fe19dbd6425ef2323f02868095 100644 (file)
@@ -122,7 +122,7 @@ static void rna_Actuator_name_set(PointerRNA *ptr, const char *value)
 
        if (ptr->id.data) {
                Object *ob = (Object *)ptr->id.data;
-               BLI_uniquename(&ob->actuators, act, "Actuator", '.', offsetof(bActuator, name), sizeof(act->name));
+               BLI_uniquename(&ob->actuators, act, DATA_("Actuator"), '.', offsetof(bActuator, name), sizeof(act->name));
        }
 }
 
index 472cc6e89e6eca9adae43cb4e08ff2bf7e9f6ea0..28a2ca7cb75a4cc0034c900694ebdb7a1ea2492f 100644 (file)
@@ -31,6 +31,8 @@
 
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "RNA_define.h"
 
 #include "rna_internal.h"
@@ -88,7 +90,8 @@ static void rna_Constroller_name_set(PointerRNA *ptr, const char *value)
 
        if (ptr->id.data) {
                Object *ob = (Object *)ptr->id.data;
-               BLI_uniquename(&ob->controllers, cont, "Controller", '.', offsetof(bController, name), sizeof(cont->name));
+               BLI_uniquename(&ob->controllers, cont, DATA_("Controller"), '.', offsetof(bController, name),
+                              sizeof(cont->name));
        }
 }
 
index 7156b76bab227a4a676676d88fb5727e8dbb922f..fbf6f921d0db8e9d819256514b08e320d97c39a3 100644 (file)
@@ -33,6 +33,8 @@
 
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "RNA_access.h"
 #include "RNA_define.h"
 
@@ -110,7 +112,7 @@ static void rna_GPencilLayer_info_set(PointerRNA *ptr, const char *value)
        /* copy the new name into the name slot */
        BLI_strncpy_utf8(gpl->info, value, sizeof(gpl->info));
 
-       BLI_uniquename(&gpd->layers, gpl, "GP_Layer", '.', offsetof(bGPDlayer, info), sizeof(gpl->info));
+       BLI_uniquename(&gpd->layers, gpl, DATA_("GP_Layer"), '.', offsetof(bGPDlayer, info), sizeof(gpl->info));
 }
 
 static void rna_GPencil_stroke_point_add(bGPDstroke *stroke, int count)
index 1577019f22a03e55802b1aacf5457279d5d151e0..b84436820b8d7ba02786efe8a7ff53c7694871bf 100644 (file)
@@ -35,6 +35,8 @@
 
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "RNA_access.h"
 #include "RNA_define.h"
 
@@ -81,7 +83,8 @@ static void rna_ShapeKey_name_set(PointerRNA *ptr, const char *value)
        /* make sure the name is truly unique */
        if (ptr->id.data) {
                Key *key = rna_ShapeKey_find_key(ptr->id.data);
-               BLI_uniquename(&key->block, kb, "Key", '.', offsetof(KeyBlock, name), sizeof(kb->name));
+               BLI_uniquename(&key->block, kb, CTX_DATA_(BLF_I18NCONTEXT_ID_SHAPEKEY, "Key"), '.',
+                              offsetof(KeyBlock, name), sizeof(kb->name));
        }
        
        /* fix all the animation data which may link to this */
index fc1fe0b08de869a08b612053cd21c359735c5d89..fd87ce3a6cecb0d2d97ac38b2c2acf50f77a2ae5 100644 (file)
@@ -1287,7 +1287,7 @@ static PointerRNA rna_Mesh_vertex_color_new(struct Mesh *me, const char *name)
 static void rna_Mesh_vertex_color_remove(struct Mesh *me, ReportList *reports, CustomDataLayer *layer)
 {
        if (ED_mesh_color_remove_named(me, layer->name) == false) {
-               BKE_reportf(reports, RPT_ERROR, "vertex color '%s' not found", layer->name);
+               BKE_reportf(reports, RPT_ERROR, "Vertex color '%s' not found", layer->name);
        }
 }
 
@@ -1383,7 +1383,7 @@ static PointerRNA rna_Mesh_uv_texture_new(struct Mesh *me, const char *name)
 static void rna_Mesh_uv_texture_layers_remove(struct Mesh *me, ReportList *reports, CustomDataLayer *layer)
 {
        if (ED_mesh_uv_texture_remove_named(me, layer->name) == false) {
-               BKE_reportf(reports, RPT_ERROR, "texture layer '%s' not found", layer->name);
+               BKE_reportf(reports, RPT_ERROR, "Texture layer '%s' not found", layer->name);
        }
 }
 
index c675aa6ebc333c6f1e98b6326d846366ea3fc1f7..1ed3e673c8ed778ba9d22973b3f20085fb9eeaa1 100644 (file)
@@ -45,6 +45,8 @@
 #include "RNA_define.h"
 #include "RNA_enum_types.h"
 
+#include "BLF_translation.h"
+
 #include "rna_internal.h"
 
 #include "WM_types.h"
@@ -871,7 +873,7 @@ static void rna_ParticleSystem_name_set(PointerRNA *ptr, const char *value)
        /* copy the new name into the name slot */
        BLI_strncpy_utf8(part->name, value, sizeof(part->name));
 
-       BLI_uniquename(&ob->particlesystem, part, "ParticleSystem", '.', offsetof(ParticleSystem, name),
+       BLI_uniquename(&ob->particlesystem, part, DATA_("ParticleSystem"), '.', offsetof(ParticleSystem, name),
                       sizeof(part->name));
 }
 
index 6a1b3d4cfc59bc981c1e6c4d68b23e79ed9f746a..0a19d7b5250f2e7ba7c20a805617d9ad064dca6b 100644 (file)
@@ -41,6 +41,8 @@
 
 #include "BLI_math.h"
 
+#include "BLF_translation.h"
+
 #include "WM_types.h"
 
 
@@ -156,7 +158,8 @@ static void rna_BoneGroup_name_set(PointerRNA *ptr, const char *value)
        /* copy the new name into the name slot */
        BLI_strncpy_utf8(agrp->name, value, sizeof(agrp->name));
 
-       BLI_uniquename(&ob->pose->agroups, agrp, "Group", '.', offsetof(bActionGroup, name), sizeof(agrp->name));
+       BLI_uniquename(&ob->pose->agroups, agrp, CTX_DATA_(BLF_I18NCONTEXT_ID_ARMATURE, "Group"), '.',
+                      offsetof(bActionGroup, name), sizeof(agrp->name));
 }
 
 static IDProperty *rna_PoseBone_idprops(PointerRNA *ptr, bool create)
index 72f18d603c06e3d0dc8e7e2a86dfa1371a8012fb..297af940d2cef497c5a5f1a8f38ad9882a2286d4 100644 (file)
@@ -1113,7 +1113,7 @@ static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
        Scene *scene = (Scene *)ptr->id.data;
        SceneRenderLayer *rl = (SceneRenderLayer *)ptr->data;
        BLI_strncpy_utf8(rl->name, value, sizeof(rl->name));
-       BLI_uniquename(&scene->r.layers, rl, "RenderLayer", '.', offsetof(SceneRenderLayer, name), sizeof(rl->name));
+       BLI_uniquename(&scene->r.layers, rl, DATA_("RenderLayer"), '.', offsetof(SceneRenderLayer, name), sizeof(rl->name));
 
        if (scene->nodetree) {
                bNode *node;
index 547d0ff78c91852f712a2bc881c56b2a3dbc5db3..a482072aef5d65e618928a5fadadd11c8818e436 100644 (file)
@@ -32,6 +32,8 @@
 
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "RNA_define.h"
 #include "RNA_enum_types.h"
 #include "RNA_access.h"
@@ -113,7 +115,7 @@ static void rna_Sensor_name_set(PointerRNA *ptr, const char *value)
 
        if (ptr->id.data) {
                Object *ob = (Object *)ptr->id.data;
-               BLI_uniquename(&ob->sensors, sens, "Sensor", '.', offsetof(bSensor, name), sizeof(sens->name));
+               BLI_uniquename(&ob->sensors, sens, DATA_("Sensor"), '.', offsetof(bSensor, name), sizeof(sens->name));
        }
 }