GNU bug report logs -
#73407
31.0.50; Add diff-discard-hunk
Previous Next
Reported by: Sean Whitton <spwhitton <at> spwhitton.name>
Date: Sat, 21 Sep 2024 10:20:01 UTC
Severity: normal
Found in version 31.0.50
Done: Sean Whitton <spwhitton <at> spwhitton.name>
Bug is archived. No further changes may be made.
Full log
Message #59 received at 73407 <at> debbugs.gnu.org (full text, mbox):
Hello,
On Tue 24 Sep 2024 at 09:07pm +03, Eli Zaretskii wrote:
>> From: Juri Linkov <juri <at> linkov.net>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>, dgutov <at> yandex.ru, 73407 <at> debbugs.gnu.org
>> Date: Tue, 24 Sep 2024 19:59:04 +0300
>>
>> >>> - (message "%d hunks failed; no buffers changed" failures)))))
>> >>> + (message "%d hunks failed; no buffers changed" failures)
>> >>> + failures))))
>> >>
>> >> This comes from existing text, but still: what does the above say when
>> >> there's only 1 failure? does it say "1 hunks failed"? If so, can we
>> >> improve the handling of singular/plural here?
>> >
>> > I've installed a fix for that.
>>
>> Another variant would be to use 'ngettext'.
>
> That's what I had in mind...
Do you mean like this?
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index be3d94db011..9677fbb9175 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -2083,7 +2083,7 @@ diff-apply-buffer
(message "Saved %d buffers" (length buffer-edits)))
(t
(message "%d %s failed; no buffers changed"
- failures (if (> failures 1) "hunks" "hunk"))))))
+ failures (ngettext "hunk" "hunks" failures))))))
(defalias 'diff-mouse-goto-source #'diff-goto-source)
--
Sean Whitton
This bug report was last modified 291 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.