[Aptitude-devel] gtk aptitude and gettext and empty strings
kurem at upcase.inf.upol.cz
Sat Jun 20 15:31:52 UTC 2009
I was testing the GTK version of aptitude this weekend and have
noticed a small bug regarding localization.
If you have a list of packages displayed and you hover your mouse over
the status column, a tooltip pops up describing the current status and
a selected status.
When the "Selected status" description is empty, instead of an empty
string the header of the corresponding .po file is displayed.
If you have a look to the src/gtk/pkgview.cc, where the view is
constructed, the function selected_package_state_columns() on line 118
returns entity_state_info that has its description initiated to the
When this empty string is handled further down line 172, gettext looks
up the corresponding string in .po file and returns the localized
string. Unfortunately, the empty string matches the dummy header
string in a .po file:
"Report-Msgid-Bugs-To: aptitude at packages.debian.org\n"
For obvious reasons this does not happen if you run aptitude with no
locale like, i.e. LANG=C aptitude.
I would suggest to introduce new entity_state_info called
no_action_columns and use some other description than empty string
(ehm, space is enough). Proof of code attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1393 bytes
Desc: not available
More information about the Aptitude-devel