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>2012-03-04 01:42:21 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-03-04 01:42:21 +0400
commit685fda4f13715ccadb32fa72af1b557cb55c9574 (patch)
tree6bed82889f7b418efea9557262304c321b1ed744 /source/blender/editors/animation
parent35900761939465a3014ef58a12e9293d59575e32 (diff)
Many i18n fixings, based on [#30428] [2.62] Translation Issues.
In fact, most "UI special cases" are not well translated, currently. :/ This affects especially the "Properties" panels. This commit should address problems in Graph editors, and 3D View (but probably not yet all of them). Yet it already adds more than 100 new messages (and fixes translated drawing of more). Also done some style edits…
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/CMakeLists.txt1
-rw-r--r--source/blender/editors/animation/SConscript2
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c93
3 files changed, 62 insertions, 34 deletions
diff --git a/source/blender/editors/animation/CMakeLists.txt b/source/blender/editors/animation/CMakeLists.txt
index 0386af9776c..2549358f285 100644
--- a/source/blender/editors/animation/CMakeLists.txt
+++ b/source/blender/editors/animation/CMakeLists.txt
@@ -20,6 +20,7 @@
set(INC
../include
+ ../../blenfont
../../blenkernel
../../blenlib
../../blenloader
diff --git a/source/blender/editors/animation/SConscript b/source/blender/editors/animation/SConscript
index 3e5133c1174..120000fedc4 100644
--- a/source/blender/editors/animation/SConscript
+++ b/source/blender/editors/animation/SConscript
@@ -3,7 +3,7 @@ Import ('env')
sources = env.Glob('*.c')
-incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf'
+incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf ../../blenfont'
incs += ' ../../bmesh ../../windowmanager #/intern/guardedalloc #/extern/glew/include ../../blenloader'
env.BlenderLib ( 'bf_editors_animation', sources, Split(incs), [], libtype=['core'], priority=[125] )
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index 0b63a0ad752..f2e18983e05 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -45,6 +45,8 @@
#include "MEM_guardedalloc.h"
+#include "BLF_translation.h"
+
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
@@ -141,39 +143,50 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
/* draw polynomial order selector */
row= uiLayoutRow(layout, 0);
block= uiLayoutGetBlock(row);
- but= uiDefButI(block, NUM, B_FMODIFIER_REDRAW, "Poly Order: ", 10,0,width-30,19, &data->poly_order, 1, 100, 0, 0, "'Order' of the Polynomial - for a polynomial with n terms, 'order' is n-1");
+ but= uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 10, 0, width-30, 19,
+ &data->poly_order, 1, 100, 0, 0,
+ TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)"));
uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
/* draw controls for each coefficient and a + sign at end of row */
row= uiLayoutRow(layout, 1);
block= uiLayoutGetBlock(row);
- uiDefBut(block, LABEL, 1, "y = ", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
cp= data->coefficients;
for (i=0; (i < data->arraysize) && (cp); i++, cp++) {
+ /* To align with first line. */
+ if (i)
+ uiDefBut(block, LABEL, 1, " ", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
+ else
+ uiDefBut(block, LABEL, 1, "y =", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
/* coefficient */
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 150, 20, cp, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient for polynomial");
+ uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 150, 20, cp, -UI_FLT_MAX, UI_FLT_MAX,
+ 10, 3, TIP_("Coefficient for polynomial"));
/* 'x' param (and '+' if necessary) */
- if (i) {
- if (i == 1)
- strcpy(xval, "x");
- else
- sprintf(xval, "x^%u", i);
- uiDefBut(block, LABEL, 1, xval, 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "Power of x");
- }
+ if (i == 0)
+ strcpy(xval, "");
+ else if (i == 1)
+ strcpy(xval, "x");
+ else
+ sprintf(xval, "x^%u", i);
+ uiDefBut(block, LABEL, 1, xval, 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, TIP_("Power of x"));
if ( (i != (data->arraysize - 1)) || ((i==0) && data->arraysize==2) ) {
- uiDefBut(block, LABEL, 1, "+", 0,0 , 30, 20, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefBut(block, LABEL, 1, "+", 0, 0, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
/* next coefficient on a new row */
row= uiLayoutRow(layout, 1);
block= uiLayoutGetBlock(row);
}
+ else {
+ /* For alignement in UI! */
+ uiDefBut(block, LABEL, 1, " ", 0, 0, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
+ }
}
- }
break;
+ }
case FCM_GENERATOR_POLYNOMIAL_FACTORISED: /* Factorized polynomial expression */
{
@@ -183,26 +196,34 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
/* draw polynomial order selector */
row= uiLayoutRow(layout, 0);
block= uiLayoutGetBlock(row);
- but= uiDefButI(block, NUM, B_FMODIFIER_REDRAW, "Poly Order: ", 0,0,width-30,19, &data->poly_order, 1, 100, 0, 0, "'Order' of the Polynomial - for a polynomial with n terms, 'order' is n-1");
+ but= uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 0, 0, width-30, 19,
+ &data->poly_order, 1, 100, 0, 0,
+ TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)"));
uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
/* draw controls for each pair of coefficients */
row= uiLayoutRow(layout, 1);
block= uiLayoutGetBlock(row);
- uiDefBut(block, LABEL, 1, "y=", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
cp= data->coefficients;
for (i=0; (i < data->poly_order) && (cp); i++, cp+=2) {
+ /* To align with first line. */
+ if (i)
+ uiDefBut(block, LABEL, 1, " ", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
+ else
+ uiDefBut(block, LABEL, 1, "y =", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
/* opening bracket */
uiDefBut(block, LABEL, 1, "(", 0, 0, 20, 20, NULL, 0.0, 0.0, 0, 0, "");
/* coefficients */
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 100, 20, cp, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient of x");
+ uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 100, 20, cp, -UI_FLT_MAX, UI_FLT_MAX,
+ 10, 3, TIP_("Coefficient of x"));
- uiDefBut(block, LABEL, 1, "x+", 0, 0, 40, 20, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefBut(block, LABEL, 1, "x +", 0, 0, 40, 20, NULL, 0.0, 0.0, 0, 0, "");
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 100, 20, cp+1, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Second coefficient");
+ uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 100, 20, cp+1, -UI_FLT_MAX, UI_FLT_MAX,
+ 10, 3, TIP_("Second coefficient"));
/* closing bracket and '+' sign */
if ( (i != (data->poly_order - 1)) || ((i==0) && data->poly_order==2) ) {
@@ -261,13 +282,13 @@ static void draw_modifier__cycles(uiLayout *layout, ID *id, FModifier *fcm, shor
/* before range */
col= uiLayoutColumn(split, 1);
- uiItemL(col, "Before:", ICON_NONE);
+ uiItemL(col, IFACE_("Before:"), ICON_NONE);
uiItemR(col, &ptr, "mode_before", 0, "", ICON_NONE);
uiItemR(col, &ptr, "cycles_before", 0, NULL, ICON_NONE);
/* after range */
col= uiLayoutColumn(split, 1);
- uiItemL(col, "After:", ICON_NONE);
+ uiItemL(col, IFACE_("After:"), ICON_NONE);
uiItemR(col, &ptr, "mode_after", 0, "", ICON_NONE);
uiItemR(col, &ptr, "cycles_after", 0, NULL, ICON_NONE);
}
@@ -479,12 +500,12 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh
/* general settings */
col= uiLayoutColumn(layout, 1);
- uiItemL(col, "Envelope:", ICON_NONE);
+ uiItemL(col, IFACE_("Envelope:"), ICON_NONE);
uiItemR(col, &ptr, "reference_value", 0, NULL, ICON_NONE);
row= uiLayoutRow(col, 1);
- uiItemR(row, &ptr, "default_min", 0, "Min", ICON_NONE);
- uiItemR(row, &ptr, "default_max", 0, "Max", ICON_NONE);
+ uiItemR(row, &ptr, "default_min", 0, IFACE_("Min"), ICON_NONE);
+ uiItemR(row, &ptr, "default_max", 0, IFACE_("Max"), ICON_NONE);
/* control points header */
// TODO: move this control-point control stuff to using the new special widgets for lists
@@ -492,9 +513,10 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh
row= uiLayoutRow(layout, 0);
block= uiLayoutGetBlock(row);
- uiDefBut(block, LABEL, 1, "Control Points:", 0, 0, 150, 20, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefBut(block, LABEL, 1, IFACE_("Control Points:"), 0, 0, 150, 20, NULL, 0.0, 0.0, 0, 0, "");
- but= uiDefBut(block, BUT, B_FMODIFIER_REDRAW, "Add Point", 0,0,150,19, NULL, 0, 0, 0, 0, "Adds a new control-point to the envelope on the current frame");
+ but= uiDefBut(block, BUT, B_FMODIFIER_REDRAW, IFACE_("Add Point"), 0, 0, 150, 19,
+ NULL, 0, 0, 0, 0, TIP_("Add a new control-point to the envelope on the current frame"));
uiButSetFunc(but, fmod_envelope_addpoint_cb, env, NULL);
/* control points list */
@@ -504,13 +526,17 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh
block= uiLayoutGetBlock(row);
uiBlockBeginAlign(block);
- but=uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Fra:", 0, 0, 90, 20, &fed->time, -MAXFRAMEF, MAXFRAMEF, 10, 1, "Frame that envelope point occurs");
+ but=uiDefButF(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Fra:"), 0, 0, 90, 20,
+ &fed->time, -MAXFRAMEF, MAXFRAMEF, 10, 1, TIP_("Frame that envelope point occurs"));
uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Min:", 0, 0, 100, 20, &fed->min, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, "Minimum bound of envelope at this point");
- uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Max:", 0, 0, 100, 20, &fed->max, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, "Maximum bound of envelope at this point");
+ uiDefButF(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Min:"), 0, 0, 100, 20,
+ &fed->min, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, TIP_("Minimum bound of envelope at this point"));
+ uiDefButF(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Max:"), 0, 0, 100, 20,
+ &fed->max, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, TIP_("Maximum bound of envelope at this point"));
- but= uiDefIconBut(block, BUT, B_FMODIFIER_REDRAW, ICON_X, 0, 0, 18, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Delete envelope control point");
+ but= uiDefIconBut(block, BUT, B_FMODIFIER_REDRAW, ICON_X, 0, 0, 18, 20,
+ NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Delete envelope control point"));
uiButSetFunc(but, fmod_envelope_deletepoint_cb, env, SET_INT_IN_POINTER(i));
uiBlockBeginAlign(block);
}
@@ -648,7 +674,8 @@ void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifie
uiBlockSetEmboss(block, UI_EMBOSSN);
/* delete button */
- but= uiDefIconBut(block, BUT, B_REDR, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "Delete F-Curve Modifier");
+ but= uiDefIconBut(block, BUT, B_REDR, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y,
+ NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Delete F-Curve Modifier"));
uiButSetFunc(but, delete_fmodifier_cb, modifiers, fcm);
uiBlockSetEmboss(block, UI_EMBOSS);
@@ -709,14 +736,14 @@ void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifie
/* second row: settings */
row = uiLayoutRow(col, 1);
- uiItemR(row, &ptr, "frame_start", 0, "Start", ICON_NONE);
- uiItemR(row, &ptr, "frame_end", 0, "End", ICON_NONE);
+ uiItemR(row, &ptr, "frame_start", 0, IFACE_("Start"), ICON_NONE);
+ uiItemR(row, &ptr, "frame_end", 0, IFACE_("End"), ICON_NONE);
/* third row: blending influence */
row = uiLayoutRow(col, 1);
- uiItemR(row, &ptr, "blend_in", 0, "In", ICON_NONE);
- uiItemR(row, &ptr, "blend_out", 0, "Out", ICON_NONE);
+ uiItemR(row, &ptr, "blend_in", 0, IFACE_("In"), ICON_NONE);
+ uiItemR(row, &ptr, "blend_out", 0, IFACE_("Out"), ICON_NONE);
}
/* influence -------------------------------------------------------------- */