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 682876 - [i18n] some messages need translation context.
[i18n] some messages need translation context.
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: general
3.5.x
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-08-28 13:57 UTC by Jiro Matsuzawa
Modified: 2012-08-28 15:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch for this bug. (2.71 KB, patch)
2012-08-28 13:59 UTC, Jiro Matsuzawa
needs-work Details | Review
a patch for this bug (1.22 KB, patch)
2012-08-28 14:00 UTC, Jiro Matsuzawa
accepted-commit_now Details | Review
a patch for this bug (3.68 KB, patch)
2012-08-28 14:01 UTC, Jiro Matsuzawa
committed Details | Review
a patch for this bug (1.08 KB, patch)
2012-08-28 14:01 UTC, Jiro Matsuzawa
needs-work Details | Review
modified patch (2.65 KB, patch)
2012-08-28 15:04 UTC, Jiro Matsuzawa
committed Details | Review
modified patch (1.24 KB, patch)
2012-08-28 15:07 UTC, Jiro Matsuzawa
committed Details | Review

Description Jiro Matsuzawa 2012-08-28 13:57:40 UTC
Some messages (e.g. "None") need translation context.
How to translate "None" into Japanese or other languages is dependent on the context.
Comment 1 Jiro Matsuzawa 2012-08-28 13:59:44 UTC
Created attachment 222630 [details] [review]
a patch for this bug.

universal-access: add translation context for Zoom gray
Comment 2 Jiro Matsuzawa 2012-08-28 14:00:33 UTC
Created attachment 222631 [details] [review]
a patch for this bug

network: add translation context for Wifi security
Comment 3 Jiro Matsuzawa 2012-08-28 14:01:06 UTC
Created attachment 222632 [details] [review]
a patch for this bug

wacom: add translation context for Wacom action type
Comment 4 Jiro Matsuzawa 2012-08-28 14:01:38 UTC
Created attachment 222633 [details] [review]
a patch for this bug

universal-access: add translation context for osk model
Comment 5 Jiro Matsuzawa 2012-08-28 14:03:27 UTC
Please review the patches. Thanks in advance.
Comment 6 Bastien Nocera 2012-08-28 14:04:46 UTC
Review of attachment 222630 [details] [review]:

::: panels/universal-access/zoom-options.ui
@@ +928,3 @@
                                         <property name="can_focus">False</property>
                                         <property name="xalign">1</property>
+                                        <property name="label" translatable="yes" context="Zoom Grayscale" comments="short delay">None</property>

It's not a delay. None means "No colour" (eg. grayscale only)...

@@ +959,3 @@
                                         <property name="can_focus">False</property>
                                         <property name="xalign">0</property>
+                                        <property name="label" translatable="yes" context="Zoom Grayscale" comments="long delay">Full</property>

and "Full" means "full colour" (eg. no change, it's the default)
Comment 7 Bastien Nocera 2012-08-28 14:05:36 UTC
Review of attachment 222631 [details] [review]:

::: panels/network/net-device-wifi.c
@@ +309,3 @@
                 g_string_set_size (str, str->len - 2);
         else {
                 /* TRANSLATORS: this no (!) WiFi security */

You can probably remove the translator comment now that you have a context.
Comment 8 Bastien Nocera 2012-08-28 14:06:33 UTC
Review of attachment 222632 [details] [review]:

::: panels/wacom/cc-wacom-page.c
@@ +605,3 @@
 	gtk_list_store_set (model, &new_row,
 			    MAPPING_DESCRIPTION_COLUMN, dir_name ? dir_name : button->name,
+			    MAPPING_TYPE_COLUMN, g_dpgettext2 (NULL, "Wacom action-type", action_table[type].action_name),

You should add a macro for that instead of calling g_dpgettext2 by hand.
Comment 9 Bastien Nocera 2012-08-28 14:08:02 UTC
Review of attachment 222633 [details] [review]:

::: panels/universal-access/uap.ui
@@ +76,3 @@
       </row>
       <row>
+        <col id="0" translatable="yes" context="universal access, on screen keyboard model">None</col>

I'm pretty sure this code isn't used at all and should just be removed.
Comment 10 Jiro Matsuzawa 2012-08-28 15:04:13 UTC
Created attachment 222640 [details] [review]
modified patch

> Review of attachment 222630 [details] [review]:
> 
> ::: panels/universal-access/zoom-options.ui
> @@ +928,3 @@
>                                          <property
> name="can_focus">False</property>
>                                          <property name="xalign">1</property>
> +                                        <property name="label"
> translatable="yes" context="Zoom Grayscale" comments="short
> delay">None</property>
> 
> It's not a delay. None means "No colour" (eg. grayscale only)...
> 
> @@ +959,3 @@
>                                          <property
> name="can_focus">False</property>
>                                          <property name="xalign">0</property>
> +                                        <property name="label"
> translatable="yes" context="Zoom Grayscale" comments="long
> delay">Full</property>
> 
> and "Full" means "full colour" (eg. no change, it's the default)

You are right. I removed the comments.
Comment 11 Jiro Matsuzawa 2012-08-28 15:07:01 UTC
Created attachment 222641 [details] [review]
modified patch

> Review of attachment 222631 [details] [review]:
> 
> ::: panels/network/net-device-wifi.c
> @@ +309,3 @@
>                  g_string_set_size (str, str->len - 2);
>          else {
>                  /* TRANSLATORS: this no (!) WiFi security */
> 
> You can probably remove the translator comment now that you have a context.

All right. I removed it.
Comment 12 Jiro Matsuzawa 2012-08-28 15:18:53 UTC
(In reply to comment #8)
> Review of attachment 222632 [details] [review]:
> 
> ::: panels/wacom/cc-wacom-page.c
> @@ +605,3 @@
>      gtk_list_store_set (model, &new_row,
>                  MAPPING_DESCRIPTION_COLUMN, dir_name ? dir_name :
> button->name,
> +                MAPPING_TYPE_COLUMN, g_dpgettext2 (NULL, "Wacom action-type",
> action_table[type].action_name),
> 
> You should add a macro for that instead of calling g_dpgettext2 by hand.

I refered to other source files of gnome-control-center and other modules. But all the souces call g_dpgettext2 directly instead of defining a macro.

For example:
panels/display/cc-display-panel.c:
510:          add_key (gtk_combo_box_get_model (GTK_COMBO_BOX (self->priv->rotation_combo)), g_dpgettext2 (NULL, "display panel, rotation", info->name), FALSE, 0, 0, 0, info->rotation);
513:            selection = g_dpgettext2 (NULL, "display panel, rotation", info->name);
Comment 13 Jiro Matsuzawa 2012-08-28 15:33:31 UTC
(In reply to comment #9)
> Review of attachment 222633 [details] [review]:
> 
> ::: panels/universal-access/uap.ui
> @@ +76,3 @@
>        </row>
>        <row>
> +        <col id="0" translatable="yes" context="universal access, on screen
> keyboard model">None</col>
> 
> I'm pretty sure this code isn't used at all and should just be removed.

I see. I'll back down this patch.  Whether you remove the unused elements, I leave it in your hands.

Thank you.
Comment 14 Bastien Nocera 2012-08-28 15:53:43 UTC
Used a macro for the Wacom bits, and removed the unused universal-access object.