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 772362 - 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
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on: 772069
Blocks:
 
 
Reported: 2016-10-03 12:21 UTC by Bastien Nocera
Modified: 2017-03-14 16:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] libnma,libnm-gtk: use package-aware gettext() macro (4.36 KB, patch)
2017-03-13 21:07 UTC, Beniamino Galvani
none Details | Review

Description Bastien Nocera 2016-10-03 12:21:03 UTC
+++ This bug was initially created as a clone of Bug #772069 +++

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 Piotr Drąg 2017-02-18 17:49:09 UTC
Would it be possible to do the update-from-nma thing before 3.24?
Comment 2 Bastien Nocera 2017-02-18 20:22:26 UTC
(In reply to Piotr Drąg from comment #1)
> Would it be possible to do the update-from-nma thing before 3.24?

Not unless somebody fixes the patch application. It fails right now.
Comment 3 Piotr Drąg 2017-02-18 20:55:14 UTC
I’m afraid I wouldn’t know where to start. I hope someone more capable will notice this.
Comment 4 Ask Hjorth Larsen 2017-02-24 22:53:39 UTC
I have checked that the command:

  patch --reverse < nm-connection-editor-ui-to-network-panel.patch

will cause many strings in gnome-control-center to coincide with strings in network-manager-applet.  Also it changes e.g. the column spacing attribute from 6 to 12 which appears consistent with network-manager-applet.  I suspect the problem was that the patch was just reversed, and the above command should then fix the problem unless for some reason it relies on the other patch.

As for the other patch, I cannot tell what it does.  Maybe it was already applied and should be ignored, because I also get a 'reverse patch' warning for that one, and I cannot tell if those changes fix anything.
Comment 5 Bastien Nocera 2017-02-24 23:06:16 UTC
You need to copy the files from NetworkManager-applet before applying the patch... Otherwise you're just undoing what the patch would do, on an old version of the NetworkManager-applet sources.
Comment 6 Ask Hjorth Larsen 2017-02-25 00:42:28 UTC
Hmm.  I can copy the files and apply the ui patch successfully, but the other patch fails rather spectacularly.  I wouldn't know why this would suddenly make the strings translatable though.

There are probably too many things that I don't know about gnome-control-center (I only read this bug report), and I don't want to waste more of your time.  So feel free to ignore this.
Comment 7 Bastien Nocera 2017-03-13 17:56:58 UTC
This is actually a problem in network-manager-applet.

Calling just gettext() to do translations will use the last textdomain() call's domain to grab the translations. This isn't a problem for nm-connection-editor, which uses the same "nm-applet" gettext domain.

But that will fail for gnome-control-center, as the last call for the textdomain might be for control-center or any of the other libraries it might be using.

Replacing the naked "gettext()" calls with "_()" will correct the translation.

To check, run:
LC_ALL=pt_BR.UTF-8 gnome-control-center network

And verify that, in the properties of a wireless connection, the left hand-side bar is in Portuguese and so is the password drop-down.
Comment 8 Beniamino Galvani 2017-03-13 21:07:17 UTC
Created attachment 347876 [details] [review]
[PATCH] libnma,libnm-gtk: use package-aware gettext() macro
Comment 9 Thomas Haller 2017-03-14 09:52:52 UTC
(In reply to Beniamino Galvani from comment #8)
> Created attachment 347876 [details] [review] [review]
> [PATCH] libnma,libnm-gtk: use package-aware gettext() macro

lgtm