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-10-19 20:43:10 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-10-19 20:43:10 +0400
commitf72f1dca6c70bd4597f0106adbd50608cdd8c01b (patch)
tree88d45cbf4d7b2afdf881f4db4d3aa2339308d6fa /source/blender/editors
parent97c68098cca15480f07afb28261021bb3548c89b (diff)
More UI messages fixes and tweaks, BKE_report<->BKE_reportf, and stuff to translate...
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/armature/editarmature.c16
-rw-r--r--source/blender/editors/armature/poselib.c22
-rw-r--r--source/blender/editors/armature/poseobject.c4
-rw-r--r--source/blender/editors/mesh/CMakeLists.txt5
-rw-r--r--source/blender/editors/mesh/SConscript5
-rw-r--r--source/blender/editors/mesh/editmesh_slide.c14
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c6
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c6
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c3
9 files changed, 46 insertions, 35 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 584bbf7a0aa..8a75d07a678 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -654,7 +654,7 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op)
if (ob->type != OB_ARMATURE)
return OPERATOR_CANCELLED;
if (BKE_object_obdata_is_libdata(ob)) {
- BKE_report(op->reports, RPT_ERROR, "Cannot apply pose to lib-linked armature"); //error_libdata();
+ BKE_report(op->reports, RPT_ERROR, "Cannot apply pose to lib-linked armature"); /* error_libdata(); */
return OPERATOR_CANCELLED;
}
@@ -666,7 +666,7 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op)
"transforms stored are relative to the old rest pose");
/* Get editbones of active armature to alter */
- ED_armature_to_edit(ob);
+ ED_armature_to_edit(ob);
/* get pose of active object and move it out of posemode */
pose = ob->pose;
@@ -2099,7 +2099,7 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
}
sub_v3_v3v3(nor, ebone->tail, ebone->head);
- vec_roll_to_mat3(nor, ebone->roll, mat);
+ vec_roll_to_mat3(nor, ebone->roll, mat);
copy_v3_v3(vec, mat[2]);
}
else { /* Axis */
@@ -2969,7 +2969,7 @@ static int armature_fill_bones_exec(bContext *C, wmOperator *op)
}
}
else {
- // FIXME.. figure out a method for multiple bones
+ /* FIXME.. figure out a method for multiple bones */
BKE_reportf(op->reports, RPT_ERROR, "Too many points selected: %d\n", count);
BLI_freelistN(&points);
return OPERATOR_CANCELLED;
@@ -3823,7 +3823,7 @@ static int armature_parent_set_exec(bContext *C, wmOperator *op)
/* there must be an active bone */
if (actbone == NULL) {
- BKE_report(op->reports, RPT_ERROR, "Operation requires an Active Bone");
+ BKE_report(op->reports, RPT_ERROR, "Operation requires an active bone");
return OPERATOR_CANCELLED;
}
else if (arm->flag & ARM_MIRROR_EDIT) {
@@ -4217,7 +4217,7 @@ static int armature_select_similar_exec(bContext *C, wmOperator *op)
/* Check for active bone */
if (ebone_act == NULL) {
- BKE_report(op->reports, RPT_ERROR, "Operation requires an Active Bone");
+ BKE_report(op->reports, RPT_ERROR, "Operation requires an active bone");
return OPERATOR_CANCELLED;
}
@@ -4409,7 +4409,7 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op)
/* there must be an active bone */
if (actbone == NULL) {
- BKE_report(op->reports, RPT_ERROR, "Operation requires an Active Bone");
+ BKE_report(op->reports, RPT_ERROR, "Operation requires an active bone");
return OPERATOR_CANCELLED;
}
else if (arm->flag & ARM_MIRROR_EDIT) {
@@ -5152,7 +5152,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op,
/* sanity checks */
if (ELEM(NULL, clear_func, default_ksName)) {
- BKE_report(op->reports, RPT_ERROR, "Programming error: missing clear transform function or Keying Set Name");
+ BKE_report(op->reports, RPT_ERROR, "Programming error: missing clear transform function or keying set name");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index eea7424c59a..a05a98c58ca 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -298,7 +298,7 @@ static int poselib_sanitize_exec(bContext *C, wmOperator *op)
/* validate action */
if (act == NULL) {
- BKE_report(op->reports, RPT_WARNING, "No Action to validate");
+ BKE_report(op->reports, RPT_WARNING, "No action to validate");
return OPERATOR_CANCELLED;
}
@@ -547,7 +547,7 @@ static int poselib_remove_exec(bContext *C, wmOperator *op)
/* check if valid poselib */
if (act == NULL) {
- BKE_report(op->reports, RPT_ERROR, "Object doesn't have PoseLib data");
+ BKE_report(op->reports, RPT_ERROR, "Object does not have pose lib data");
return OPERATOR_CANCELLED;
}
@@ -562,7 +562,7 @@ static int poselib_remove_exec(bContext *C, wmOperator *op)
/* get index (and pointer) of pose to remove */
marker = BLI_findlink(&act->markers, marker_index);
if (marker == NULL) {
- BKE_reportf(op->reports, RPT_ERROR, "Invalid Pose specified %d", marker_index);
+ BKE_reportf(op->reports, RPT_ERROR, "Invalid pose specified %d", marker_index);
return OPERATOR_CANCELLED;
}
@@ -628,14 +628,14 @@ static int poselib_rename_invoke(bContext *C, wmOperator *op, wmEvent *evt)
/* check if valid poselib */
if (act == NULL) {
- BKE_report(op->reports, RPT_ERROR, "Object doesn't have PoseLib data");
+ BKE_report(op->reports, RPT_ERROR, "Object does not have pose lib data");
return OPERATOR_CANCELLED;
}
/* get index (and pointer) of pose to remove */
marker = BLI_findlink(&act->markers, act->active_marker - 1);
if (marker == NULL) {
- BKE_report(op->reports, RPT_ERROR, "Invalid index for Pose");
+ BKE_report(op->reports, RPT_ERROR, "Invalid index for pose");
return OPERATOR_CANCELLED;
}
else {
@@ -657,14 +657,14 @@ static int poselib_rename_exec(bContext *C, wmOperator *op)
/* check if valid poselib */
if (act == NULL) {
- BKE_report(op->reports, RPT_ERROR, "Object doesn't have PoseLib data");
+ BKE_report(op->reports, RPT_ERROR, "Object does not have pose lib data");
return OPERATOR_CANCELLED;
}
/* get index (and pointer) of pose to remove */
marker = BLI_findlink(&act->markers, RNA_int_get(op->ptr, "pose"));
if (marker == NULL) {
- BKE_report(op->reports, RPT_ERROR, "Invalid index for Pose");
+ BKE_report(op->reports, RPT_ERROR, "Invalid index for pose");
return OPERATOR_CANCELLED;
}
@@ -1424,12 +1424,12 @@ static void poselib_preview_init_data(bContext *C, wmOperator *op)
/* check if valid poselib */
if (ELEM3(NULL, pld->ob, pld->pose, pld->arm)) {
- BKE_report(op->reports, RPT_ERROR, "PoseLib is only for Armatures in PoseMode");
+ BKE_report(op->reports, RPT_ERROR, "Pose lib is only for armatures in pose mode");
pld->state = PL_PREVIEW_ERROR;
return;
}
if (pld->act == NULL) {
- BKE_report(op->reports, RPT_ERROR, "Object doesn't have a valid PoseLib");
+ BKE_report(op->reports, RPT_ERROR, "Object does not have a valid pose lib");
pld->state = PL_PREVIEW_ERROR;
return;
}
@@ -1438,10 +1438,10 @@ static void poselib_preview_init_data(bContext *C, wmOperator *op)
/* just use first one then... */
pld->marker = pld->act->markers.first;
if (pose_index > -2)
- BKE_report(op->reports, RPT_WARNING, "PoseLib had no active pose");
+ BKE_report(op->reports, RPT_WARNING, "Pose lib had no active pose");
}
else {
- BKE_report(op->reports, RPT_ERROR, "PoseLib has no poses to preview/apply");
+ BKE_report(op->reports, RPT_ERROR, "Pose lib has no poses to preview/apply");
pld->state = PL_PREVIEW_ERROR;
return;
}
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 0e5daea6f16..99de90bc9fa 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -105,7 +105,7 @@ void ED_armature_enter_posemode(bContext *C, Base *base)
Object *ob = base->object;
if (ob->id.lib) {
- BKE_report(reports, RPT_WARNING, "Can't pose libdata");
+ BKE_report(reports, RPT_WARNING, "Cannot pose libdata");
return;
}
@@ -1236,7 +1236,7 @@ static int pose_copy_exec(bContext *C, wmOperator *op)
/* sanity checking */
if (ELEM(NULL, ob, ob->pose)) {
- BKE_report(op->reports, RPT_ERROR, "No Pose to Copy");
+ BKE_report(op->reports, RPT_ERROR, "No pose to copy");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt
index 246c323213c..9aa3f3633f3 100644
--- a/source/blender/editors/mesh/CMakeLists.txt
+++ b/source/blender/editors/mesh/CMakeLists.txt
@@ -21,6 +21,7 @@
set(INC
../include
../uvedit
+ ../../blenfont
../../blenkernel
../../blenlib
../../blenloader
@@ -68,4 +69,8 @@ if(WITH_GAMEENGINE)
)
endif()
+if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
blender_add_lib(bf_editor_mesh "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/mesh/SConscript b/source/blender/editors/mesh/SConscript
index b3aba977b21..923bb3f9057 100644
--- a/source/blender/editors/mesh/SConscript
+++ b/source/blender/editors/mesh/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('*.c')
defs = []
-incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
+incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../gpu ../../blenloader'
incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern'
@@ -24,4 +24,7 @@ if env['WITH_BF_GAMEENGINE']:
else:
sources.remove('mesh_navmesh.c')
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('WITH_INTERNATIONAL')
+
env.BlenderLib ( 'bf_editors_mesh', sources, Split(incs), defs, libtype=['core'], priority=[45] )
diff --git a/source/blender/editors/mesh/editmesh_slide.c b/source/blender/editors/mesh/editmesh_slide.c
index a0cf5efabd9..d370b5a881e 100644
--- a/source/blender/editors/mesh/editmesh_slide.c
+++ b/source/blender/editors/mesh/editmesh_slide.c
@@ -34,6 +34,8 @@
#include "BLI_array.h"
#include "BLI_math.h"
+#include "BLF_translation.h"
+
#include "BKE_context.h"
#include "BKE_report.h"
#include "BKE_tessmesh.h"
@@ -113,11 +115,11 @@ static int vtx_slide_init(bContext *C, wmOperator *op)
/* Custom data */
VertexSlideOp *vso;
- const char *header_str = "Vertex Slide: Hover over an edge and left-click to select slide edge. "
- "Left-Shift: Midpoint Snap, Left-Alt: Snap, Left-Ctrl: Snap&Merge";
+ const char *header_str = TIP_("Vertex Slide: Hover over an edge and left-click to select slide edge. "
+ "Left-Shift: Midpoint Snap, Left-Alt: Snap, Left-Ctrl: Snap & Merge");
if (!obedit) {
- BKE_report(op->reports, RPT_ERROR, "Vertex Slide Error: Not object in context");
+ BKE_report(op->reports, RPT_ERROR, "Vertex slide error: no object in context");
return FALSE;
}
@@ -126,7 +128,7 @@ static int vtx_slide_init(bContext *C, wmOperator *op)
/* Is there a starting vertex ? */
if (ese == NULL || (ese->htype != BM_VERT && ese->htype != BM_EDGE)) {
- BKE_report(op->reports, RPT_ERROR_INVALID_INPUT, "Vertex Slide Error: Select a (single) vertex");
+ BKE_report(op->reports, RPT_ERROR_INVALID_INPUT, "Vertex slide error: select a (single) vertex");
return FALSE;
}
@@ -177,7 +179,7 @@ static int vtx_slide_init(bContext *C, wmOperator *op)
/* Init frame */
if (!vtx_slide_set_frame(vso)) {
- BKE_report(op->reports, RPT_ERROR_INVALID_INPUT, "Vertex Slide: Can't find starting vertex!");
+ BKE_report(op->reports, RPT_ERROR_INVALID_INPUT, "Vertex slide error: cannot find starting vertex!");
vtx_slide_exit(C, op);
return FALSE;
}
@@ -719,7 +721,7 @@ static int edbm_vertex_slide_exec_ex(bContext *C, wmOperator *op, const int do_u
/* Is there a starting vertex ? */
if ((ese == NULL) || (ese->htype != BM_VERT && ese->htype != BM_EDGE)) {
- BKE_report(op->reports, RPT_ERROR_INVALID_INPUT, "Vertex Slide Error: Select a (single) vertex");
+ BKE_report(op->reports, RPT_ERROR_INVALID_INPUT, "Vertex slide error: select a (single) vertex");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 695afd44408..eba71a63e2c 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -2133,7 +2133,7 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op)
}
count = totvert_orig - em->bm->totvert;
- BKE_reportf(op->reports, RPT_INFO, "Removed %d vert%s", count, (count == 1) ? "ex" : "ices");
+ BKE_reportf(op->reports, RPT_INFO, "Removed %d vertices", count);
EDBM_update_generic(C, em, TRUE);
@@ -2218,7 +2218,7 @@ static int edbm_select_vertex_path_exec(bContext *C, wmOperator *op)
}
if (svert == NULL || evert == NULL) {
- BKE_report(op->reports, RPT_WARNING, "Path Selection requires that two vertices be selected");
+ BKE_report(op->reports, RPT_WARNING, "Path selection requires two vertices to be selected");
return OPERATOR_CANCELLED;
}
@@ -4330,7 +4330,7 @@ static int edbm_sort_elements_exec(bContext *C, wmOperator *op)
if (ELEM(action, SRT_VIEW_ZAXIS, SRT_VIEW_XAXIS)) {
if (rv3d == NULL) {
- BKE_report(op->reports, RPT_ERROR, "View not found, can't sort by view axis");
+ BKE_report(op->reports, RPT_ERROR, "View not found, cannot sort by view axis");
return OPERATOR_CANCELLED;
}
}
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 59273ee66b3..acc69309a8c 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -2135,7 +2135,7 @@ static int select_linked_internal(bContext *C, wmOperator *op, wmEvent *event, i
NearestHit hit, *hit_p = NULL;
if (ts->uv_flag & UV_SYNC_SELECTION) {
- BKE_report(op->reports, RPT_ERROR, "Can't select linked when sync selection is enabled");
+ BKE_report(op->reports, RPT_ERROR, "Cannot select linked when sync selection is enabled");
return OPERATOR_CANCELLED;
}
@@ -2242,7 +2242,7 @@ static int select_split_exec(bContext *C, wmOperator *op)
short change = FALSE;
if (ts->uv_flag & UV_SYNC_SELECTION) {
- BKE_report(op->reports, RPT_ERROR, "Can't split selection when sync selection is enabled");
+ BKE_report(op->reports, RPT_ERROR, "Cannot split selection when sync selection is enabled");
return OPERATOR_CANCELLED;
}
@@ -2321,7 +2321,7 @@ static int unlink_selection_exec(bContext *C, wmOperator *op)
MLoopUV *luv;
if (ts->uv_flag & UV_SYNC_SELECTION) {
- BKE_report(op->reports, RPT_ERROR, "Can't unlink selection when sync selection is enabled");
+ BKE_report(op->reports, RPT_ERROR, "Cannot unlink selection when sync selection is enabled");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index decd94f77c8..19a1c4339ad 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -1184,7 +1184,8 @@ static int unwrap_exec(bContext *C, wmOperator *op)
mat4_to_size(obsize, obedit->obmat);
if (!compare_v3v3(obsize, unitsize, 1e-4f))
- BKE_report(op->reports, RPT_INFO, "Object scale is not 1.0. Unwrap will operate on a non-scaled version of the mesh.");
+ BKE_report(op->reports, RPT_INFO,
+ "Object scale is not 1.0, unwrap will operate on a non-scaled version of the mesh");
/* remember last method for live unwrap */
if (RNA_struct_property_is_set(op->ptr, "method"))