GNOME Bugzilla – Bug 115457
Middle dot appears in msgstr (and gets saved!)
Last modified: 2009-08-15 18:40:50 UTC
In msgstr, whenever space is typed, middle dot will appear in msgstr in the actual saved file. Conversely, if one intentionally type middle dot into msgstr, then gtranslator will convert it into space when saving. This is quite counter-intuitive.
This bug is really present, set the bits accordingly - I think it has got to with our beloved old and stupid conversion routines between the middle dot and the space on the GUI side of things therefore this is a bug for the Interface component. Maybe with the new buffer system of Gtk+ 2.x one could set the space char easily per se to a middle dot and then get Gtk+ 2.x around handling all that for us easily; would this be possible?! Ross?
How come we need a 'gtranslator_utils_invert_dot' to add/remove the dot? There's possibly a good explanation for this feature, but I can't figure it out myself. I can see why this occurs, as the call that 'undots' currently resides in a block of code that is #ifdef NOT_PORTED. The function itself works fine. If there's a good reason for it, then we need to work out exactly where this call needs to be used (on file loading/saving, or on GUI input/output).
It's needed to indicate the free space to the translator, just a display feature with no background in the parsing etc. code should be only done in the GUI displaying, editing and saving to GtrMsg code. Was just a visual feature as desired by many translators previously. _Sorry, but almost no time therefore just short excerpt of stuff.
No problem. If it was previously desired by many translators, I will try to fix it up.
I just wonder, if we could use different background color to show the msgid and msgstr (including spaces), instead of using middle dot? middle dot is good for showing spaces, but somehow I find it disturbing for my eyes :-)
It'd help if I knew _why_ these people want to be able to display a dot instead of a space. I can appreciate why it would be required in a word processor, or other 'wysiwyg' application to differentiate content and layout. I use this feature in word processors, but I still can't see it's purpose in gtranslator. Can anyone enlighten me?
Is this still present in CVS HEAD? I thought I could reproduce it last week, but now I cannot.
I can't get gtranslator to save with the dots in. Can this be reproduced with CVS HEAD? -- Ross
Well, it seems to be reproducable within gtranslator: you'Ve got the msgstr "(C)·1999·The·Free·Software·Foundation" in normal text view. If you do now enter 2-3 spaces between the The and Free, then the text looks like "(C)·1999·The ·Free·Software·Foundation" and in the saved file "(C) 1999 The··· Free Software Foundation" - hmmm, is this ok? I guess not or? The case with the intentionally inserted middle dots · I get same msgstr as "(C) 1999 The··· Free Software Foundation " Hmm, I would say the problem still persists and there's a problem with the dot inversion functions....
I can see it now. I think it's because when the user hits 'space' in the translated textview, it goes it as a space, despite the fact that the existing spaces are dots. When the 'invert_dots' is called, it inverts the dots to spaces and spaces to dots. The textview should be hijacked so that spaces are input as dots. I probably removed a bit of code (or didn't route a signal properly) that introduced this bug.
Confirmed, this problem still exists, depending on the preference; if the special char option is turned on, then middle dots will be saved into po file. If the option is off, then spaces are saved properly into po file. But... wait. What's the desired behavior for this option? 1. Both msgid and msgstr box shows middle dot 2. Only msgid box shows middle dot Besides, here is what I mean by background highlighting: http://deaddog.org/~maddog/screenshot/gtranslator-background-highlight.png This is just an illustration, I have just added red background tag to the text buffer, nothing more. Notice that extra spaces at the end of msgstr entry is highlighted with red color. Is something like this possible?
showing spaces with dot is useful because it is easy to see if a wrong amount of space are inserted ... especially at the beginning of the string. Sometime the string is indented using spaces and if you have multiple sentences seeing the points works very well detecting the misalinement.
another problem here around is that that I have described in the bug #115851 every time you split a string, an extra space is added. if you have msgstr "" "" "" the resulting string loaded and after saved by gtranslator wil be msgstr " " RIP dog asked me to close the previous bug ... but dunno if is better to leave it open for this one. let me know
*** Bug 115851 has been marked as a duplicate of this bug. ***
OK, patch in CVS that should deal with this. Only basic testing done (it's late), so please test and close this report if it's sorted. -- Ross
It's fixed now and works really like desired - thanks very much2Ross for the nightly action :-)