Revert "UI: use correct singular and plural nouns in report messages"
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 2 Oct 2019 10:52:58 +0000 (12:52 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 2 Oct 2019 10:54:56 +0000 (12:54 +0200)
Convention is to use (s) postfix for cases where there can be one or multiple,
so stay consistent with that.

This reverts commit 3e8276311ed17d12e8b47b4fe8e2f68c1ce8c603.

source/blender/blenkernel/intern/packedFile.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/object/object_add.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_view3d/view3d_ops.c

index cc3b10b120783a11680a6226eb1d531c74b7d580..5fa3352d497a09a416e4ead333fae06e37030f0e 100644 (file)
@@ -267,11 +267,7 @@ void BKE_packedfile_pack_all(Main *bmain, ReportList *reports, bool verbose)
   }
 
   if (tot > 0) {
-    BKE_reportf(reports,
-                RPT_INFO,
-                tot == 1 ? "Packed %d file" :
-                           "Packed %d files",
-                tot);
+    BKE_reportf(reports, RPT_INFO, "Packed %d file(s)", tot);
   }
   else if (verbose) {
     BKE_report(reports, RPT_INFO, "No new files have been packed");
index 4636d1ee71ee4b4504bb6302f4b21a59c7373bb9..cf3170b54460a7c7b642a7f909d2f27d195c9ab4 100644 (file)
@@ -2044,11 +2044,7 @@ static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op)
   }
 
   if (tot_failed_all != 0) {
-    BKE_reportf(op->reports,
-                RPT_WARNING,
-                tot_failed_all == 1 ? "Unable to rotate %d edge" :
-                                      "Unable to rotate %d edges",
-                tot_failed_all);
+    BKE_reportf(op->reports, RPT_WARNING, "Unable to rotate %d edge(s)", tot_failed_all);
   }
 
   return OPERATOR_FINISHED;
@@ -3165,11 +3161,7 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op)
   }
   MEM_freeN(objects);
 
-  BKE_reportf(op->reports,
-              RPT_INFO,
-              count_multi == 1 ? "Removed %d vertex" :
-                                 "Removed %d vertices",
-              count_multi);
+  BKE_reportf(op->reports, RPT_INFO, "Removed %d vertice(s)", count_multi);
 
   return OPERATOR_FINISHED;
 }
index d6816ddbe7343f0087d6e493bd43122ec405f637..52618ba4dfc99eca99241b4b00c167d9a7e5d1dd 100644 (file)
@@ -1581,11 +1581,7 @@ static int object_delete_exec(bContext *C, wmOperator *op)
   }
   CTX_DATA_END;
 
-  BKE_reportf(op->reports,
-              RPT_INFO,
-              changed_count == 1 ? "Deleted %u object" :
-                                   "Deleted %u objects",
-              changed_count);
+  BKE_reportf(op->reports, RPT_INFO, "Deleted %u object(s)", changed_count);
 
   if (changed_count == 0) {
     return OPERATOR_CANCELLED;
index 2ea0e9dc018380056625d88639c2229e4a74b10a..3978f7ba3b5b12b39a1f04e8cc18391253a8dca4 100644 (file)
@@ -3076,11 +3076,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op)
     return OPERATOR_CANCELLED;
   }
 
-  BKE_reportf(op->reports,
-              RPT_INFO,
-              totremoved == 1 ? "Removed %d double particle" :
-                                "Removed %d double particles",
-              totremoved);
+  BKE_reportf(op->reports, RPT_INFO, "Removed %d double particle(s)", totremoved);
 
   DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
   WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob);
index 39f7bf001f3265968e66f3c610373b3ee04c1e78..a8dfad852323ec1e66cf4c7da80d967283064bb2 100644 (file)
@@ -2298,12 +2298,7 @@ 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,
-              tot == 1 ? "%d image will be saved in %s" :
-                         "%d images will be saved in %s",
-              tot,
-              di);
+  BKE_reportf(op->reports, RPT_INFO, "%d image(s) will be saved in %s", tot, di);
 
   iter = IMB_moviecacheIter_new(image->cache);
   while (!IMB_moviecacheIter_done(iter)) {
index c81d292a8593b8fb8e0314cff3da48833b78cc0a..c55140db46ff4c61c66001443964de7b7f8e7fc7 100644 (file)
@@ -770,11 +770,7 @@ 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,
-              num_ids == 1 ? "Copied %d selected data-block" :
-                             "Copied %d selected data-blocks",
-              num_ids);
+  BKE_reportf(op->reports, RPT_INFO, "Copied %d selected data-block(s)", num_ids);
 
   return OPERATOR_FINISHED;
 }
@@ -808,11 +804,7 @@ static int outliner_id_paste_exec(bContext *C, wmOperator *op)
 
   WM_event_add_notifier(C, NC_WINDOW, NULL);
 
-  BKE_reportf(op->reports,
-              RPT_INFO,
-              num_pasted == 1 ? "%d data-block pasted" :
-                                "%d data-blocks pasted",
-              num_pasted);
+  BKE_reportf(op->reports, RPT_INFO, "%d data-block(s) pasted", num_pasted);
   return OPERATOR_FINISHED;
 }
 
@@ -2265,11 +2257,7 @@ static int outliner_orphans_purge_exec(bContext *C, wmOperator *op)
 
   BKE_id_multi_tagged_delete(bmain);
 
-  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]);
+  BKE_reportf(op->reports, RPT_INFO, "Deleted %d data-block(s)", 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
index 37eea6b03d79adf058006690e27b49896d6ff3f6..cfdd3dcbb6fe7e666564bd8c6c4e67da982d4459 100644 (file)
@@ -79,11 +79,7 @@ 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,
-              num_copied == 1 ? "Copied %d selected object" :
-                                "Copied %d selected objects",
-              num_copied);
+  BKE_reportf(op->reports, RPT_INFO, "Copied %d selected object(s)", num_copied);
 
   return OPERATOR_FINISHED;
 }
@@ -122,11 +118,7 @@ static int view3d_pastebuffer_exec(bContext *C, wmOperator *op)
 
   WM_event_add_notifier(C, NC_WINDOW, NULL);
 
-  BKE_reportf(op->reports,
-              RPT_INFO,
-              num_pasted == 1 ? "%d object pasted" :
-                                "%d objects pasted",
-              num_pasted);
+  BKE_reportf(op->reports, RPT_INFO, "%d object(s) pasted", num_pasted);
 
   return OPERATOR_FINISHED;
 }