From: Lukas Wagner <l.wagner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 proxmox-widget-toolkit 7/8] panel: notification: fix `gettext` calls
Date: Thu, 31 Aug 2023 16:30:21 +0200 [thread overview]
Message-ID: <20230831143022.685011-8-l.wagner@proxmox.com> (raw)
In-Reply-To: <20230831143022.685011-1-l.wagner@proxmox.com>
gettext is rather simple and does not like multi-line strings or
string interpolation.
Reported-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
src/panel/NotificationConfigView.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/panel/NotificationConfigView.js b/src/panel/NotificationConfigView.js
index 6586524..770ae4a 100644
--- a/src/panel/NotificationConfigView.js
+++ b/src/panel/NotificationConfigView.js
@@ -88,7 +88,10 @@ Ext.define('Proxmox.panel.NotificationEndpointView', {
Ext.Msg.confirm(
gettext("Notification Target Test"),
- gettext(`Do you want to send a test notification to '${target}'?`),
+ Ext.String.format(
+ gettext("Do you want to send a test notification to '{0}'?"),
+ target
+ ),
function(decision) {
if (decision !== "yes") {
return;
@@ -101,7 +104,10 @@ Ext.define('Proxmox.panel.NotificationEndpointView', {
success: function(response, opt) {
Ext.Msg.show({
title: gettext('Notification Target Test'),
- message: gettext(`Sent test notification to '${target}'.`),
+ message: Ext.String.format(
+ gettext("Sent test notification to '{0}'."),
+ target
+ ),
buttons: Ext.Msg.OK,
icon: Ext.Msg.INFO,
});
--
2.39.2
next prev parent reply other threads:[~2023-08-31 14:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 14:30 [pve-devel] [PATCH v2 many 0/8] notifications: add SMTP endpoint Lukas Wagner
2023-08-31 14:30 ` [pve-devel] [PATCH v2 proxmox 1/8] notify: add 'smtp' endpoint Lukas Wagner
2023-08-31 14:30 ` [pve-devel] [PATCH v2 proxmox 2/8] notify: add api for smtp endpoints Lukas Wagner
2023-08-31 14:30 ` [pve-devel] [PATCH v2 proxmox 3/8] notify: fix typo in doc comments Lukas Wagner
2023-08-31 14:30 ` [pve-devel] [PATCH v2 proxmox-perl-rs 4/8] notify: add bindings for smtp API calls Lukas Wagner
2023-08-31 14:30 ` [pve-devel] [PATCH v2 pve-manager 5/8] notify: add API routes for smtp endpoints Lukas Wagner
2023-08-31 14:30 ` [pve-devel] [PATCH v2 proxmox-widget-toolkit 6/8] panel: notification: add gui for SMTP endpoints Lukas Wagner
2023-08-31 14:30 ` Lukas Wagner [this message]
2023-08-31 14:30 ` [pve-devel] [PATCH v2 pve-docs 8/8] notifications: document " Lukas Wagner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230831143022.685011-8-l.wagner@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox