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 613306 - xgettext:no-c-format for string "%x"
xgettext:no-c-format for string "%x"
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.29.x
Other Linux
: High major
: ---
Assigned To: GDM maintainers
GDM maintainers
: 614159 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-03-19 08:50 UTC by Tommi Vainikainen
Modified: 2010-06-19 13:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that adds xgettext:no-c-format markers (854 bytes, patch)
2010-03-19 08:50 UTC, Tommi Vainikainen
none Details | Review
Patch for gdm-clock-widget.c (1.21 KB, patch)
2010-03-30 03:07 UTC, Takao Fujiwara
none Details | Review

Description Tommi Vainikainen 2010-03-19 08:50:24 UTC
Created attachment 156541 [details] [review]
Patch that adds xgettext:no-c-format markers

Currently translators cannot really translate "%x" string because po-validation fails as xgettext marks the string as c-format (printf kind of formatting), which it is not (it is strftime formatting string).
Comment 1 Tommi Vainikainen 2010-03-19 08:51:03 UTC
According to interpretation on gnome-i18n list, this does not break string freeze because it only changes comments, and it does not change string freeze because it does not modify any strings:

http://mail.gnome.org/archives/gnome-i18n/2010-March/msg00237.html
Comment 2 Takao Fujiwara 2010-03-29 02:56:58 UTC
OK, I understood your issue is bug 614159.
I think %x is not a translatable string.
I think the msgstr is also "%x" so that LC_TIME can change the value instead of
LC_MESSAGES.

If %x doesn't work on your locale, I think the most issue is your locale issue instead of changing %x.
The workaround is to modify the comment(# c-format) in your po file however I think it's better to keep %x for LC_TIME.
Comment 3 Claude Paroz 2010-03-29 06:51:22 UTC
*** Bug 614159 has been marked as a duplicate of this bug. ***
Comment 4 TLE 2010-03-29 09:18:41 UTC
Takao

If we are not supposed to be able to change "%x" then why mark it for translation?
Comment 5 Takao Fujiwara 2010-03-29 09:56:24 UTC
(In reply to comment #4)
> If we are not supposed to be able to change "%x" then why mark it for
> translation?

My suggestion is to remove the gettext mark _() to use LC_TIME instead of LC_MESSAGES since someone sometimes file a bug to use LC_TIME.
Probably now is a string freeze but msgstr "%x" might be no problem at the moment.

E.g. IIRC, Evolution also removes gettext and use "%x" after got a bug.
http://git.gnome.org/browse/evolution/tree/e-util/e-datetime-format.c#n111
Comment 6 André Klapper 2010-03-29 10:14:14 UTC
*removing* strings from translation is never any problem under string freeze as no additional work is created for translators.
There's a hardcode freeze currently though until 2.30.0 is released.
Comment 7 Ray Strode [halfline] 2010-03-29 18:39:07 UTC
Yup, I guess we should have never marked it for translation.  My mistake.  Sorry guys.
Comment 8 Takao Fujiwara 2010-03-30 03:07:33 UTC
Created attachment 157435 [details] [review]
Patch for gdm-clock-widget.c

Attached the patch for 2.30.

Probably I think it's better to provide the option to choose LC_MESSAGES(%D, %d/%m/%y) or LC_TIME(%x) with another bug in the next release.
Comment 9 Takao Fujiwara 2010-03-30 03:27:21 UTC
(In reply to comment #8)
> Probably I think it's better to provide the option to choose LC_MESSAGES(%D,
> %d/%m/%y) or LC_TIME(%x) with another bug in the next release.

Thinking again, it may be better to use LC_TIME only for the date formats in the next release(2.32).
Comment 10 Takao Fujiwara 2010-04-01 06:03:36 UTC
I noticed the gettext mark was removed in "%x" in git HEAD.
I think you can commit .po files and close this bug.