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 699503 - nmcli headers don't line up right in some localizations
nmcli headers don't line up right in some localizations
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nmcli
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-05-02 18:14 UTC by Dan Winship
Modified: 2013-05-31 07:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dan Winship 2013-05-02 18:14:29 UTC
danw@laptop:NetworkManager (master)> nmcli dev
DEVICE     TYPE              STATE        
wlan0      802-11-wireless   connected    
em1        802-3-ethernet    disconnected 
danw@laptop:NetworkManager (master)> LANG=es_ES.utf8 nmcli dev
DISPOSITIVO TIPO              ESTADO       
wlan0      802-11-wireless   conectado    
em1        802-3-ethernet    desconectado 


I guess it needs to make sure that each column is at least as wide as its header...
Comment 1 Jiri Klimes 2013-05-28 11:59:57 UTC
Actually, we need to know the widest string in a column to be able to align the column properly. And it requires first collect all data before printing.
I wanted to do the enhancement long time, but didn't get round to it until now, because it was quite a complex change.

Nevertheless, I've implemented the change now and it is available in jklimes/nmcli-enh-output branch. I'd like to ask you for a review.
Comment 2 Dan Williams 2013-05-29 21:05:53 UTC
> value = _(fields->name_l10n);

Hmm, any idea how this works for translators?  Obviously it works at runtime, but I have no idea how this shows up in the text that translators actually look at...

Anyway, looks good to me...
Comment 3 Jiri Klimes 2013-05-30 08:42:53 UTC
(In reply to comment #2)
> > value = _(fields->name_l10n);
> 
> Hmm, any idea how this works for translators?  Obviously it works at runtime,
> but I have no idea how this shows up in the text that translators actually look
> at...
> 

Apparently xgettext is clear enough and doesn't include variables into translatable messages, just literals.

jklimes@gromit ~/work/NetworkManager/po$ make NetworkManager.pot
INTLTOOL_EXTRACT="/usr/bin/intltool-extract" XGETTEXT="/usr/bin/xgettext" srcdir=. /usr/bin/intltool-update --gettext-package NetworkManager --pot
Comment 4 Jiri Klimes 2013-05-31 07:54:02 UTC
Pushed to master:
66098fa cli: trivial update of NmcOutputField initializers
1d1cfd7 cli: adapt the code for the new flags and printing facilities
7fe4345 cli: print_required_fields() - fix non-ASCII strings alignment in multiline
e687078 cli: enhance printing to align tabular output properly and not to waste space