diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-10-19 20:43:10 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-10-19 20:43:10 +0400 |
commit | f72f1dca6c70bd4597f0106adbd50608cdd8c01b (patch) | |
tree | 88d45cbf4d7b2afdf881f4db4d3aa2339308d6fa /source/blender/windowmanager/intern | |
parent | 97c68098cca15480f07afb28261021bb3548c89b (diff) |
More UI messages fixes and tweaks, BKE_report<->BKE_reportf, and stuff to translate...
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 17 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 13 |
2 files changed, 13 insertions, 17 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index c6bd912e89b..602105fd28c 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -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; } } diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 8496cd8041a..8c9d4861a9e 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -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; } } |