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 644097 - Number with percentage should be given for translation
Number with percentage should be given for translation
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-03-07 08:25 UTC by F Wolff
Modified: 2011-09-14 13:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power-status: Mark number with percentage for translation (1.06 KB, patch)
2011-09-07 12:49 UTC, Florian Müllner
none Details | Review
power-status: Mark number with percentage for translation (1.61 KB, patch)
2011-09-07 13:32 UTC, Florian Müllner
committed Details | Review

Description F Wolff 2011-03-07 08:25:19 UTC
The battery percentage is hardcoded here to use a percentage sign after the number:
http://git.gnome.org/browse/gnome-shell/tree/js/ui/status/power.js#n128
This is not used this way in all languages, so it should be passed for translation, like here:
http://git.gnome.org/browse/gnome-shell/tree/js/ui/status/power.js#n220
Comment 1 F Wolff 2011-07-18 11:00:34 UTC
This is still an issue. This is the new reference:
http://git.gnome.org/browse/gnome-shell/tree/js/ui/status/power.js#n127

This now also doesn't use gettext:
http://git.gnome.org/browse/gnome-shell/tree/js/ui/status/power.js#n209
(maybe I misread before, but I thought it used a gettext call around the string "%d%%").

Not al languages use the percentage sign after the number, and some languages use a different character than '%', so please mark that string for translators.
Comment 2 Christian Dywan 2011-08-23 09:52:53 UTC
'Not all' presumably means certain African languages? Positive examples are often more motivating than theoretical assertions.
Comment 3 F Wolff 2011-08-23 10:14:01 UTC
Some I could find quickly:
http://git.gnome.org/browse/gtk+/tree/po/eu.po#n665
http://git.gnome.org/browse/gtk+/tree/po/ar.po#n802
http://git.gnome.org/browse/gtk+/tree/po/ku.po#n571

(in case the line numbers change, search for the string "%d %%")
Comment 4 F Wolff 2011-08-30 20:55:48 UTC
String freeze is in a few days. Would it be possible to look into this before then?
Comment 5 Florian Müllner 2011-09-07 12:49:05 UTC
Created attachment 195868 [details] [review]
power-status: Mark number with percentage for translation

Some locales expect the percentage sign before the number while
others use a different character, so mark it for translation.

(In reply to comment #4)
> String freeze is in a few days. Would it be possible to look into this before
> then?

Apparently not :(
Comment 6 F Wolff 2011-09-07 13:14:22 UTC
Review of attachment 195868 [details] [review]:

If I'm reading the code correctly, there are two places that need attention:
http://git.gnome.org/browse/gnome-shell/tree/js/ui/status/power.js#n121
http://git.gnome.org/browse/gnome-shell/tree/js/ui/status/power.js#n194
Comment 7 F Wolff 2011-09-07 13:17:20 UTC
Since the strings are not currently marked for translation, I think it is acceptable to fix this now, with an announcement to the i18n mailing list:

https://live.gnome.org/TranslationProject/HandlingStringFreezes
The following types of changes do not need explicit approval, however we would still very much like them to be announced so that we know about them: 
 - Marking a message for translation that was previously not marked for translation by accident.
Comment 8 Florian Müllner 2011-09-07 13:32:11 UTC
Created attachment 195874 [details] [review]
power-status: Mark number with percentage for translation

(In reply to comment #6)
> Review of attachment 195868 [details] [review]:
>
> If I'm reading the code correctly, there are two places that need attention:
> http://git.gnome.org/browse/gnome-shell/tree/js/ui/status/power.js#n121
> http://git.gnome.org/browse/gnome-shell/tree/js/ui/status/power.js#n194

Sorry, my bad - I was only grepping for '%%'
Comment 9 Dan Winship 2011-09-07 14:40:33 UTC
Comment on attachment 195874 [details] [review]
power-status: Mark number with percentage for translation

looks right
Comment 10 André Klapper 2011-09-07 14:42:48 UTC
Note: From https://live.gnome.org/TranslationProject/HandlingStringFreezes :
Marking a message for translation that was previously not marked for translation by accident does not need explicit approval, however we would still very much like them to be announced to gnome-i18n@ so that we know about them.
Comment 11 Florian Müllner 2011-09-14 13:45:21 UTC
Attachment 195874 [details] pushed as e943dca - power-status: Mark number with percentage for translation