diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-03-20 22:42:09 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-03-20 22:42:09 +0400 |
commit | 885441e75804a92d4c2270fd006f3e71fc460d7b (patch) | |
tree | 7d3e89d07af080a2146eb747ff9da6ecd9d0e7f9 /source/blender/editors/curve | |
parent | e9b0b402cc85533c8b247b174f17f41b1892ef04 (diff) |
I18n users request: add the ability to use a translated name for newly added/created objects or other datablocks.
This simply adds a third "translation type" (in addition to iface and tip), "new data", with relevant user settings flag and helper funcs/macros (and py api).
Currently implemented name translation when adding new objects, as well as modifiers and constraints, will add the others (cd layers, scenes, perhaps nodes [though I think they do not need this], etc.) later.
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 5c8a755b391..8bd1830a289 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 "BezierCurve"; - case CU_PRIM_CIRCLE: return "BezierCircle"; - case CU_PRIM_PATH: return "CurvePath"; + case CU_PRIM_CURVE: return DATA_("BezierCurve"); + case CU_PRIM_CIRCLE: return DATA_("BezierCircle"); + case CU_PRIM_PATH: return DATA_("CurvePath"); default: - return "Curve"; + return DATA_("Curve"); } } else { switch (stype) { - case CU_PRIM_CURVE: return "NurbsCurve"; - case CU_PRIM_CIRCLE: return "NurbsCircle"; - case CU_PRIM_PATH: return "NurbsPath"; + case CU_PRIM_CURVE: return DATA_("NurbsCurve"); + case CU_PRIM_CIRCLE: return DATA_("NurbsCircle"); + case CU_PRIM_PATH: return DATA_("NurbsPath"); default: - return "Curve"; + return DATA_("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 "SurfCurve"; - case CU_PRIM_CIRCLE: return "SurfCircle"; - case CU_PRIM_PATCH: return "SurfPatch"; - case CU_PRIM_SPHERE: return "SurfSphere"; - case CU_PRIM_DONUT: return "SurfTorus"; + 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"); default: - return "Surface"; + return DATA_("Surface"); } } |