all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-datacenter-manager] overview: make ha-state non-translatable
@ 2026-06-03  8:00 Maximiliano Sandoval
  0 siblings, 0 replies; only message in thread
From: Maximiliano Sandoval @ 2026-06-03  8:00 UTC (permalink / raw)
  To: pdm-devel

There is no point in translating "{0}".

We additionally replace the "none" string with "None", since there isn't
any HA state called "none". The capitalization makes it clear that there
is no state rather than being in a state called "none".

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 ui/src/pve/lxc/overview.rs  | 9 ++++-----
 ui/src/pve/qemu/overview.rs | 9 ++++-----
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/ui/src/pve/lxc/overview.rs b/ui/src/pve/lxc/overview.rs
index 18d28229..e8e46516 100644
--- a/ui/src/pve/lxc/overview.rs
+++ b/ui/src/pve/lxc/overview.rs
@@ -268,14 +268,13 @@ impl yew::Component for LxcanelComp {
         }
 
         let ha_text = if status.ha["managed"].as_i64().unwrap_or_default() > 0 {
-            let ha_state = status
+            status
                 .ha
                 .get("state")
-                .and_then(|c| c.as_str())
-                .unwrap_or_default();
-            tr!("{0}", ha_state)
+                .map(|c| c.to_string())
+                .unwrap_or_default()
         } else {
-            tr!("none")
+            tr!("None")
         };
 
         status_comp.add_child(status_row(tr!("HA state"), "fa-heartbeat", ha_text));
diff --git a/ui/src/pve/qemu/overview.rs b/ui/src/pve/qemu/overview.rs
index f14f9744..123cc519 100644
--- a/ui/src/pve/qemu/overview.rs
+++ b/ui/src/pve/qemu/overview.rs
@@ -277,14 +277,13 @@ impl yew::Component for QemuOverviewPanelComp {
         }
 
         let ha_text = if status.ha["managed"].as_i64().unwrap_or_default() > 0 {
-            let ha_state = status
+            status
                 .ha
                 .get("state")
-                .and_then(|c| c.as_str())
-                .unwrap_or_default();
-            tr!("{0}", ha_state)
+                .map(|c| c.to_string())
+                .unwrap_or_default()
         } else {
-            tr!("none")
+            tr!("None")
         };
 
         status_comp.add_child(status_row(tr!("HA state"), "fa-heartbeat", ha_text));
-- 
2.47.3





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-03  8:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-03  8:00 [PATCH proxmox-datacenter-manager] overview: make ha-state non-translatable Maximiliano Sandoval

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal