[Bf-blender-cvs] [68e86c4816a] blender-v3.0-release: Cleanup: use (s) postfix for messages that may be plural
Campbell Barton
noreply at git.blender.org
Fri Nov 5 06:04:19 CET 2021
Commit: 68e86c4816a0fb18a8bd393d938dc8f95c1d0807
Author: Campbell Barton
Date: Fri Nov 5 15:58:01 2021 +1100
Branches: blender-v3.0-release
https://developer.blender.org/rB68e86c4816a0fb18a8bd393d938dc8f95c1d0807
Cleanup: use (s) postfix for messages that may be plural
Ref 01c824ac88a0ff95a26c26be09f7a8853e47e446
===================================================================
M source/blender/editors/curve/editcurve.c
M source/blender/editors/curve/editcurve_select.c
M source/blender/editors/lattice/editlattice_select.c
M source/blender/editors/mesh/editmesh_tools.c
===================================================================
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 029c8b05923..46bf1f6c9b5 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1437,20 +1437,13 @@ static int separate_exec(bContext *C, wmOperator *op)
/* Some curves changed, but some curves failed: don't explain why it failed. */
if (status.changed) {
- BKE_reportf(op->reports,
- RPT_INFO,
- tot_errors == 1 ? "%d curve could not be separated" :
- "%d curves could not be separated",
- tot_errors);
+ BKE_reportf(op->reports, RPT_INFO, "%d curve(s) could not be separated", tot_errors);
return OPERATOR_FINISHED;
}
/* All curves failed: If there is more than one error give a generic error report. */
if (((status.error_vertex_keys ? 1 : 0) + (status.error_generic ? 1 : 0)) > 1) {
- BKE_report(op->reports,
- RPT_ERROR,
- tot_errors == 1 ? "Could not separate selected curves" :
- "Could not separate selected curve");
+ BKE_report(op->reports, RPT_ERROR, "Could not separate selected curve(s)");
}
/* All curves failed due to the same error. */
@@ -4708,11 +4701,7 @@ static int make_segment_exec(bContext *C, wmOperator *op)
if (tot_errors > 0) {
/* Some curves changed, but some curves failed: don't explain why it failed. */
if (status.changed) {
- BKE_reportf(op->reports,
- RPT_INFO,
- tot_errors == 1 ? "%d curve could not make segments" :
- "%d curves could not make segments",
- tot_errors);
+ BKE_reportf(op->reports, RPT_INFO, "%d curves could not make segments", tot_errors);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/curve/editcurve_select.c b/source/blender/editors/curve/editcurve_select.c
index 721aa7afecc..a76e73d3cf1 100644
--- a/source/blender/editors/curve/editcurve_select.c
+++ b/source/blender/editors/curve/editcurve_select.c
@@ -1464,15 +1464,10 @@ static int select_nth_exec(bContext *C, wmOperator *op)
if (!changed) {
if (obact->type == OB_SURF) {
- BKE_report(
- op->reports,
- RPT_ERROR,
- (objects_len == 1 ? "Surface has no active point" : "Surfaces have no active point"));
+ BKE_report(op->reports, RPT_ERROR, "Surface(s) have no active point");
}
else {
- BKE_report(op->reports,
- RPT_ERROR,
- (objects_len == 1 ? "Curve has no active point" : "Curves have no active point"));
+ BKE_report(op->reports, RPT_ERROR, "Curve(s) have no active point");
}
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/lattice/editlattice_select.c b/source/blender/editors/lattice/editlattice_select.c
index e6f190f335b..5ea2b68d901 100644
--- a/source/blender/editors/lattice/editlattice_select.c
+++ b/source/blender/editors/lattice/editlattice_select.c
@@ -540,10 +540,7 @@ static int lattice_select_ungrouped_exec(bContext *C, wmOperator *op)
MEM_freeN(objects);
if (!changed) {
- BKE_report(op->reports,
- RPT_ERROR,
- objects_len > 1 ? "No weights/vertex groups on objects" :
- "No weights/vertex groups on object");
+ BKE_report(op->reports, RPT_ERROR, "No weights/vertex groups on object(s)");
return OPERATOR_CANCELLED;
}
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 122214b87d5..6cd7d912820 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -3706,10 +3706,7 @@ static int edbm_shape_propagate_to_all_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
if (tot_shapekeys == 0) {
- BKE_report(op->reports,
- RPT_ERROR,
- objects_len > 1 ? "Meshes do not have shape keys" :
- "Mesh does not have shape keys");
+ BKE_report(op->reports, RPT_ERROR, "Mesh(es) do not have shape keys");
return OPERATOR_CANCELLED;
}
More information about the Bf-blender-cvs
mailing list