Author Topic: Chinese New Year Gift  (Read 11393 times)

cs_jacky

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • http://
Chinese New Year Gift
« on: February 09, 2005, 08:33:41 pm »
Hi,

A gift for Chinese... This is a gtk im module for Chinese input method. This module allows Chinese input in GTK programs (such as gaim) only. It is better than none, right?

After installed the ipk (attached), run tim-config to setup you the environment. It will create ~/.wenju, ~/.gtk-2.0, and ~/.gtk-2.0/gtk-immodules. You should be able to select the input mehtod in text input fields with right click -> Input Method.

For some reason, the input method menu was taken out in Mozilla, firefox, and thunderbird. To preload your input method, set the environment variable "GTK_IM_MODULE" to your input method. For example, preload ChangJi input method in firefox, you can run it with
Code: [Select]
GTK_IM_MODULE=cj.tim firefox
By default, firefox will switch to ChangJi and you can use CTRL-Space to switch between your input method and English.

Of cause, you can set the variable in /etc/profile or even change the firefox shell in /usr/bin.

Enjoy... Happy Chinese New Year

EDIT: The IPK was uploaded to unstable feed.
« Last Edit: February 15, 2005, 06:11:17 am by cs_jacky »

badog

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Chinese New Year Gift
« Reply #1 on: February 10, 2005, 01:14:57 am »
太good
!!
only CJ,no PY?
« Last Edit: February 10, 2005, 07:45:07 am by badog »

badog

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Chinese New Year Gift
« Reply #2 on: February 10, 2005, 10:13:55 am »
tim-config is not work goodly. it display : cannot load ..../im-ja.os:libgconf-2.so canot open shared object file:no such file or dir...
 cd /usr/lib/.../
there is not libgconf-2.so!
« Last Edit: February 10, 2005, 10:46:39 am by badog »

cs_jacky

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • http://
Chinese New Year Gift
« Reply #3 on: February 10, 2005, 07:10:11 pm »
Quote
tim-config is not work goodly. it display : cannot load ..../im-ja.os:libgconf-2.so canot open shared object file:no such file or dir...
 cd /usr/lib/.../
there is not libgconf-2.so!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=66441\"][{POST_SNAPBACK}][/a][/div]

What is the output of the command "gtk-query-immodules-2.0"?

Yes, there is a PinYin input method. Set GTK_IM_MODULE to "pinyin". There are some more. Check their names in /usr/share/wenju
« Last Edit: February 10, 2005, 07:13:17 pm by cs_jacky »

badog

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Chinese New Year Gift
« Reply #4 on: February 10, 2005, 09:45:18 pm »
i am sorry ,all. i have to type message in chinese for cs_jacky.

你好。杰克先生:
十分感谢你的对华人的贡献。
然后,我不知道如何使用你的输入法。
我能够很好的运行gtk-query-immodules-2.0.它出现一大堆的信息,但没有报错的信息。
但运行tim-config就出现缺少libgconf.so的错误。事实上,我们的机器中也没有这样的库文件。
另外我运行过:GTK_IM_MODULE=cj/pinyin/wubi...firefox/abiword.指定的应用程序会出现,但是没有出现输入法选项。右点击也不知道点击哪里。请不吝指教。
我哪里出错了呢?

cs_jacky

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • http://
Chinese New Year Gift
« Reply #5 on: February 10, 2005, 10:46:56 pm »
Quote
i am sorry ,all. i have to type message in chinese for cs_jacky.

你好。杰克先生:
十分感谢你的对华人的贡献。
然后,我不知道如何使用你的输入法。
我能够很好的运行gtk-query-immodules-2.0.它出现一大堆的信息,但没有报错的信息。
但运行tim-config就出现缺少libgconf.so的错误。事实上,我们的机器中也没有这样的库文件。
另外我运行过:GTK_IM_MODULE=cj/pinyin/wubi...firefox/abiword.指定的应用程序会出现,但是没有出现输入法选项。右点击也不知道点击哪里。请不吝指教。
我哪里出错了呢?
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

tim-config is just a shell script (under /usr/bin). You can see what it does if you know shell programming. Actually, it created 2 directories and 1 file under your home directory.

I don't see any possible cause of giving error message you mentioned if you can run gtk-query-immodules-2.0. If tim-config cannot run, try do it manually.
Code: [Select]
cd
mkdir .wenju
mkdir .gtk-2.0
gtk-query-immodules-2.0 > .gtk-2.0/gtk.immodules

For the problem found in Abiword, it is a well know problem. Preedit is not shown and the words you typed will appear only after you press enter key.

I found that im-ja (a Japanese GTK im module) reported the same problem. [a href=\"http://im-ja.sourceforge.net/im-ja-doc.html]http://im-ja.sourceforge.net/im-ja-doc.html[/url]

Finally, I would like to clarify that wenju is not written by me. I just compile it and put it in Zaurus user group. The glory should go to the authors and thanks for their contributions.

badog

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Chinese New Year Gift
« Reply #6 on: February 11, 2005, 08:05:06 am »
i can not call input method~~
where is input method in abiword or firefox?

cs_jacky

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • http://
Chinese New Year Gift
« Reply #7 on: February 11, 2005, 08:44:42 am »
Quote
i can not call input method~~
where is input method in abiword or firefox?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=66597\"][{POST_SNAPBACK}][/a][/div]

To run firefox, try this command
Code: [Select]
GTK_IM_MODULE=cj.tim firefoxThe default input method should be cj. Shift-space to switch between Chinese and English input.

To use input method in abiword, try right click->Input Methods-><your input method>.

BTW, you can try to use it in gaim first to confirm it was installed properly.
« Last Edit: February 11, 2005, 08:46:58 am by cs_jacky »

badog

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Chinese New Year Gift
« Reply #8 on: February 11, 2005, 09:04:13 am »
i don't find "input methods" in apps

run tim-config
cannot load module /usr/lib/gtk-2.0/2.4.0/immodules/im-ja.so: libanthydic.so.0:
cannot open shared object file: no such file or directory
 /usr/lib/gtk-2.0/2.4.0/immodules/im-ja.so does not export GTK+IM module API:  libanthydic.so.0: cannot open shared object file: no such file or directory

"not export GTK+IM module API"?!

i run rc9.
i install it /   or  /mnt/card~~
« Last Edit: February 11, 2005, 11:47:12 am by badog »

cs_jacky

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • http://
Chinese New Year Gift
« Reply #9 on: February 11, 2005, 10:47:47 am »
Quote
i don't find "input methods" in apps
[div align=\"right\"][a href=\"index.php?act=findpost&pid=66609\"][{POST_SNAPBACK}][/a][/div]

Right click on the text input field and you will find it. Check it carefully. There is no "input method" menu in firefox and that is why you need to run firefox in the way I told you. That is all that I can help.

badog

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Chinese New Year Gift
« Reply #10 on: February 11, 2005, 11:59:38 am »
in fact :
A
i can find the menu include "input methods"  at abiword. but have:
default
Amharic(EZ+)
...
thai
...
X input method
i select one method of all,it can't input chinese(press enter)

B
i run firefox as your told. i right click text input field ,display:
undo
cut
copy
paste
delete
select all
clear search history

no input method~~

cs_jacky

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • http://
Chinese New Year Gift
« Reply #11 on: February 11, 2005, 09:41:14 pm »
Quote
in fact :
A
i can find the menu include "input methods"  at abiword. but have:
default
Amharic(EZ+)
...
thai
...
X input method
i select one method of all,it can't input chinese(press enter)

B
i run firefox as your told. i right click text input field ,display:
undo
cut
copy
paste
delete
select all
clear search history

no input method~~
[div align=\"right\"][a href=\"index.php?act=findpost&pid=66639\"][{POST_SNAPBACK}][/a][/div]

ok, the gtk im module not installed properly. Run the following command and it should work
Code: [Select]
gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules

badog

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Chinese New Year Gift
« Reply #12 on: February 12, 2005, 02:32:22 am »
thank you.
i reinstalled pdaxrom/rc9.1,and re-format sd.reinstalled im.
the im work~~.
thank you,again

samxiao

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://
Chinese New Year Gift
« Reply #13 on: February 12, 2005, 11:11:48 pm »
finally

well done
Zaurus C1000 (formerly SL5500 and C700)
Cacko developer ROM 1.23 beta + Debian Sarge + X/Qt
1GB Transcend 80x SD (ext2) / 512MB Lexar SD (ext2) / 256MB SanDisk CF(vfat)
Netgear MA701 WiFi CF
Ambicom GPS-CF
Pocketop IR keyboard (has positioning problem with C1000)
Brando LCD screen protector

Apple PowerBook 12" G4 Rev. C + Mac OS X 10.4.x (Tiger)

radon88

  • Newbie
  • *
  • Posts: 14
    • View Profile
Chinese New Year Gift
« Reply #14 on: February 13, 2005, 06:04:37 am »
Hi guys.

I'm a korean who want to know i18n capability in pdaxrom.

Is xterm display chinese characters correctly?

Do you guys use another xterm-compliants to see chinses characters?

Or xterm with some parameter or hack?

Cheers.