GNOME Bugzilla – Bug 695230
Untranslatable strings on user accounts panel
Last modified: 2013-08-13 12:17:09 UTC
The user accounts panel has some untranslatable strings. Many of them are date-time formats. A patch is coming.
Created attachment 238145 [details] [review] Mark some strings as translatable I've attached a patch for this i18n problem. Please review it.
Review of attachment 238145 [details] [review]: ::: panels/user-accounts/um-history-dialog.c @@ +93,3 @@ else { date = g_date_time_add_days (um->week, 6); + /* Translators: This is a date format. */ A date format that represents what? What are translators supposed to do with it? @@ +97,3 @@ if (g_date_time_get_year (um->week) == g_date_time_get_year (um->current_week)) { + /* Translators: This is a date format. */ + to = g_date_time_format (date, _("%b %e")); Ditto. @@ +106,3 @@ + /* Translators: This indicates a week label on a login history. + The first %s is a from-week, and the second %s a to-week. */ + label = g_strdup_printf(C_("login history week", "%s - %s"), from, to); How do you expect this to be translated? Even with split strings, I don't see what changes translators would make. @@ +190,3 @@ date = get_smart_date (datetime); + /* Translators: This is a time format. */ + time = g_date_time_format (datetime, _("%k:%M")); This needs to be %X (or even %r/%R depending on whether the locale uses AM/PM, see datetime panel). This shouldn't be translatable. ::: panels/user-accounts/um-user-panel.c @@ +582,3 @@ date_str = get_smart_date (date_time); + /* Translators: This is a time format. */ + time_str = g_date_time_format (date_time, _("%k:%M")); This shouldn't be translatable.
Created attachment 238205 [details] [review] Mark some strings as translatable Thank you for the review. I updated the patch.
(In reply to comment #2) > Review of attachment 238145 [details] [review]: > > ::: panels/user-accounts/um-history-dialog.c > @@ +93,3 @@ > else { > date = g_date_time_add_days (um->week, 6); > + /* Translators: This is a date format. */ > > A date format that represents what? What are translators supposed to do with > it? > > @@ +97,3 @@ > if (g_date_time_get_year (um->week) == g_date_time_get_year > (um->current_week)) { > + /* Translators: This is a date format. */ > + to = g_date_time_format (date, _("%b %e")); > > Ditto. > As you say, information about the context may have been insufficient. I gave more details about the contexts for translators in the new patch. > @@ +106,3 @@ > + /* Translators: This indicates a week label on a login > history. > + The first %s is a from-week, and the second %s a to-week. > */ > + label = g_strdup_printf(C_("login history week", "%s - %s"), > from, to); > > How do you expect this to be translated? Even with split strings, I don't see > what changes translators would make. > I consider RTL (Right-to-Left) languages such as Arabic. For exmaple, "%2$s - %1$s" might be used instead of "%s - %s" in such languages. > @@ +190,3 @@ > date = get_smart_date (datetime); > + /* Translators: This is a time format. */ > + time = g_date_time_format (datetime, _("%k:%M")); > > This needs to be %X (or even %r/%R depending on whether the locale uses AM/PM, > see datetime panel). This shouldn't be translatable. > > ::: panels/user-accounts/um-user-panel.c > @@ +582,3 @@ > date_str = get_smart_date (date_time); > + /* Translators: This is a time format. */ > + time_str = g_date_time_format (date_time, _("%k:%M")); > > This shouldn't be translatable. A time format varies depending on the language. In Japanese, "%X" is not "%k:%M" or "%H:%M". It is "%H時%M分" (Without seconds). "時" (U+6642) means Hour, and "分" (U+5206) Minute. For exmaple: * "%k:%M" => "22:58" * "%X" => "22時58分" I think it would be better if translators can specify their time format. However, if these formats must be "%k:%M" or "%H:%M" for design reasons and so on, I'll remove these gettext functions. Thank you.
Review of attachment 238205 [details] [review]: Please make patches using "git format-patch" command, otherwise it looks good to me.
Created attachment 251316 [details] [review] user-accounts: Mark some strings as translatable Hi Ondrej, Thank you for the review. I've remade the patch using git-format-patch.
we should land this before the string freeze in 3.9.90
Review of attachment 251316 [details] [review]: Looks good to me.
Review of attachment 251316 [details] [review]: Thanks. Committed: https://git.gnome.org/browse/gnome-control-center/commit/?id=aa3af401147c9550bc19d14b5cdaf5588083f7c1