[yew-devel] [PATCH proxmox-yew-comp] apt_repositories: Add context to string with plural form
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Jan 22 18:25:25 CET 2025
Am 22.01.25 um 13:09 schrieb Maximiliano Sandoval:
> The "Warning" msgid is already used in proxmox-widget-toolkit. Gettext
> does not allow duplicated msgids and therefore they cannot be shared for
> translations with and without plurals.
Hmm, a bit odd IMO, do you have by chance any reference to some background
and/or rational here?
Can you also describe what context does in the commit message here, as this
is the first commit introducing that usage IIRC.
>
> Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
> ---
> src/apt_repositories.rs | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/apt_repositories.rs b/src/apt_repositories.rs
> index b671d01e..487ca7f 100644
> --- a/src/apt_repositories.rs
> +++ b/src/apt_repositories.rs
> @@ -873,7 +873,8 @@ fn render_text_with_warnings(text: &str, warnings: &[String]) -> Html {
> <i class="fa fa-fw fa-exclamation-circle"/>
> </span>
> };
> - let title = tr!("Warning" | "Warnings" % warnings.len());
> + let title =
> + tr!("This is a title" => "Warning" | "Warnings" % warnings.len());
Do I need to use this context every time I use just the plural variant?
And if that's the case, would another context make more sense, like
"Unconditional plural"? Just trying to get a better understanding of the
details here.
More information about the yew-devel
mailing list