Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2013-03-25 12:29:06 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-03-25 12:29:06 +0400
commit69265961749780e252e144d1f815c0fdda435b8a (patch)
treeafe54648b63dc0f9746d38cff81de247ca0ddf98 /source/blender
parent1b4c9e1ad40142fbf6a2d97303661a78527c134b (diff)
More new data names translation (most cases should be covered now).
Also done a few cleanup here and there...
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenfont/BLF_translation.h8
-rw-r--r--source/blender/blenkernel/BKE_library.h2
-rw-r--r--source/blender/blenkernel/intern/action.c17
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c10
-rw-r--r--source/blender/blenkernel/intern/constraint.c2
-rw-r--r--source/blender/blenkernel/intern/customdata.c57
-rw-r--r--source/blender/blenkernel/intern/deform.c4
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c6
-rw-r--r--source/blender/blenkernel/intern/fcurve.c7
-rw-r--r--source/blender/blenkernel/intern/gpencil.c4
-rw-r--r--source/blender/blenkernel/intern/ipo.c4
-rw-r--r--source/blender/blenkernel/intern/key.c10
-rw-r--r--source/blender/blenkernel/intern/library.c18
-rw-r--r--source/blender/blenkernel/intern/mask.c5
-rw-r--r--source/blender/blenkernel/intern/modifier.c4
-rw-r--r--source/blender/blenkernel/intern/nla.c6
-rw-r--r--source/blender/blenkernel/intern/node.c2
-rw-r--r--source/blender/blenkernel/intern/scene.c9
-rw-r--r--source/blender/blenkernel/intern/seqmodifier.c61
-rw-r--r--source/blender/blenkernel/intern/tracking.c8
-rw-r--r--source/blender/collada/AnimationImporter.cpp14
-rw-r--r--source/blender/collada/CMakeLists.txt5
-rw-r--r--source/blender/collada/SConscript36
-rw-r--r--source/blender/editors/armature/armature_naming.c6
-rw-r--r--source/blender/editors/armature/pose_lib.c4
-rw-r--r--source/blender/editors/curve/editcurve.c28
-rw-r--r--source/blender/editors/mesh/editmesh_add.c18
-rw-r--r--source/blender/editors/object/object_add.c16
-rw-r--r--source/blender/editors/object/object_vgroup.c4
-rw-r--r--source/blender/editors/physics/dynamicpaint_ops.c6
-rw-r--r--source/blender/editors/render/render_shading.c6
-rw-r--r--source/blender/editors/screen/screen_ops.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c2
-rw-r--r--source/blender/editors/transform/transform_orientations.c3
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c2
-rw-r--r--source/blender/makesrna/intern/rna_controller.c5
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c4
-rw-r--r--source/blender/makesrna/intern/rna_key.c5
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c4
-rw-r--r--source/blender/makesrna/intern/rna_particle.c4
-rw-r--r--source/blender/makesrna/intern/rna_pose.c5
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c4
44 files changed, 268 insertions, 165 deletions
diff --git a/source/blender/blenfont/BLF_translation.h b/source/blender/blenfont/BLF_translation.h
index f59d3409b65..f7d2a306315 100644
--- a/source/blender/blenfont/BLF_translation.h
+++ b/source/blender/blenfont/BLF_translation.h
@@ -37,6 +37,10 @@
#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__ */
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index 816fb2d1b35..944b6e9b8c0 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -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))
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 509442b1d4e..fa85f6e4f86 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -47,18 +47,19 @@
#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);
}
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index d9089a58f03..2c7339122f4 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -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;
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index dc47ff40863..4d9f0fc769c 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -100,7 +100,7 @@
/* 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 --------------- */
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 1f9c067e4a6..74ad1ab4c0b 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -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)
diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c
index 7543892f2e3..ed665d44431 100644
--- a/source/blender/blenkernel/intern/deform.c
+++ b/source/blender/blenkernel/intern/deform.c
@@ -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)
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 5dfaba2ea93..812c0cf674b 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -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);
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index f63eb9f87e3..3141d52e22a 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -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);
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 755030bd208..31dd79e7623 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -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)
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index c5364744b2d..10226ade786 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -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 */
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index d123de224e9..864c5ef3f92 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -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++;
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 4038dd2d165..3f287a7c9cc 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -71,11 +71,13 @@
#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,
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c
index a5241684e3a..35a5ac7d94a 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -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)
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 9b8101cdad4..dda243eed5c 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -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));
}
}
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index ccae1f606fc..72d5e73d67b 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -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);
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 788b185c6eb..1c1102d91ba 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -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)
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 131fb38e816..0b6d641ca48 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -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 */
diff --git a/source/blender/blenkernel/intern/seqmodifier.c b/source/blender/blenkernel/intern/seqmodifier.c
index a64a4895e9b..595907ffb27 100644
--- a/source/blender/blenkernel/intern/seqmodifier.c
+++ b/source/blender/blenkernel/intern/seqmodifier.c
@@ -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)
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index df10d1374bb..fe53f073ea6 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -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;
}
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index 60188071832..e36a9873574 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -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);
}
diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt
index 8747d2995f2..8b021f75f28 100644
--- a/source/blender/collada/CMakeLists.txt
+++ b/source/blender/collada/CMakeLists.txt
@@ -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")
diff --git a/source/blender/collada/SConscript b/source/blender/collada/SConscript
index 4da99a21517..e1ab774ffbe 100644
--- a/source/blender/collada/SConscript
+++ b/source/blender/collada/SConscript
@@ -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 )
diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c
index 561e196bf41..196b8064967 100644
--- a/source/blender/editors/armature/armature_naming.c
+++ b/source/blender/editors/armature/armature_naming.c
@@ -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 */
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c
index 09c0f7e9647..cb7a699b522 100644
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@ -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
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index f95fbd1eacb..c001c17a279 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -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");
}
}
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index 1daf39d3319..3117f45156d 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -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(
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 63582feadb7..b33c7212f0e 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -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");
}
}
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 5abbb7124c0..bdf04dcd20d 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -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)
diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c
index aa4652af0ba..05c3af40a29 100644
--- a/source/blender/editors/physics/dynamicpaint_ops.c
+++ b/source/blender/editors/physics/dynamicpaint_ops.c
@@ -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;
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 54f59a82adc..dc26bde6861 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -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);
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index d5d5add215c..68dd6c65e36 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -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);
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 26a0d0a2fa8..c8bed8ebf11 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -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;
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 8b21364a1cc..374aa84dfde 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -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 */
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index b12c0906fa0..0c1f169935a 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -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)
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 2c022e80ddd..d258c686b99 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -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));
}
}
diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c
index 472cc6e89e6..28a2ca7cb75 100644
--- a/source/blender/makesrna/intern/rna_controller.c
+++ b/source/blender/makesrna/intern/rna_controller.c
@@ -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));
}
}
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 7156b76bab2..fbf6f921d0d 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -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)
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 1577019f22a..b84436820b8 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -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 */
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index fc1fe0b08de..fd87ce3a6ce 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -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);
}
}
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index c675aa6ebc3..1ed3e673c8e 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -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));
}
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 6a1b3d4cfc5..0a19d7b5250 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -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)
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 72f18d603c0..297af940d2c 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -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;
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index 547d0ff78c9..a482072aef5 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -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));
}
}