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 551222 - Wrong "%s left" string marked for l10n in the file-transfer progress dialog
Wrong "%s left" string marked for l10n in the file-transfer progress dialog
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Internationalization (i18n)
2.23.x
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-09-07 13:17 UTC by Matteo Settenvini
Modified: 2009-01-29 13:57 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Patch (1.16 KB, patch)
2008-09-08 15:34 UTC, Christian Neumair
none Details | Review
Patch (1.87 KB, patch)
2008-09-08 21:04 UTC, Christian Neumair
none Details | Review

Description Matteo Settenvini 2008-09-07 13:17:43 UTC
Please describe the problem:
When you transfer files with nautilus, a progress dialog is shown.
Under the progress bar, there's an ETA saying, e.g., "15 seconds left", or "1 minute left".

While in English you've got just a plural for "second" <-> "seconds", "minute" <-> "minutes", "hour" <-> "hours" and "day" <-> "days", in other languages such in Italian the verb has to express the same multeplicity of the subject.

So, for example, you'd have:
"1 minute left" <-> "1 minuto rimanente"
"5 minutes left" <-> "5 minuti rimanenti"

As you can see, you pass from "minuto" to "minuti" with the plural, as you do with the verb too ("rimanent(e|i)" is the translation of "left").

So, instead of what's probably _("%s left") in the source, you should use ("%s", minutes == 1 ? _("minute left") : _("minutes left")).

I've not looked at the source, though. The same problem may recurr elsewhere in the source when handling plurals.

Steps to reproduce:
1. Start a file transfer with the C locale. Look at the time remaining when it's > 1 minute and exactly one minute, or do the same with seconds.
2. Start it in another language, like Italian.

Actual results:
You read "5 minuti rimanenti" and "1 minuto rimanenti".

Expected results:
You should respectively read "5 minuti rimanenti" and "1 minuto rimanente".

Does this happen every time?
Oh yes.

Other information:
Comment 1 Christian Neumair 2008-09-08 15:33:24 UTC
Thanks, good catch!

Confirming.

Unfortunately, we may not change strings at this point of the development cycle (”string freeze”), so you will have to wait for the GNOME 2.26 release.
Comment 2 Christian Neumair 2008-09-08 15:34:07 UTC
Created attachment 118307 [details] [review]
Patch
Comment 3 Christian Neumair 2008-09-08 15:44:49 UTC
Marking patch as obsolete.

Matteo: What happens in Italian if a phrase reads “3 hours, 4 minutes left“? In German, we count the minutes when deciding whether to use the singular or plural form of “left”. Assuming you do the same thing in Italian, I'll use that form.
Comment 4 Matteo Settenvini 2008-09-08 17:33:05 UTC
Yep, Italian behaves as German in this regard. It's because you're counting two things: "hours AND minutes". Even if it is "ONE hour AND ONE minute" you're still counting TWO things.
Comment 5 Christian Neumair 2008-09-08 21:04:57 UTC
Created attachment 118329 [details] [review]
Patch

OK, thanks. Then we'll use the attached patch once string freeze is over.
Comment 6 André Klapper 2009-01-02 20:39:06 UTC
String freeze is over. Please commit soon.
Comment 7 Alexander Larsson 2009-01-29 12:13:41 UTC
"%T left" is used in several other places too, so this fix seems not complete.
Comment 8 Cosimo Cecchi 2009-01-29 13:57:01 UTC
I fixed this in trunk, hopefully taking care of the other cases as well.

2009-01-29  Cosimo Cecchi  <cosimoc@gnome.org>

	* libnautilus-private/nautilus-file-operations.c:
	(seconds_count_format_time_units), (report_delete_progress),
	(report_copy_progress): make sure to use the correct singular
	or plural form for the time format when reporting a file operation
	progress detail.
	Thanks to Christian Neumair (#551222).