all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox-datacenter-manager v2 2/2] ui: add catalog_url_builder
Date: Wed, 22 Jan 2025 16:01:32 +0100	[thread overview]
Message-ID: <20250122150132.426276-2-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20250122150132.426276-1-m.sandoval@proxmox.com>

This is where pdm-i18n will install its translations.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 ui/src/main.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ui/src/main.rs b/ui/src/main.rs
index 1416856..5ac2eae 100644
--- a/ui/src/main.rs
+++ b/ui/src/main.rs
@@ -9,6 +9,7 @@ use web_sys::HtmlElement;
 use yew::prelude::*;
 
 use pwt::prelude::*;
+use pwt::props::TextRenderFn;
 use pwt::state::Loader;
 use pwt::widget::{Column, DesktopApp, Dialog, Mask};
 
@@ -262,6 +263,9 @@ impl Component for DatacenterManagerApp {
         DesktopApp::new(
             html! {<ContextProvider<RemoteList> {context}>{body}</ContextProvider<RemoteList>>},
         )
+        .catalog_url_builder(TextRenderFn::new(|lang| {
+            format!("locale/catalog-{lang}.mo")
+        }))
         .into()
     }
 }
-- 
2.39.5



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


      reply	other threads:[~2025-01-22 15:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-22 15:01 [pdm-devel] [PATCH proxmox-datacenter-manager v2 1/2] Revert "ui: reduce list of available languages to english" Maximiliano Sandoval
2025-01-22 15:01 ` Maximiliano Sandoval [this message]

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=20250122150132.426276-2-m.sandoval@proxmox.com \
    --to=m.sandoval@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 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