Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2012-10-13 19:44:50 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-10-13 19:44:50 +0400
commitb50fc8ac689cc6e39aa34b427234efab6e1965ae (patch)
treedf3959641225b0fd207579b9b89d4d30450ee22d /source
parent3d6ab52f2b2918282b55c2d8b6e0de78941a2f1e (diff)
More UI messages fixes.
Also forgot to translate reports' titles, and change some usages of BKE_reportf to simple BKE_report, when the former is not needed!
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/anim.c6
-rw-r--r--source/blender/blenkernel/intern/packedFile.c3
-rw-r--r--source/blender/blenkernel/intern/report.c27
-rw-r--r--source/blender/blenloader/intern/readfile.c2
-rw-r--r--source/blender/blenloader/intern/writefile.c12
-rw-r--r--source/blender/editors/interface/interface_ops.c2
-rw-r--r--source/blender/makesrna/intern/rna_animation_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c16
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_wm.c6
-rw-r--r--source/blender/quicktime/apple/quicktime_export.c16
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c7
13 files changed, 58 insertions, 45 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index f44cb6d6b19..622658e0a49 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -40,6 +40,8 @@
#include "BLI_rand.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_group_types.h"
@@ -174,10 +176,10 @@ bMotionPath *animviz_verify_motionpaths(ReportList *reports, Scene *scene, Objec
/* avoid 0 size allocs */
if (avs->path_sf >= avs->path_ef) {
BKE_reportf(reports, RPT_ERROR,
- "Motion Path frame extents invalid for %s (%d to %d).%s\n",
+ "Motion Path frame extents invalid for %s (%d to %d)%s",
(pchan) ? pchan->name : ob->id.name,
avs->path_sf, avs->path_ef,
- (avs->path_sf == avs->path_ef) ? " Cannot have single-frame paths." : "");
+ (avs->path_sf == avs->path_ef) ? TIP_(", cannot have single-frame paths") : "");
return NULL;
}
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index f2069229ac2..f16748bf20a 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -238,7 +238,8 @@ void packAll(Main *bmain, ReportList *reports)
ima->packedfile = newPackedFile(reports, ima->name, ID_BLEND_PATH(bmain, &ima->id));
}
else if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE)) {
- BKE_reportf(reports, RPT_WARNING, "Image '%s' skipped, movies and image sequences not supported.", ima->id.name + 2);
+ BKE_reportf(reports, RPT_WARNING, "Image '%s' skipped, movies and image sequences not supported",
+ ima->id.name + 2);
}
}
}
diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c
index 59806bdeaf5..ae6f4f35519 100644
--- a/source/blender/blenkernel/intern/report.c
+++ b/source/blender/blenkernel/intern/report.c
@@ -46,15 +46,24 @@
static const char *report_type_str(int type)
{
switch (type) {
- case RPT_DEBUG: return "Debug";
- case RPT_INFO: return "Info";
- case RPT_OPERATOR: return "Operator";
- case RPT_WARNING: return "Warning";
- case RPT_ERROR: return "Error";
- case RPT_ERROR_INVALID_INPUT: return "Invalid Input Error";
- case RPT_ERROR_INVALID_CONTEXT: return "Invalid Context Error";
- case RPT_ERROR_OUT_OF_MEMORY: return "Out Of Memory Error";
- default: return "Undefined Type";
+ case RPT_DEBUG:
+ return TIP_("Debug");
+ case RPT_INFO:
+ return TIP_("Info");
+ case RPT_OPERATOR:
+ return TIP_("Operator");
+ case RPT_WARNING:
+ return TIP_("Warning");
+ case RPT_ERROR:
+ return TIP_("Error");
+ case RPT_ERROR_INVALID_INPUT:
+ return TIP_("Invalid Input Error");
+ case RPT_ERROR_INVALID_CONTEXT:
+ return TIP_("Invalid Context Error");
+ case RPT_ERROR_OUT_OF_MEMORY:
+ return TIP_("Out Of Memory Error");
+ default:
+ return TIP_("Undefined Type");
}
}
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 9171e78e7ad..1e14eb55dc0 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6611,7 +6611,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 (error in console)");
}
//XXX hack, material.c uses G.main allover the place, instead of main
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 536376ac577..a825cf4ef98 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -3022,7 +3022,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, "Can't open file %s for writing: %s", tempname, strerror(errno));
return 0;
}
@@ -3073,7 +3073,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
if (write_flags & G_FILE_HISTORY) {
int err_hist = do_history(filepath, reports);
if (err_hist) {
- BKE_report(reports, RPT_ERROR, "Version backup failed. File saved with @");
+ BKE_report(reports, RPT_ERROR, "Version backup failed (file saved with @)");
return 0;
}
}
@@ -3090,23 +3090,23 @@ 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, "Can't change old file (file saved with @)");
return 0;
}
BLI_delete(tempname, 0, 0);
}
else if (-1==ret) {
- BKE_report(reports, RPT_ERROR, "Failed opening .gz file.");
+ BKE_report(reports, RPT_ERROR, "Failed opening .gz file");
return 0;
}
else if (-2==ret) {
- BKE_report(reports, RPT_ERROR, "Failed opening .blend file for compression.");
+ BKE_report(reports, RPT_ERROR, "Failed opening .blend file for compression");
return 0;
}
}
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, "Can't change old file (file saved with @)");
return 0;
}
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index ba2feebd2f8..f9a325944e4 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -808,7 +808,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);
+ "File: '%s' can't be opened", filepath);
return OPERATOR_CANCELLED;
}
else {
diff --git a/source/blender/makesrna/intern/rna_animation_api.c b/source/blender/makesrna/intern/rna_animation_api.c
index 39128b48cd8..b93fd9daa36 100644
--- a/source/blender/makesrna/intern/rna_animation_api.c
+++ b/source/blender/makesrna/intern/rna_animation_api.c
@@ -60,7 +60,7 @@ static void rna_KeyingSet_context_refresh(KeyingSet *ks, bContext *C, ReportList
break;
case MODIFYKEY_MISSING_TYPEINFO:
- BKE_report(reports, RPT_ERROR, "Incomplete built-in Keying Set. Appears to be missing type info");
+ BKE_report(reports, RPT_ERROR, "Incomplete built-in Keying Set, appears to be missing type info");
break;
}
}
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index dff08990dec..ce0f588a4ba 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -689,7 +689,7 @@ static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *C, ReportList *r
bNodeTemplate ntemp;
if (type == NODE_GROUP && group == NULL) {
- BKE_reportf(reports, RPT_ERROR, "node type \'GROUP\' missing group argument");
+ BKE_report(reports, RPT_ERROR, "Node type 'GROUP' missing group argument");
return NULL;
}
@@ -700,7 +700,7 @@ static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *C, ReportList *r
node = nodeAddNode(ntree, &ntemp);
if (node == NULL) {
- BKE_reportf(reports, RPT_ERROR, "Unable to create node");
+ BKE_report(reports, RPT_ERROR, "Unable to create node");
}
else {
ntreeUpdateTree(ntree); /* update group node socket links*/
@@ -800,7 +800,7 @@ static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports,
nodeFindNode(ntree, tosock, &tonode, NULL, &to_in_out);
if (&from_in_out == &to_in_out) {
- BKE_reportf(reports, RPT_ERROR, "Same input/output direction of sockets");
+ BKE_report(reports, RPT_ERROR, "Same input/output direction of sockets");
return NULL;
}
@@ -827,7 +827,7 @@ static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports,
static void rna_NodeTree_link_remove(bNodeTree *ntree, ReportList *reports, bNodeLink *link)
{
if (BLI_findindex(&ntree->links, link) == -1) {
- BKE_reportf(reports, RPT_ERROR, "Unable to locate link in node tree");
+ BKE_report(reports, RPT_ERROR, "Unable to locate link in node tree");
}
else {
nodeRemLink(ntree, link);
@@ -882,9 +882,9 @@ static bNodeSocket *rna_NodeTree_input_expose(bNodeTree *ntree, ReportList *repo
int index, in_out;
if (!nodeFindNode(ntree, sock, &node, &index, &in_out))
- BKE_reportf(reports, RPT_ERROR, "Unable to locate socket in node tree");
+ BKE_report(reports, RPT_ERROR, "Unable to locate socket in node tree");
else if (in_out != SOCK_IN)
- BKE_reportf(reports, RPT_ERROR, "Socket is not an input");
+ BKE_report(reports, RPT_ERROR, "Socket is not an input");
else {
/* XXX should check if tree is a group here! no good way to do this currently. */
gsock = node_group_add_socket(ntree, sock->name, sock->type, SOCK_IN);
@@ -906,9 +906,9 @@ static bNodeSocket *rna_NodeTree_output_expose(bNodeTree *ntree, ReportList *rep
int index, in_out;
if (!nodeFindNode(ntree, sock, &node, &index, &in_out))
- BKE_reportf(reports, RPT_ERROR, "Unable to locate socket in node tree");
+ BKE_report(reports, RPT_ERROR, "Unable to locate socket in node tree");
else if (in_out != SOCK_OUT)
- BKE_reportf(reports, RPT_ERROR, "Socket is not an output");
+ BKE_report(reports, RPT_ERROR, "Socket is not an output");
else {
/* XXX should check if tree is a group here! no good way to do this currently. */
gsock = node_group_add_socket(ntree, sock->name, sock->type, SOCK_OUT);
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 879a77527cd..5f5bdb765b1 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -158,7 +158,7 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
/* BKE_mesh_from_nurbs changes the type to a mesh, check it worked */
if (tmpobj->type != OB_MESH) {
BKE_libblock_free_us(&(G.main->object), tmpobj);
- BKE_report(reports, RPT_ERROR, "cant convert curve to mesh. Does the curve have any segments?");
+ BKE_report(reports, RPT_ERROR, "Can't convert curve to mesh (does the curve have any segments?)");
return NULL;
}
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index d8753f4ff43..30bdc717f50 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -1062,7 +1062,7 @@ static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, void *
}
else {
BKE_reportf(reports, RPT_ERROR,
- "registering operator class: '%s', invalid bl_idname '%s', at position %d",
+ "Registering operator class: '%s', invalid bl_idname '%s', at position %d",
identifier, _operator_idname, i);
return NULL;
}
@@ -1071,7 +1071,7 @@ static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, void *
}
if (i > ((int)sizeof(dummyop.idname)) - 3) {
- BKE_reportf(reports, RPT_ERROR, "registering operator class: '%s', invalid bl_idname '%s', "
+ BKE_reportf(reports, RPT_ERROR, "Registering operator class: '%s', invalid bl_idname '%s', "
"is too long, maximum length is %d", identifier, _operator_idname,
(int)sizeof(dummyop.idname) - 3);
return NULL;
@@ -1079,7 +1079,7 @@ static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, void *
if (dot != 1) {
BKE_reportf(reports, RPT_ERROR,
- "registering operator class: '%s', invalid bl_idname '%s', must contain 1 '.' character",
+ "Registering operator class: '%s', invalid bl_idname '%s', must contain 1 '.' character",
identifier, _operator_idname);
return NULL;
}
diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c
index 659fd997c1f..e376cba9a9f 100644
--- a/source/blender/quicktime/apple/quicktime_export.c
+++ b/source/blender/quicktime/apple/quicktime_export.c
@@ -218,7 +218,7 @@ static OSErr QT_SaveCodecSettingsToScene(RenderData *rd, ReportList *reports)
/* retreive codecdata from quicktime in a atomcontainer */
myErr = SCGetSettingsAsAtomContainer(qtdata->theComponent, &myContainer);
if (myErr != noErr) {
- BKE_reportf(reports, RPT_ERROR, "Quicktime: SCGetSettingsAsAtomContainer failed\n");
+ BKE_report(reports, RPT_ERROR, "Quicktime: SCGetSettingsAsAtomContainer failed");
goto bail;
}
@@ -238,7 +238,7 @@ static OSErr QT_SaveCodecSettingsToScene(RenderData *rd, ReportList *reports)
GetCodecInfo(&ci, qtdata->gSpatialSettings.codecType, 0);
}
else {
- BKE_reportf(reports, RPT_ERROR, "Quicktime: QT_SaveCodecSettingsToScene failed\n");
+ BKE_report(reports, RPT_ERROR, "Quicktime: QT_SaveCodecSettingsToScene failed");
}
QTUnlockContainer(myContainer);
@@ -268,7 +268,7 @@ static OSErr QT_GetCodecSettingsFromScene(RenderData *rd, ReportList *reports)
if (qcd->cdParms && qcd->cdSize) {
myErr = SCSetSettingsFromAtomContainer((GraphicsExportComponent)qtdata->theComponent, (QTAtomContainer)myHandle);
if (myErr != noErr) {
- BKE_reportf(reports, RPT_ERROR, "Quicktime: SCSetSettingsFromAtomContainer failed\n");
+ BKE_report(reports, RPT_ERROR, "Quicktime: SCSetSettingsFromAtomContainer failed");
goto bail;
}
@@ -295,7 +295,7 @@ static OSErr QT_GetCodecSettingsFromScene(RenderData *rd, ReportList *reports)
}
else {
- BKE_reportf(reports, RPT_ERROR, "Quicktime: QT_GetCodecSettingsFromScene failed\n");
+ BKE_report(reports, RPT_ERROR, "Quicktime: QT_GetCodecSettingsFromScene failed");
}
bail:
if (myHandle != NULL)
@@ -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_reportf(reports, RPT_WARNING, "Only minimum quality compression supported for QuickTime H.264.\n");
+ 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_reportf(reports, RPT_ERROR, "error while creating movie file!\n");
+ BKE_report(reports, RPT_ERROR, "error while creating movie file!");
/* do something? */
}
close(myFile);
@@ -599,7 +599,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
#endif
}
else {
- //printf("Created QuickTime movie: %s\n", name);
+ /* printf("Created QuickTime movie: %s\n", name); */
QT_CreateMyVideoTrack(rectx, recty, reports);
}
@@ -636,7 +636,7 @@ void end_qt(void)
DisposeMovie(qtexport->theMovie);
- //printf("Finished QuickTime movie.\n");
+ /* printf("Finished QuickTime movie.\n"); */
}
#ifdef __APPLE__
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 9bb3b2a0e69..658a13a8918 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -302,7 +302,7 @@ int WM_init_game(bContext *C)
else {
ReportTimerInfo *rti;
- BKE_report(&wm->reports, RPT_ERROR, "No valid 3D View found. Game auto start is not possible.");
+ BKE_report(&wm->reports, RPT_ERROR, "No valid 3D View found, game auto start is not possible");
/* After adding the report to the global list, reset the report timer. */
WM_event_remove_timer(wm, NULL, wm->reports.reporttimer);
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 19c2a58fdfc..8496cd8041a 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1162,7 +1162,7 @@ int WM_operator_props_popup(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
if ((op->type->flag & OPTYPE_REGISTER) == 0) {
BKE_reportf(op->reports, RPT_ERROR,
- "Operator '%s' does not have register enabled, incorrect invoke function.", op->type->idname);
+ "Operator '%s' does not have register enabled, incorrect invoke function", op->type->idname);
return OPERATOR_CANCELLED;
}
@@ -1193,11 +1193,12 @@ int WM_operator_redo_popup(bContext *C, wmOperator *op)
{
/* CTX_wm_reports(C) because operator is on stack, not active in event system */
if ((op->type->flag & OPTYPE_REGISTER) == 0) {
- BKE_reportf(CTX_wm_reports(C), RPT_ERROR, "Operator redo '%s' does not have register enabled, incorrect invoke function.", op->type->idname);
+ BKE_reportf(CTX_wm_reports(C), RPT_ERROR,
+ "Operator redo '%s' does not have register enabled, incorrect invoke function", op->type->idname);
return OPERATOR_CANCELLED;
}
if (op->type->poll && op->type->poll(C) == 0) {
- BKE_reportf(CTX_wm_reports(C), RPT_ERROR, "Operator redo '%s': wrong context.", op->type->idname);
+ BKE_reportf(CTX_wm_reports(C), RPT_ERROR, "Operator redo '%s': wrong context", op->type->idname);
return OPERATOR_CANCELLED;
}