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 648403 - gnome-shell: 12-hour string translated as a 24-hour string
gnome-shell: 12-hour string translated as a 24-hour string
Status: RESOLVED FIXED
Product: l10n
Classification: Infrastructure
Component: Swedish [sv]
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Christian Rose
gnome-se-list
Depends on: 648394
Blocks:
 
 
Reported: 2011-04-21 17:29 UTC by Owen Taylor
Modified: 2012-08-20 14:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2011-04-21 17:29:41 UTC
Below reported problem also applies to Swedish translation (search for %l to find all relevant strings)

+++ This bug was initially created as a clone of Bug #648394 +++

The formats string in gnome-shell.po that are supposed to be a 12-hour time format:

#. Translators: This is a time format with date used
#. for AM/PM.
#: ../js/ui/dateMenu.js:177
msgid "%a %b %e, %l:%M:%S %p"
msgstr "%a, %e. %b, %H:%M:%S"

#: ../js/ui/dateMenu.js:178
msgid "%a %b %e, %l:%M %p"
msgstr "%a, %e. %b, %H:%M"

#. Translators: This is a time format without date used
#. for AM/PM.
#: ../js/ui/dateMenu.js:182
msgid "%a %l:%M:%S %p"
msgstr "%a %H:%M:%S"

#: ../js/ui/dateMenu.js:183
msgid "%a %l:%M %p"
msgstr "%a %H:%M"

Are done as straight-up 24-hour time formats. This makes the switch in System Settings that is supposed to switch between 12-hour and 24-hour time do nothing, which looks buggy. 

 https://bugzilla.redhat.com/show_bug.cgi?id=698698

Compare the gnome-panel translation:

#: ../applets/clock/calendar-window.c:316 ../applets/clock/clock.c:448
#: ../applets/clock/clock-location-tile.c:507
msgid "%l:%M %p"
msgstr "%I:%M %p"

Since the default value for the toggle switch is a 24-hour format (for all locales), I don't think it matters that 12-hour time with AM/PM isn't natural in German.
Comment 1 Göran Uddeborg 2011-04-21 21:38:31 UTC
What is the purpose of having these strings translatable, if they are not meant to be adapted to each locale?  Or, if they are to be adapted, what kind of adaption is permissible, if this, the most obvious one, is not?

A 12-hour clock is still sometimes used in spoken language in Swedish, but hardly ever in text.  By the way, %p is always empty in the sv locale.
Comment 2 Owen Taylor 2011-04-21 22:17:16 UTC
(In reply to comment #1)
> What is the purpose of having these strings translatable, if they are not meant
> to be adapted to each locale?  Or, if they are to be adapted, what kind of
> adaption is permissible, if this, the most obvious one, is not?
> 
> A 12-hour clock is still sometimes used in spoken language in Swedish, but
> hardly ever in text.  By the way, %p is always empty in the sv locale.

Because there might be ordering or punctuation differences, largely.

 - It's fine if %p is always empty - the locale doesn't have accepted abbrevations, and the user decides to pick a 12 hour time, well, generally people do know the time within 12 hours or can look out the window.
 
 - If %p is always empty, it's also fine to omit it from the translation if the space before %p leaves a gap, though it might be better to strip leading/trailing whitespace within the gnome shell code.

 - If %p is always empty, then it *is* OK to make the separate format string for calendar events in 12-hour mode be a 24-hour format, since the user would be left guessing. But the strings for the clock panel still have to be 12-hour.

Yes, some of that should make it's way into translator comments.
Comment 3 Daniel Nylander 2011-04-22 06:51:16 UTC
Fix for Swedish has been commited.
Comment 4 Piotr Drąg 2012-08-20 14:46:10 UTC
Closing as per comment #3.