* [pdm-devel] [PATCH datacenter-manager v2] ui: use explicit parameter indices in tr macros
@ 2025-12-01 16:46 Lukas Wagner
2025-12-01 18:26 ` [pdm-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Wagner @ 2025-12-01 16:46 UTC (permalink / raw)
To: pdm-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pdm-devel] applied: [PATCH datacenter-manager v2] ui: use explicit parameter indices in tr macros
2025-12-01 16:46 [pdm-devel] [PATCH datacenter-manager v2] ui: use explicit parameter indices in tr macros Lukas Wagner
@ 2025-12-01 18:26 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-12-01 18:26 UTC (permalink / raw)
To: pdm-devel, Lukas Wagner
On Mon, 01 Dec 2025 17:46:00 +0100, Lukas Wagner wrote:
> 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"
>
>
> [...]
Applied, thanks!
[1/1] ui: use explicit parameter indices in tr macros
commit: 1365fc7d01c6f37989d48dfe3c365f85dfb0114d
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-01 18:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-01 16:46 [pdm-devel] [PATCH datacenter-manager v2] ui: use explicit parameter indices in tr macros Lukas Wagner
2025-12-01 18:26 ` [pdm-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.