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/blenkernel/intern
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/blenkernel/intern')
-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
18 files changed, 133 insertions, 101 deletions
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;
}