From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [PATCH proxmox-yew-comp] apt package manager: fix format of translatable string
Date: Wed, 4 Feb 2026 11:07:22 +0100 [thread overview]
Message-ID: <20260204100736.134697-1-m.sandoval@proxmox.com> (raw)
Tr uses the `{n}` variable name for the count variable.
Note that as per gettext docs [1] it is not appropriate to use ngettext
when neither the msgid or the msgid_plural strings make use of the count
variable `n`. This produces warnings with msgfmt --check on newer
gettext versions.
[1] https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html#index-ngettext
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
src/apt_package_manager.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/apt_package_manager.rs b/src/apt_package_manager.rs
index 2385b43..314d6f9 100644
--- a/src/apt_package_manager.rs
+++ b/src/apt_package_manager.rs
@@ -478,7 +478,7 @@ fn render_tree_node(args: &mut DataTableCellRenderArgs<TreeEntry>) -> Html {
+ ": "
+ &*info.name
+ " ("
- + &tr!("One item" | "{} items" % info.count)
+ + &tr!("One item" | "{n} items" % info.count)
+ ")";
args.add_class("pwt-bg-color-surface");
args.set_attribute("colspan", "20");
--
2.47.3
reply other threads:[~2026-02-04 10:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260204100736.134697-1-m.sandoval@proxmox.com \
--to=m.sandoval@proxmox.com \
--cc=yew-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.