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 666516 - Not using translation for default wired network connection
Not using translation for default wired network connection
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Dan Williams
Dan Williams
Depends on:
Blocks:
 
 
Reported: 2011-12-19 13:25 UTC by Hendrik Knackstedt
Modified: 2012-01-17 15:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Call setlocale() (704 bytes, patch)
2011-12-21 14:06 UTC, Gabor Kelemen
none Details | Review

Description Hendrik Knackstedt 2011-12-19 13:25:17 UTC
If a wired network connection is created by network-manager with default settings automatically network-manager does not use the translation but gives the connection the English name.

So as example in German the connection should be called »Kabelnetzwerkverbindung 1« but is shown as »wired connection 1«.

Further information about this bug and a possible cause may be found here:
https://bugs.launchpad.net/ubuntu-translations/+bug/875017
Comment 1 André Klapper 2011-12-19 14:32:28 UTC
So copying the useful information from downstream here (please always do that):

string "Wired Connection %d"
Guess for location: http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/src/settings/nm-settings-utils.c#n50
Comment 2 Jiri Klimes 2011-12-19 16:05:55 UTC
The string is translated in po file upstream.

The default connection name is created by NetworkManager daemon. So, in order to have the string translated, you have to run the daemon with German locale, something like:
LANG=de_DE /usr/sbin/NetworkManager

Solve that with Ubuntu.
Comment 3 Gabor Kelemen 2011-12-21 14:05:29 UTC
Reopening.

Jiri: have you actually tried that? I did, and it does not work, because in src/main.c, there is no setlocale() call. Also the Networkmanager --help output does currently not show up localized at all.
After adding this function, the --help output shows up partially translated, along the "Wired connection %d" string in nm-applet.

See also: http://www.gnu.org/software/gettext/manual/gettext.html#Triggering
Comment 4 Gabor Kelemen 2011-12-21 14:06:10 UTC
Created attachment 204033 [details] [review]
Call setlocale()
Comment 5 Jiri Klimes 2012-01-17 15:32:53 UTC
You are right, Gabor. The setlocale() has to be called so that locale specific environment variables are taken into account.

Added proper include and pushed as
48852e112e7491780850c1a21fc395c163c58dc7 (master)

Thanks a lot!