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-02-19 19:45:56 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-02-19 19:45:56 +0400
commit04d628a5b510e3e8f0c8cf67f07af021aa3f46cf (patch)
treecb03fd82a34a13d05901fce30d2d9a0d766beb9c
parent1a620ac9c331cd9a9eb5a378a22818163fd61ab4 (diff)
Another huge bunch of new UI translations (some reported by Leon Cheung, thanks!)...
-rw-r--r--source/blender/blenkernel/intern/context.c4
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c19
-rw-r--r--source/blender/editors/interface/interface_templates.c41
-rw-r--r--source/blender/editors/mesh/editface.c4
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c15
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c10
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c25
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c7
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c26
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c40
-rw-r--r--source/blender/editors/transform/transform.c191
-rw-r--r--source/blender/editors/transform/transform_constraints.c28
-rw-r--r--source/blender/editors/transform/transform_generics.c16
-rw-r--r--source/blender/editors/transform/transform_orientations.c10
-rw-r--r--source/blender/editors/uvedit/CMakeLists.txt5
-rw-r--r--source/blender/editors/uvedit/SConscript9
-rw-r--r--source/blender/editors/uvedit/uvedit_buttons.c10
17 files changed, 251 insertions, 209 deletions
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c
index a45afa5e69a..a9e3d52f223 100644
--- a/source/blender/blenkernel/intern/context.c
+++ b/source/blender/blenkernel/intern/context.c
@@ -48,6 +48,8 @@
#include "BLI_threads.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "BKE_context.h"
#include "BKE_main.h"
#include "BKE_screen.h"
@@ -851,7 +853,7 @@ void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
const char *CTX_wm_operator_poll_msg_get(bContext *C)
{
- return C->wm.operator_poll_msg;
+ return IFACE_(C->wm.operator_poll_msg);
}
/* data context */
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 41ef4bd0b95..8cd2bd861bc 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -39,6 +39,8 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "PIL_time.h"
#include "BKE_gpencil.h"
@@ -1457,28 +1459,27 @@ static void gpencil_draw_status_indicators(tGPsdata *p)
case GP_STATUS_PAINTING:
/* only print this for paint-sessions, otherwise it gets annoying */
if (GPENCIL_SKETCH_SESSIONS_ON(p->scene))
- ED_area_headerprint(p->sa, "Grease Pencil: Drawing/erasing stroke... Release to end stroke");
+ ED_area_headerprint(p->sa, IFACE_("Grease Pencil: Drawing/erasing stroke... Release to end stroke"));
break;
case GP_STATUS_IDLING:
/* print status info */
switch (p->paintmode) {
case GP_PAINTMODE_ERASER:
- ED_area_headerprint(p->sa,
- "Grease Pencil Erase Session: Hold and drag LMB or RMB to erase |"
- " ESC/Enter to end");
+ ED_area_headerprint(p->sa, IFACE_("Grease Pencil Erase Session: Hold and drag LMB or RMB to erase |"
+ " ESC/Enter to end"));
break;
case GP_PAINTMODE_DRAW_STRAIGHT:
- ED_area_headerprint(p->sa, "Grease Pencil Line Session: Hold and drag LMB to draw | "
- "ESC/Enter to end");
+ ED_area_headerprint(p->sa, IFACE_("Grease Pencil Line Session: Hold and drag LMB to draw | "
+ "ESC/Enter to end"));
break;
case GP_PAINTMODE_DRAW:
- ED_area_headerprint(p->sa, "Grease Pencil Freehand Session: Hold and drag LMB to draw | "
- "ESC/Enter to end");
+ ED_area_headerprint(p->sa, IFACE_("Grease Pencil Freehand Session: Hold and drag LMB to draw | "
+ "ESC/Enter to end"));
break;
default: /* unhandled future cases */
- ED_area_headerprint(p->sa, "Grease Pencil Session: ESC/Enter to end");
+ ED_area_headerprint(p->sa, IFACE_("Grease Pencil Session: ESC/Enter to end"));
break;
}
break;
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 5805806a9a9..a9227158a20 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -542,8 +542,8 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
/* Due to space limit in UI - skip the "open" icon for packed data, and allow to unpack.
Only for images, sound and fonts */
if (id && BKE_pack_check(id)) {
-
- but = uiDefIconButO(block, BUT, "FILE_OT_unpack_item", WM_OP_INVOKE_REGION_WIN, ICON_PACKAGE, 0, 0, UI_UNIT_X, UI_UNIT_Y, "Packed File");
+ but = uiDefIconButO(block, BUT, "FILE_OT_unpack_item", WM_OP_INVOKE_REGION_WIN, ICON_PACKAGE, 0, 0,
+ UI_UNIT_X, UI_UNIT_Y, TIP_("Packed File, click to unpack"));
uiButGetOperatorPtrRNA(but);
RNA_string_set(but->opptr, "id_name", id->name + 2);
@@ -691,7 +691,7 @@ void uiTemplateAnyID(uiLayout *layout, PointerRNA *ptr, const char *propname, co
uiItemL(row, text, ICON_NONE);
}
else
- uiItemL(row, "ID-Block:", ICON_NONE);
+ uiItemL(row, IFACE_("ID-Block:"), ICON_NONE);
/* ID-Type Selector - just have a menu of icons */
/* FIXME: the icon-only setting doesn't work when we supply a blank name */
@@ -735,7 +735,7 @@ void uiTemplatePathBuilder(uiLayout *layout, PointerRNA *ptr, const char *propna
/************************ Modifier Template *************************/
-#define ERROR_LIBDATA_MESSAGE "Can't edit external libdata"
+#define ERROR_LIBDATA_MESSAGE IFACE_("Can't edit external libdata")
static void modifiers_setOnCage(bContext *C, void *ob_v, void *md_v)
{
@@ -835,8 +835,8 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
block = uiLayoutGetBlock(row);
/* VIRTUAL MODIFIER */
/* XXX this is not used now, since these cannot be accessed via RNA */
- BLI_snprintf(str, sizeof(str), "%s parent deform", md->name);
- uiDefBut(block, LABEL, 0, str, 0, 0, 185, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "Modifier name");
+ BLI_snprintf(str, sizeof(str), IFACE_("%s parent deform"), md->name);
+ uiDefBut(block, LABEL, 0, str, 0, 0, 185, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Modifier name"));
but = uiDefBut(block, BUT, 0, IFACE_("Make Real"), 0, 0, 80, 16, NULL, 0.0, 0.0, 0.0, 0.0,
TIP_("Convert virtual modifier to a real modifier"));
@@ -943,18 +943,22 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
if (!(ob->mode & OB_MODE_PARTICLE_EDIT) && psys->pathcache) {
if (ELEM(psys->part->ren_as, PART_DRAW_GR, PART_DRAW_OB))
- uiItemO(row, "Convert", ICON_NONE, "OBJECT_OT_duplicates_make_real");
+ uiItemO(row, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Convert"), ICON_NONE,
+ "OBJECT_OT_duplicates_make_real");
else if (psys->part->ren_as == PART_DRAW_PATH)
- uiItemO(row, "Convert", ICON_NONE, "OBJECT_OT_modifier_convert");
+ uiItemO(row, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Convert"), ICON_NONE,
+ "OBJECT_OT_modifier_convert");
}
}
else {
uiLayoutSetOperatorContext(row, WM_OP_INVOKE_DEFAULT);
- uiItemEnumO(row, "OBJECT_OT_modifier_apply", IFACE_("Apply"), 0, "apply_as", MODIFIER_APPLY_DATA);
+ uiItemEnumO(row, "OBJECT_OT_modifier_apply", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Apply"),
+ 0, "apply_as", MODIFIER_APPLY_DATA);
if (modifier_isSameTopology(md) && !modifier_isNonGeometrical(md)) {
- uiItemEnumO(row, "OBJECT_OT_modifier_apply", IFACE_("Apply as Shape Key"), 0,
- "apply_as", MODIFIER_APPLY_SHAPE);
+ uiItemEnumO(row, "OBJECT_OT_modifier_apply",
+ CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Apply as Shape Key"),
+ 0, "apply_as", MODIFIER_APPLY_SHAPE);
}
}
@@ -964,7 +968,8 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
if (!ELEM5(md->type, eModifierType_Fluidsim, eModifierType_Softbody, eModifierType_ParticleSystem,
eModifierType_Cloth, eModifierType_Smoke))
{
- uiItemO(row, IFACE_("Copy"), ICON_NONE, "OBJECT_OT_modifier_copy");
+ uiItemO(row, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Copy"), ICON_NONE,
+ "OBJECT_OT_modifier_copy");
}
}
@@ -1086,10 +1091,10 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
cti = BKE_constraint_get_typeinfo(con);
if (cti == NULL) {
/* exception for 'Null' constraint - it doesn't have constraint typeinfo! */
- BLI_strncpy(typestr, (con->type == CONSTRAINT_TYPE_NULL) ? "Null" : "Unknown", sizeof(typestr));
+ BLI_strncpy(typestr, (con->type == CONSTRAINT_TYPE_NULL) ? IFACE_("Null") : IFACE_("Unknown"), sizeof(typestr));
}
else
- BLI_strncpy(typestr, cti->name, sizeof(typestr));
+ BLI_strncpy(typestr, IFACE_(cti->name), sizeof(typestr));
/* determine whether constraint is proxy protected or not */
if (BKE_proxylocked_constraints_owner(ob, pchan))
@@ -1194,7 +1199,7 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
/* Set but-locks for protected settings (magic numbers are used here!) */
if (proxy_protected)
- uiBlockSetButLock(block, 1, "Cannot edit Proxy-Protected Constraint");
+ uiBlockSetButLock(block, 1, IFACE_("Cannot edit Proxy-Protected Constraint"));
/* Draw constraint data */
if ((con->flag & CONSTRAINT_EXPAND) == 0) {
@@ -1478,7 +1483,7 @@ static void colorband_buttons_large(uiLayout *layout, uiBlock *block, ColorBand
RNA_pointer_create(cb->ptr.id.data, &RNA_ColorRampElement, cbd, &ptr);
row = uiLayoutRow(layout, FALSE);
- uiItemR(row, &ptr, "position", 0, "Pos", ICON_NONE);
+ uiItemR(row, &ptr, "position", 0, IFACE_("Pos"), ICON_NONE);
bt = block->buttons.last;
uiButSetFunc(bt, colorband_update_cb, bt, coba);
@@ -2480,8 +2485,8 @@ void uiTemplateList(uiLayout *layout, bContext *C, const char *listtype_name, co
/* validate arguments */
/* Forbid default UI_UL_DEFAULT_CLASS_NAME list class without a custom list_id! */
if (!strcmp(UI_UL_DEFAULT_CLASS_NAME, listtype_name) && !(list_id && list_id[0])) {
- RNA_warning("template_list using default '" UI_UL_DEFAULT_CLASS_NAME
- "' UIList class must provide a custom list_id");
+ RNA_warning("template_list using default '%s' UIList class must provide a custom list_id",
+ UI_UL_DEFAULT_CLASS_NAME);
return;
}
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index 3fbfaabbc0d..7ac27e038a4 100644
--- a/source/blender/editors/mesh/editface.c
+++ b/source/blender/editors/mesh/editface.c
@@ -34,6 +34,8 @@
#include "BLI_math.h"
#include "BLI_edgehash.h"
+#include "BLF_translation.h"
+
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
@@ -429,7 +431,7 @@ void seam_mark_clear_tface(Scene *scene, short mode)
if (me == 0 || me->totpoly == 0) return;
if (mode == 0)
- mode = pupmenu("Seams %t|Mark Border Seam %x1|Clear Seam %x2");
+ mode = pupmenu(IFACE_("Seams %t|Mark Border Seam %x1|Clear Seam %x2"));
if (mode != 1 && mode != 2)
return;
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index bc7fe783e78..98fa9d10ab9 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -41,6 +41,8 @@
#include "BLI_smallhash.h"
#include "BLI_memarena.h"
+#include "BLF_translation.h"
+
#include "BKE_DerivedMesh.h"
#include "BKE_context.h"
@@ -215,12 +217,13 @@ static void knife_update_header(bContext *C, KnifeTool_OpData *kcd)
#define HEADER_LENGTH 190
char header[HEADER_LENGTH];
- BLI_snprintf(header, HEADER_LENGTH, "LMB: define cut lines, Return/Spacebar: confirm, Esc or RMB: cancel, E: new cut, Ctrl: midpoint snap (%s), "
- "Shift: ignore snap (%s), C: angle constrain (%s), Z: cut through (%s)",
- kcd->snap_midpoints ? "On" : "Off",
- kcd->ignore_edge_snapping ? "On" : "Off",
- kcd->angle_snapping ? "On" : "Off",
- kcd->cut_through ? "On" : "Off");
+ BLI_snprintf(header, HEADER_LENGTH, IFACE_("LMB: define cut lines, Return/Spacebar: confirm, Esc or RMB: cancel, "
+ "E: new cut, Ctrl: midpoint snap (%s), Shift: ignore snap (%s), "
+ "C: angle constrain (%s), Z: cut through (%s)"),
+ kcd->snap_midpoints ? IFACE_("On") : IFACE_("Off"),
+ kcd->ignore_edge_snapping ? IFACE_("On") : IFACE_("Off"),
+ kcd->angle_snapping ? IFACE_("On") : IFACE_("Off"),
+ kcd->cut_through ? IFACE_("On") : IFACE_("Off"));
ED_area_headerprint(CTX_wm_area(C), header);
}
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index d1373363992..83542915ec2 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -37,6 +37,8 @@
#include "BLI_blenlib.h"
#include "BLI_math.h"
+#include "BLF_translation.h"
+
#include "BKE_context.h"
#include "BKE_modifier.h"
#include "BKE_report.h"
@@ -411,10 +413,8 @@ static int ringcut_invoke(bContext *C, wmOperator *op, wmEvent *evt)
lcd->eed = edge;
ringsel_find_edge(lcd, 1);
}
- ED_area_headerprint(sa,
- "Select a ring to be cut, "
- "use mouse-wheel or page-up/down for number of cuts, "
- "Hold Alt for smooth");
+ ED_area_headerprint(sa, IFACE_("Select a ring to be cut, use mouse-wheel or page-up/down for number of cuts, "
+ "hold Alt for smooth"));
return OPERATOR_RUNNING_MODAL;
}
@@ -543,7 +543,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, wmEvent *event)
if (show_cuts) {
char buf[64];
- BLI_snprintf(buf, sizeof(buf), "Number of Cuts: %d, Smooth: %.2f (Alt)", cuts, smoothness);
+ BLI_snprintf(buf, sizeof(buf), IFACE_("Number of Cuts: %d, Smooth: %.2f (Alt)"), cuts, smoothness);
ED_area_headerprint(CTX_wm_area(C), buf);
}
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 4957d498e98..3dd9adc264b 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -47,6 +47,8 @@
#include "BLI_math.h"
#include "BLI_rand.h"
+#include "BLF_translation.h"
+
#include "BKE_material.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
@@ -4673,9 +4675,10 @@ typedef struct {
static void edbm_bevel_update_header(wmOperator *op, bContext *C)
{
#ifdef NEW_BEVEL
- static char str[] = "Confirm: Enter/LClick, Cancel: (Esc/RMB), offset: %s, segments: %d";
+ const char *str = IFACE_("Confirm: Enter/LClick, Cancel: (Esc/RMB), Offset: %s, Segments: %d");
#else
- static char str[] = "Confirm: Enter/LClick, Cancel: (Esc/RMB), factor: %s, Use Dist (D): %s: Use Even (E): %s";
+ const char *str = IFACE_("Confirm: Enter/LClick, Cancel: (Esc/RMB), Factor: %s, Use Dist (D): %s, "
+ "Use Even (E): %s");
BevelData *opdata = op->customdata;
#endif
@@ -4698,8 +4701,8 @@ static void edbm_bevel_update_header(wmOperator *op, bContext *C)
BLI_snprintf(factor_str, NUM_STR_REP_LEN, "%f", RNA_float_get(op->ptr, "percent"));
BLI_snprintf(msg, HEADER_LENGTH, str,
factor_str,
- RNA_boolean_get(op->ptr, "use_dist") ? "On" : "Off",
- RNA_boolean_get(op->ptr, "use_even") ? "On" : "Off"
+ RNA_boolean_get(op->ptr, "use_dist") ? IFACE_("On") : IFACE_("Off"),
+ RNA_boolean_get(op->ptr, "use_even") ? IFACE_("On") : IFACE_("Off")
);
#endif
@@ -5212,12 +5215,8 @@ static void edbm_inset_update_header(wmOperator *op, bContext *C)
{
InsetData *opdata = op->customdata;
- static const char str[] = "Confirm: Enter/LClick, "
- "Cancel: (Esc/RClick), "
- "thickness: %s, "
- "depth (Ctrl to tweak): %s (%s), "
- "Outset (O): (%s), "
- "Boundary (B): (%s)";
+ const char *str = IFACE_("Confirm: Enter/LClick, Cancel: (Esc/RClick), Thickness: %s, "
+ "Depth (Ctrl to tweak): %s (%s), Outset (O): (%s), Boundary (B): (%s)");
char msg[HEADER_LENGTH];
ScrArea *sa = CTX_wm_area(C);
@@ -5233,9 +5232,9 @@ static void edbm_inset_update_header(wmOperator *op, bContext *C)
BLI_snprintf(msg, HEADER_LENGTH, str,
flts_str,
flts_str + NUM_STR_REP_LEN,
- opdata->modify_depth ? "On" : "Off",
- RNA_boolean_get(op->ptr, "use_outset") ? "On" : "Off",
- RNA_boolean_get(op->ptr, "use_boundary") ? "On" : "Off"
+ opdata->modify_depth ? IFACE_("On") : IFACE_("Off"),
+ RNA_boolean_get(op->ptr, "use_outset") ? IFACE_("On") : IFACE_("Off"),
+ RNA_boolean_get(op->ptr, "use_boundary") ? IFACE_("On") : IFACE_("Off")
);
ED_area_headerprint(sa, msg);
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 2a5b64cd6ed..0bdae9e32f4 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -36,6 +36,8 @@
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "DNA_armature_types.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
@@ -1028,7 +1030,8 @@ void buttons_context_draw(const bContext *C, uiLayout *layout)
block = uiLayoutGetBlock(row);
uiBlockSetEmboss(block, UI_EMBOSSN);
- but = uiDefIconButBitC(block, ICONTOG, SB_PIN_CONTEXT, 0, ICON_UNPINNED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &sbuts->flag, 0, 0, 0, 0, "Follow context or keep fixed datablock displayed");
+ but = uiDefIconButBitC(block, ICONTOG, SB_PIN_CONTEXT, 0, ICON_UNPINNED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &sbuts->flag,
+ 0, 0, 0, 0, IFACE_("Follow context or keep fixed datablock displayed"));
uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
uiButSetFunc(but, pin_cb, NULL, NULL);
@@ -1068,7 +1071,7 @@ void buttons_context_register(ARegionType *art)
pt = MEM_callocN(sizeof(PanelType), "spacetype buttons panel context");
strcpy(pt->idname, "BUTTONS_PT_context");
- strcpy(pt->label, "Context");
+ strcpy(pt->label, N_("Context")); /* XXX C panels are not available through RNA (bpy.types)! */
pt->draw = buttons_panel_context;
pt->flag = PNL_NO_HEADER;
BLI_addtail(&art->paneltypes, pt);
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 65fe9dba258..bb286194992 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -403,28 +403,28 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
uiBlockBeginAlign(block);
/* Should be no need to translate these. */
- but = uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "X:", 0, yi -= buth, 200, buth,
+ but = uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, IFACE_("X:"), 0, yi -= buth, 200, buth,
&(tfp->ve_median[LOC_X]), -lim, lim, 10, RNA_TRANSLATION_PREC_DEFAULT, "");
uiButSetUnitType(but, PROP_UNIT_LENGTH);
- but = uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Y:", 0, yi -= buth, 200, buth,
+ but = uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, IFACE_("Y:"), 0, yi -= buth, 200, buth,
&(tfp->ve_median[LOC_Y]), -lim, lim, 10, RNA_TRANSLATION_PREC_DEFAULT, "");
uiButSetUnitType(but, PROP_UNIT_LENGTH);
- but = uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Z:", 0, yi -= buth, 200, buth,
+ but = uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, IFACE_("Z:"), 0, yi -= buth, 200, buth,
&(tfp->ve_median[LOC_Z]), -lim, lim, 10, RNA_TRANSLATION_PREC_DEFAULT, "");
uiButSetUnitType(but, PROP_UNIT_LENGTH);
if (totcurvebweight == tot) {
- uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "W:", 0, yi -= buth, 200, buth,
+ uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, IFACE_("W:"), 0, yi -= buth, 200, buth,
&(tfp->ve_median[C_BWEIGHT]), 0.01, 100.0, 1, 3, "");
}
uiBlockBeginAlign(block);
uiDefButBitS(block, TOG, V3D_GLOBAL_STATS, B_REDR, IFACE_("Global"),
0, yi -= buth + but_margin, 100, buth,
- &v3d->flag, 0, 0, 0, 0, "Displays global values");
+ &v3d->flag, 0, 0, 0, 0, TIP_("Displays global values"));
uiDefButBitS(block, TOGN, V3D_GLOBAL_STATS, B_REDR, IFACE_("Local"),
100, yi, 100, buth,
- &v3d->flag, 0, 0, 0, 0, "Displays local values");
+ &v3d->flag, 0, 0, 0, 0, TIP_("Displays local values"));
uiBlockEndAlign(block);
/* Meshes... */
@@ -454,11 +454,11 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
}
/* Curve... */
else if (totcurvedata == 1) {
- uiDefButR(block, NUM, 0, "Weight", 0, yi -= buth + but_margin, 200, buth,
+ uiDefButR(block, NUM, 0, IFACE_("Weight"), 0, yi -= buth + but_margin, 200, buth,
&data_ptr, "weight_softbody", 0, 0.0, 1.0, 1, 3, NULL);
- uiDefButR(block, NUM, 0, "Radius", 0, yi -= buth + but_margin, 200, buth,
+ uiDefButR(block, NUM, 0, IFACE_("Radius"), 0, yi -= buth + but_margin, 200, buth,
&data_ptr, "radius", 0, 0.0, 100.0, 1, 3, NULL);
- uiDefButR(block, NUM, 0, "Tilt", 0, yi -= buth + but_margin, 200, buth,
+ uiDefButR(block, NUM, 0, IFACE_("Tilt"), 0, yi -= buth + but_margin, 200, buth,
&data_ptr, "tilt", 0, -FLT_MAX, FLT_MAX, 1, 3, NULL);
}
else if (totcurvedata > 1) {
@@ -476,7 +476,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
}
/* Lattice... */
else if (totlattdata == 1) {
- uiDefButR(block, NUM, 0, "Weight", 0, yi -= buth + but_margin, 200, buth,
+ uiDefButR(block, NUM, 0, IFACE_("Weight"), 0, yi -= buth + but_margin, 200, buth,
&data_ptr, "weight_softbody", 0, 0.0, 1.0, 1, 3, NULL);
}
else if (totlattdata > 1) {
@@ -1269,20 +1269,20 @@ void view3d_buttons_register(ARegionType *art)
pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel object");
strcpy(pt->idname, "VIEW3D_PT_object");
- strcpy(pt->label, "Transform");
+ strcpy(pt->label, N_("Transform")); /* XXX C panels not available through RNA (bpy.types)! */
pt->draw = view3d_panel_object;
BLI_addtail(&art->paneltypes, pt);
pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel gpencil");
strcpy(pt->idname, "VIEW3D_PT_gpencil");
- strcpy(pt->label, "Grease Pencil");
+ strcpy(pt->label, N_("Grease Pencil")); /* XXX C panels are not available through RNA (bpy.types)! */
pt->draw_header = gpencil_panel_standard_header;
pt->draw = gpencil_panel_standard;
BLI_addtail(&art->paneltypes, pt);
pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel vgroup");
strcpy(pt->idname, "VIEW3D_PT_vgroup");
- strcpy(pt->label, "Vertex Groups");
+ strcpy(pt->label, N_("Vertex Groups")); /* XXX C panels are not available through RNA (bpy.types)! */
pt->draw = view3d_panel_vgroup;
pt->poll = view3d_panel_vgroup_poll;
BLI_addtail(&art->paneltypes, pt);
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index c41fb926ab0..a34b4c5157b 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -75,7 +75,9 @@
#include "BIF_glutil.h"
#include "WM_api.h"
+
#include "BLF_api.h"
+#include "BLF_translation.h"
#include "ED_armature.h"
#include "ED_keyframing.h"
@@ -804,28 +806,28 @@ static const char *view3d_get_name(View3D *v3d, RegionView3D *rv3d)
switch (rv3d->view) {
case RV3D_VIEW_FRONT:
- if (rv3d->persp == RV3D_ORTHO) name = "Front Ortho";
- else name = "Front Persp";
+ if (rv3d->persp == RV3D_ORTHO) name = IFACE_("Front Ortho");
+ else name = IFACE_("Front Persp");
break;
case RV3D_VIEW_BACK:
- if (rv3d->persp == RV3D_ORTHO) name = "Back Ortho";
- else name = "Back Persp";
+ if (rv3d->persp == RV3D_ORTHO) name = IFACE_("Back Ortho");
+ else name = IFACE_("Back Persp");
break;
case RV3D_VIEW_TOP:
- if (rv3d->persp == RV3D_ORTHO) name = "Top Ortho";
- else name = "Top Persp";
+ if (rv3d->persp == RV3D_ORTHO) name = IFACE_("Top Ortho");
+ else name = IFACE_("Top Persp");
break;
case RV3D_VIEW_BOTTOM:
- if (rv3d->persp == RV3D_ORTHO) name = "Bottom Ortho";
- else name = "Bottom Persp";
+ if (rv3d->persp == RV3D_ORTHO) name = IFACE_("Bottom Ortho");
+ else name = IFACE_("Bottom Persp");
break;
case RV3D_VIEW_RIGHT:
- if (rv3d->persp == RV3D_ORTHO) name = "Right Ortho";
- else name = "Right Persp";
+ if (rv3d->persp == RV3D_ORTHO) name = IFACE_("Right Ortho");
+ else name = IFACE_("Right Persp");
break;
case RV3D_VIEW_LEFT:
- if (rv3d->persp == RV3D_ORTHO) name = "Left Ortho";
- else name = "Left Persp";
+ if (rv3d->persp == RV3D_ORTHO) name = IFACE_("Left Ortho");
+ else name = IFACE_("Left Persp");
break;
default:
@@ -833,14 +835,14 @@ static const char *view3d_get_name(View3D *v3d, RegionView3D *rv3d)
if ((v3d->camera) && (v3d->camera->type == OB_CAMERA)) {
Camera *cam;
cam = v3d->camera->data;
- name = (cam->type != CAM_ORTHO) ? "Camera Persp" : "Camera Ortho";
+ name = (cam->type != CAM_ORTHO) ? IFACE_("Camera Persp") : IFACE_("Camera Ortho");
}
else {
- name = "Object as Camera";
+ name = IFACE_("Object as Camera");
}
}
else {
- name = (rv3d->persp == RV3D_ORTHO) ? "User Ortho" : "User Persp";
+ name = (rv3d->persp == RV3D_ORTHO) ? IFACE_("User Ortho") : IFACE_("User Persp");
}
break;
}
@@ -855,7 +857,7 @@ static void draw_viewport_name(ARegion *ar, View3D *v3d, rcti *rect)
char tmpstr[24];
if (v3d->localvd) {
- BLI_snprintf(tmpstr, sizeof(tmpstr), "%s (Local)", name);
+ BLI_snprintf(tmpstr, sizeof(tmpstr), IFACE_("%s (Local)"), name);
name = tmpstr;
}
@@ -918,7 +920,7 @@ static void draw_selected_name(Scene *scene, Object *ob, rcti *rect)
if (kb) {
BLI_snprintf(shapes, sizeof(shapes), ": %s ", kb->name);
if (ob->shapeflag == OB_SHAPE_LOCK) {
- strcat(shapes, " (Pinned)");
+ strcat(shapes, IFACE_(" (Pinned)"));
}
}
}
@@ -2846,11 +2848,11 @@ static void draw_viewport_fps(Scene *scene, rcti *rect)
/* is this more then half a frame behind? */
if (fps + 0.5f < (float)(FPS)) {
UI_ThemeColor(TH_REDALERT);
- BLI_snprintf(printable, sizeof(printable), "fps: %.2f", fps);
+ BLI_snprintf(printable, sizeof(printable), IFACE_("fps: %.2f"), fps);
}
else {
UI_ThemeColor(TH_TEXT_HI);
- BLI_snprintf(printable, sizeof(printable), "fps: %i", (int)(fps + 0.5f));
+ BLI_snprintf(printable, sizeof(printable), IFACE_("fps: %i"), (int)(fps + 0.5f));
}
BLF_draw_default_ascii(rect->xmin + U.widget_unit, rect->ymax - U.widget_unit, 0.0f, printable, sizeof(printable));
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index befeb2bce25..1a7a425fbc9 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -94,6 +94,7 @@
#include "RNA_access.h"
#include "BLF_api.h"
+#include "BLF_translation.h"
#include "transform.h"
@@ -790,22 +791,29 @@ static void transform_event_xyz_constraint(TransInfo *t, short key_type, char cm
if (!(t->flag & T_NO_CONSTRAINT)) {
int constraint_axis, constraint_plane;
int edit_2d = (t->flag & T_2D_EDIT);
- char msg1[] = "along _";
- char msg2[] = "along %s _";
- char msg3[] = "locking %s _";
+ const char *msg1 = "", *msg2 = "", *msg3 = "";
char axis;
/* Initialize */
switch (key_type) {
case XKEY:
+ msg1 = IFACE_("along X");
+ msg2 = IFACE_("along %s X");
+ msg3 = IFACE_("locking %s X");
axis = 'X';
constraint_axis = CON_AXIS0;
break;
case YKEY:
+ msg1 = IFACE_("along Y");
+ msg2 = IFACE_("along %s Y");
+ msg3 = IFACE_("locking %s Y");
axis = 'Y';
constraint_axis = CON_AXIS1;
break;
case ZKEY:
+ msg1 = IFACE_("along Z");
+ msg2 = IFACE_("along %s Z");
+ msg3 = IFACE_("locking %s Z");
axis = 'Z';
constraint_axis = CON_AXIS2;
break;
@@ -813,9 +821,6 @@ static void transform_event_xyz_constraint(TransInfo *t, short key_type, char cm
/* Invalid key */
return;
}
- msg1[sizeof(msg1) - 2] = axis;
- msg2[sizeof(msg2) - 2] = axis;
- msg3[sizeof(msg3) - 2] = axis;
constraint_plane = ((CON_AXIS0 | CON_AXIS1 | CON_AXIS2) & (~constraint_axis));
if (edit_2d && (key_type != ZKEY)) {
@@ -1005,10 +1010,10 @@ int transformEvent(TransInfo *t, wmEvent *event)
}
else {
if (t->flag & T_2D_EDIT) {
- setUserConstraint(t, V3D_MANIP_GLOBAL, (CON_AXIS0), "along X");
+ setUserConstraint(t, V3D_MANIP_GLOBAL, (CON_AXIS0), IFACE_("along X"));
}
else {
- setUserConstraint(t, t->current_orientation, (CON_AXIS0), "along %s X");
+ setUserConstraint(t, t->current_orientation, (CON_AXIS0), IFACE_("along %s X"));
}
}
t->redraw |= TREDRAW_HARD;
@@ -1021,10 +1026,10 @@ int transformEvent(TransInfo *t, wmEvent *event)
}
else {
if (t->flag & T_2D_EDIT) {
- setUserConstraint(t, V3D_MANIP_GLOBAL, (CON_AXIS1), "along Y");
+ setUserConstraint(t, V3D_MANIP_GLOBAL, (CON_AXIS1), IFACE_("along Y"));
}
else {
- setUserConstraint(t, t->current_orientation, (CON_AXIS1), "along %s Y");
+ setUserConstraint(t, t->current_orientation, (CON_AXIS1), IFACE_("along %s Y"));
}
}
t->redraw |= TREDRAW_HARD;
@@ -1036,7 +1041,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
stopConstraint(t);
}
else {
- setUserConstraint(t, t->current_orientation, (CON_AXIS2), "along %s Z");
+ setUserConstraint(t, t->current_orientation, (CON_AXIS2), IFACE_("along %s Z"));
}
t->redraw |= TREDRAW_HARD;
}
@@ -1047,7 +1052,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
stopConstraint(t);
}
else {
- setUserConstraint(t, t->current_orientation, (CON_AXIS1 | CON_AXIS2), "locking %s X");
+ setUserConstraint(t, t->current_orientation, (CON_AXIS1 | CON_AXIS2), IFACE_("locking %s X"));
}
t->redraw |= TREDRAW_HARD;
}
@@ -1058,7 +1063,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
stopConstraint(t);
}
else {
- setUserConstraint(t, t->current_orientation, (CON_AXIS0 | CON_AXIS2), "locking %s Y");
+ setUserConstraint(t, t->current_orientation, (CON_AXIS0 | CON_AXIS2), IFACE_("locking %s Y"));
}
t->redraw |= TREDRAW_HARD;
}
@@ -1069,7 +1074,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
stopConstraint(t);
}
else {
- setUserConstraint(t, t->current_orientation, (CON_AXIS0 | CON_AXIS1), "locking %s Z");
+ setUserConstraint(t, t->current_orientation, (CON_AXIS0 | CON_AXIS1), IFACE_("locking %s Z"));
}
t->redraw |= TREDRAW_HARD;
}
@@ -1174,7 +1179,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
/* exception for switching to dolly, or trackball, in camera view */
if (t->flag & T_CAMERA) {
if (t->mode == TFM_TRANSLATION)
- setLocalConstraint(t, (CON_AXIS2), "along local Z");
+ setLocalConstraint(t, (CON_AXIS2), IFACE_("along local Z"));
else if (t->mode == TFM_ROTATION) {
restoreTransObjects(t);
initTrackball(t);
@@ -1666,7 +1671,7 @@ static void drawTransformView(const struct bContext *C, ARegion *UNUSED(ar), voi
static void drawAutoKeyWarning(TransInfo *UNUSED(t), ARegion *ar)
{
rcti rect;
- const char printable[] = "Auto Keying On";
+ const char *printable = IFACE_("Auto Keying On");
float printable_size[2];
int xco, yco;
@@ -2699,13 +2704,13 @@ int Warp(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c);
- sprintf(str, "Warp: %s", c);
+ sprintf(str, IFACE_("Warp: %s"), c);
circumfac = DEG2RADF(circumfac);
}
else {
/* default header print */
- sprintf(str, "Warp: %.3f", RAD2DEGF(circumfac));
+ sprintf(str, IFACE_("Warp: %.3f"), RAD2DEGF(circumfac));
}
t->values[0] = circumfac;
@@ -2840,11 +2845,11 @@ int Shear(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c);
- sprintf(str, "Shear: %s %s", c, t->proptext);
+ sprintf(str, IFACE_("Shear: %s %s"), c, t->proptext);
}
else {
/* default header print */
- sprintf(str, "Shear: %.3f %s (Press X or Y to set shear axis)", value, t->proptext);
+ sprintf(str, IFACE_("Shear: %.3f %s (Press X or Y to set shear axis)"), value, t->proptext);
}
t->values[0] = value;
@@ -2936,30 +2941,30 @@ static void headerResize(TransInfo *t, float vec[3], char *str)
if (t->con.mode & CON_APPLY) {
switch (t->num.idx_max) {
case 0:
- spos += sprintf(spos, "Scale: %s%s %s", &tvec[0], t->con.text, t->proptext);
+ spos += sprintf(spos, IFACE_("Scale: %s%s %s"), &tvec[0], t->con.text, t->proptext);
break;
case 1:
- spos += sprintf(spos, "Scale: %s : %s%s %s", &tvec[0], &tvec[NUM_STR_REP_LEN],
+ spos += sprintf(spos, IFACE_("Scale: %s : %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN],
t->con.text, t->proptext);
break;
case 2:
- spos += sprintf(spos, "Scale: %s : %s : %s%s %s", &tvec[0], &tvec[NUM_STR_REP_LEN],
+ spos += sprintf(spos, IFACE_("Scale: %s : %s : %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN],
&tvec[NUM_STR_REP_LEN * 2], t->con.text, t->proptext);
}
}
else {
if (t->flag & T_2D_EDIT) {
- spos += sprintf(spos, "Scale X: %s Y: %s%s %s", &tvec[0], &tvec[NUM_STR_REP_LEN],
+ spos += sprintf(spos, IFACE_("Scale X: %s Y: %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN],
t->con.text, t->proptext);
}
else {
- spos += sprintf(spos, "Scale X: %s Y: %s Z: %s%s %s", &tvec[0], &tvec[NUM_STR_REP_LEN],
+ spos += sprintf(spos, IFACE_("Scale X: %s Y: %s Z: %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN],
&tvec[NUM_STR_REP_LEN * 2], t->con.text, t->proptext);
}
}
if (t->flag & (T_PROP_EDIT | T_PROP_CONNECTED)) {
- spos += sprintf(spos, " Proportional size: %.2f", t->prop_size);
+ spos += sprintf(spos, IFACE_(" Proportional size: %.2f"), t->prop_size);
}
(void)spos;
@@ -3318,11 +3323,11 @@ int ToSphere(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c);
- sprintf(str, "To Sphere: %s %s", c, t->proptext);
+ sprintf(str, IFACE_("To Sphere: %s %s"), c, t->proptext);
}
else {
/* default header print */
- sprintf(str, "To Sphere: %.4f %s", ratio, t->proptext);
+ sprintf(str, IFACE_("To Sphere: %.4f %s"), ratio, t->proptext);
}
@@ -3662,17 +3667,17 @@ int Rotation(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c);
- spos += sprintf(spos, "Rot: %s %s %s", &c[0], t->con.text, t->proptext);
+ spos += sprintf(spos, IFACE_("Rot: %s %s %s"), &c[0], t->con.text, t->proptext);
/* Clamp between -180 and 180 */
final = angle_wrap_rad(DEG2RADF(final));
}
else {
- spos += sprintf(spos, "Rot: %.2f%s %s", RAD2DEGF(final), t->con.text, t->proptext);
+ spos += sprintf(spos, IFACE_("Rot: %.2f%s %s"), RAD2DEGF(final), t->con.text, t->proptext);
}
if (t->flag & (T_PROP_EDIT | T_PROP_CONNECTED)) {
- spos += sprintf(spos, " Proportional size: %.2f", t->prop_size);
+ spos += sprintf(spos, IFACE_(" Proportional size: %.2f"), t->prop_size);
}
(void)spos;
@@ -3761,17 +3766,17 @@ int Trackball(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c);
- spos += sprintf(spos, "Trackball: %s %s %s", &c[0], &c[NUM_STR_REP_LEN], t->proptext);
+ spos += sprintf(spos, IFACE_("Trackball: %s %s %s"), &c[0], &c[NUM_STR_REP_LEN], t->proptext);
phi[0] = DEG2RADF(phi[0]);
phi[1] = DEG2RADF(phi[1]);
}
else {
- spos += sprintf(spos, "Trackball: %.2f %.2f %s", RAD2DEGF(phi[0]), RAD2DEGF(phi[1]), t->proptext);
+ spos += sprintf(spos, IFACE_("Trackball: %.2f %.2f %s"), RAD2DEGF(phi[0]), RAD2DEGF(phi[1]), t->proptext);
}
if (t->flag & (T_PROP_EDIT | T_PROP_CONNECTED)) {
- spos += sprintf(spos, " Proportional size: %.2f", t->prop_size);
+ spos += sprintf(spos, IFACE_(" Proportional size: %.2f"), t->prop_size);
}
(void)spos;
@@ -3882,7 +3887,7 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str)
short chainlen = t->settings->autoik_chainlen;
if (chainlen)
- sprintf(autoik, "AutoIK-Len: %d", chainlen);
+ sprintf(autoik, IFACE_("AutoIK-Len: %d"), chainlen);
else
autoik[0] = '\0';
}
@@ -3915,7 +3920,7 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str)
}
if (t->flag & (T_PROP_EDIT | T_PROP_CONNECTED)) {
- spos += sprintf(spos, " Proportional size: %.2f", t->prop_size);
+ spos += sprintf(spos, IFACE_(" Proportional size: %.2f"), t->prop_size);
}
(void)spos;
}
@@ -4077,7 +4082,7 @@ int ShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
/* header print for NumInput */
str_p = str;
- str_p += BLI_snprintf(str_p, sizeof(str), "Shrink/Fatten:");
+ str_p += BLI_snprintf(str_p, sizeof(str), IFACE_("Shrink/Fatten:"));
if (hasNumInput(&t->num)) {
char c[NUM_STR_REP_LEN];
outputNumInput(&(t->num), c);
@@ -4099,8 +4104,8 @@ int ShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
str_p += WM_keymap_item_to_string(kmi, str_p, sizeof(str) - (str_p - str));
}
}
- str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), " or Alt) Even Thickness %s",
- (t->flag & T_ALT_TRANSFORM) ? "ON" : "OFF");
+ str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), IFACE_(" or Alt) Even Thickness %s"),
+ (t->flag & T_ALT_TRANSFORM) ? IFACE_("ON") : IFACE_("OFF"));
/* done with header string */
@@ -4171,7 +4176,7 @@ int Tilt(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c);
- sprintf(str, "Tilt: %s° %s", &c[0], t->proptext);
+ sprintf(str, IFACE_("Tilt: %s° %s"), &c[0], t->proptext);
final = DEG2RADF(final);
@@ -4179,7 +4184,7 @@ int Tilt(TransInfo *t, const int UNUSED(mval[2]))
t->values[0] = final;
}
else {
- sprintf(str, "Tilt: %.2f° %s", RAD2DEGF(final), t->proptext);
+ sprintf(str, IFACE_("Tilt: %.2f° %s"), RAD2DEGF(final), t->proptext);
}
for (i = 0; i < t->total; i++, td++) {
@@ -4243,10 +4248,10 @@ int CurveShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
char c[NUM_STR_REP_LEN];
outputNumInput(&(t->num), c);
- sprintf(str, "Shrink/Fatten: %s", c);
+ sprintf(str, IFACE_("Shrink/Fatten: %s"), c);
}
else {
- sprintf(str, "Shrink/Fatten: %3f", ratio);
+ sprintf(str, IFACE_("Shrink/Fatten: %3f"), ratio);
}
for (i = 0; i < t->total; i++, td++) {
@@ -4311,10 +4316,10 @@ int MaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
char c[NUM_STR_REP_LEN];
outputNumInput(&(t->num), c);
- sprintf(str, "Feather Shrink/Fatten: %s", c);
+ sprintf(str, IFACE_("Feather Shrink/Fatten: %s"), c);
}
else {
- sprintf(str, "Feather Shrink/Fatten: %3f", ratio);
+ sprintf(str, IFACE_("Feather Shrink/Fatten: %3f"), ratio);
}
/* detect if no points have feather yet */
@@ -4399,11 +4404,11 @@ int PushPull(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c);
- sprintf(str, "Push/Pull: %s%s %s", c, t->con.text, t->proptext);
+ sprintf(str, IFACE_("Push/Pull: %s%s %s"), c, t->con.text, t->proptext);
}
else {
/* default header print */
- sprintf(str, "Push/Pull: %.4f%s %s", distance, t->con.text, t->proptext);
+ sprintf(str, IFACE_("Push/Pull: %.4f%s %s"), distance, t->con.text, t->proptext);
}
t->values[0] = distance;
@@ -4520,7 +4525,7 @@ int Bevel(TransInfo *t, const int UNUSED(mval[2]))
const char *mode;
TransData *td = t->data;
- mode = (G.editBMesh->options & BME_BEVEL_VERT) ? "verts only" : "normal";
+ mode = (G.editBMesh->options & BME_BEVEL_VERT) ? IFACE_("verts only") : IFACE_("normal");
distance = t->values[0] / 4; /* 4 just seemed a nice value to me, nothing special */
distance = fabs(distance);
@@ -4535,11 +4540,11 @@ int Bevel(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c);
- sprintf(str, "Bevel - Dist: %s, Mode: %s (MMB to toggle))", c, mode);
+ sprintf(str, IFACE_("Bevel - Dist: %s, Mode: %s (MMB to toggle))"), c, mode);
}
else {
/* default header print */
- sprintf(str, "Bevel - Dist: %.4f, Mode: %s (MMB to toggle))", distance, mode);
+ sprintf(str, IFACE_("Bevel - Dist: %.4f, Mode: %s (MMB to toggle))"), distance, mode);
}
if (distance < 0) distance = -distance;
@@ -4603,16 +4608,16 @@ int BevelWeight(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c);
if (weight >= 0.0f)
- sprintf(str, "Bevel Weight: +%s %s", c, t->proptext);
+ sprintf(str, IFACE_("Bevel Weight: +%s %s"), c, t->proptext);
else
- sprintf(str, "Bevel Weight: %s %s", c, t->proptext);
+ sprintf(str, IFACE_("Bevel Weight: %s %s"), c, t->proptext);
}
else {
/* default header print */
if (weight >= 0.0f)
- sprintf(str, "Bevel Weight: +%.3f %s", weight, t->proptext);
+ sprintf(str, IFACE_("Bevel Weight: +%.3f %s"), weight, t->proptext);
else
- sprintf(str, "Bevel Weight: %.3f %s", weight, t->proptext);
+ sprintf(str, IFACE_("Bevel Weight: %.3f %s"), weight, t->proptext);
}
for (i = 0; i < t->total; i++, td++) {
@@ -4676,16 +4681,16 @@ int Crease(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c);
if (crease >= 0.0f)
- sprintf(str, "Crease: +%s %s", c, t->proptext);
+ sprintf(str, IFACE_("Crease: +%s %s"), c, t->proptext);
else
- sprintf(str, "Crease: %s %s", c, t->proptext);
+ sprintf(str, IFACE_("Crease: %s %s"), c, t->proptext);
}
else {
/* default header print */
if (crease >= 0.0f)
- sprintf(str, "Crease: +%.3f %s", crease, t->proptext);
+ sprintf(str, IFACE_("Crease: +%.3f %s"), crease, t->proptext);
else
- sprintf(str, "Crease: %.3f %s", crease, t->proptext);
+ sprintf(str, IFACE_("Crease: %.3f %s"), crease, t->proptext);
}
for (i = 0; i < t->total; i++, td++) {
@@ -4744,14 +4749,14 @@ static void headerBoneSize(TransInfo *t, float vec[3], char *str)
/* hmm... perhaps the y-axis values don't need to be shown? */
if (t->con.mode & CON_APPLY) {
if (t->num.idx_max == 0)
- sprintf(str, "ScaleB: %s%s %s", &tvec[0], t->con.text, t->proptext);
+ sprintf(str, IFACE_("ScaleB: %s%s %s"), &tvec[0], t->con.text, t->proptext);
else
- sprintf(str, "ScaleB: %s : %s : %s%s %s", &tvec[0], &tvec[NUM_STR_REP_LEN], &tvec[NUM_STR_REP_LEN * 2],
- t->con.text, t->proptext);
+ sprintf(str, IFACE_("ScaleB: %s : %s : %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN],
+ &tvec[NUM_STR_REP_LEN * 2], t->con.text, t->proptext);
}
else {
- sprintf(str, "ScaleB X: %s Y: %s Z: %s%s %s", &tvec[0], &tvec[NUM_STR_REP_LEN], &tvec[NUM_STR_REP_LEN * 2],
- t->con.text, t->proptext);
+ sprintf(str, IFACE_("ScaleB X: %s Y: %s Z: %s%s %s"), &tvec[0], &tvec[NUM_STR_REP_LEN],
+ &tvec[NUM_STR_REP_LEN * 2], t->con.text, t->proptext);
}
}
@@ -4867,10 +4872,10 @@ int BoneEnvelope(TransInfo *t, const int UNUSED(mval[2]))
char c[NUM_STR_REP_LEN];
outputNumInput(&(t->num), c);
- sprintf(str, "Envelope: %s", c);
+ sprintf(str, IFACE_("Envelope: %s"), c);
}
else {
- sprintf(str, "Envelope: %3f", ratio);
+ sprintf(str, IFACE_("Envelope: %3f"), ratio);
}
for (i = 0; i < t->total; i++, td++) {
@@ -5923,12 +5928,12 @@ int EdgeSlide(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c);
- BLI_snprintf(str, sizeof(str), "Edge Slide: %s (E)ven: %s, (F)lipped: %s",
- &c[0], !is_proportional ? "ON" : "OFF", flipped ? "ON" : "OFF");
+ BLI_snprintf(str, sizeof(str), IFACE_("Edge Slide: %s (E)ven: %s, (F)lipped: %s"),
+ &c[0], !is_proportional ? IFACE_("ON") : IFACE_("OFF"), flipped ? IFACE_("ON") : IFACE_("OFF"));
}
else {
- BLI_snprintf(str, sizeof(str), "Edge Slide: %.4f (E)ven: %s, (F)lipped: %s",
- final, !is_proportional ? "ON" : "OFF", flipped ? "ON" : "OFF");
+ BLI_snprintf(str, sizeof(str), IFACE_("Edge Slide: %.4f (E)ven: %s, (F)lipped: %s"),
+ final, !is_proportional ? IFACE_("ON") : IFACE_("OFF"), flipped ? IFACE_("ON") : IFACE_("OFF"));
}
CLAMP(final, -1.0f, 1.0f);
@@ -5939,7 +5944,7 @@ int EdgeSlide(TransInfo *t, const int UNUSED(mval[2]))
if (t->customData)
doEdgeSlide(t, final);
else {
- strcpy(str, "Invalid Edge Selection");
+ strcpy(str, IFACE_("Invalid Edge Selection"));
t->state = TRANS_CANCEL;
}
@@ -6428,7 +6433,7 @@ int VertSlide(TransInfo *t, const int UNUSED(mval[2]))
/* header string */
str_p = str;
- str_p += BLI_snprintf(str_p, sizeof(str), "Vert Slide: ");
+ str_p += BLI_snprintf(str_p, sizeof(str), IFACE_("Vert Slide: "));
if (hasNumInput(&t->num)) {
char c[NUM_STR_REP_LEN];
applyNumInput(&t->num, &final);
@@ -6438,20 +6443,22 @@ int VertSlide(TransInfo *t, const int UNUSED(mval[2]))
else {
str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), "%.4f ", final);
}
- str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), "(E)ven: %s, ", !is_proportional ? "ON" : "OFF");
+ str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), IFACE_("(E)ven: %s, "),
+ !is_proportional ? IFACE_("ON") : IFACE_("OFF"));
if (!is_proportional) {
- str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), "(F)lipped: %s, ", flipped ? "ON" : "OFF");
+ str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), IFACE_("(F)lipped: %s, "),
+ flipped ? IFACE_("ON") : IFACE_("OFF"));
}
- str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), "Alt or (C)lamp: %s", is_clamp ? "ON" : "OFF");
+ str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), IFACE_("Alt or (C)lamp: %s"),
+ is_clamp ? IFACE_("ON") : IFACE_("OFF"));
/* done with header string */
-
/*do stuff here*/
if (t->customData) {
doVertSlide(t, final);
}
else {
- strcpy(str, "Invalid Vert Selection");
+ strcpy(str, IFACE_("Invalid Vert Selection"));
t->state = TRANS_CANCEL;
}
@@ -6502,12 +6509,12 @@ int BoneRoll(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c);
- sprintf(str, "Roll: %s", &c[0]);
+ sprintf(str, IFACE_("Roll: %s"), &c[0]);
final = DEG2RADF(final);
}
else {
- sprintf(str, "Roll: %.2f", RAD2DEGF(final));
+ sprintf(str, IFACE_("Roll: %.2f"), RAD2DEGF(final));
}
/* set roll values */
@@ -6573,16 +6580,16 @@ int BakeTime(TransInfo *t, const int mval[2])
outputNumInput(&(t->num), c);
if (time >= 0.0f)
- sprintf(str, "Time: +%s %s", c, t->proptext);
+ sprintf(str, IFACE_("Time: +%s %s"), c, t->proptext);
else
- sprintf(str, "Time: %s %s", c, t->proptext);
+ sprintf(str, IFACE_("Time: %s %s"), c, t->proptext);
}
else {
/* default header print */
if (time >= 0.0f)
- sprintf(str, "Time: +%.3f %s", time, t->proptext);
+ sprintf(str, IFACE_("Time: +%.3f %s"), time, t->proptext);
else
- sprintf(str, "Time: %.3f %s", time, t->proptext);
+ sprintf(str, IFACE_("Time: %.3f %s"), time, t->proptext);
}
for (i = 0; i < t->total; i++, td++) {
@@ -6642,7 +6649,7 @@ int Mirror(TransInfo *t, const int UNUSED(mval[2]))
t->con.applySize(t, NULL, mat);
}
- sprintf(str, "Mirror%s", t->con.text);
+ sprintf(str, IFACE_("Mirror%s"), t->con.text);
for (i = 0, td = t->data; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -6676,9 +6683,9 @@ int Mirror(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
if (t->flag & T_2D_EDIT)
- ED_area_headerprint(t->sa, "Select a mirror axis (X, Y)");
+ ED_area_headerprint(t->sa, IFACE_("Select a mirror axis (X, Y)"));
else
- ED_area_headerprint(t->sa, "Select a mirror axis (X, Y, Z)");
+ ED_area_headerprint(t->sa, IFACE_("Select a mirror axis (X, Y, Z)"));
}
return 1;
@@ -6735,7 +6742,7 @@ int Align(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
- ED_area_headerprint(t->sa, "Align");
+ ED_area_headerprint(t->sa, IFACE_("Align"));
return 1;
}
@@ -6772,7 +6779,7 @@ static void headerSeqSlide(TransInfo *t, float val[2], char *str, size_t str_len
}
str_p = str;
- str_p += BLI_snprintf(str, str_len, "Sequence Slide: %s%s, (", &tvec[0], t->con.text);
+ str_p += BLI_snprintf(str, str_len, IFACE_("Sequence Slide: %s%s, ("), &tvec[0], t->con.text);
{
wmKeyMapItem *kmi = WM_modalkeymap_find_propvalue(t->keymap, TFM_MODAL_TRANSLATE);
@@ -6780,8 +6787,8 @@ static void headerSeqSlide(TransInfo *t, float val[2], char *str, size_t str_len
str_p += WM_keymap_item_to_string(kmi, str_p, str_len - (str_p - str));
}
}
- str_p += BLI_snprintf(str_p, str_len - (str_p - str), " or Alt) Expand to fit %s",
- (t->flag & T_ALT_TRANSFORM) ? "ON" : "OFF");
+ str_p += BLI_snprintf(str_p, str_len - (str_p - str), IFACE_(" or Alt) Expand to fit %s"),
+ (t->flag & T_ALT_TRANSFORM) ? IFACE_("ON") : IFACE_("OFF"));
}
static void applySeqSlide(TransInfo *t, float val[2])
@@ -7046,7 +7053,7 @@ static void headerTimeTranslate(TransInfo *t, char *str)
sprintf(&tvec[0], "%.4f", val);
}
- sprintf(str, "DeltaX: %s", &tvec[0]);
+ sprintf(str, IFACE_("DeltaX: %s"), &tvec[0]);
}
static void applyTimeTranslate(TransInfo *t, float UNUSED(sval))
@@ -7187,7 +7194,7 @@ static void headerTimeSlide(TransInfo *t, float sval, char *str)
sprintf(&tvec[0], "%.4f", val);
}
- sprintf(str, "TimeSlide: %s", &tvec[0]);
+ sprintf(str, IFACE_("TimeSlide: %s"), &tvec[0]);
}
static void applyTimeSlide(TransInfo *t, float sval)
@@ -7319,7 +7326,7 @@ static void headerTimeScale(TransInfo *t, char *str)
else
sprintf(&tvec[0], "%.4f", t->values[0]);
- sprintf(str, "ScaleX: %s", &tvec[0]);
+ sprintf(str, IFACE_("ScaleX: %s"), &tvec[0]);
}
static void applyTimeScale(TransInfo *t)
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index 097e4592933..c4d61472f18 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -60,6 +60,8 @@
#include "BLI_utildefines.h"
#include "BLI_string.h"
+#include "BLF_translation.h"
+
#include "UI_resources.h"
#include "transform.h"
@@ -598,24 +600,24 @@ void setUserConstraint(TransInfo *t, short orientation, int mode, const char fte
case V3D_MANIP_GLOBAL:
{
float mtx[3][3] = MAT3_UNITY;
- BLI_snprintf(text, sizeof(text), ftext, "global");
+ BLI_snprintf(text, sizeof(text), ftext, IFACE_("global"));
setConstraint(t, mtx, mode, text);
}
break;
case V3D_MANIP_LOCAL:
- BLI_snprintf(text, sizeof(text), ftext, "local");
+ BLI_snprintf(text, sizeof(text), ftext, IFACE_("local"));
setLocalConstraint(t, mode, text);
break;
case V3D_MANIP_NORMAL:
- BLI_snprintf(text, sizeof(text), ftext, "normal");
+ BLI_snprintf(text, sizeof(text), ftext, IFACE_("normal"));
setConstraint(t, t->spacemtx, mode, text);
break;
case V3D_MANIP_VIEW:
- BLI_snprintf(text, sizeof(text), ftext, "view");
+ BLI_snprintf(text, sizeof(text), ftext, IFACE_("view"));
setConstraint(t, t->spacemtx, mode, text);
break;
case V3D_MANIP_GIMBAL:
- BLI_snprintf(text, sizeof(text), ftext, "gimbal");
+ BLI_snprintf(text, sizeof(text), ftext, IFACE_("gimbal"));
setConstraint(t, t->spacemtx, mode, text);
break;
default: /* V3D_MANIP_CUSTOM */
@@ -865,11 +867,11 @@ static void setNearestAxis2d(TransInfo *t)
/* no correction needed... just use whichever one is lower */
if (abs(t->mval[0] - t->con.imval[0]) < abs(t->mval[1] - t->con.imval[1]) ) {
t->con.mode |= CON_AXIS1;
- BLI_snprintf(t->con.text, sizeof(t->con.text), " along Y axis");
+ BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" along Y axis"));
}
else {
t->con.mode |= CON_AXIS0;
- BLI_snprintf(t->con.text, sizeof(t->con.text), " along X axis");
+ BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" along X axis"));
}
}
@@ -920,31 +922,31 @@ static void setNearestAxis3d(TransInfo *t)
if (len[0] <= len[1] && len[0] <= len[2]) {
if (t->modifiers & MOD_CONSTRAINT_PLANE) {
t->con.mode |= (CON_AXIS1 | CON_AXIS2);
- BLI_snprintf(t->con.text, sizeof(t->con.text), " locking %s X axis", t->spacename);
+ BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" locking %s X axis"), t->spacename);
}
else {
t->con.mode |= CON_AXIS0;
- BLI_snprintf(t->con.text, sizeof(t->con.text), " along %s X axis", t->spacename);
+ BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" along %s X axis"), t->spacename);
}
}
else if (len[1] <= len[0] && len[1] <= len[2]) {
if (t->modifiers & MOD_CONSTRAINT_PLANE) {
t->con.mode |= (CON_AXIS0 | CON_AXIS2);
- BLI_snprintf(t->con.text, sizeof(t->con.text), " locking %s Y axis", t->spacename);
+ BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" locking %s Y axis"), t->spacename);
}
else {
t->con.mode |= CON_AXIS1;
- BLI_snprintf(t->con.text, sizeof(t->con.text), " along %s Y axis", t->spacename);
+ BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" along %s Y axis"), t->spacename);
}
}
else if (len[2] <= len[1] && len[2] <= len[0]) {
if (t->modifiers & MOD_CONSTRAINT_PLANE) {
t->con.mode |= (CON_AXIS0 | CON_AXIS1);
- BLI_snprintf(t->con.text, sizeof(t->con.text), " locking %s Z axis", t->spacename);
+ BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" locking %s Z axis"), t->spacename);
}
else {
t->con.mode |= CON_AXIS2;
- BLI_snprintf(t->con.text, sizeof(t->con.text), " along %s Z axis", t->spacename);
+ BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" along %s Z axis"), t->spacename);
}
}
}
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 9ee1d11a036..c2a331f5249 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -56,6 +56,8 @@
#include "BLI_rand.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "RNA_access.h"
#include "BIF_gl.h"
@@ -1768,25 +1770,25 @@ void calculatePropRatio(TransInfo *t)
}
switch (t->prop_mode) {
case PROP_SHARP:
- strcpy(t->proptext, "(Sharp)");
+ strcpy(t->proptext, IFACE_("(Sharp)"));
break;
case PROP_SMOOTH:
- strcpy(t->proptext, "(Smooth)");
+ strcpy(t->proptext, IFACE_("(Smooth)"));
break;
case PROP_ROOT:
- strcpy(t->proptext, "(Root)");
+ strcpy(t->proptext, IFACE_("(Root)"));
break;
case PROP_LIN:
- strcpy(t->proptext, "(Linear)");
+ strcpy(t->proptext, IFACE_("(Linear)"));
break;
case PROP_CONST:
- strcpy(t->proptext, "(Constant)");
+ strcpy(t->proptext, IFACE_("(Constant)"));
break;
case PROP_SPHERE:
- strcpy(t->proptext, "(Sphere)");
+ strcpy(t->proptext, IFACE_("(Sphere)"));
break;
case PROP_RANDOM:
- strcpy(t->proptext, "(Random)");
+ strcpy(t->proptext, IFACE_("(Random)"));
break;
default:
t->proptext[0] = '\0';
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 4bd6496e083..e507d062b0e 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -493,25 +493,25 @@ void initTransformOrientation(bContext *C, TransInfo *t)
switch (t->current_orientation) {
case V3D_MANIP_GLOBAL:
unit_m3(t->spacemtx);
- strcpy(t->spacename, "global");
+ strcpy(t->spacename, IFACE_("global"));
break;
case V3D_MANIP_GIMBAL:
unit_m3(t->spacemtx);
if (gimbal_axis(ob, t->spacemtx)) {
- strcpy(t->spacename, "gimbal");
+ strcpy(t->spacename, IFACE_("gimbal"));
break;
}
/* no gimbal fallthrough to normal */
case V3D_MANIP_NORMAL:
if (obedit || (ob && ob->mode & OB_MODE_POSE)) {
- strcpy(t->spacename, "normal");
+ strcpy(t->spacename, IFACE_("normal"));
ED_getTransformOrientationMatrix(C, t->spacemtx, (v3d->around == V3D_ACTIVE));
break;
}
/* no break we define 'normal' as 'local' in Object mode */
case V3D_MANIP_LOCAL:
- strcpy(t->spacename, "local");
+ strcpy(t->spacename, IFACE_("local"));
if (ob) {
copy_m3_m4(t->spacemtx, ob->obmat);
@@ -528,7 +528,7 @@ void initTransformOrientation(bContext *C, TransInfo *t)
RegionView3D *rv3d = t->ar->regiondata;
float mat[3][3];
- strcpy(t->spacename, "view");
+ strcpy(t->spacename, IFACE_("view"));
copy_m3_m4(mat, rv3d->viewinv);
normalize_m3(mat);
copy_m3_m3(t->spacemtx, mat);
diff --git a/source/blender/editors/uvedit/CMakeLists.txt b/source/blender/editors/uvedit/CMakeLists.txt
index 1c69e569aa6..695a7cdd0f6 100644
--- a/source/blender/editors/uvedit/CMakeLists.txt
+++ b/source/blender/editors/uvedit/CMakeLists.txt
@@ -22,6 +22,7 @@ set(INC
../include
../../blenkernel
../../blenlib
+ ../../blenfont
../../blenloader
../../bmesh
../../makesdna
@@ -47,4 +48,8 @@ set(SRC
uvedit_parametrizer.h
)
+if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
blender_add_lib(bf_editor_uvedit "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/uvedit/SConscript b/source/blender/editors/uvedit/SConscript
index 01316680d5d..dfa15d2de4f 100644
--- a/source/blender/editors/uvedit/SConscript
+++ b/source/blender/editors/uvedit/SConscript
@@ -27,10 +27,15 @@
Import ('env')
+defs = []
+
sources = env.Glob('*.c')
-incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
+incs = '../include ../../blenlib ../../blenfont ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../bmesh ../../makesrna #/intern/opennl/extern ../../gpu ../../blenloader'
-env.BlenderLib ( 'bf_editors_uvedit', sources, Split(incs), [], libtype=['core'], priority=[45] )
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('WITH_INTERNATIONAL')
+
+env.BlenderLib ( 'bf_editors_uvedit', sources, Split(incs), defs, libtype=['core'], priority=[45] )
diff --git a/source/blender/editors/uvedit/uvedit_buttons.c b/source/blender/editors/uvedit/uvedit_buttons.c
index 1c32c01b8f0..5c188628978 100644
--- a/source/blender/editors/uvedit/uvedit_buttons.c
+++ b/source/blender/editors/uvedit/uvedit_buttons.c
@@ -43,6 +43,8 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_mesh.h"
@@ -152,8 +154,10 @@ static void uvedit_vertex_buttons(const bContext *C, uiBlock *block)
}
uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_UVEDIT_VERTEX, "X:", 10, 10, 145, 19, &uvedit_old_center[0], -10 * imx, 10.0 * imx, step, digits, "");
- uiDefButF(block, NUM, B_UVEDIT_VERTEX, "Y:", 165, 10, 145, 19, &uvedit_old_center[1], -10 * imy, 10.0 * imy, step, digits, "");
+ uiDefButF(block, NUM, B_UVEDIT_VERTEX, IFACE_("X:"), 10, 10, 145, 19, &uvedit_old_center[0],
+ -10 * imx, 10.0 * imx, step, digits, "");
+ uiDefButF(block, NUM, B_UVEDIT_VERTEX, IFACE_("Y:"), 165, 10, 145, 19, &uvedit_old_center[1],
+ -10 * imy, 10.0 * imy, step, digits, "");
uiBlockEndAlign(block);
}
}
@@ -214,7 +218,7 @@ void ED_uvedit_buttons_register(ARegionType *art)
pt = MEM_callocN(sizeof(PanelType), "spacetype image panel uv");
strcpy(pt->idname, "IMAGE_PT_uv");
- strcpy(pt->label, "UV Vertex");
+ strcpy(pt->label, N_("UV Vertex")); /* XXX C panels are not available through RNA (bpy.types)! */
pt->draw = image_panel_uv;
pt->poll = image_panel_uv_poll;
BLI_addtail(&art->paneltypes, pt);