GNOME Bugzilla – Bug 106702
Please use ngettext for handling plurals in nautilus
Last modified: 2004-12-22 21:47:04 UTC
#: components/hardware/nautilus-hardware-view.c:483 #, c-format msgid "Uptime is %d days, %d hours, %d minutes" #: components/image_properties/nautilus-image-properties-view.c:144 #, c-format msgid "" "<b>Image Type:</b> %s (%s)\n" "<b>Resolution:</b> %dx%d pixels\n" #: src/file-manager/fm-directory-view.c:486 #, c-format msgid "This will open %d separate windows. Are you sure you want to do this?" #: src/file-manager/fm-directory-view.c:488 #, c-format msgid "Open %d Windows?" #: src/file-manager/fm-directory-view.c:843 #, c-format msgid "Are you sure you want to permanently delete the %d selected items?" #: src/file-manager/fm-directory-view.c:1515 msgid "1 folder selected" #: src/file-manager/fm-directory-view.c:1518 #, c-format msgid "%d folders selected" #: src/file-manager/fm-directory-view.c:1525 msgid " (containing 0 items)" #: src/file-manager/fm-directory-view.c:1527 msgid " (containing 1 item)" #: src/file-manager/fm-directory-view.c:1529 #, c-format msgid " (containing %d items)" #: src/file-manager/fm-directory-view.c:1536 msgid " (containing a total of 0 items)" #: src/file-manager/fm-directory-view.c:1538 msgid " (containing a total of 1 item)" #: src/file-manager/fm-directory-view.c:1540 #, c-format msgid " (containing a total of %d items)" #: src/file-manager/fm-directory-view.c:1557 #, c-format msgid "%d items selected (%s)" #: src/file-manager/fm-directory-view.c:1564 #, c-format msgid "1 other item selected (%s)" #: src/file-manager/fm-directory-view.c:1567 #, c-format msgid "%d other items selected (%s)" #: src/file-manager/fm-directory-view.c:3022 #, c-format msgid "" "The %d selected items cannot be moved to the Trash. Do you want to delete " "them immediately?" #: src/file-manager/fm-directory-view.c:3026 #, c-format msgid "" "%d of the selected items cannot be moved to the Trash. Do you want to delete " "those %d items immediately?" #: src/file-manager/fm-directory-view.c:3070 #, c-format msgid "" "Are you sure you want to permanently delete the %d selected items from the " "Trash?" #: src/file-manager/fm-directory-view.c:4405 #, c-format msgid "" "The %d selected items will be moved if you select the Paste Files command" #: src/file-manager/fm-directory-view.c:4409 #, c-format msgid "" "The %d selected items will be copied if you select the Paste Files command" #: src/file-manager/fm-directory-view.c:4678 #, c-format msgid "Open _in %d New Windows" #: src/file-manager/fm-properties-window.c:1230 #, c-format msgid "%d items, totalling %s" #: src/file-manager/fm-search-list-view.c:568 #, c-format msgid "Reveal in %d _New Windows" #: src/nautilus-location-bar.c:154 #, c-format msgid "Do you want to view these %d locations in separate windows?" As mentioned in http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html#plurals, this way of handling plurals is broken for many locales. A way to solve this is by using ngettext instead as mentioned in that document. A simple code example of code using ngettext: g_printf (ngettext ("Found %d file.", "Found %d files.", nbr_of_files), nbr_of_files);
I didn't check if it's still relevant for GNOME 2.3, but there are a couple more strings that need fixing listed at http://bugzilla.gnome.org/show_bug.cgi?id=111773
*** Bug 111773 has been marked as a duplicate of this bug. ***
dsegan@gmx.net noticed that this problem also affects these messages: #: libnautilus-private/nautilus-file.c:3942 #, c-format msgid "%u items" #: libnautilus-private/nautilus-file.c:3942 #, c-format msgid "%u folders" # bug: plural-forms #: libnautilus-private/nautilus-file.c:3943 #, c-format msgid "%u files"
Can we have this issue revisited now?
I'll add that this one: msgid "" "<b>Image Type:</b> %s (%s)\n" "<b>Resolution:</b> %dx%d pixels\n" shoud be "pluralized" on the *second* %d. Also, if nobody does it before, I'll probably submit a patch here for all of these in about a week. Btw, how is any of this related to "spatial" Nautilus branch -- i.e. will there be any problems merging the separate patches if "spatial" turns out to be the choice for 2.6?
Created attachment 20445 [details] [review] Proposed patch. Please report any problems! Not sure whether it's complete/exactly what you wanted.
This also affects recently added message: #: src/file-manager/fm-directory-view.c:4791 #, c-format msgid "%d Navigation Windows"
Created attachment 20511 [details] [review] Proposed patch, taking into account Danilo's proposal
I'm raising the priority to high since a patch is attached.
Could we have this revisited RSN before freezes apply?
Created attachment 23289 [details] [review] Updated and (hopefully) corrected patch to use ngettext in Nautilus
This is updated patch which applies cleanly to HEAD as of couple of hours back. ChangeLog entry is included (it won't be applied, "patch" should ignore it). There were a few changes in Nautilus since last patch was made, and they are reflected in the new patch. Btw, I've just compiled it and noticed one mistake, I will follow up with a corrected patch.
Created attachment 23291 [details] [review] Another updated patch: tested, compiles *and* works fine
Ok, this is fixed in CVS, so if Dave (after another review, he is the one who [sort of] approved the commit) doesn't come shooting my way, this can probably be marked as RESOLVED/FIXED.
Closing. Thanks for your efforts. regs, Chris