UI: use correct singular and plural nouns in report messages
Differential Revision: https://developer.blender.org/D5729
This commit is contained in:
@@ -267,7 +267,11 @@ void BKE_packedfile_pack_all(Main *bmain, ReportList *reports, bool verbose)
|
||||
}
|
||||
|
||||
if (tot > 0) {
|
||||
BKE_reportf(reports, RPT_INFO, "Packed %d files", tot);
|
||||
BKE_reportf(reports,
|
||||
RPT_INFO,
|
||||
tot == 1 ? "Packed %d file" :
|
||||
"Packed %d files",
|
||||
tot);
|
||||
}
|
||||
else if (verbose) {
|
||||
BKE_report(reports, RPT_INFO, "No new files have been packed");
|
||||
|
||||
@@ -2044,7 +2044,11 @@ static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
if (tot_failed_all != 0) {
|
||||
BKE_reportf(op->reports, RPT_WARNING, "Unable to rotate %d edge(s)", tot_failed_all);
|
||||
BKE_reportf(op->reports,
|
||||
RPT_WARNING,
|
||||
tot_failed_all == 1 ? "Unable to rotate %d edge" :
|
||||
"Unable to rotate %d edges",
|
||||
tot_failed_all);
|
||||
}
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -3161,7 +3165,11 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
|
||||
BKE_reportf(op->reports, RPT_INFO, "Removed %d vertices", count_multi);
|
||||
BKE_reportf(op->reports,
|
||||
RPT_INFO,
|
||||
count_multi == 1 ? "Removed %d vertex" :
|
||||
"Removed %d vertices",
|
||||
count_multi);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
@@ -1581,7 +1581,11 @@ static int object_delete_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
CTX_DATA_END;
|
||||
|
||||
BKE_reportf(op->reports, RPT_INFO, "Deleted %u object(s)", changed_count);
|
||||
BKE_reportf(op->reports,
|
||||
RPT_INFO,
|
||||
changed_count == 1 ? "Deleted %u object" :
|
||||
"Deleted %u objects",
|
||||
changed_count);
|
||||
|
||||
if (changed_count == 0) {
|
||||
return OPERATOR_CANCELLED;
|
||||
|
||||
@@ -3076,7 +3076,11 @@ static int remove_doubles_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
BKE_reportf(op->reports, RPT_INFO, "Removed %d double particles", totremoved);
|
||||
BKE_reportf(op->reports,
|
||||
RPT_INFO,
|
||||
totremoved == 1 ? "Removed %d double particle" :
|
||||
"Removed %d double particles",
|
||||
totremoved);
|
||||
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob);
|
||||
|
||||
@@ -2298,7 +2298,12 @@ static int image_save_sequence_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* get a filename for menu */
|
||||
BLI_split_dir_part(first_ibuf->name, di, sizeof(di));
|
||||
BKE_reportf(op->reports, RPT_INFO, "%d image(s) will be saved in %s", tot, di);
|
||||
BKE_reportf(op->reports,
|
||||
RPT_INFO,
|
||||
tot == 1 ? "%d image will be saved in %s" :
|
||||
"%d images will be saved in %s",
|
||||
tot,
|
||||
di);
|
||||
|
||||
iter = IMB_moviecacheIter_new(image->cache);
|
||||
while (!IMB_moviecacheIter_done(iter)) {
|
||||
|
||||
@@ -770,7 +770,11 @@ static int outliner_id_copy_exec(bContext *C, wmOperator *op)
|
||||
BLI_make_file_string("/", str, BKE_tempdir_base(), "copybuffer.blend");
|
||||
BKE_copybuffer_save(bmain, str, op->reports);
|
||||
|
||||
BKE_reportf(op->reports, RPT_INFO, "Copied %d selected data-blocks", num_ids);
|
||||
BKE_reportf(op->reports,
|
||||
RPT_INFO,
|
||||
num_ids == 1 ? "Copied %d selected data-block" :
|
||||
"Copied %d selected data-blocks",
|
||||
num_ids);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -804,7 +808,11 @@ static int outliner_id_paste_exec(bContext *C, wmOperator *op)
|
||||
|
||||
WM_event_add_notifier(C, NC_WINDOW, NULL);
|
||||
|
||||
BKE_reportf(op->reports, RPT_INFO, "%d data-blocks pasted", num_pasted);
|
||||
BKE_reportf(op->reports,
|
||||
RPT_INFO,
|
||||
num_pasted == 1 ? "%d data-block pasted" :
|
||||
"%d data-blocks pasted",
|
||||
num_pasted);
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
@@ -2257,7 +2265,11 @@ static int outliner_orphans_purge_exec(bContext *C, wmOperator *op)
|
||||
|
||||
BKE_id_multi_tagged_delete(bmain);
|
||||
|
||||
BKE_reportf(op->reports, RPT_INFO, "Deleted %d data-blocks", num_tagged[INDEX_ID_NULL]);
|
||||
BKE_reportf(op->reports,
|
||||
RPT_INFO,
|
||||
num_tagged[INDEX_ID_NULL] == 1 ? "Deleted %d data-block" :
|
||||
"Deleted %d data-blocks",
|
||||
num_tagged[INDEX_ID_NULL]);
|
||||
|
||||
/* XXX: tree management normally happens from draw_outliner(), but when
|
||||
* you're clicking to fast on Delete object from context menu in
|
||||
|
||||
@@ -79,7 +79,11 @@ static int view3d_copybuffer_exec(bContext *C, wmOperator *op)
|
||||
BLI_make_file_string("/", str, BKE_tempdir_base(), "copybuffer.blend");
|
||||
BKE_copybuffer_save(bmain, str, op->reports);
|
||||
|
||||
BKE_reportf(op->reports, RPT_INFO, "Copied %d selected objects", num_copied);
|
||||
BKE_reportf(op->reports,
|
||||
RPT_INFO,
|
||||
num_copied == 1 ? "Copied %d selected object" :
|
||||
"Copied %d selected objects",
|
||||
num_copied);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -118,7 +122,11 @@ static int view3d_pastebuffer_exec(bContext *C, wmOperator *op)
|
||||
|
||||
WM_event_add_notifier(C, NC_WINDOW, NULL);
|
||||
|
||||
BKE_reportf(op->reports, RPT_INFO, "%d objects pasted", num_pasted);
|
||||
BKE_reportf(op->reports,
|
||||
RPT_INFO,
|
||||
num_pasted == 1 ? "%d object pasted" :
|
||||
"%d objects pasted",
|
||||
num_pasted);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user