GNOME Bugzilla – Bug 628960
Column width unchanged after shortening translation string
Last modified: 2018-06-29 22:44:19 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.
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).
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?
> 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.
Created attachment 169862 [details] [review] The patch fixing the problem with column width
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.
Either way a part of this patch adds missing functionality of the function gnc_tree_view_column_properties stated in its documentation comment.
Comment on attachment 169862 [details] [review] The patch fixing the problem with column width In r19569. Thank you.
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.