* [pdm-devel] [PATCH proxmox-datacenter-manager v3 0/2] ui: allow selecting other languages
@ 2025-09-05 14:27 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 ` [pdm-devel] [PATCH proxmox-datacenter-manager v3 2/2] ui: add catalog_url_builder Maximiliano Sandoval
0 siblings, 2 replies; 3+ messages in thread
From: Maximiliano Sandoval @ 2025-09-05 14:27 UTC (permalink / raw)
To: pdm-devel
Allows selecting languages other than English in the web UI. Some languages
already have full translations for pdm's web UI.
This requires the package pdm-i18n to be installed which at the moment of
writting is not yet on the stagging repository but can be build locally.
Differences from v2:
- Rebased on top of origin/master
- Has a cover letter
Maximiliano Sandoval (2):
Revert "ui: reduce list of available languages to english"
ui: add catalog_url_builder
ui/src/main.rs | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
--
2.47.2
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pdm-devel] [PATCH proxmox-datacenter-manager v3 1/2] Revert "ui: reduce list of available languages to english"
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 ` Maximiliano Sandoval
2025-09-05 14:27 ` [pdm-devel] [PATCH proxmox-datacenter-manager v3 2/2] ui: add catalog_url_builder Maximiliano Sandoval
1 sibling, 0 replies; 3+ messages in thread
From: Maximiliano Sandoval @ 2025-09-05 14:27 UTC (permalink / raw)
To: pdm-devel
This reverts commit 12844034f863456597ecab2a942d47278edf30dd.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
ui/src/main.rs | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/ui/src/main.rs b/ui/src/main.rs
index be0c10c..ddec64a 100644
--- a/ui/src/main.rs
+++ b/ui/src/main.rs
@@ -308,13 +308,8 @@ fn main() {
);
pwt::state::set_available_themes(&["Desktop", "Crisp"]);
- use pwt::state::LanguageInfo;
- pwt::state::set_available_languages(vec![LanguageInfo::new(
- "en",
- "English",
- gettext_noop("English"),
- )]);
+ pwt::state::set_available_languages(proxmox_yew_comp::available_language_list());
yew::Renderer::<DatacenterManagerApp>::new().render();
}
--
2.47.2
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pdm-devel] [PATCH proxmox-datacenter-manager v3 2/2] ui: add catalog_url_builder
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
1 sibling, 0 replies; 3+ messages in thread
From: Maximiliano Sandoval @ 2025-09-05 14:27 UTC (permalink / raw)
To: pdm-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-05 14:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [pdm-devel] [PATCH proxmox-datacenter-manager v3 2/2] ui: add catalog_url_builder Maximiliano Sandoval
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox