GNOME Bugzilla – Bug 60350
Can't edit Japanese text with gtranslator
Last modified: 2009-08-15 18:40:50 UTC
gtranslator shows Japanese translations in message trees correctly, but editor widget shows them incorrectly. This is the show-stopping bug, and gtranslator cannot be useful for Japanese (and probably other multi-byte languages) though its rich features.
Created attachment 5580 [details] LANG=ja_JP.eucJP running with gtranslator/po/ja.po
Did you already switch to your own Japanese fonts for the editor widget? On Prefs => Colors & fonts you've got to check "Apply own fonts" and then select your desired Japanese fonts. This should work rightly (at least I've got one person who can work with Chinese and Japanese this way, so it should work).
No, I changed all fonts for Japanese from dialog but doesn't work. I replace to all gdk_fontset_load() to take Japanese fonts for its arguments but doesn't work. It seems to use GtkText widget, but use style changing. I'm using RHL 7.2, gtk+-1.2.10.
I've found the bug. gtranslator_utils_invert_dot() in utils_gui.c replaces space to 0xb7, so GTK+ is confused. 0xb7 is preserved in Japanese encoding. This affects all multibyte environment Japanese, Korean, Chinese (Traditional, Simplified). This feature should not be default. And, 0xb7 is not a visible charactor on all editor in our environment, so you should write _("\xb7") as ascii strings instead of 0xb7 directly.
Hm, therefore this character is i18n'ified by the translators -- don't forget that the "·" character is a translated message (in your case it'd be the ja.po) -- I guess, the translator didn't translate it rightly, right? The comment for the translatable message explains the situation good IMHO. If the char would be translated differently, would it then work for you? Test & feedback ,-)
It is translatable, but do not include non-ascii charactor in msgid. 0xb7 behaves as backspace and not editable with other Japanese charactors in many editors, vi, nvi, emacs(Japanese EUC-JP edit mode) and even in gtranslator. Those are in utils_gui.c, syntax.c, view.c. I tried the _("\xb7") but new gtranslator.pot convert it to non-ascii 0xb7 so it takes no effect.
Yes, Ynakai is right. This is an old bug for me. I am so sorry that I have not inform you. Due to I have bypass this bug by not selecting the "use special character to indicate free space" in Prefs. With this 0xb7, the old po files cannot even msgmerge with the new pot file. It will stop at the msgid 0xb7 when merge the two files in my big5 system Everytime, I need to change the 0xb7 to other character in the new pot file before I can merge the new pot file with the old po file. So, Please try to accept the suggestion from Ynakai Joe Man
Due to this special character 0xb7, you can see that all the gtranslator.po under ja, zh_cn and zh_TW in the gnome extra status report http://developer.gnome.org/projects/gtp/status/extra/ are not right. All the po files are stopped at the msgid 0xb7. Joe Man
I corrected the direct '·' to be '\xb7' -- this doesn't fix everxthing I guess. But at least some of Yukihiro's suggestions go in..
Does it work with current CVS now?
This bug should be closed. It's against a very old CVS snapshot, and the screenshot looks like it was Gtk1-based anyway. Let it be re-opened if it is still a problem with more recent versions.
Closed due to Ross' request - shall not be currently active anyway with GNOME 2.x