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 509036 - Strings with numbers should rather use %d
Strings with numbers should rather use %d
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: general
3.17.x
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on: 779165
Blocks:
 
 
Reported: 2008-01-12 22:11 UTC by Khaled Hosny
Modified: 2017-10-29 00:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Khaled Hosny 2008-01-12 22:11:22 UTC
Nautilus PO file has many unnecassary, localization unfriendly strings. Here are:

* all *% strings like:
#: ../libnautilus-private/nautilus-global-preferences.c:76
#, no-c-format
msgid "25%"
msgstr ""

#: ../libnautilus-private/nautilus-global-preferences.c:78
#, no-c-format
msgid "50%"
msgstr ""

and alike, it should be replaced by one "%d%s" or some thing (%d for the number and %s for the sign)

also:
#: ../libnautilus-private/nautilus-global-preferences.c:92
msgid "100 K"
msgstr ""

#: ../libnautilus-private/nautilus-global-preferences.c:93
msgid "500 K"
msgstr ""

which is the same issue. For Arabic this is a big problem, as we have to sets of digits and rely on using localized formate code (%Id etc...) for chosing the correct set according to locale.
Comment 1 André Klapper 2008-01-13 12:32:33 UTC
msgid "25%"
this MUST be translated, some languages use another order (% at the start) and other numbers.


#: ../libnautilus-private/nautilus-global-preferences.c:93
msgid "500 K"

> which is the same issue. For Arabic this is a big problem, as we have to 
> sets of digits and rely on using localized formate code (%Id etc...) for 
> chosing the correct set according to locale.

...but what exactly do you propose here?
Comment 2 Djihed Afifi 2008-01-13 12:54:59 UTC
Yes, Andre, we use it. The point is, they should just offer "%d" with a translator comment, and translators are free to make it %Id.

Why this is a better approach: Arabic has about 23 locales, and we have just one ar.po , what do we choose? arabic or arabic-hindu numerals? but if we leave it to %Id, it's up to the locale to decide, ar_EG would use arabic-hindu, while ar_DZ would use the normal Arabic numerals.

As for the percent sign, offer it as a separate character, but we won't make use of it for Arabic for now because it is too much effort to have 23 ar_XX.po files. But may be it will be used for other languages.

> ...but what exactly do you propose here?

Do away with the numbers, generate them in code and offer "%d" for translation, with a translator comment.
Comment 3 André Klapper 2008-01-13 15:28:46 UTC
ah... got it (hopefully), thanks. wanna come up with a patch?
Comment 4 Allan Day 2010-06-20 21:26:44 UTC
Changing component as a part of ongoing bug reorganisation work.
Comment 5 André Klapper 2011-08-19 11:50:06 UTC
The original strings don't exist anymore in 3.1.4, however there are:

#: ../src/nautilus-file-management-properties.ui.h:1
msgid "1 GB"
#: ../src/nautilus-file-management-properties.ui.h:2
msgid "1 MB"
#: ../src/nautilus-file-management-properties.ui.h:3
msgid "10 MB"
#: ../src/nautilus-file-management-properties.ui.h:4
msgid "100 KB"
#: ../src/nautilus-file-management-properties.ui.h:5
msgid "100 MB"
#: ../src/nautilus-file-management-properties.ui.h:7
msgid "100%"
#: ../src/nautilus-file-management-properties.ui.h:9
msgid "150%"
#: ../src/nautilus-file-management-properties.ui.h:10
msgid "2 GB"
#: ../src/nautilus-file-management-properties.ui.h:12
msgid "200%"
#: ../src/nautilus-file-management-properties.ui.h:13
msgid "3 MB"
#: ../src/nautilus-file-management-properties.ui.h:15
msgid "33%"
#: ../src/nautilus-file-management-properties.ui.h:16
msgid "4 GB"
#: ../src/nautilus-file-management-properties.ui.h:18
msgid "400%"
#: ../src/nautilus-file-management-properties.ui.h:19
msgid "5 MB"
#: ../src/nautilus-file-management-properties.ui.h:21
msgid "50%"
#: ../src/nautilus-file-management-properties.ui.h:22
msgid "500 KB"
#: ../src/nautilus-file-management-properties.ui.h:24
msgid "66%"
Comment 6 William Jon McCann 2012-08-17 15:33:20 UTC
Andre, what exactly is needed here?
Comment 7 André Klapper 2012-08-17 17:24:41 UTC
Basically: Replacing numbers by %d (?) so "500 KB" becomes "%d KB".
"KB", "MB" etc do have translations in some languages, but I don't see any sense in translating numbers themselves.
Comment 8 Carlos Soriano 2015-09-01 13:57:02 UTC
I'm actually not sure we want that option in nautilus preferences, we should came up with a common usable default value.
Deferring to 3.20 to see if we get rid of that preference.
Comment 9 Carlos Soriano 2016-02-23 17:31:03 UTC
Removing milestone, not sure this is needed.
Comment 10 Ernestas Kulik 2017-02-20 18:00:51 UTC
What about using a spin button and a combo box for unit selection?
Comment 11 Carlos Soriano 2017-02-24 10:44:51 UTC
(In reply to Ernestas Kulik from comment #10)
> What about using a spin button and a combo box for unit selection?

I think the only unit that makes sense is MB, why would you want GB or KB?
Comment 12 Ernestas Kulik 2017-02-24 19:07:30 UTC
(In reply to Carlos Soriano from comment #11)
> I think the only unit that makes sense is MB, why would you want GB or KB?

Yeah, you’re right.
Comment 13 Alexandre Franke 2017-02-24 20:22:42 UTC
(In reply to Ernestas Kulik from comment #12)
> (In reply to Carlos Soriano from comment #11)
> > I think the only unit that makes sense is MB, why would you want GB or KB?
> 
> Yeah, you’re right.

No, he’s not. As I told him on IRC, video files can easily reach above 1GB and they deserve a thumbnail too. I have set my preference to the maximum (4GB).
Comment 14 Ernestas Kulik 2017-02-24 21:12:46 UTC
(In reply to Alexandre Franke from comment #13)
> (In reply to Ernestas Kulik from comment #12)
> > (In reply to Carlos Soriano from comment #11)
> > > I think the only unit that makes sense is MB, why would you want GB or KB?
> > 
> > Yeah, you’re right.
> 
> No, he’s not. As I told him on IRC, video files can easily reach above 1GB
> and they deserve a thumbnail too. I have set my preference to the maximum
> (4GB).

I’ve only just realized that the setting is ignored on my machine. I always get thumbnails for my video files and never had to tweak it.
Comment 15 Ernestas Kulik 2017-02-24 21:24:40 UTC
(In reply to Ernestas Kulik from comment #14)
> I’ve only just realized that the setting is ignored on my machine. I always
> get thumbnails for my video files and never had to tweak it.

Or maybe not. Just coincidental.
Comment 16 Piotr Drąg 2017-10-29 00:58:09 UTC
There are no such strings in Nautilus anymore.