public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pdm-devel] [PATCH datacenter-manager] ui: pbs datastores panel: make status label translatable
@ 2025-11-03 13:00 Christian Ebner
  2025-11-03 13:16 ` [pdm-devel] applied: " Lukas Wagner
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Ebner @ 2025-11-03 13:00 UTC (permalink / raw)
  To: pdm-devel

The shown labels must be translatable to other languages. This has
been overlooked in the initial implementation introduced by commit
2dcae341 ("ui: dashboard: add panel for PBS datastore statistics").

Reported-by: Shannon Sterz <s.sterz@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 ui/src/dashboard/pbs_datastores_panel.rs | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ui/src/dashboard/pbs_datastores_panel.rs b/ui/src/dashboard/pbs_datastores_panel.rs
index a06acf7..3e347b9 100644
--- a/ui/src/dashboard/pbs_datastores_panel.rs
+++ b/ui/src/dashboard/pbs_datastores_panel.rs
@@ -102,28 +102,28 @@ fn create_list_tile(
         StatusRow::Online(count) => (
             Fa::from(Status::Success),
             count,
-            "Online",
+            tr!("Online"),
             Some(("online", "status")),
         ),
         StatusRow::HighUsage(count) => (
             Fa::from(Status::Warning),
             count,
-            "High usage",
+            tr!("High usage"),
             Some(("high-usage", "property")),
         ),
         StatusRow::UnderMaintenance(count) => (
             Fa::new("wrench"),
             count,
-            "Under Maintenance",
+            tr!("Under Maintenance"),
             Some(("under-maintenance", "status")),
         ),
         StatusRow::Unknown(count) => (
             Fa::from(Status::Unknown),
             count,
-            "Unknown",
+            tr!("Unknown"),
             Some(("unknown", "property")),
         ),
-        StatusRow::All(count) => (Fa::new("database"), count, "All", None),
+        StatusRow::All(count) => (Fa::new("database"), count, tr!("All"), None),
     };
 
     Some(
-- 
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] ui: pbs datastores panel: make status label translatable
  2025-11-03 13:00 [pdm-devel] [PATCH datacenter-manager] ui: pbs datastores panel: make status label translatable Christian Ebner
@ 2025-11-03 13:16 ` Lukas Wagner
  0 siblings, 0 replies; 2+ messages in thread
From: Lukas Wagner @ 2025-11-03 13:16 UTC (permalink / raw)
  To: Proxmox Datacenter Manager development discussion, Christian Ebner

On Mon Nov 3, 2025 at 2:00 PM CET, Christian Ebner wrote:
> The shown labels must be translatable to other languages. This has
> been overlooked in the initial implementation introduced by commit
> 2dcae341 ("ui: dashboard: add panel for PBS datastore statistics").
>
> Reported-by: Shannon Sterz <s.sterz@proxmox.com>
> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
> ---
>  ui/src/dashboard/pbs_datastores_panel.rs | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/ui/src/dashboard/pbs_datastores_panel.rs b/ui/src/dashboard/pbs_datastores_panel.rs
> index a06acf7..3e347b9 100644
> --- a/ui/src/dashboard/pbs_datastores_panel.rs
> +++ b/ui/src/dashboard/pbs_datastores_panel.rs
> @@ -102,28 +102,28 @@ fn create_list_tile(
>          StatusRow::Online(count) => (
>              Fa::from(Status::Success),
>              count,
> -            "Online",
> +            tr!("Online"),
>              Some(("online", "status")),
>          ),
>          StatusRow::HighUsage(count) => (
>              Fa::from(Status::Warning),
>              count,
> -            "High usage",
> +            tr!("High usage"),
>              Some(("high-usage", "property")),
>          ),
>          StatusRow::UnderMaintenance(count) => (
>              Fa::new("wrench"),
>              count,
> -            "Under Maintenance",
> +            tr!("Under Maintenance"),
>              Some(("under-maintenance", "status")),
>          ),
>          StatusRow::Unknown(count) => (
>              Fa::from(Status::Unknown),
>              count,
> -            "Unknown",
> +            tr!("Unknown"),
>              Some(("unknown", "property")),
>          ),
> -        StatusRow::All(count) => (Fa::new("database"), count, "All", None),
> +        StatusRow::All(count) => (Fa::new("database"), count, tr!("All"), None),
>      };
>  
>      Some(

Applied, thanks a lot!


_______________________________________________
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-11-03 13:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-03 13:00 [pdm-devel] [PATCH datacenter-manager] ui: pbs datastores panel: make status label translatable Christian Ebner
2025-11-03 13:16 ` [pdm-devel] applied: " Lukas Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal