GNOME Bugzilla – Bug 666516
Not using translation for default wired network connection
Last modified: 2012-01-17 15:32:53 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
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
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.
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
Created attachment 204033 [details] [review] Call setlocale()
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!