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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 76016 in the body.
You can then email your comments to 76016 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#76016; Package emacs. (Sun, 02 Feb 2025 17:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ship Mints <shipmints <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 02 Feb 2025 17:05:02 GMT) Full text and rfc822 format available.

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

From: Ship Mints <shipmints <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Correct project-remember/forget-projects-under message grammar
Date: Sun, 2 Feb 2025 12:02:17 -0500
[Message part 1 (text/plain, inline)]
Correct grammar for the singular case. Rather than "1 projects were found",
say "1 project was found". Ditto for forgotten.

-Stephane
[Message part 2 (text/html, inline)]
[0001-Correct-project-remember-forget-projects-under-messa.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76016; Package emacs. (Sun, 02 Feb 2025 17:30:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 76016 <at> debbugs.gnu.org
Subject: Re: bug#76016: [PATCH] Correct project-remember/forget-projects-under
 message grammar
Date: Sun, 02 Feb 2025 19:29:47 +0200
> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76016; Package emacs. (Sun, 02 Feb 2025 17:47:02 GMT) Full text and rfc822 format available.

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)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76016; Package emacs. (Sun, 02 Feb 2025 18:48:02 GMT) Full text and rfc822 format available.

Message #14 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 13:45:51 -0500
[Message part 1 (text/plain, inline)]
In any case, here's a revised patch with ngettext.

On Sun, Feb 2, 2025 at 12:44 PM Ship Mints <shipmints <at> gmail.com> wrote:

> 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)]
[0001-Correct-project-remember-forget-projects-under-messa.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76016; Package emacs. (Sun, 02 Feb 2025 19:14:01 GMT) Full text and rfc822 format available.

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

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

Yes, as its doc string says.  ngettext is not (yet) a full-blown
multi-lingual construct, because Emacs doesn't (yet) support any
language but English.  What to say in the zero case is an
application-level decision anyway, even in the English case.




Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Tue, 11 Feb 2025 07:53:03 GMT) Full text and rfc822 format available.

Notification sent to Ship Mints <shipmints <at> gmail.com>:
bug acknowledged by developer. (Tue, 11 Feb 2025 07:53:03 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 76016-done <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#76016: [PATCH] Correct project-remember/forget-projects-under
 message grammar
Date: Mon, 10 Feb 2025 23:52:05 -0800
Version: 31.1

Ship Mints <shipmints <at> gmail.com> writes:

> In any case, here's a revised patch with ngettext.
>
> On Sun, Feb 2, 2025 at 12:44 PM Ship Mints <shipmints <at> gmail.com> wrote:
>
>  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.

Thanks, installed on master as commit b2d2ad58ea4.  Closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 11 Mar 2025 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 101 days ago.

Previous Next


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