Monthly Archive for April, 2007

How to add a new language to 770/N800

Adding a new language to 770/N800 is very simple. Once done, you can choose it from the “Device language” list of the “Language & region” applet.

add new languages to device

1. install extra locales, got from garage.maemo.org/projects/locales-extras
2. add the country code to gconf configuration database, e.g.

# gconftool-2 --set /apps/osso/applet/languageregional/available_languages \
    --type=list --list-type=string "[zh_CN]"

an alternative way to do this is using gconf-editor.

of course, the text of UI need to be translated to this new language.

移植StarDict到maemo平台 (1) 准备工作

参考maemo 3.0 Porting GuidePorting existing application to maemo 3.0 一节。

StarDict的源码取自Ubuntu Dapper,版本2.4.5-1.1

1. 由于要使用Hildon UI,所以可以去掉libgnomeui, libbonobo2, liborbit2。查看configure.in后发现可以使用configure的一个选项 –disable-gnome-support。修改configure.in,在加入对hildon-libs 和 libosso的检测,PKG_CHECK_MODULES(STARDICT, [gtk+-2.0 hildon-libs libosso])

2. 原来的help文件不适用于maemo,所以help目录不需要处理。修改Makefile.am,从SUBDIRS列表里删去help,还需要修改configure.in,从AC_OUTPUT列表里删去help及其子目录的Makefile

3. 执行autogen.sh,生成新的configure脚本

4. 修改debian/rules文件中调用configure脚本那一行,加上 –disable-gnome-support

5. 移去debian/control里对 libgnomeui-dev, scrollkeeper, libbonobo2-dev, liborbit2-dev 的依赖,修改Section为user/utils

6. 现在可以用dpkg-buildpackage命令编译了。

7. 为了能够正常显示英语音标等符号,还需要ttf-thryomanes字体。

stardict in maemo

PyGTK里取得一个xpm图标的灰度图

最近用PyMaemo写一个N800上跑的程序时用到的:

  1. self.mote_pixbuf = gtk.gdk.pixbuf_new_from_xpm_data(MOTE_PIXMAP)
  2. self.mote_gray_pixbuf = self.mote_pixbuf.copy()
  3. self.mote_pixbuf.saturate_and_pixelate(self.mote_gray_pixbuf, 0.0, True)

colored

grayed

MaemoCJK Chinese support version 0.3.3 released!

See garage.maemo.org/forum/forum.php?forum_id=951

Repository:
N800: maemocjk.garage.maemo.org/ bora user
770: maemocjk.garage.maemo.org/ mistral user

The scim-tables and scim-chewing is in progress.

SCIM移植

代码已经提交到MameoCJK项目了,不过还没有正式发布。我设置的源不会再更新了。目前可以使用MaemoCJK的测试源:
N800: http://maemocjk.garage.maemo.org/ bora test
770: http://maemocjk.garage.maemo.org/ mistral test

问题还是很多的,有的时候安装后无法使用拼音输入法,甚至连键盘也不见了。设置程序的界面也很乱。虚拟键盘的UI也不好。对SCIM的结构还不是很了解,真是痛苦啊。

好消息也有,我开始移植五笔等table-based的输入法和繁体中文的chewing输入法了。这些其实都比较容易,只是把从Ubuntu源里拿到的源代码修改changelog、control等文件后,编译成armel的安装包就行了。当然,要想更好的用于770/800,要做的事情很多。

还有一个好消息,MaemoCJK的项目管理人Makoto已经开始写全屏的虚拟键盘了,期待。。。 非常感谢他的贡献。

请大家多关注MaemoCJk项目,提建议和报bug请到项目主页 garage.maemo.org/projects/maemocjk/