[pve-devel] [PATCH widget-toolkit] fix #6088: notification: matcher: use more descriptive strings

Maximiliano Sandoval m.sandoval at proxmox.com
Tue Jan 28 10:31:59 CET 2025


Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---

The longest translation of "At least one rule does not match" has only 4 more
characters than the original, this is not a problem for the size we have
available as in most cases the rules carry even longer text.

 src/window/NotificationMatcherEdit.js | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/window/NotificationMatcherEdit.js b/src/window/NotificationMatcherEdit.js
index 9ab443f..83c09ea 100644
--- a/src/window/NotificationMatcherEdit.js
+++ b/src/window/NotificationMatcherEdit.js
@@ -491,12 +491,17 @@ Ext.define('Proxmox.panel.NotificationMatchRuleTree', {
 	    } break;
 	    case 'mode':
 		if (data.value === 'all') {
-		    text = gettext("All");
+		    if (data.invert) {
+			text = gettext('At least one rule does not match');
+		    } else {
+			text = gettext('All rules match');
+		    }
 		} else if (data.value === 'any') {
-		    text = gettext("Any");
-		}
-		if (data.invert) {
-		    text = `!${text}`;
+		    if (data.invert) {
+			text = gettext('No rule matches');
+		    } else {
+			text = gettext('Any rule matches');
+		    }
 		}
 		iconCls = 'fa fa-filter';
 
-- 
2.39.5





More information about the pve-devel mailing list