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 772069 - Untranslated strings in a drop-down in the Network panel
Untranslated strings in a drop-down in the Network panel
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nm-applet
1.4.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: 772362
 
 
Reported: 2016-09-27 15:51 UTC by Piotr Drąg
Modified: 2016-10-03 17:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Untranslated strings (165.71 KB, image/png)
2016-09-27 15:51 UTC, Piotr Drąg
  Details
Wrap gtk_label in _() sentence to assure localisation (1.83 KB, patch)
2016-09-30 15:45 UTC, Pierre Amadio
rejected Details | Review

Description Piotr Drąg 2016-09-27 15:51:19 UTC
Created attachment 336376 [details]
Untranslated strings

Using control-center-3.22.0-1.fc25.x86_64, "Store the password only for this user", "Store the password for all users" and "Ask for this password every time" strings in a drop down in the Security tab of the Network panel are in English.
Comment 1 Pierre Amadio 2016-09-30 15:45:36 UTC
Created attachment 336686 [details] [review]
Wrap gtk_label in _() sentence to assure localisation

This patch should fix bug 772069
Some string related to wifi password management are now wrapped within a
$_() sentence to assure they get localised properly.
Comment 2 Pierre Amadio 2016-09-30 15:46:58 UTC
I was not able to reproduce the problem with jhbuild as i do not have any wifi device in the vm i run fedora on, however, i think the attached patch in comment1 is likely to solve the problem.
Comment 3 Pierre Amadio 2016-09-30 16:34:09 UTC
the correct product/component for this bug should be: NetworkManager / nm-applet 
(the patch in comment 1 apply in jhbuild/checkout/network-manager-applet)
Comment 4 Pierre Amadio 2016-10-01 08:28:27 UTC
Comment on attachment 336686 [details] [review]
Wrap gtk_label in _() sentence to assure localisation

i made an error,sorry,  the strings in icon_desc_table are already wrapped within a N_() sentence.
Comment 5 Bastien Nocera 2016-10-01 13:09:17 UTC
Once the patch is applied, we'll need to update that same file in gnome-control-center. See the "update-from-nma" target in:
gnome-control-center/panels/network/wireless-security
Comment 6 Pierre Amadio 2016-10-03 10:04:45 UTC
Reproducer: in french or polish locales, start nm-connection-editor
Click on "Add"
Select "Wifi", click on "Create"
Switch to "Wifi Security" pannel, choose one security option, by example "Web 128"

Click at the right part of the password field for the key, and a pop up menu appear.

This pop is not translated.

It is generated on the fly insrc/libnma/nma-ui-utils.c 

I first though that N_() was enough to call gettext, but it is not (https://developer.gnome.org/glib/stable/glib-I18N.html#N-:CAPS) so the string stored in icon_desc_table  must be passed threw gettext before being included in the pop up menu as in patch1.

Howeverer it is still not enough. Even in this case, one still needs to modify the po file in order to remove the fuzzy keyword for those 3 messages, then regenerate a mo file before being able to get the translated strings in the pop up menu:

By example:

#: ../src/libnma/nma-ui-utils.c:49 ../src/libnm-gtk/nm-ui-utils.c:615
-#, fuzzy
+#,
 msgid "Store the password only for this user"
 msgstr "Enregistrer le mot de passe seulement pour cet _utilisateur"
 

Now, the problem is "fixed", but only to end up with some string not being designed to be in a pop up with stuff like "cet _utilisateur" but i think this is due to the french translator as the original sentence did not have any _ in it (nor in the po file, nor in the c source).
Comment 7 Piotr Drąg 2016-10-03 10:14:56 UTC
Don't worry about the second part, translators will take care of it.
Comment 8 Thomas Haller 2016-10-03 17:24:32 UTC
fixed in master:

https://git.gnome.org/browse/network-manager-applet/commit/?id=2f3f2680519150cc8d401410cdcb410069adf4e2

(I also merged Pierre's patch from comment 1).


Thanks.