After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 572096 - Incorrect plural forms in note deletion dialogs
Incorrect plural forms in note deletion dialogs
Status: RESOLVED FIXED
Product: tomboy
Classification: Applications
Component: General
unspecified
Other All
: Urgent normal
: ---
Assigned To: Tomboy Maintainers
Tomboy Maintainers
ben[open_task]
Depends on:
Blocks:
 
 
Reported: 2009-02-17 01:02 UTC by Wouter Bolsterlee (uws)
Modified: 2009-04-23 02:14 UTC
See Also:
GNOME target: 2.26.x
GNOME version: 2.25/2.26


Attachments
Adds the requested plural form support (584 bytes, patch)
2009-02-20 15:39 UTC, Benjamin Podszun
committed Details | Review

Description Wouter Bolsterlee (uws) 2009-02-17 01:02:06 UTC
The ShowDeletionDialog method in NoteUtils, defined in Note.cs, contains this piece of logic:

if (notes.Count == 1)
  message = Catalog.GetString ("Really delete this note?");
else
  message = Catalog.GetString ("Really delete these notes?");

This is wrong for all languages that have plurals forms different from English (e.g. Slavic languages). The ngettext()/N_() variant for C# should be used here.
Comment 1 Wouter Bolsterlee (uws) 2009-02-17 01:10:02 UTC
And while you're at it, this string is not very professional:

#: ../Tomboy/PreferencesDialog.cs:1204
msgid "Error connecting :("
Comment 2 Benjamin Podszun 2009-02-17 01:54:17 UTC
Good catch, this is another gettext error. Forget the comment #1 though, that is a duplicate of (one single point of) bug 473519 and should be fixed anyway.
Comment 3 Wouter Bolsterlee (uws) 2009-02-17 12:04:35 UTC
Btw, the correct approach would be something like this:

if (notes.Count == 1)
  message = Catalog.GetString ("Really delete this note?");
else
  message = Catalog.GetPluralString (
    "Really delete this %d notes?",
    "Really delete these %d notes?",
    notes.Count
  );


The special case if there's just 1 is quite common (also in other projects), but in the remaining cases the plural form has to be constructed correctly.
Comment 4 Sandy Armstrong 2009-02-17 15:16:01 UTC
I think this would quality as breaking string freeze. Targetting for 0.15.x.
Comment 5 Wouter Bolsterlee (uws) 2009-02-17 15:23:49 UTC
Yes, but incorrect plural forms are a VERY VALID REASON to request string freeze break, since it makes it impossible to correctly translate an application in various languages. Please send mail to gnome-i18n. You can count on my 1/2 approval!
Comment 6 Sandy Armstrong 2009-02-17 15:54:17 UTC
Thanks Wouter, I should have checked the wiki on this.
Comment 7 Benjamin Podszun 2009-02-18 18:11:42 UTC
Please update this bug if there's an approval and you won't create the patch. It's trivial of course, but I could create a patch if this makes sense. If we won't break string freeze I'd keep that in the backlog though.
Comment 8 Sandy Armstrong 2009-02-18 18:21:10 UTC
Benjamin, feel free to generate a patch. I retargetted to 0.13.x based on Wouter's input, so this will be fixed by the next release.
Comment 9 Wouter Bolsterlee (uws) 2009-02-18 21:51:35 UTC
(In reply to comment #7)
> Please update this bug if there's an approval and you won't create the patch.
> It's trivial of course, but I could create a patch if this makes sense. If we
> won't break string freeze I'd keep that in the backlog though.

Benjamin,

Please provide a patch. Then have Sandy announce it to gnome-i18n, after which I and another gnome-i18n coordination team person will approve the change.
Comment 10 Benjamin Podszun 2009-02-20 15:39:35 UTC
Created attachment 129158 [details] [review]
Adds the requested plural form support

Well, nothing exciting: I did exactly what you proposed and just created this diff.. Sandy? ;)
Comment 11 Sandy Armstrong 2009-02-20 16:08:54 UTC
Looks good Benjamin. Will commit as soon as I get a chance. Thanks!
Comment 12 André Klapper 2009-02-21 19:38:14 UTC
Sandy: Can you please send an freeze break request to gnome-i18n/release-team so this can be fixed soon?
Note that Wouter already gave a 1 out of 2.
Comment 13 Benjamin Podszun 2009-02-22 00:26:53 UTC
I'd love to help out here, but I cannot commit anyway. Regarding sandy: Don't quote me on this but his twitter messages seem to indicate that he went out on a trip about < 9 hours ago (Message starts with "Packing"). So if this is _really_ urgent, maybe you need to find another way?
Comment 14 Wouter Bolsterlee (uws) 2009-02-22 12:34:35 UTC
I'll ask gnome-i18n and take care of this.
Comment 15 Wouter Bolsterlee (uws) 2009-02-22 13:04:12 UTC
I've committed a slightly modified version of the patch. Thanks, Benjamin.

Committed revision 2370.

2009-02-22  Wouter Bolsterlee  <wbolster@svn.gnome.org>

	* Tomboy/Note.cs: Use correct plural forms in note
	deletion dialogs. Closes bug #572096, patch by Benjamin
	Podszun and myself.
Comment 16 Sandy Armstrong 2009-02-22 14:24:28 UTC
Thanks Wouter and Benjamin.  I was en route to Boston and had limited net access until now.  Appreciate the help on this.