More UI messages fixes and tweaks, BKE_report<->BKE_reportf, and stuff to translate...
authorBastien Montagne <montagne29@wanadoo.fr>
Fri, 19 Oct 2012 16:43:10 +0000 (16:43 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Fri, 19 Oct 2012 16:43:10 +0000 (16:43 +0000)
17 files changed:
source/blender/blenloader/CMakeLists.txt
source/blender/blenloader/SConscript
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/runtime.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/poselib.c
source/blender/editors/armature/poseobject.c
source/blender/editors/mesh/CMakeLists.txt
source/blender/editors/mesh/SConscript
source/blender/editors/mesh/editmesh_slide.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/quicktime/apple/quicktime_export.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_operators.c

index 74df5211dad8305578297083bdd4c7cee09af927..3c5812fa513b6e4f9ae48600ac22e0912c649a78 100644 (file)
@@ -25,6 +25,7 @@
 
 set(INC 
        .
+       ../blenfont
        ../blenkernel
        ../blenlib
        ../makesdna
@@ -62,4 +63,8 @@ if(WITH_BUILDINFO)
        add_definitions(-DWITH_BUILDINFO)
 endif()
 
+if(WITH_INTERNATIONAL)
+       add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
 blender_add_lib(bf_blenloader "${SRC}" "${INC}" "${INC_SYS}")
index 20b560744b3aa5b21dc7838f87d0eb0f6f09446e..49e8869637e8a9eb71025605a21347da360aa095 100644 (file)
@@ -3,7 +3,7 @@ Import ('env')
 
 sources = env.Glob('intern/*.c')
 
-incs = '. #/intern/guardedalloc ../blenlib ../blenkernel'
+incs = '. #/intern/guardedalloc ../blenfont ../blenlib ../blenkernel'
 incs += ' ../makesdna ../editors/include'
 incs += ' ../render/extern/include ../makesrna ../nodes ../bmesh ../imbuf'
 
@@ -11,6 +11,9 @@ incs += ' ' + env['BF_ZLIB_INC']
 
 defs = []
 
+if env['WITH_BF_INTERNATIONAL']:
+    defs.append('WITH_INTERNATIONAL')
+
 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
     env.BlenderLib ( 'bf_blenloader', sources, Split(incs), defs, libtype=['core','player'], priority = [167,30]) #, cc_compileflags=['/WX'] )
 else:
index 3d7c9c21ecad08a070cbec8c10a2fffbc6521d62..41a635a5e01b306329bd0f6a9f09081d04a7d14b 100644 (file)
 #include "BLI_math.h"
 #include "BLI_edgehash.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_anim.h"
 #include "BKE_action.h"
 #include "BKE_armature.h"
@@ -976,13 +978,13 @@ static FileData *blo_decode_and_check(FileData *fd, ReportList *reports)
        
        if (fd->flags & FD_FLAGS_FILE_OK) {
                if (!read_file_dna(fd)) {
-                       BKE_reportf(reports, RPT_ERROR, "Failed to read blend file: \"%s\", incomplete", fd->relabase);
+                       BKE_reportf(reports, RPT_ERROR, "Failed to read blend file '%s', incomplete", fd->relabase);
                        blo_freefiledata(fd);
                        fd = NULL;
                }
        } 
        else {
-               BKE_reportf(reports, RPT_ERROR, "Failed to read blend file: \"%s\", not a blend file", fd->relabase);
+               BKE_reportf(reports, RPT_ERROR, "Failed to read blend file '%s', not a blend file", fd->relabase);
                blo_freefiledata(fd);
                fd = NULL;
        }
@@ -999,7 +1001,8 @@ FileData *blo_openblenderfile(const char *filepath, ReportList *reports)
        gzfile = BLI_gzopen(filepath, "rb");
        
        if (gzfile == (gzFile)Z_NULL) {
-               BKE_reportf(reports, RPT_WARNING, "Unable to open \"%s\": %s.", filepath, errno ? strerror(errno) : "Unknown error reading file");
+               BKE_reportf(reports, RPT_WARNING, "Unable to open '%s': %s",
+                           filepath, errno ? strerror(errno) : TIP_("Unknown error reading file"));
                return NULL;
        }
        else {
@@ -1017,7 +1020,7 @@ FileData *blo_openblenderfile(const char *filepath, ReportList *reports)
 FileData *blo_openblendermemory(void *mem, int memsize, ReportList *reports)
 {
        if (!mem || memsize<SIZEOFBLENDERHEADER) {
-               BKE_report(reports, RPT_WARNING, (mem)? "Unable to read": "Unable to open");
+               BKE_report(reports, RPT_WARNING, (mem) ? TIP_("Unable to read"): TIP_("Unable to open"));
                return NULL;
        }
        else {
@@ -4764,8 +4767,7 @@ static void lib_link_scene(FileData *fd, Main *main)
                                base->object = newlibadr_us(fd, sce->id.lib, base->object);
                                
                                if (base->object == NULL) {
-                                       BKE_reportf_wrap(fd->reports, RPT_WARNING,
-                                                        "LIB ERROR: Object lost from scene:'%s\'",
+                                       BKE_reportf_wrap(fd->reports, RPT_WARNING, "LIB ERROR: object lost from scene: '%s'",
                                                         sce->id.name + 2);
                                        BLI_remlink(&sce->base, base);
                                        if (base == sce->basact) sce->basact = NULL;
@@ -6613,7 +6615,7 @@ void convert_tface_mt(FileData *fd, Main *main)
                G.main = main;
                
                if (!(do_version_tface(main, 1))) {
-                       BKE_report(fd->reports, RPT_WARNING, "Texface conversion problem (error in console)");
+                       BKE_report(fd->reports, RPT_WARNING, "Texface conversion problem (see error in console)");
                }
                
                //XXX hack, material.c uses G.main allover the place, instead of main
@@ -7396,8 +7398,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                        prop = BKE_bproperty_object_get(ob, "Text");
                                        if (prop) {
                                                BKE_reportf_wrap(fd->reports, RPT_WARNING,
-                                                                "Game property name conflict in object: \"%s\".\nText objects reserve the "
-                                                                "[\"Text\"] game property to change their content through Logic Bricks.",
+                                                                "Game property name conflict in object '%s':\ntext objects reserve the "
+                                                                "['Text'] game property to change their content through logic bricks",
                                                                 ob->id.name + 2);
                                        }
                                }
@@ -9681,7 +9683,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
                                if (fd == NULL) {
                                        /* printf and reports for now... its important users know this */
                                        BKE_reportf_wrap(basefd->reports, RPT_INFO,
-                                                        "read library:  '%s', '%s'",
+                                                        "Read library:  '%s', '%s'",
                                                         mainptr->curlib->filepath, mainptr->curlib->name);
                                        
                                        fd = blo_openblenderfile(mainptr->curlib->filepath, basefd->reports);
@@ -9735,7 +9737,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
                                        
                                        if (fd == NULL) {
                                                BKE_reportf_wrap(basefd->reports, RPT_WARNING,
-                                                                "Can't find lib '%s'",
+                                                                "Cannot find lib '%s'",
                                                                 mainptr->curlib->filepath);
                                        }
                                }
@@ -9754,7 +9756,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
                                                                append_id_part(fd, mainptr, id, &realid);
                                                                if (!realid) {
                                                                        BKE_reportf_wrap(fd->reports, RPT_WARNING,
-                                                                                        "LIB ERROR: %s:'%s' missing from '%s'",
+                                                                                        "LIB ERROR: %s: '%s' missing from '%s'",
                                                                                         BKE_idcode_to_name(GS(id->name)),
                                                                                         id->name+2, mainptr->curlib->filepath);
                                                                }
@@ -9786,7 +9788,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
                                if (id->flag & LIB_READ) {
                                        BLI_remlink(lbarray[a], id);
                                        BKE_reportf_wrap(basefd->reports, RPT_WARNING,
-                                                        "LIB ERROR: %s:'%s' unread libblock missing from '%s'",
+                                                        "LIB ERROR: %s: '%s' unread libblock missing from '%s'",
                                                         BKE_idcode_to_name(GS(id->name)), id->name + 2, mainptr->curlib->filepath);
                                        change_idid_adr(mainlist, basefd, id, NULL);
                                        
index eaf725dda9e592c08aeba3bd8b004841a316d0ac..4136f71f050ae6a69a59a21af779bc49a6eb7cff 100644 (file)
@@ -104,7 +104,7 @@ BlendFileData *BLO_read_runtime(const char *path, ReportList *reports)
        fd = BLI_open(path, O_BINARY | O_RDONLY, 0);
 
        if (fd == -1) {
-               BKE_reportf(reports, RPT_ERROR, "Unable to open \"%s\": %s.", path, strerror(errno));
+               BKE_reportf(reports, RPT_ERROR, "Unable to open '%s': %s", path, strerror(errno));
                goto cleanup;
        }
        
@@ -115,15 +115,15 @@ BlendFileData *BLO_read_runtime(const char *path, ReportList *reports)
        datastart = handle_read_msb_int(fd);
 
        if (datastart == -1) {
-               BKE_reportf(reports, RPT_ERROR, "Unable to read  \"%s\" (problem seeking)", path);
+               BKE_reportf(reports, RPT_ERROR, "Unable to read '%s' (problem seeking)", path);
                goto cleanup;
        }
        else if (read(fd, buf, 8) != 8) {
-               BKE_reportf(reports, RPT_ERROR, "Unable to read  \"%s\" (truncated header)", path);
+               BKE_reportf(reports, RPT_ERROR, "Unable to read '%s' (truncated header)", path);
                goto cleanup;
        }
        else if (memcmp(buf, "BRUNTIME", 8) != 0) {
-               BKE_reportf(reports, RPT_ERROR, "Unable to read  \"%s\" (not a blend file)", path);
+               BKE_reportf(reports, RPT_ERROR, "Unable to read '%s' (not a blend file)", path);
                goto cleanup;
        }
        else {  
index ab7f5d46f8b6566e44f65d3ec606736a938fda9e..274762679fee9c658e484fd80f8a36b9f8ccd5b0 100644 (file)
@@ -3026,7 +3026,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
 
        file = BLI_open(tempname, O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
        if (file == -1) {
-               BKE_reportf(reports, RPT_ERROR, "Can't open file %s for writing: %s", tempname, strerror(errno));
+               BKE_reportf(reports, RPT_ERROR, "Cannot open file %s for writing: %s", tempname, strerror(errno));
                return 0;
        }
 
@@ -3094,7 +3094,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
                if (0==ret) {
                        /* now rename to real file name, and delete temp @ file too */
                        if (BLI_rename(gzname, filepath) != 0) {
-                               BKE_report(reports, RPT_ERROR, "Can't change old file (file saved with @)");
+                               BKE_report(reports, RPT_ERROR, "Cannot change old file (file saved with @)");
                                return 0;
                        }
 
@@ -3110,7 +3110,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
                }
        }
        else if (BLI_rename(tempname, filepath) != 0) {
-               BKE_report(reports, RPT_ERROR, "Can't change old file (file saved with @)");
+               BKE_report(reports, RPT_ERROR, "Cannot change old file (file saved with @)");
                return 0;
        }
 
index 584bbf7a0aa1b00bb0d029bad6c64c84eb484ce9..8a75d07a67810be1670f769d92f17be0000e77e0 100644 (file)
@@ -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;
        }
        
index eea7424c59a271d788f76f68ebdecbcd28b2edfb..a05a98c58ca15a8f34e5c301a462d49f53fc1bad 100644 (file)
@@ -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;
                }
index 0e5daea6f16a20c8846edc0495a46c544b8e57f8..99de90bc9fae2cf2df5d9a7134d8e214e1d7801b 100644 (file)
@@ -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;
        }
 
index 246c323213cedcc3aa4f422d0686f4e8822113aa..9aa3f3633f30595b23dd95bc4fa3347583bc5c3f 100644 (file)
@@ -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}")
index b3aba977b2156e3b9323346c135d658280f90481..923bb3f90577274488188a64042423142c13e24f 100644 (file)
@@ -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] )
index a0cf5efabd902273c4776c4462e4d4264d369a3d..d370b5a881ec105562c63a7571eabea224865c52 100644 (file)
@@ -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;
        }
 
index 695afd444083b489c127ba42d76202a510adad34..eba71a63e2cff20bb7293ea70ea9025d4c848666 100644 (file)
@@ -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;
                }
        }
index 59273ee66b33c92f3677b2ae73b86f05c86d1236..acc69309a8cefd62359115e52e49791d990d4723 100644 (file)
@@ -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;
        }
        
index decd94f77c8974dafdf54960ebf52669f3c69a2c..19a1c4339adef999b5445be8a29d5f5a5dae6013 100644 (file)
@@ -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"))
index e376cba9a9fa23c5292a9c4ef444aea7be7abf00..1d5838e9905d0144ed0da37d366bfbb0b2e42d04 100644 (file)
@@ -414,7 +414,7 @@ static void QT_StartAddVideoSamplesToMedia(const Rect *trackFrame, int rectx, in
        gTemporalSettings = qtdata->gTemporalSettings;
        if (qtdata->gSpatialSettings.codecType == kH264CodecType) {
                if (gTemporalSettings.temporalQuality != codecMinQuality) {
-                       BKE_report(reports, RPT_WARNING, "Only minimum quality compression supported for QuickTime H.264");
+                       BKE_report(reports, RPT_WARNING, "Only minimum quality compression supported for Quicktime H.264");
                        gTemporalSettings.temporalQuality = codecMinQuality;
                }
        }
@@ -564,7 +564,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
        /* hack: create an empty file to make FSPathMakeRef() happy */
        myFile = open(theFullPath, O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRUSR | S_IWUSR);
        if (myFile < 0) {
-               BKE_report(reports, RPT_ERROR, "error while creating movie file!");
+               BKE_report(reports, RPT_ERROR, "Error while creating movie file!");
                /* do something? */
        }
        close(myFile);
index c6bd912e89bc172d1ac6352fdf3255f6b2c31894..602105fd28cb56662b5fdd35467748839460ac02 100644 (file)
@@ -450,9 +450,8 @@ void WM_file_read(bContext *C, const char *filepath, ReportList *reports)
                                if (sce->r.engine[0] &&
                                    BLI_findstring(&R_engines, sce->r.engine, offsetof(RenderEngineType, idname)) == NULL)
                                {
-                                       BKE_reportf(reports, RPT_WARNING,
-                                                   "Engine not available: '%s' for scene: %s, "
-                                                   "an addon may need to be installed or enabled",
+                                       BKE_reportf(reports, RPT_ERROR, "Engine '%s' not available for scene '%s' "
+                                                   "(an addon may need to be installed or enabled)",
                                                    sce->r.engine, sce->id.name + 2);
                                }
                        }
@@ -465,17 +464,17 @@ void WM_file_read(bContext *C, const char *filepath, ReportList *reports)
        else if (retval == BKE_READ_EXOTIC_OK_OTHER)
                BKE_write_undo(C, "Import file");
        else if (retval == BKE_READ_EXOTIC_FAIL_OPEN) {
-               BKE_reportf(reports, RPT_ERROR, IFACE_("Can't read file: \"%s\", %s."), filepath,
-                           errno ? strerror(errno) : IFACE_("Unable to open the file"));
+               BKE_reportf(reports, RPT_ERROR, "Cannot read file '%s': %s", filepath,
+                           errno ? strerror(errno) : TIP_("unable to open the file"));
        }
        else if (retval == BKE_READ_EXOTIC_FAIL_FORMAT) {
-               BKE_reportf(reports, RPT_ERROR, IFACE_("File format is not supported in file: \"%s\"."), filepath);
+               BKE_reportf(reports, RPT_ERROR, "File format is not supported in file '%s'", filepath);
        }
        else if (retval == BKE_READ_EXOTIC_FAIL_PATH) {
-               BKE_reportf(reports, RPT_ERROR, IFACE_("File path invalid: \"%s\"."), filepath);
+               BKE_reportf(reports, RPT_ERROR, "File path '%s' invalid", filepath);
        }
        else {
-               BKE_reportf(reports, RPT_ERROR, IFACE_("Unknown error loading: \"%s\"."), filepath);
+               BKE_reportf(reports, RPT_ERROR, "Unknown error loading '%s'", filepath);
                BLI_assert(!"invalid 'retval'");
        }
 
@@ -791,7 +790,7 @@ int WM_file_write(bContext *C, const char *target, int fileflags, ReportList *re
        /* send the OnSave event */
        for (li = G.main->library.first; li; li = li->id.next) {
                if (BLI_path_cmp(li->filepath, filepath) == 0) {
-                       BKE_reportf(reports, RPT_ERROR, "Can't overwrite used library '%.240s'", filepath);
+                       BKE_reportf(reports, RPT_ERROR, "Cannot overwrite used library '%.240s'", filepath);
                        return -1;
                }
        }
index 8496cd8041a26b215983900cb328534a1f9ffae6..8c9d4861a9ecb994555dfb92f32a4bf2495a7015 100644 (file)
@@ -3130,7 +3130,7 @@ static int radial_control_get_path(PointerRNA *ctx_ptr, wmOperator *op,
 
        /* check flags */
        if ((flags & RC_PROP_REQUIRE_BOOL) && (flags & RC_PROP_REQUIRE_FLOAT)) {
-               BKE_reportf(op->reports, RPT_ERROR, "Property can't be both boolean and float");
+               BKE_report(op->reports, RPT_ERROR, "Property cannot be both boolean and float");
                return 0;
        }
 
@@ -3153,7 +3153,7 @@ static int radial_control_get_path(PointerRNA *ctx_ptr, wmOperator *op,
                if (flags & RC_PROP_ALLOW_MISSING)
                        return 1;
                else {
-                       BKE_reportf(op->reports, RPT_ERROR, "Couldn't resolve path %s", name);
+                       BKE_reportf(op->reports, RPT_ERROR, "Could not resolve path '%s'", name);
                        return 0;
                }
        }
@@ -3166,8 +3166,7 @@ static int radial_control_get_path(PointerRNA *ctx_ptr, wmOperator *op,
                    ((flags & RC_PROP_REQUIRE_FLOAT) && prop_type != PROP_FLOAT))
                {
                        MEM_freeN(str);
-                       BKE_reportf(op->reports, RPT_ERROR,
-                                   "Property from path %s is not a float", name);
+                       BKE_reportf(op->reports, RPT_ERROR, "Property from path '%s' is not a float", name);
                        return 0;
                }
        }
@@ -3175,8 +3174,7 @@ static int radial_control_get_path(PointerRNA *ctx_ptr, wmOperator *op,
        /* check property's array length */
        if (*r_prop && (len = RNA_property_array_length(r_ptr, *r_prop)) != req_length) {
                MEM_freeN(str);
-               BKE_reportf(op->reports, RPT_ERROR,
-                           "Property from path %s has length %d instead of %d",
+               BKE_reportf(op->reports, RPT_ERROR, "Property from path '%s' has length %d instead of %d",
                            name, len, req_length);
                return 0;
        }
@@ -3244,8 +3242,7 @@ static int radial_control_get_properties(bContext *C, wmOperator *op)
        else if (rc->image_id_ptr.data) {
                /* extra check, pointer must be to an ID */
                if (!RNA_struct_is_ID(rc->image_id_ptr.type)) {
-                       BKE_report(op->reports, RPT_ERROR,
-                                  "Pointer from path image_id is not an ID");
+                       BKE_report(op->reports, RPT_ERROR, "Pointer from path image_id is not an ID");
                        return 0;
                }
        }