all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [yew-devel] [PATCH proxmox-yew-comp] task viewer: mark user-facing strings as translatable
@ 2025-09-08 12:38 Maximiliano Sandoval
  2025-09-10 12:07 ` [yew-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Maximiliano Sandoval @ 2025-09-08 12:38 UTC (permalink / raw)
  To: yew-devel

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 src/task_viewer.rs | 39 +++++++++++++++++++++------------------
 1 file changed, 21 insertions(+), 18 deletions(-)

diff --git a/src/task_viewer.rs b/src/task_viewer.rs
index f1e2d5c..e78454e 100644
--- a/src/task_viewer.rs
+++ b/src/task_viewer.rs
@@ -147,9 +147,12 @@ impl Component for PwtTaskViewer {
         let panel = self.loader.render(|data| {
             TabPanel::new()
                 .class("pwt-flex-fit")
-                .with_item(TabBarItem::new().label("Output"), self.view_output(ctx))
                 .with_item(
-                    TabBarItem::new().label("Status"),
+                    TabBarItem::new().label(tr!("Output")),
+                    self.view_output(ctx),
+                )
+                .with_item(
+                    TabBarItem::new().label(tr!("Status")),
                     self.view_status(ctx, data.clone()),
                 )
         });
@@ -190,7 +193,7 @@ impl PwtTaskViewer {
         let link = ctx.link();
 
         let toolbar = Toolbar::new().with_child(
-            Button::new("Stop")
+            Button::new(tr!("Stop"))
                 .disabled(!active)
                 .onclick(link.callback(|_| Msg::StopTask)),
         );
@@ -199,7 +202,7 @@ impl PwtTaskViewer {
             .class("pwt-flex-fit")
             .data(data)
             .rows(Rc::new(vec![
-                KVGridRow::new("status", "Status")
+                KVGridRow::new("status", tr!("Status"))
                     .renderer(|_name, value, record| {
                         let value = match value.as_str() {
                             Some(s) => s,
@@ -212,8 +215,8 @@ impl PwtTaskViewer {
                         html! {{format!("{}: {}", value, status)}}
                     })
                     .placeholder("unknown"),
-                KVGridRow::new("type", "Task type").required(true),
-                KVGridRow::new("user", "User name")
+                KVGridRow::new("type", tr!("Task type")).required(true),
+                KVGridRow::new("user", tr!("User name"))
                     .renderer(|_name, value, record| {
                         let mut user = match value.as_str() {
                             Some(s) => s.to_owned(),
@@ -225,22 +228,22 @@ impl PwtTaskViewer {
                         html! {{user}}
                     })
                     .required(true),
-                KVGridRow::new("node", "Node").required(true),
-                KVGridRow::new("pid", "Process ID").required(true),
-                KVGridRow::new("task_id", "Task ID"),
-                KVGridRow::new("starttime", "Start Time")
+                KVGridRow::new("node", tr!("Node")).required(true),
+                KVGridRow::new("pid", tr!("Process ID")).required(true),
+                KVGridRow::new("task_id", tr!("Task ID")),
+                KVGridRow::new("starttime", tr!("Start Time"))
                     .renderer(|_name, value, _record| match value.as_i64() {
                         None => html! {"unknown (wrong format)"},
                         Some(epoch) => html! { {render_epoch(epoch)} },
                     })
                     .required(true),
-                KVGridRow::new("endtime", "End Time").renderer(|_name, value, _record| match value
-                    .as_i64()
-                {
-                    None => html! {"unknown (wrong format)"},
-                    Some(epoch) => html! { {render_epoch(epoch)} },
+                KVGridRow::new("endtime", tr!("End Time")).renderer(|_name, value, _record| {
+                    match value.as_i64() {
+                        None => html! {"unknown (wrong format)"},
+                        Some(epoch) => html! { {render_epoch(epoch)} },
+                    }
                 }),
-                KVGridRow::new("duration", "Duration")
+                KVGridRow::new("duration", tr!("Duration"))
                     .renderer(move |_name, _value, record| {
                         if let Some(starttime) = record["starttime"].as_i64() {
                             let duration = if let Some(endtime) = record["endtime"].as_i64() {
@@ -254,7 +257,7 @@ impl PwtTaskViewer {
                         html! {"-"}
                     })
                     .required(true),
-                KVGridRow::new("upid", "Unique task ID"),
+                KVGridRow::new("upid", tr!("Unique task ID")),
             ]));
 
         Column::new()
@@ -271,7 +274,7 @@ impl PwtTaskViewer {
         let link = ctx.link();
 
         let toolbar = Toolbar::new().class("pwt-border-bottom").with_child(
-            Button::new("Stop")
+            Button::new(tr!("Stop"))
                 .disabled(!active)
                 .onclick(link.callback(|_| Msg::StopTask)),
         );
-- 
2.47.3



_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [yew-devel] applied: [PATCH proxmox-yew-comp] task viewer: mark user-facing strings as translatable
  2025-09-08 12:38 [yew-devel] [PATCH proxmox-yew-comp] task viewer: mark user-facing strings as translatable Maximiliano Sandoval
@ 2025-09-10 12:07 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-09-10 12:07 UTC (permalink / raw)
  To: yew-devel, Maximiliano Sandoval

On Mon, 08 Sep 2025 14:38:19 +0200, Maximiliano Sandoval wrote:
> 


Applied, thanks!

[1/1] task viewer: mark user-facing strings as translatable
      commit: e754ed23c2729478b2520b3fdafe96ee738ac560


_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-10 12:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-08 12:38 [yew-devel] [PATCH proxmox-yew-comp] task viewer: mark user-facing strings as translatable Maximiliano Sandoval
2025-09-10 12:07 ` [yew-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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal