From: Lukas Wagner <l.wagner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager v2] ui: use explicit parameter indices in tr macros
Date: Mon, 1 Dec 2025 17:46:00 +0100 [thread overview]
Message-ID: <20251201164600.413879-1-l.wagner@proxmox.com> (raw)
The order of parameters can change in translations, so it is important
to use explicit indexing when there are *multiple* parameters. The
gettext runtime shows warnings in the browser console for these:
"... multiple non-indexed, non-named arguments - order is implicit"
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
Changes since v1:
- Actually only add indices if there are *multiple* parameters.
ui/src/remotes/firewall/ui_helpers.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/src/remotes/firewall/ui_helpers.rs b/ui/src/remotes/firewall/ui_helpers.rs
index 741064d8..7aa2e05e 100644
--- a/ui/src/remotes/firewall/ui_helpers.rs
+++ b/ui/src/remotes/firewall/ui_helpers.rs
@@ -89,7 +89,7 @@ impl PanelConfig {
let mut rules = proxmox_yew_comp::FirewallRules::node(remote.to_string(), node.to_string());
rules.reload_token = reload_token;
Self {
- title: create_panel_title("list", tr!("Node Firewall Rules - {}/{}", remote, node)),
+ title: create_panel_title("list", tr!("Node Firewall Rules - {0}/{1}", remote, node)),
key: format!("node-{}-{}", remote, node),
content: rules.into(),
title_prefix: None,
@@ -115,7 +115,7 @@ impl PanelConfig {
title: create_panel_title(
"list",
tr!(
- "Guest Firewall Rules - {}/{}/{} {}",
+ "Guest Firewall Rules - {0}/{1}/{2} {3}",
remote,
node,
vmtype.to_uppercase(),
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next reply other threads:[~2025-12-01 16:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 16:46 Lukas Wagner [this message]
2025-12-01 18:26 ` [pdm-devel] applied: " Thomas Lamprecht
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=20251201164600.413879-1-l.wagner@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pdm-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