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 628960 - Column width unchanged after shortening translation string
Column width unchanged after shortening translation string
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Scheduled Transactions
git-master
Other Linux
: Normal normal
: ---
Assigned To: Josh Sled
Josh Sled
Depends on:
Blocks:
 
 
Reported: 2010-09-07 14:16 UTC by Radzisław Galler
Modified: 2018-06-29 22:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The patch fixing the problem with column width (4.06 KB, patch)
2010-09-09 14:35 UTC, Radzisław Galler
committed Details | Review

Description Radzisław Galler 2010-09-07 14:16:35 UTC
This is quite spectacular example that happened in scheduled translations editor. The msgid was:
"Single-character short column-title form of 'Enabled'|E"

And a previous translator translated everything (i.e. including the part before '|'). Now after translation there is only one letter, but the width of the column left equal to the previous translation string length. 

The setting is permanent. There is no way to change the width with mouse (this is the only column that cannot be changed). Neither reloading GnuCash nor creating new file help.
Comment 1 Geert Janssens 2010-09-08 13:44:41 UTC
The column width of that field is stored in gconf. You could use the following command to fix it:
gconftool-2 -t int -s /apps/gnucash/window/pages/sx_list/enabled_width 17
(Width 17 is what it is set to for my system, where the column has a single 'E' as title).
Comment 2 Radzisław Galler 2010-09-09 07:50:02 UTC
Wow! That's a user friendly approach! So for the next release I propose to put your response into "tip of the day". It's necessary because every user of Polish translation will have to do it. Otherwise they will have strangely wide column until the end of live of their current OS installation (which can be quite long in case of Linux, but much shorter in case of Windows). And please provide Windows-friendly description.

So AFAIU once the setting of the column width entered gconf there is no way to correct it from GnuCash?
Comment 3 Geert Janssens 2010-09-09 13:51:41 UTC
> Wow! That's a user friendly approach! So for the next release I propose to put
> your response into "tip of the day". It's necessary because every user of
> Polish translation will have to do it.
Well,... no. Only every user of the Polish translation that happens to use the scheduled transaction editor with the bad po file. That's quite a few less than every user of the Polish translation :)

Just to be sure, I even checked the po file for 2.2.9. The string is not translated in that revision, so the issue is limited to the development series.

In the development series you can expect things to go wrong in unexpected ways. The fix may in this case require actions *outside* of GnuCash, such as I proposed.

But I agree I may have closed the bug too soon.

I believe the first thing that should happen is fix the translation. You mention you fixed it, but it is still not so in the svn source tree. It is up to the current translation maintainer to send a corrected po file for inclusion. If that's not you, you can contact the current maintainer and point him/her to this bug.

Secondly, I have looked in the code. It seems for checkbox style columns the column width
* is always fixed
* is calculated from the column title the very first time the column is created the
* saved in gconf at that moment and never recalculated again.

I do agree this is bad practice. If a user choose to increase the system's font size or even use a different default font, this fixed, saved width may already cause issues.
Comment 4 Radzisław Galler 2010-09-09 14:35:55 UTC
Created attachment 169862 [details] [review]
The patch fixing the problem with column width
Comment 5 Geert Janssens 2010-09-09 15:48:36 UTC
Comment on attachment 169862 [details] [review]
The patch fixing the problem with column width

Wow, that's fast !

I was still querying the devel list for the proper way to fix this.

I like your patch (except for a small whitespace glitch) and will apply it if the consensus is to keep unchangeable column widths.
Comment 6 Radzisław Galler 2010-09-10 06:19:01 UTC
Either way a part of this patch adds missing functionality of the function gnc_tree_view_column_properties stated in its documentation comment.
Comment 7 Geert Janssens 2010-09-11 10:38:06 UTC
Comment on attachment 169862 [details] [review]
The patch fixing the problem with column width

In r19569. Thank you.
Comment 8 John Ralls 2018-06-29 22:44:19 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=628960. Please update any external references or bookmarks.