[yew-devel] [PATCH pywt] catalog_loader: fix url for translation files
Shannon Sterz
s.sterz at proxmox.com
Wed Jan 22 13:59:23 CET 2025
On Wed Jan 22, 2025 at 1:13 PM CET, Maximiliano Sandoval wrote:
> As per proxmox-datacenter-api.rs:
> ```rust
> ("locale", "/usr/share/pdm-i18n"),
> ```
> the translations are at /locale/catalog-{lang}.mo
>
> Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
> ---
> src/widget/catalog_loader.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/widget/catalog_loader.rs b/src/widget/catalog_loader.rs
> index 21437991..c3732d49 100644
> --- a/src/widget/catalog_loader.rs
> +++ b/src/widget/catalog_loader.rs
> @@ -49,7 +49,7 @@ impl CatalogLoader {
> if let Some(url_builder) = &self.url_builder {
> url_builder.apply(&lang)
> } else {
> - format!("catalog-{}.mo", lang)
> + format!("locale/catalog-{lang}.mo")
> }
> }
> }
this re-defines the fallback here. i'd rather you give this catalog
loader an `url_builder` as that is the already implemented way of
adapting the location of catalogs. if you change that here, that is a
breaking change for users of this crate, so that would need more
considerations imo.
More information about the yew-devel
mailing list