diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-10-26 21:32:50 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-10-26 21:32:50 +0400 |
commit | c9dade4fe0ba8c94aad919a1fedc3403e8dc5419 (patch) | |
tree | 2c7cb5e5889987262491af7543319fc849b83bf0 /source/blender/editors | |
parent | 6abd7fda52a01349a851650e309399817fc095f9 (diff) |
Big i18n commit: add "reports" from bmesh/readfile/tracking/dynapaint (and a few others), and another bunch of UI messages tweaks/fixes, as well as some BKE_report()<->BKE_reportf()...
Diffstat (limited to 'source/blender/editors')
54 files changed, 175 insertions, 136 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 0ae06e71b66..852f3fa5469 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -522,7 +522,7 @@ static int ed_markers_opwrap_invoke_custom(bContext *C, wmOperator *op, wmEvent else if (op->type->exec) retval = op->type->exec(C, op); else - BKE_report(op->reports, RPT_ERROR, "Programming error: operator doesn't actually have code to do anything!"); + BKE_report(op->reports, RPT_ERROR, "Programming error: operator does not actually have code to do anything!"); /* return status modifications - for now, make this spacetype dependent as above */ if (sa->spacetype != SPACE_TIME) { @@ -1377,7 +1377,7 @@ static int ed_marker_make_links_scene_exec(bContext *C, wmOperator *op) } if (scene_to == CTX_data_scene(C)) { - BKE_report(op->reports, RPT_ERROR, "Can't re-link markers into the same scene"); + BKE_report(op->reports, RPT_ERROR, "Cannot re-link markers into the same scene"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 238dd9c68e4..4f16c1a6622 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -789,7 +789,7 @@ short insert_keyframe_direct(ReportList *reports, PointerRNA ptr, PropertyRNA *p /* F-Curve not editable? */ if (fcurve_is_keyframable(fcu) == 0) { BKE_reportf(reports, RPT_ERROR, - "F-Curve with path = '%s' [%d] cannot be keyframed, ensure that it is not locked or sampled, " + "F-Curve with path '%s[%d]' cannot be keyframed, ensure that it is not locked or sampled, " "and try removing F-Modifiers", fcu->rna_path, fcu->array_index); return 0; @@ -1028,7 +1028,7 @@ short delete_keyframe(ReportList *reports, ID *id, bAction *act, const char grou cfra = BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP); } else { - BKE_reportf(reports, RPT_ERROR, "No action to delete keyframes from for ID = %s\n", id->name); + BKE_reportf(reports, RPT_ERROR, "No action to delete keyframes from for ID = %s", id->name); return 0; } } @@ -1126,7 +1126,7 @@ static short clear_keyframe(ReportList *reports, ID *id, bAction *act, const cha act = adt->action; } else { - BKE_reportf(reports, RPT_ERROR, "No action to delete keyframes from for ID = %s\n", id->name); + BKE_reportf(reports, RPT_ERROR, "No action to delete keyframes from for ID = %s", id->name); return 0; } } @@ -1236,7 +1236,7 @@ static int insert_key_exec(bContext *C, wmOperator *op) /* try to insert keyframes for the channels specified by KeyingSet */ success = ANIM_apply_keyingset(C, NULL, NULL, ks, MODIFYKEY_MODE_INSERT, cfra); if (G.debug & G_DEBUG) - BKE_reportf(op->reports, RPT_INFO, "Keying set '%s' - successfully added %d keyframes\n", ks->name, success); + BKE_reportf(op->reports, RPT_INFO, "Keying set '%s' - successfully added %d keyframes", ks->name, success); /* report failure or do updates? */ if (success == MODIFYKEY_INVALID_CONTEXT) { diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index 5844bd6708f..9c3c8de3ed6 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -947,7 +947,7 @@ int ANIM_apply_keyingset(bContext *C, ListBase *dsources, bAction *act, KeyingSe /* skip path if no ID pointer is specified */ if (ksp->id == NULL) { BKE_reportf(reports, RPT_WARNING, - "Skipping path in keying set, as it has no ID (KS = '%s', path = '%s'[%d])", + "Skipping path in keying set, as it has no ID (KS = '%s', path = '%s[%d]')", ks->name, ksp->rna_path, ksp->array_index); continue; } diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 15efe71397f..48da23d5e8d 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -2970,7 +2970,7 @@ static int armature_fill_bones_exec(bContext *C, wmOperator *op) } else { /* FIXME.. figure out a method for multiple bones */ - BKE_reportf(op->reports, RPT_ERROR, "Too many points selected: %d\n", count); + BKE_reportf(op->reports, RPT_ERROR, "Too many points selected: %d", count); BLI_freelistN(&points); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 51b7a3aa984..3963f9fed2d 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -53,7 +53,6 @@ #include "BKE_modifier.h" #include "BKE_mesh.h" - #ifdef RIGID_DEFORM #include "BLI_polardecomp.h" #endif @@ -794,7 +793,7 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource, } } else if (*err_str == NULL) { - *err_str = "Bone Heat Weighting: failed to find solution for one or more bones"; + *err_str = N_("Bone Heat Weighting: failed to find solution for one or more bones"); break; } diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 336ff5e1023..685ae343b84 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1361,7 +1361,7 @@ static int separate_exec(bContext *C, wmOperator *op) oldedit = oldcu->editnurb; if (oldcu->key) { - BKE_report(op->reports, RPT_ERROR, "Can't separate a curve with vertex keys"); + BKE_report(op->reports, RPT_ERROR, "Cannot separate a curve with vertex keys"); return OPERATOR_CANCELLED; } @@ -3501,7 +3501,7 @@ static int set_spline_type_exec(bContext *C, wmOperator *op) int changed = 0, type = RNA_enum_get(op->ptr, "type"); if (type == CU_CARDINAL || type == CU_BSPLINE) { - BKE_report(op->reports, RPT_ERROR, "Not implemented yet"); + BKE_report(op->reports, RPT_ERROR, "Not yet implemented"); return OPERATOR_CANCELLED; } @@ -3833,7 +3833,7 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu } if (nu1->pntsv != nu2->pntsv) { - BKE_report(op->reports, RPT_ERROR, "Resolution doesn't match"); + BKE_report(op->reports, RPT_ERROR, "Resolution does not match"); return; } @@ -3943,7 +3943,7 @@ static int merge_nurb(bContext *C, wmOperator *op) } if (ok == 0) { - BKE_report(op->reports, RPT_ERROR, "Resolution doesn't match"); + BKE_report(op->reports, RPT_ERROR, "Resolution does not match"); BLI_freelistN(&nsortbase); return OPERATOR_CANCELLED; } @@ -4123,7 +4123,7 @@ static int make_segment_exec(bContext *C, wmOperator *op) } if (!ok) { - BKE_report(op->reports, RPT_ERROR, "Can't make segment"); + BKE_report(op->reports, RPT_ERROR, "Cannot make segment"); return OPERATOR_CANCELLED; } @@ -4376,7 +4376,7 @@ static int spin_exec(bContext *C, wmOperator *op) unit_m4(viewmat); if (!spin_nurb(viewmat, obedit, axis, cent)) { - BKE_report(op->reports, RPT_ERROR, "Can't spin"); + BKE_report(op->reports, RPT_ERROR, "Cannot spin"); return OPERATOR_CANCELLED; } @@ -5624,10 +5624,10 @@ static int select_nth_exec(bContext *C, wmOperator *op) if (!CU_select_nth(obedit, nth)) { if (obedit->type == OB_SURF) { - BKE_report(op->reports, RPT_ERROR, "Surface hasn't got active point"); + BKE_report(op->reports, RPT_ERROR, "Surface has not got active point"); } else { - BKE_report(op->reports, RPT_ERROR, "Curve hasn't got active point"); + BKE_report(op->reports, RPT_ERROR, "Curve has not got active point"); } return OPERATOR_CANCELLED; diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 46df8ba5fac..ed8a1ea8280 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -212,7 +212,7 @@ static int gp_data_add_exec(bContext *C, wmOperator *op) bGPdata **gpd_ptr = gpencil_data_get_pointers(C, NULL); if (gpd_ptr == NULL) { - BKE_report(op->reports, RPT_ERROR, "Nowhere for Grease Pencil data to go"); + BKE_report(op->reports, RPT_ERROR, "Nowhere for grease pencil data to go"); return OPERATOR_CANCELLED; } else { @@ -260,7 +260,7 @@ static int gp_data_unlink_exec(bContext *C, wmOperator *op) bGPdata **gpd_ptr = gpencil_data_get_pointers(C, NULL); if (gpd_ptr == NULL) { - BKE_report(op->reports, RPT_ERROR, "Nowhere for Grease Pencil data to go"); + BKE_report(op->reports, RPT_ERROR, "Nowhere for grease pencil data to go"); return OPERATOR_CANCELLED; } else { @@ -299,7 +299,7 @@ static int gp_layer_add_exec(bContext *C, wmOperator *op) /* if there's no existing Grease-Pencil data there, add some */ if (gpd_ptr == NULL) { - BKE_report(op->reports, RPT_ERROR, "Nowhere for Grease Pencil data to go"); + BKE_report(op->reports, RPT_ERROR, "Nowhere for grease pencil data to go"); return OPERATOR_CANCELLED; } if (*gpd_ptr == NULL) @@ -348,7 +348,7 @@ static int gp_actframe_delete_exec(bContext *C, wmOperator *op) /* if there's no existing Grease-Pencil data there, add some */ if (gpd == NULL) { - BKE_report(op->reports, RPT_ERROR, "No Grease Pencil data"); + BKE_report(op->reports, RPT_ERROR, "No grease pencil data"); return OPERATOR_CANCELLED; } if (ELEM(NULL, gpl, gpf)) { @@ -634,7 +634,7 @@ static int gp_convert_layer_exec(bContext *C, wmOperator *op) /* check if there's data to work with */ if (gpd == NULL) { - BKE_report(op->reports, RPT_ERROR, "No Grease Pencil data to work on"); + BKE_report(op->reports, RPT_ERROR, "No grease pencil data to work on"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 017ffdcfb14..e7a5f993d32 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -807,7 +807,7 @@ static int editsource_text_edit(bContext *C, wmOperator *op, } if (text == NULL) { - BKE_reportf(op->reports, RPT_WARNING, "File: '%s' can't be opened", filepath); + BKE_reportf(op->reports, RPT_WARNING, "File '%s' cannot be opened", filepath); return OPERATOR_CANCELLED; } else { @@ -870,12 +870,12 @@ static int editsource_exec(bContext *C, wmOperator *op) but_store->py_dbg_ln); } else { - BKE_report(op->reports, RPT_ERROR, "Active button isn't from a script, cant edit source"); + BKE_report(op->reports, RPT_ERROR, "Active button is not from a script, cannot edit source"); ret = OPERATOR_CANCELLED; } } else { - BKE_report(op->reports, RPT_ERROR, "Active button match can't be found"); + BKE_report(op->reports, RPT_ERROR, "Active button match cannot be found"); ret = OPERATOR_CANCELLED; } @@ -973,12 +973,12 @@ static int edittranslation_exec(bContext *C, wmOperator *op) uiStringInfo rna_ctxt = {BUT_GET_RNA_LABEL_CONTEXT, NULL}; if (!BLI_is_dir(root)) { - BKE_report(op->reports, RPT_ERROR, "Please set your User Preferences' \"Translation Branches " - "Directory\" path to a valid directory"); + BKE_report(op->reports, RPT_ERROR, "Please set your User Preferences' 'Translation Branches " + "Directory' path to a valid directory"); return OPERATOR_CANCELLED; } if (!WM_operatortype_find(EDTSRC_I18N_OP_NAME, 0)) { - BKE_reportf(op->reports, RPT_ERROR, "Could not find operator \"%s\"! Please enable ui_translate addon " + BKE_reportf(op->reports, RPT_ERROR, "Could not find operator '%s'! Please enable ui_translate addon " "in the User Preferences", EDTSRC_I18N_OP_NAME); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index 262f81abacb..8e5c89adfca 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -419,7 +419,7 @@ static int ringcut_invoke(bContext *C, wmOperator *op, wmEvent *evt) float dist = 75.0f; if (modifiers_isDeformedByLattice(obedit) || modifiers_isDeformedByArmature(obedit)) - BKE_report(op->reports, RPT_WARNING, "Loop cut doesn't work well on deformed edit mesh display"); + BKE_report(op->reports, RPT_WARNING, "Loop cut does not work well on deformed edit mesh display"); view3d_operator_needs_opengl(C); diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c index 8fe2aa4b1a7..f12e5ddfadb 100644 --- a/source/blender/editors/mesh/editmesh_rip.c +++ b/source/blender/editors/mesh/editmesh_rip.c @@ -1007,7 +1007,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) * with modified selection */ // WM_operator_name_call(C, "MESH_OT_region_to_loop", WM_OP_INVOKE_DEFAULT, NULL); - BKE_report(op->reports, RPT_ERROR, "Can't rip selected faces"); + BKE_report(op->reports, RPT_ERROR, "Cannot rip selected faces"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index c0c4be3ec77..03c88c4a9da 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -2472,7 +2472,7 @@ static int edbm_select_non_manifold_exec(bContext *C, wmOperator *op) */ if (em->selectmode == SCE_SELECT_FACE) { - BKE_report(op->reports, RPT_ERROR, "Doesn't work in face selection mode"); + BKE_report(op->reports, RPT_ERROR, "Does not work in face selection mode"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index dd0cc08bf37..fd3eabdaec3 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -3559,9 +3559,9 @@ void MESH_OT_dissolve_limited(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; prop = RNA_def_float_rotation(ot->srna, "angle_limit", 0, NULL, 0.0f, DEG2RADF(180.0f), - "Max Angle", "Angle Limit in Degrees", 0.0f, DEG2RADF(180.0f)); + "Max Angle", "Angle limit", 0.0f, DEG2RADF(180.0f)); RNA_def_property_float_default(prop, DEG2RADF(15.0f)); - RNA_def_boolean(ot->srna, "use_dissolve_boundaries", 0, "All Boundries", + RNA_def_boolean(ot->srna, "use_dissolve_boundaries", 0, "All Boundaries", "Dissolve all vertices inbetween face boundaries"); } diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 9feaafbd857..765f9307247 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -113,7 +113,7 @@ int join_mesh_exec(bContext *C, wmOperator *op) CustomData vdata, edata, fdata, ldata, pdata; if (scene->obedit) { - BKE_report(op->reports, RPT_WARNING, "Cannot join while in editmode"); + BKE_report(op->reports, RPT_WARNING, "Cannot join while in edit mode"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 9a57f9d0ba8..9fc4e0a906d 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -2057,11 +2057,11 @@ static int join_exec(bContext *C, wmOperator *op) Object *ob = CTX_data_active_object(C); if (scene->obedit) { - BKE_report(op->reports, RPT_ERROR, "This data does not support joining in editmode"); + BKE_report(op->reports, RPT_ERROR, "This data does not support joining in edit mode"); return OPERATOR_CANCELLED; } else if (BKE_object_obdata_is_libdata(ob)) { - BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata"); + BKE_report(op->reports, RPT_ERROR, "Cannot edit external libdata"); return OPERATOR_CANCELLED; } @@ -2111,11 +2111,11 @@ static int join_shapes_exec(bContext *C, wmOperator *op) Object *ob = CTX_data_active_object(C); if (scene->obedit) { - BKE_report(op->reports, RPT_ERROR, "This data does not support joining in editmode"); + BKE_report(op->reports, RPT_ERROR, "This data does not support joining in edit mode"); return OPERATOR_CANCELLED; } else if (BKE_object_obdata_is_libdata(ob)) { - BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata"); + BKE_report(op->reports, RPT_ERROR, "Cannot edit external libdata"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index 09c80bdc3dc..2914a1ff673 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -967,7 +967,7 @@ static int multiresbake_check(bContext *C, wmOperator *op) } if (mmd->lvl == 0) { - BKE_report(op->reports, RPT_ERROR, "Multires data baking is not support for preview subdivision level 0"); + BKE_report(op->reports, RPT_ERROR, "Multires data baking is not supported for preview subdivision level 0"); break; } diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 1b486f589ae..f78e1203bc4 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -807,7 +807,7 @@ static int childof_set_inverse_exec(bContext *C, wmOperator *op) /* despite 3 layers of checks, we may still not be able to find a constraint */ if (data == NULL) { printf("DEBUG: Child-Of Set Inverse - object = '%s'\n", (ob) ? ob->id.name + 2 : "<None>"); - BKE_report(op->reports, RPT_ERROR, "Couldn't find constraint data for Child-Of Set Inverse"); + BKE_report(op->reports, RPT_ERROR, "Could not find constraint data for Child-Of Set Inverse"); return OPERATOR_CANCELLED; } @@ -1028,7 +1028,7 @@ static int objectsolver_set_inverse_exec(bContext *C, wmOperator *op) /* despite 3 layers of checks, we may still not be able to find a constraint */ if (data == NULL) { printf("DEBUG: Child-Of Set Inverse - object = '%s'\n", (ob) ? ob->id.name + 2 : "<None>"); - BKE_report(op->reports, RPT_ERROR, "Couldn't find constraint data for Child-Of Set Inverse"); + BKE_report(op->reports, RPT_ERROR, "Could not find constraint data for Child-Of Set Inverse"); return OPERATOR_CANCELLED; } @@ -1628,15 +1628,15 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase return OPERATOR_CANCELLED; } if ((type == CONSTRAINT_TYPE_RIGIDBODYJOINT) && (list != &ob->constraints)) { - BKE_report(op->reports, RPT_ERROR, "Rigid Body Joint Constraint can only be added to Objects"); + BKE_report(op->reports, RPT_ERROR, "Rigid Body Joint constraint can only be added to objects"); return OPERATOR_CANCELLED; } if ((type == CONSTRAINT_TYPE_KINEMATIC) && ((!pchan) || (list != &pchan->constraints))) { - BKE_report(op->reports, RPT_ERROR, "IK Constraint can only be added to Bones"); + BKE_report(op->reports, RPT_ERROR, "IK constraint can only be added to bones"); return OPERATOR_CANCELLED; } if ((type == CONSTRAINT_TYPE_SPLINEIK) && ((!pchan) || (list != &pchan->constraints))) { - BKE_report(op->reports, RPT_ERROR, "Spline IK Constraint can only be added to Bones"); + BKE_report(op->reports, RPT_ERROR, "Spline IK constraint can only be added to bones"); return OPERATOR_CANCELLED; } @@ -1856,7 +1856,7 @@ static int pose_ik_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt)) /* must have active bone */ if (ELEM(NULL, ob, pchan)) { - BKE_report(op->reports, RPT_ERROR, "Must have active bone to add IK Constraint to"); + BKE_report(op->reports, RPT_ERROR, "Must have an active bone to add IK constraint to"); return OPERATOR_CANCELLED; } @@ -1865,7 +1865,7 @@ static int pose_ik_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt)) if (con->type == CONSTRAINT_TYPE_KINEMATIC) break; } if (con) { - BKE_report(op->reports, RPT_ERROR, "Bone already has IK Constraint"); + BKE_report(op->reports, RPT_ERROR, "Bone already has an IK constraint"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c index e8d388bb812..a3bf27a19d6 100644 --- a/source/blender/editors/object/object_group.c +++ b/source/blender/editors/object/object_group.c @@ -195,7 +195,7 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op) } } - if (!ok) BKE_report(op->reports, RPT_ERROR, "Active Object contains no groups"); + if (!ok) BKE_report(op->reports, RPT_ERROR, "Active object contains no groups"); DAG_scene_sort(bmain, scene); WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL); diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index 1332d9b19a3..caeff1e82a7 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -515,12 +515,12 @@ static int object_add_hook_selob_exec(bContext *C, wmOperator *op) CTX_DATA_END; if (!obsel) { - BKE_report(op->reports, RPT_ERROR, "Can't add hook with no other selected objects"); + BKE_report(op->reports, RPT_ERROR, "Cannot add hook with no other selected objects"); return OPERATOR_CANCELLED; } if (use_bone && obsel->type != OB_ARMATURE) { - BKE_report(op->reports, RPT_ERROR, "Can't add hook bone for a non armature object"); + BKE_report(op->reports, RPT_ERROR, "Cannot add hook bone for a non armature object"); return OPERATOR_CANCELLED; } @@ -590,7 +590,7 @@ static int object_hook_remove_exec(bContext *C, wmOperator *op) hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num); if (!hmd) { - BKE_report(op->reports, RPT_ERROR, "Couldn't find hook modifier"); + BKE_report(op->reports, RPT_ERROR, "Could not find hook modifier"); return OPERATOR_CANCELLED; } @@ -673,7 +673,7 @@ static int object_hook_reset_exec(bContext *C, wmOperator *op) hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num); } if (!ob || !hmd) { - BKE_report(op->reports, RPT_ERROR, "Couldn't find hook modifier"); + BKE_report(op->reports, RPT_ERROR, "Could not find hook modifier"); return OPERATOR_CANCELLED; } @@ -741,7 +741,7 @@ static int object_hook_recenter_exec(bContext *C, wmOperator *op) hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num); } if (!ob || !hmd) { - BKE_report(op->reports, RPT_ERROR, "Couldn't find hook modifier"); + BKE_report(op->reports, RPT_ERROR, "Could not find hook modifier"); return OPERATOR_CANCELLED; } @@ -799,7 +799,7 @@ static int object_hook_assign_exec(bContext *C, wmOperator *op) hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num); } if (!ob || !hmd) { - BKE_report(op->reports, RPT_ERROR, "Couldn't find hook modifier"); + BKE_report(op->reports, RPT_ERROR, "Could not find hook modifier"); return OPERATOR_CANCELLED; } @@ -861,7 +861,7 @@ static int object_hook_select_exec(bContext *C, wmOperator *op) hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num); } if (!ob || !hmd) { - BKE_report(op->reports, RPT_ERROR, "Couldn't find hook modifier"); + BKE_report(op->reports, RPT_ERROR, "Could not find hook modifier"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 02070506937..3d2c4f95624 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -99,13 +99,13 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc /* only geometry objects should be able to get modifiers [#25291] */ if (!ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_LATTICE)) { - BKE_reportf(reports, RPT_WARNING, "Modifiers cannot be added to Object '%s'", ob->id.name + 2); + BKE_reportf(reports, RPT_WARNING, "Modifiers cannot be added to object '%s'", ob->id.name + 2); return NULL; } if (mti->flags & eModifierTypeFlag_Single) { if (modifiers_findByType(ob, type)) { - BKE_report(reports, RPT_WARNING, "Only one modifier of this type allowed"); + BKE_report(reports, RPT_WARNING, "Only one modifier of this type is allowed"); return NULL; } } @@ -556,7 +556,7 @@ static int modifier_apply_shape(ReportList *reports, Scene *scene, Object *ob, M KeyBlock *kb; if (!modifier_sameTopology(md) || mti->type == eModifierTypeType_NonGeometrical) { - BKE_report(reports, RPT_ERROR, "Only deforming modifiers can be applied to Shapes"); + BKE_report(reports, RPT_ERROR, "Only deforming modifiers can be applied to shapes"); return 0; } @@ -604,7 +604,7 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob, MultiresModifierData *mmd = find_multires_modifier_before(scene, md); if (me->key && mti->type != eModifierTypeType_NonGeometrical) { - BKE_report(reports, RPT_ERROR, "Modifier cannot be applied to Mesh with Shape Keys"); + BKE_report(reports, RPT_ERROR, "Modifier cannot be applied to a mesh with shape keys"); return 0; } @@ -681,7 +681,7 @@ int ED_object_modifier_apply(ReportList *reports, Scene *scene, Object *ob, Modi int prev_mode; if (scene->obedit) { - BKE_report(reports, RPT_ERROR, "Modifiers cannot be applied in editmode"); + BKE_report(reports, RPT_ERROR, "Modifiers cannot be applied in edit mode"); return 0; } else if (((ID *) ob->data)->us > 1) { diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 4e1eaea70e4..58c6959d6f0 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -628,7 +628,7 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object pchan = BKE_pose_channel_active(par); if (pchan == NULL) { - BKE_report(reports, RPT_ERROR, "No active Bone"); + BKE_report(reports, RPT_ERROR, "No active bone"); return 0; } } @@ -1036,7 +1036,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op) int type = RNA_enum_get(op->ptr, "type"); if (CTX_data_edit_object(C)) { - BKE_report(op->reports, RPT_ERROR, "Operation cannot be performed in EditMode"); + BKE_report(op->reports, RPT_ERROR, "Operation cannot be performed in edit mode"); return OPERATOR_CANCELLED; } CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) @@ -1350,17 +1350,17 @@ static int make_links_scene_exec(bContext *C, wmOperator *op) Scene *scene_to = BLI_findlink(&CTX_data_main(C)->scene, RNA_enum_get(op->ptr, "scene")); if (scene_to == NULL) { - BKE_report(op->reports, RPT_ERROR, "Couldn't find scene"); + BKE_report(op->reports, RPT_ERROR, "Could not find scene"); return OPERATOR_CANCELLED; } if (scene_to == CTX_data_scene(C)) { - BKE_report(op->reports, RPT_ERROR, "Can't link objects into the same scene"); + BKE_report(op->reports, RPT_ERROR, "Cannot link objects into the same scene"); return OPERATOR_CANCELLED; } if (scene_to->id.lib) { - BKE_report(op->reports, RPT_ERROR, "Can't link objects into a linked scene"); + BKE_report(op->reports, RPT_ERROR, "Cannot link objects into a linked scene"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 687ce35f6d7..2aa737d204d 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -425,7 +425,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) ob = OBACT; if (ob == NULL) { - BKE_report(op->reports, RPT_ERROR, "No Active Object"); + BKE_report(op->reports, RPT_ERROR, "No active object"); return OPERATOR_CANCELLED; } @@ -800,7 +800,7 @@ static int object_select_grouped_exec(bContext *C, wmOperator *op) ob = OBACT; if (ob == NULL) { - BKE_report(op->reports, RPT_ERROR, "No Active Object"); + BKE_report(op->reports, RPT_ERROR, "No active object"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 58931d3e341..4476296866e 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -217,7 +217,7 @@ static int object_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; } @@ -390,19 +390,19 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo if (ob->type == OB_MESH) { if (ID_REAL_USERS(ob->data) > 1) { - BKE_report(reports, RPT_ERROR, "Can't apply to a multi user mesh, doing nothing"); + BKE_report(reports, RPT_ERROR, "Cannot apply to a multi user mesh, doing nothing"); change = 0; } } else if (ob->type == OB_ARMATURE) { if (ID_REAL_USERS(ob->data) > 1) { - BKE_report(reports, RPT_ERROR, "Can't apply to a multi user armature, doing nothing"); + BKE_report(reports, RPT_ERROR, "Cannot apply to a multi user armature, doing nothing"); change = 0; } } else if (ob->type == OB_LATTICE) { if (ID_REAL_USERS(ob->data) > 1) { - BKE_report(reports, RPT_ERROR, "Can't apply to a multi user lattice, doing nothing"); + BKE_report(reports, RPT_ERROR, "Cannot apply to a multi user lattice, doing nothing"); change = 0; } } @@ -410,7 +410,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo Curve *cu; if (ID_REAL_USERS(ob->data) > 1) { - BKE_report(reports, RPT_ERROR, "Can't apply to a multi user curve, doing nothing"); + BKE_report(reports, RPT_ERROR, "Cannot apply to a multi user curve, doing nothing"); change = 0; } @@ -422,7 +422,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo change = 0; } if (cu->key) { - BKE_report(reports, RPT_ERROR, "Can't apply to a curve with vertex keys, doing nothing"); + BKE_report(reports, RPT_ERROR, "Cannot apply to a curve with vertex keys, doing nothing"); change = 0; } } @@ -672,7 +672,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) int tot_change = 0, tot_lib_error = 0, tot_multiuser_arm_error = 0; if (obedit && centermode != GEOMETRY_TO_ORIGIN) { - BKE_report(op->reports, RPT_ERROR, "Operation cannot be performed in EditMode"); + BKE_report(op->reports, RPT_ERROR, "Operation cannot be performed in edit mode"); return OPERATOR_CANCELLED; } else { @@ -854,7 +854,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) if (ID_REAL_USERS(arm) > 1) { #if 0 - BKE_report(op->reports, RPT_ERROR, "Can't apply to a multi user armature"); + BKE_report(op->reports, RPT_ERROR, "Cannot apply to a multi user armature"); return; #endif tot_multiuser_arm_error++; diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 3d96ea11715..6c2503e3d67 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -3470,7 +3470,7 @@ static int vgroup_do_remap(Object *ob, char *name_array, wmOperator *op) } } else { - BKE_report(op->reports, RPT_ERROR, "Editmode lattice isn't supported yet"); + BKE_report(op->reports, RPT_ERROR, "Editmode lattice is not supported yet"); MEM_freeN(sort_map_update); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt index 4d43c618568..da12a26e747 100644 --- a/source/blender/editors/physics/CMakeLists.txt +++ b/source/blender/editors/physics/CMakeLists.txt @@ -20,6 +20,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader @@ -54,4 +55,8 @@ if(WITH_OPENMP) add_definitions(-DPARALLEL=1) endif() +if(WITH_INTERNATIONAL) + add_definitions(-DWITH_INTERNATIONAL) +endif() + blender_add_lib(bf_editor_physics "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/editors/physics/SConscript b/source/blender/editors/physics/SConscript index 9fe6cff4349..fffe05d6a0d 100644 --- a/source/blender/editors/physics/SConscript +++ b/source/blender/editors/physics/SConscript @@ -3,12 +3,12 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../gpu ../../blenloader ../../bmesh' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' -defs = '' +defs = [] if env['OURPLATFORM'] == 'linux': cflags='-pthread' @@ -17,9 +17,11 @@ if env['OURPLATFORM'] == 'linux': if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'): incs += ' ' + env['BF_PTHREADS_INC'] - if env['OURPLATFORM'] == 'darwin': if env['WITH_BF_OPENMP']: - defs += ' PARALLEL=1' + defs.append('PARALLEL=1') + +if env['WITH_BF_INTERNATIONAL']: + defs.append('WITH_INTERNATIONAL') -env.BlenderLib ( 'bf_editors_physics', sources, Split(incs), Split(defs), libtype=['core'], priority=[45] ) +env.BlenderLib ( 'bf_editors_physics', sources, Split(incs), defs, libtype=['core'], priority=[45] ) diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c index 467ad5c6ff9..c51b3ca4c43 100644 --- a/source/blender/editors/physics/dynamicpaint_ops.c +++ b/source/blender/editors/physics/dynamicpaint_ops.c @@ -26,6 +26,8 @@ #include "BLI_string.h" #include "BLI_utildefines.h" +#include "BLF_translation.h" + #include "DNA_dynamicpaint_types.h" #include "DNA_modifier_types.h" #include "DNA_object_types.h" @@ -280,7 +282,10 @@ static int dynamicPaint_bakeImageSequence(bContext *C, DynamicPaintSurface *surf int frames; frames = surface->end_frame - surface->start_frame + 1; - if (frames <= 0) {BLI_strncpy(canvas->error, "No frames to bake.", sizeof(canvas->error)); return 0;} + if (frames <= 0) { + BLI_strncpy(canvas->error, N_("No frames to bake"), sizeof(canvas->error)); + return 0; + } /* Set frame to start point (also inits modifier data) */ frame = surface->start_frame; diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 88bd4e829f1..122558997eb 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -902,7 +902,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor /* make sure it corresponds to startFrame setting (old: noFrames = scene->r.efra - scene->r.sfra +1) */; noFrames = scene->r.efra - 0; if (noFrames<=0) { - BKE_report(reports, RPT_ERROR, "No frames to export - check your animation range settings"); + BKE_report(reports, RPT_ERROR, "No frames to export (check your animation range settings)"); fluidbake_free_data(channels, fobjects, fsset, fb); return 0; } diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 63cf0fcaa31..ad9b082d044 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -202,7 +202,7 @@ static int screen_render_exec(bContext *C, wmOperator *op) screen_render_scene_layer_set(op, mainp, &scene, &srl); if (!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.im_format.imtype)) { - BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected"); + BKE_report(op->reports, RPT_ERROR, "Cannot write a single file with an animation format selected"); return OPERATOR_CANCELLED; } @@ -493,7 +493,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) } if (!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.im_format.imtype)) { - BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected"); + BKE_report(op->reports, RPT_ERROR, "Cannot write a single file with an animation format selected"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index f14b9be3039..0b6b5cb8e4a 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -308,7 +308,7 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) char err_out[256] = "unknown"; if (G.background) { - BKE_report(op->reports, RPT_ERROR, "Can't use OpenGL render in background mode (no opengl context)"); + BKE_report(op->reports, RPT_ERROR, "Cannot use OpenGL render in background mode (no opengl context)"); return 0; } @@ -329,7 +329,7 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) } if (!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.im_format.imtype)) { - BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected"); + BKE_report(op->reports, RPT_ERROR, "Cannot write a single file with an animation format selected"); return 0; } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index cfe32e05506..bd171ef247a 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2905,10 +2905,10 @@ static void SCREEN_OT_header_toggle_menus(wmOperatorType *ot) /* identifiers */ ot->name = "Show/Hide Header Menus"; ot->idname = "SCREEN_OT_header_toggle_menus"; - ot->description = "Show or Hide the header pulldown menus"; + ot->description = "Show or hide the header pulldown menus"; /* api callbacks */ - ot->exec = header_toggle_menus_exec; + ot->exec = header_toggle_menus_exec; ot->poll = ED_operator_areaactive; ot->flag = 0; } diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index 7af0fc27ed7..0ecac5fc497 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -365,7 +365,7 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float if (ok == 0) { printf("Write error: cannot save %s\n", name); - BKE_reportf(&sj->reports, RPT_INFO, "Write error: cannot save %s\n", name); + BKE_reportf(&sj->reports, RPT_INFO, "Write error: cannot save %s", name); break; } else { diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 5f05c7f8df8..8c8a5ced5d3 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -5654,7 +5654,7 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; if (BKE_object_obdata_is_libdata(ob)) { - BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata"); + BKE_report(op->reports, RPT_ERROR, "Cannot edit external libdata"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 1f0711cc4ad..0e2c6fbe3ce 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -493,7 +493,7 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op) /* copy keyframes */ if (ELEM(ac.datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK)) { /* FIXME... */ - BKE_report(op->reports, RPT_ERROR, "Keyframe pasting is not available for Grease Pencil mode"); + BKE_report(op->reports, RPT_ERROR, "Keyframe pasting is not available for grease pencil mode"); return OPERATOR_CANCELLED; } else if (ac.datatype == ANIMCONT_MASK) { @@ -543,7 +543,7 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op) /* paste keyframes */ if (ELEM(ac.datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK)) { /* FIXME... */ - BKE_report(op->reports, RPT_ERROR, "Keyframe pasting is not available for Grease Pencil or Mask mode"); + BKE_report(op->reports, RPT_ERROR, "Keyframe pasting is not available for grease pencil or mask mode"); return OPERATOR_CANCELLED; } else { diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 9a7284de660..d40426a5bc9 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -162,7 +162,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event) char *str; if (CTX_wm_space_file(C)) { - BKE_report(op->reports, RPT_ERROR, "Can't activate a file selector, one already open"); + BKE_report(op->reports, RPT_ERROR, "Cannot activate a file selector, one already open"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 1a9cae93a38..9ec2ad82bef 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -197,8 +197,8 @@ static int open_exec(bContext *C, wmOperator *op) if (op->customdata) MEM_freeN(op->customdata); - BKE_reportf(op->reports, RPT_ERROR, "Can't read \"%s\": %s", str, - errno ? strerror(errno) : TIP_("Unsupported movie clip format")); + BKE_reportf(op->reports, RPT_ERROR, "Cannot read '%s': %s", str, + errno ? strerror(errno) : TIP_("unsupported movie clip format")); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 2f1265b6a4d..f98acf8097d 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -1397,7 +1397,7 @@ static void solve_camera_freejob(void *scv) solved = BKE_tracking_reconstruction_finish(scj->context, tracking); if (!solved) - BKE_report(scj->reports, RPT_WARNING, "Some data failed to reconstruct, see console for details"); + BKE_report(scj->reports, RPT_WARNING, "Some data failed to reconstruct (see console for details)"); else BKE_reportf(scj->reports, RPT_INFO, "Average re-projection error: %.3f", tracking->reconstruction.error); @@ -3371,7 +3371,7 @@ static int tracking_object_remove_exec(bContext *C, wmOperator *op) object = BKE_tracking_object_get_active(tracking); if (object->flag & TRACKING_OBJECT_CAMERA) { - BKE_report(op->reports, RPT_WARNING, "Object used for camera tracking can't be deleted"); + BKE_report(op->reports, RPT_WARNING, "Object used for camera tracking cannot be deleted"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 52d4a6a86c1..763b18788de 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -1105,7 +1105,7 @@ int file_directory_new_exec(bContext *C, wmOperator *op) if (generate_name) { /* create a new, non-existing folder name */ if (!new_folder_path(sfile->params->dir, path, name)) { - BKE_report(op->reports, RPT_ERROR, "Couldn't create new folder name"); + BKE_report(op->reports, RPT_ERROR, "Could not create new folder name"); return OPERATOR_CANCELLED; } } @@ -1114,7 +1114,7 @@ int file_directory_new_exec(bContext *C, wmOperator *op) BLI_dir_create_recursive(path); if (!BLI_exists(path)) { - BKE_report(op->reports, RPT_ERROR, "Couldn't create new folder"); + BKE_report(op->reports, RPT_ERROR, "Could not create new folder"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 3b14257cdb4..c7f9bd87a1b 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -39,6 +39,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_translation.h" + #include "DNA_object_types.h" #include "DNA_node_types.h" #include "DNA_packedFile_types.h" @@ -858,7 +860,8 @@ static int image_open_exec(bContext *C, wmOperator *op) if (!ima) { if (op->customdata) MEM_freeN(op->customdata); - BKE_reportf(op->reports, RPT_ERROR, "Can't read: \"%s\", %s", str, errno ? strerror(errno) : "Unsupported image format"); + BKE_reportf(op->reports, RPT_ERROR, "Cannot read '%s': %s", + str, errno ? strerror(errno) : TIP_("unsupported image format")); return OPERATOR_CANCELLED; } @@ -1313,7 +1316,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI } } else { - BKE_reportf(op->reports, RPT_ERROR, "Couldn't write image: %s", simopts->filepath); + BKE_reportf(op->reports, RPT_ERROR, "Could not write image %s", simopts->filepath); } @@ -1495,7 +1498,7 @@ static int image_save_exec(bContext *C, wmOperator *op) save_image_doit(C, sima, op, &simopts, FALSE); } else { - BKE_reportf(op->reports, RPT_ERROR, "Can not save image, path '%s' is not writable", simopts.filepath); + BKE_reportf(op->reports, RPT_ERROR, "Cannot save image, path '%s' is not writable", simopts.filepath); return OPERATOR_CANCELLED; } @@ -1536,7 +1539,7 @@ static int image_save_sequence_exec(bContext *C, wmOperator *op) } if (sima->image->type == IMA_TYPE_MULTILAYER) { - BKE_report(op->reports, RPT_ERROR, "Can't save multilayer sequences"); + BKE_report(op->reports, RPT_ERROR, "Cannot save multilayer sequences"); return OPERATOR_CANCELLED; } @@ -1572,7 +1575,7 @@ static int image_save_sequence_exec(bContext *C, wmOperator *op) break; } - BKE_reportf(op->reports, RPT_INFO, "Saved: %s\n", ibuf->name); + BKE_reportf(op->reports, RPT_INFO, "Saved %s", ibuf->name); ibuf->userflags &= ~IB_BITMAPDIRTY; } } @@ -1852,7 +1855,7 @@ static int image_pack_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; if (!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) { - BKE_report(op->reports, RPT_ERROR, "Can't pack edited image from disk, only as internal PNG"); + BKE_report(op->reports, RPT_ERROR, "Cannot pack edited image from disk, only as internal PNG"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index bb2d55fa0f6..131908bc9db 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -196,7 +196,7 @@ static int make_paths_relative_exec(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); if (!G.relbase_valid) { - BKE_report(op->reports, RPT_WARNING, "Can't set relative paths with an unsaved blend file"); + BKE_report(op->reports, RPT_WARNING, "Cannot set relative paths with an unsaved blend file"); return OPERATOR_CANCELLED; } @@ -229,7 +229,7 @@ static int make_paths_absolute_exec(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); if (!G.relbase_valid) { - BKE_report(op->reports, RPT_WARNING, "Can't set absolute paths with an unsaved blend file"); + BKE_report(op->reports, RPT_WARNING, "Cannot set absolute paths with an unsaved blend file"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 92956b7aa5b..3740c3fae5e 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -398,7 +398,7 @@ static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op) act = BLI_findlink(&CTX_data_main(C)->action, RNA_enum_get(op->ptr, "action")); if (act == NULL) { - BKE_report(op->reports, RPT_ERROR, "No valid Action to add"); + BKE_report(op->reports, RPT_ERROR, "No valid action to add"); //printf("Add strip - actname = '%s'\n", actname); return OPERATOR_CANCELLED; } @@ -407,7 +407,7 @@ static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op) BKE_reportf(op->reports, RPT_WARNING, "Action '%s' does not specify what datablocks it can be used on " "(try setting the 'ID Root Type' setting from the Datablocks Editor " - "for this Action to avoid future problems)", + "for this action to avoid future problems)", act->id.name + 2); } @@ -433,7 +433,7 @@ static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op) */ if ((act->idroot) && (act->idroot != GS(ale->id->name))) { BKE_reportf(op->reports, RPT_ERROR, - "Couldn't add action '%s' as it cannot be used relative to ID-blocks of type '%s'", + "Could not add action '%s' as it cannot be used relative to ID-blocks of type '%s'", act->id.name + 2, ale->id->name); continue; } @@ -2023,7 +2023,7 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op) set_active_fmodifier(&strip->modifiers, fcm); else { BKE_reportf(op->reports, RPT_ERROR, - "Modifier couldn't be added to (%s : %s) (see console for details)", + "Modifier could not be added to (%s : %s) (see console for details)", nlt->name, strip->name); } } diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c index 99d49fa1e8f..df8a6f94d24 100644 --- a/source/blender/editors/space_node/node_add.c +++ b/source/blender/editors/space_node/node_add.c @@ -35,6 +35,8 @@ #include "BLI_math.h" +#include "BLF_translation.h" + #include "BKE_context.h" #include "BKE_image.h" #include "BKE_library.h" @@ -240,7 +242,8 @@ static int node_add_file_exec(bContext *C, wmOperator *op) ima = BKE_image_load_exists(path); if (!ima) { - BKE_reportf(op->reports, RPT_ERROR, "Can't read image: \"%s\", %s", path, errno ? strerror(errno) : "Unsupported format"); + BKE_reportf(op->reports, RPT_ERROR, "Cannot read image '%s': %s", + path, errno ? strerror(errno) : TIP_("unsupported format")); return OPERATOR_CANCELLED; } } @@ -250,7 +253,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op) ima = (Image *)BKE_libblock_find_name(ID_IM, name); if (!ima) { - BKE_reportf(op->reports, RPT_ERROR, "Image named \"%s\", not found", name); + BKE_reportf(op->reports, RPT_ERROR, "Image '%s' not found", name); return OPERATOR_CANCELLED; } } diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index cb3445739df..23766d6a6fe 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -786,7 +786,7 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so } else { /* no tree-element found */ - BKE_report(reports, RPT_WARNING, "Not found: %s", name); + BKE_reportf(reports, RPT_WARNING, "Not found: %s", name); } } #endif diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 32013dd2767..5fb9780c700 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -974,7 +974,7 @@ static int outliner_action_set_exec(bContext *C, wmOperator *op) act = BLI_findlink(&CTX_data_main(C)->action, RNA_enum_get(op->ptr, "action")); if (act == NULL) { - BKE_report(op->reports, RPT_ERROR, "No valid Action to add"); + BKE_report(op->reports, RPT_ERROR, "No valid action to add"); return OPERATOR_CANCELLED; } else if (act->idroot == 0) { @@ -982,7 +982,7 @@ static int outliner_action_set_exec(bContext *C, wmOperator *op) BKE_reportf(op->reports, RPT_WARNING, "Action '%s' does not specify what datablocks it can be used on " "(try setting the 'ID Root Type' setting from the Datablocks Editor " - "for this Action to avoid future problems)", + "for this action to avoid future problems)", act->id.name + 2); } diff --git a/source/blender/editors/space_sequencer/CMakeLists.txt b/source/blender/editors/space_sequencer/CMakeLists.txt index c1f7fc942e4..f108d9f1aaa 100644 --- a/source/blender/editors/space_sequencer/CMakeLists.txt +++ b/source/blender/editors/space_sequencer/CMakeLists.txt @@ -57,4 +57,8 @@ if(WITH_AUDASPACE) add_definitions(-DWITH_AUDASPACE) endif() +if(WITH_INTERNATIONAL) + add_definitions(-DWITH_INTERNATIONAL) +endif() + blender_add_lib(bf_editor_space_sequencer "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/editors/space_sequencer/SConscript b/source/blender/editors/space_sequencer/SConscript index ec06eacae9c..0b429ae750b 100644 --- a/source/blender/editors/space_sequencer/SConscript +++ b/source/blender/editors/space_sequencer/SConscript @@ -8,7 +8,12 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../makesrna ../../blenloader ../../blenfont' incs += ' #/intern/audaspace/intern' +defs = [] + if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'): incs += ' ' + env['BF_PTHREADS_INC'] -env.BlenderLib ( 'bf_editors_space_sequencer', sources, Split(incs), [], libtype=['core'], priority=[100] ) +if env['WITH_BF_INTERNATIONAL']: + defs.append('WITH_INTERNATIONAL') + +env.BlenderLib ( 'bf_editors_space_sequencer', sources, Split(incs), defs, libtype=['core'], priority=[100] ) diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index ff895c06d57..fd46f69da83 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -325,7 +325,7 @@ static int sequencer_add_movieclip_strip_exec(bContext *C, wmOperator *op) clip = BLI_findlink(&CTX_data_main(C)->movieclip, RNA_enum_get(op->ptr, "clip")); if (clip == NULL) { - BKE_report(op->reports, RPT_ERROR, "MovieClip not found"); + BKE_report(op->reports, RPT_ERROR, "Movie clip not found"); return OPERATOR_CANCELLED; } @@ -553,7 +553,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad } if (seq_load.tot_success == 0) { - BKE_reportf(op->reports, RPT_ERROR, "File \"%s\" could not be loaded", seq_load.path); + BKE_reportf(op->reports, RPT_ERROR, "File '%s' could not be loaded", seq_load.path); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 56fdccfb8f8..7270516aa51 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -46,6 +46,8 @@ #include "BLI_utildefines.h" #include "BLI_threads.h" +#include "BLF_translation.h" + #include "DNA_scene_types.h" #include "DNA_userdef_types.h" @@ -507,7 +509,7 @@ int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequen for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT) { if (seq->type == SEQ_TYPE_SOUND_RAM && BKE_sequence_effect_get_num_inputs(type) != 0) { - *error_str = "Can't apply effects to audio sequence strips"; + *error_str = N_("Cannot apply effects to audio sequence strips"); return 0; } if ((seq != activeseq) && (seq != seq2)) { @@ -515,7 +517,7 @@ int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequen else if (seq1 == NULL) seq1 = seq; else if (seq3 == NULL) seq3 = seq; else { - *error_str = "Can't apply effect to more than 3 sequence strips"; + *error_str = N_("Cannot apply effect to more than 3 sequence strips"); return 0; } } @@ -537,21 +539,21 @@ int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequen return 1; /* succsess */ case 1: if (seq2 == NULL) { - *error_str = "Need at least one selected sequence strip"; + *error_str = N_("At least one selected sequence strip is needed"); return 0; } if (seq1 == NULL) seq1 = seq2; if (seq3 == NULL) seq3 = seq2; case 2: if (seq1 == NULL || seq2 == NULL) { - *error_str = "Need 2 selected sequence strips"; + *error_str = N_("2 selected sequence strips are needed"); return 0; } if (seq3 == NULL) seq3 = seq2; } if (seq1 == NULL && seq2 == NULL && seq3 == NULL) { - *error_str = "TODO: in what cases does this happen?"; + *error_str = N_("TODO: in what cases does this happen?"); return 0; } @@ -1384,7 +1386,7 @@ static int sequencer_reassign_inputs_exec(bContext *C, wmOperator *op) seq_is_predecessor(seq2, last_seq) || seq_is_predecessor(seq3, last_seq)) { - BKE_report(op->reports, RPT_ERROR, "Can't reassign inputs: no cycles allowed"); + BKE_report(op->reports, RPT_ERROR, "Cannot reassign inputs: no cycles allowed"); return OPERATOR_CANCELLED; } @@ -2905,7 +2907,7 @@ static int sequencer_change_effect_input_exec(bContext *C, wmOperator *op) } if (*seq_1 == NULL || *seq_2 == NULL) { - BKE_report(op->reports, RPT_ERROR, "One of the effect inputs is unset, can't swap"); + BKE_report(op->reports, RPT_ERROR, "One of the effect inputs is unset, cannot swap"); return OPERATOR_CANCELLED; } else { diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 2c9b56d7a0d..c4df89547ef 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -1167,7 +1167,7 @@ static int sequencer_select_grouped_exec(bContext *C, wmOperator *op) extend = RNA_boolean_get(op->ptr, "extend"); if (actseq == NULL) { - BKE_report(op->reports, RPT_ERROR, "No Active Sequence!"); + BKE_report(op->reports, RPT_ERROR, "No active sequence!"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_text/CMakeLists.txt b/source/blender/editors/space_text/CMakeLists.txt index ead7de92c5c..9cc407f0604 100644 --- a/source/blender/editors/space_text/CMakeLists.txt +++ b/source/blender/editors/space_text/CMakeLists.txt @@ -54,4 +54,8 @@ if(WITH_PYTHON) add_definitions(-DWITH_PYTHON) endif() +if(WITH_INTERNATIONAL) + add_definitions(-DWITH_INTERNATIONAL) +endif() + blender_add_lib(bf_editor_text "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/editors/space_text/SConscript b/source/blender/editors/space_text/SConscript index 6ad6427f1d3..373564520c8 100644 --- a/source/blender/editors/space_text/SConscript +++ b/source/blender/editors/space_text/SConscript @@ -10,4 +10,7 @@ incs += ' ../../python ../../makesrna ../../blenfont ../../blenloader' if env['WITH_BF_PYTHON']: defs.append('WITH_PYTHON') +if env['WITH_BF_INTERNATIONAL']: + defs.append('WITH_INTERNATIONAL') + env.BlenderLib ( 'bf_editors_space_text', sources, Split(incs), defs, libtype=['core'], priority=[95] ) diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 6bb4c2987fb..2d902c4586a 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -44,6 +44,8 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" +#include "BLF_translation.h" + #include "PIL_time.h" #include "BKE_context.h" @@ -93,7 +95,7 @@ static int text_edit_poll(bContext *C) return 0; if (text->id.lib) { - // BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata"); + // BKE_report(op->reports, RPT_ERROR, "Cannot edit external libdata"); return 0; } @@ -109,7 +111,7 @@ static int text_space_edit_poll(bContext *C) return 0; if (text->id.lib) { - // BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata"); + // BKE_report(op->reports, RPT_ERROR, "Cannot edit external libdata"); return 0; } @@ -129,7 +131,7 @@ static int text_region_edit_poll(bContext *C) return 0; if (text->id.lib) { - // BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata"); + // BKE_report(op->reports, RPT_ERROR, "Cannot edit external libdata"); return 0; } @@ -463,7 +465,8 @@ static void txt_write_file(Text *text, ReportList *reports) fp = BLI_fopen(filepath, "w"); if (fp == NULL) { - BKE_reportf(reports, RPT_ERROR, "Unable to save \"%s\": %s", filepath, errno ? strerror(errno) : "Unknown error writing file"); + BKE_reportf(reports, RPT_ERROR, "Unable to save '%s': %s", + filepath, errno ? strerror(errno) : TIP_("unknown error writing file")); return; } @@ -482,7 +485,8 @@ static void txt_write_file(Text *text, ReportList *reports) } else { text->mtime = 0; - BKE_reportf(reports, RPT_WARNING, "Unable to stat \"%s\": %s", filepath, errno ? strerror(errno) : "Unknown error starrng file"); + BKE_reportf(reports, RPT_WARNING, "Unable to stat '%s': %s", + filepath, errno ? strerror(errno) : TIP_("unknown error stating file")); } if (text->flags & TXT_ISDIRTY) diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index a626b71fdf8..7c6645ce8ac 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1038,7 +1038,7 @@ static int view3d_localview_init(Main *bmain, Scene *scene, ScrArea *sa, ReportL locallay = free_localbit(bmain); if (locallay == 0) { - BKE_reportf(reports, RPT_ERROR, "No more than 8 local views"); + BKE_report(reports, RPT_ERROR, "No more than 8 local views"); ok = FALSE; } else { diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 6659472f16b..f25b52416dc 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -974,7 +974,7 @@ static void createTransPose(TransInfo *t, Object *ob) if (arm->flag & ARM_RESTPOS) { if (ELEM(t->mode, TFM_DUMMY, TFM_BONESIZE) == 0) { // XXX use transform operator reports - // 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; } } diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index fc0c174a525..916cf540589 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -284,7 +284,7 @@ static int create_orientation_exec(bContext *C, wmOperator *op) RNA_string_get(op->ptr, "name", name); if (use && !CTX_wm_view3d(C)) { - BKE_report(op->reports, RPT_ERROR, "Create Orientation \"use\" parameter only valid in a 3dView context"); + BKE_report(op->reports, RPT_ERROR, "Create Orientation's 'use' parameter only valid in a 3DView context"); return OPERATOR_CANCELLED; } |