GNOME Bugzilla – Bug 772362
Untranslated strings in a drop-down in the Network panel
Last modified: 2017-03-14 16:31:10 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.
Would it be possible to do the update-from-nma thing before 3.24?
(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.
I’m afraid I wouldn’t know where to start. I hope someone more capable will notice this.
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.
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.
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.
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.
Created attachment 347876 [details] [review] [PATCH] libnma,libnm-gtk: use package-aware gettext() macro
(In reply to Beniamino Galvani from comment #8) > Created attachment 347876 [details] [review] [review] > [PATCH] libnma,libnm-gtk: use package-aware gettext() macro lgtm
Applied: https://git.gnome.org/browse/network-manager-applet/commit/?id=9df10e2e758a7b78aa5a69a15900030f45e48fff