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 659141 - Bad gettext syntax for duration string translation
Bad gettext syntax for duration string translation
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
3.1.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2011-09-15 12:27 UTC by Claude Paroz
Modified: 2011-09-15 13:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
log-window: properly translate duration strings (1.61 KB, patch)
2011-09-15 13:06 UTC, Guillaume Desmottes
committed Details | Review
log-window: fix translators comment (1.02 KB, patch)
2011-09-15 13:13 UTC, Guillaume Desmottes
committed Details | Review

Description Claude Paroz 2011-09-15 12:27:32 UTC
gettext cannot handle embedded macros, hence this (in libempathy-gtk/empathy-log-window.c):
 g_strdup_printf (_("%" G_GINT64_FORMAT " seconds"), span);

is wrong. You have to convert first the integer to string with G_GINT64_FORMAT, and then include the result in "%s seconds" string, with a ngettext call. Same for the "minutes" string.
Comment 1 Claude Paroz 2011-09-15 12:36:46 UTC
In the same file:

text = g_date_time_format (dt,
            C_("A date such as '23 May 2010', "
               "%e is the day, %B the month and %Y the year",
               "%e %B %Y"));

should be:
text = g_date_time_format (dt,
            /* Translators: A date such as '23 May 2010' (strftime format) */
            "%e %B %Y"));
Comment 2 Claude Paroz 2011-09-15 12:58:57 UTC
Sorry, the last example was wrong:

text = g_date_time_format (dt,
            /* Translators: A date such as '23 May 2010' (strftime format) */
            _("%e %B %Y"));
Comment 3 Guillaume Desmottes 2011-09-15 13:06:31 UTC
Created attachment 196623 [details] [review]
log-window: properly translate duration strings
Comment 4 Claude Paroz 2011-09-15 13:11:49 UTC
Review of attachment 196623 [details] [review]:

This looks fine, thanks!
Comment 5 Guillaume Desmottes 2011-09-15 13:13:16 UTC
Created attachment 196624 [details] [review]
log-window: fix translators comment
Comment 6 Claude Paroz 2011-09-15 13:14:23 UTC
Review of attachment 196624 [details] [review]:

Fine, too.
Comment 7 Claude Paroz 2011-09-15 13:14:49 UTC
You can commit, and I'll explain the change to gnome-i18n.
Comment 8 Guillaume Desmottes 2011-09-15 13:17:09 UTC
Attachment 196623 [details] pushed as 63ad9eb - log-window: properly translate duration strings
Attachment 196624 [details] pushed as e3327f1 - log-window: fix translators comment