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 v3 2/2] ui: add catalog_url_builder
Date: Fri,  5 Sep 2025 16:27:40 +0200	[thread overview]
Message-ID: <20250905142748.396472-3-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20250905142748.396472-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 ddec64a..2640428 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};
 
@@ -269,6 +270,9 @@ impl Component for DatacenterManagerApp {
                 </ContextProvider<RemoteList>>
             </ContextProvider<SearchProvider>>
         })
+        .catalog_url_builder(TextRenderFn::new(|lang| {
+            format!("locale/catalog-{lang}.mo")
+        }))
         .into()
     }
 }
-- 
2.47.2



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


      parent reply	other threads:[~2025-09-05 14:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-05 14:27 [pdm-devel] [PATCH proxmox-datacenter-manager v3 0/2] ui: allow selecting other languages Maximiliano Sandoval
2025-09-05 14:27 ` [pdm-devel] [PATCH proxmox-datacenter-manager v3 1/2] Revert "ui: reduce list of available languages to english" Maximiliano Sandoval
2025-09-05 14:27 ` 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=20250905142748.396472-3-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