GNU bug report logs - #76016
[PATCH] Correct project-remember/forget-projects-under message grammar

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Sun, 2 Feb 2025 17:05:02 UTC

Severity: normal

Tags: patch

Fixed in version 31.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 76016 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 76016 <at> debbugs.gnu.org
Subject: Re: bug#76016: [PATCH] Correct project-remember/forget-projects-under
 message grammar
Date: Sun, 2 Feb 2025 12:44:16 -0500
[Message part 1 (text/plain, inline)]
Alright. Does ngettext accommodate the zero case or just singular and
plural? It seems to respect only two choices.

    (if (zerop count)
        (message "No projects were found")
      (project--write-project-list)
      (message (ngettext "%d project was found"
                         "%d projects were found"
                         count) count))

vs. which could be a useful variant:

    (when (> count 0)
      (project--write-project-list))
    (message (ngettext "No projects were found"
                       "%d project was found"
                       "%d projects were found"
                       count) count)

On Sun, Feb 2, 2025 at 12:29 PM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Sun, 2 Feb 2025 12:02:17 -0500
> >
> > Correct grammar for the singular case. Rather than "1 projects were
> found", say "1 project was found". Ditto
> > for forgotten.
>
> Neither is correct, because they hard-code English grammar.  We should
> use ngettext instead.
>
[Message part 2 (text/html, inline)]

This bug report was last modified 102 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.