From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 08EEB1FF138 for ; Wed, 04 Feb 2026 11:07:39 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id EB344F5A2; Wed, 4 Feb 2026 11:08:10 +0100 (CET) From: Maximiliano Sandoval 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 Message-ID: <20260204100736.134697-1-m.sandoval@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1770199581127 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.088 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_SHORT 0.001 Use of a URL Shortener for very short URL SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: ZOUR62S2VTPZHLFHPO7RJ27LXAD3SR2K X-Message-ID-Hash: ZOUR62S2VTPZHLFHPO7RJ27LXAD3SR2K X-MailFrom: m.sandoval@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Yew framework devel list at Proxmox List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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) -> 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