GNOME Bugzilla – Bug 572096
Incorrect plural forms in note deletion dialogs
Last modified: 2009-04-23 02:14:14 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.
And while you're at it, this string is not very professional: #: ../Tomboy/PreferencesDialog.cs:1204 msgid "Error connecting :("
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.
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.
I think this would quality as breaking string freeze. Targetting for 0.15.x.
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!
Thanks Wouter, I should have checked the wiki on this.
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, 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.
(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.
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? ;)
Looks good Benjamin. Will commit as soon as I get a chance. Thanks!
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.
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?
I'll ask gnome-i18n and take care of this.
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.
Thanks Wouter and Benjamin. I was en route to Boston and had limited net access until now. Appreciate the help on this.