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 695230 - Untranslatable strings on user accounts panel
Untranslatable strings on user accounts panel
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: User Accounts
3.7.x
Other All
: High major
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
3.10
Depends on:
Blocks:
 
 
Reported: 2013-03-05 16:53 UTC by Jiro Matsuzawa
Modified: 2013-08-13 12:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Mark some strings as translatable (4.82 KB, patch)
2013-03-05 17:01 UTC, Jiro Matsuzawa
needs-work Details | Review
Mark some strings as translatable (5.56 KB, patch)
2013-03-06 15:02 UTC, Jiro Matsuzawa
reviewed Details | Review
user-accounts: Mark some strings as translatable (6.07 KB, patch)
2013-08-12 05:54 UTC, Jiro Matsuzawa
committed Details | Review

Description Jiro Matsuzawa 2013-03-05 16:53:28 UTC
The user accounts panel has some untranslatable strings. Many of them are date-time formats.

A patch is coming.
Comment 1 Jiro Matsuzawa 2013-03-05 17:01:30 UTC
Created attachment 238145 [details] [review]
Mark some strings as translatable

I've attached a patch for this i18n problem.
Please review it.
Comment 2 Bastien Nocera 2013-03-06 10:36:45 UTC
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.
Comment 3 Jiro Matsuzawa 2013-03-06 15:02:02 UTC
Created attachment 238205 [details] [review]
Mark some strings as translatable 

Thank you for the review. I updated the patch.
Comment 4 Jiro Matsuzawa 2013-03-06 15:04:12 UTC
(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.
Comment 5 Ondrej Holy 2013-08-06 12:42:43 UTC
Review of attachment 238205 [details] [review]:

Please make patches using "git format-patch" command, otherwise it looks good to me.
Comment 6 Jiro Matsuzawa 2013-08-12 05:54:27 UTC
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.
Comment 7 Matthias Clasen 2013-08-12 14:57:57 UTC
we should land this before the string freeze in 3.9.90
Comment 8 Ondrej Holy 2013-08-13 11:56:29 UTC
Review of attachment 251316 [details] [review]:

Looks good to me.