深度软件的编译系统和国际化

5 views
Skip to first unread message

Aron Xu

unread,
Jan 18, 2012, 5:19:33 AM1/18/12
to deep...@googlegroups.com
1. deepin-scrot 目前是无编译系统状态,以目前的情况看和标准的形式相差还很大。甚至为了安装翻译文件,在
debian/rules 都要加这样的东西:

override_dh_installdirs:
dh_installdirs
for pofile in po/*.po; do \
lang=`basename $$pofile .po`; \
dest="debian/deepin-scrot/usr/share/deepin-scrot/locale/$$lang/LC_MESSAGES";
\
mkdir -p $$dest; \
msgfmt $$pofile -o $$dest/deepin-scrot.mo; \
done

这些工作应该是安装程序完成的,不该把打包的 Makefile 当作脚本用来执行这些工作。

建议重新制作编译系统:http://wiki.python.org/moin/Distutils/Tutorial

2.软件中心和 deepin-scrot 目前的国际化问题也很大,现在采用的国际化方式实在有些过于怪异,比如软件中心里面是用 id
来对照地翻译出英文、简体中文、繁体中文等。实际上应该把修改过的英文原文直接嵌入到代码中,作为其他语言翻译的模板。使用前面所说的
python-distutils 会自动处理字符串解析和翻译合并,不必像现在这样自己写脚本来处理得各种复杂。

--
Regards,
Aron Xu

Zhang Cheng

unread,
Jan 21, 2012, 12:54:59 AM1/21/12
to deep...@googlegroups.com
打包的问题,谢谢指导 :-)

我打包时,并不知道如何优雅的来做这件事。我找过一些包,gwrite的做法我当时没有理解,但是打包时间仓促,所以就临时用了这种方法,在rules中做了。下一次打包时解决这个问题。

2012/1/18 Aron Xu <aronm...@gmail.com>
1. deepin-scrot 目前是无编译系统状态,以目前的情况看和标准的形式相差还很大。甚至为了安装翻译文件,在
debian/rules 都要加这样的东西:

override_dh_installdirs:
       dh_installdirs
       for pofile in po/*.po; do \
           lang=`basename $pofile .po`; \
           dest="debian/deepin-scrot/usr/share/deepin-scrot/locale/$lang/LC_MESSAGES";
\
           mkdir -p $dest; \
           msgfmt $pofile -o $dest/deepin-scrot.mo; \

       done

这些工作应该是安装程序完成的,不该把打包的 Makefile 当作脚本用来执行这些工作。

建议重新制作编译系统:http://wiki.python.org/moin/Distutils/Tutorial



--
Best Regards,
Cheng

Aron Xu

unread,
Jan 21, 2012, 2:17:59 AM1/21/12
to deep...@googlegroups.com
2012/1/21 Zhang Cheng <steph...@googlemail.com>:

> 打包的问题,谢谢指导 :-)
>
> 我打包时,并不知道如何优雅的来做这件事。我找过一些包,gwrite的做法我当时没有理解,但是打包时间仓促,所以就临时用了这种方法,在rules中做了。下一次打包时解决这个问题。
>

这问题不应该在打包的时候解决,而是“上游”部分的问题。


--
Regards,
Aron Xu

Zhang Cheng

unread,
Jan 21, 2012, 2:20:20 AM1/21/12
to deep...@googlegroups.com

I'm some kind of upstream.

(Sent from mobile device)

Aron Xu

unread,
Jan 21, 2012, 3:46:25 AM1/21/12
to deep...@googlegroups.com
2012/1/21 Zhang Cheng <steph...@googlemail.com>:

> I'm some kind of upstream.
>

所以我加了引号,lol

--
Regards,
Aron Xu

Reply all
Reply to author
Forward
0 new messages