[中文文档]Translation of bottle doc into simplified Chinese

61 views
Skip to first unread message

詹青朋

unread,
Oct 12, 2012, 10:35:27 AM10/12/12
to bott...@googlegroups.com
Hi, I have translated the lastest bottle doc into Chinese. Hoping for your feedbacks :D

大家好,我完成了bottle 0.11文档的中文翻译,现在项目在github上,欢迎反馈。

Project in github:
bottle-zh-cn.pdf

Zoom.Quiet

unread,
Oct 13, 2012, 1:17:13 AM10/13/12
to bott...@googlegroups.com, Python.cn@google
2012/10/12 詹青朋 <scau....@gmail.com>:

> Hi, I have translated the lastest bottle doc into Chinese. Hoping for your
> feedbacks :D
>
> 大家好,我完成了bottle 0.11文档的中文翻译,现在项目在github上,欢迎反馈。
>

great job!

> --
> You are member of the "bottlepy" group at google groups.
> See http://groups.google.de/group/bottlepy for mailing list options.
> See http://bottlepy.org/ for news and documentation.

--
人生苦短, Pythonic! 冗余不做,日子甭过!备份不做,十恶不赦!
俺: http://about.me/zoom.quiet
文字协议: http://creativecommons.org/licenses/by-sa/2.5/cn/

Marcel Hellkamp

unread,
Nov 3, 2012, 6:37:53 PM11/3/12
to bott...@googlegroups.com
Am 12.10.2012 16:35, schrieb 詹锟斤拷锟斤拷:
> Hi, I have translated the lastest bottle doc into Chinese. Hoping for your
> feedbacks :D

Wow, that looks like a lot of work! Thanks for your efforts, I am sure
this helps a lot of people.

The newer versions of sphinx (our documentation system) support
internationalization via gettext and *.po files. There are lots of tools
to help translators and the *.po file format is a lot easier to maintain
than a full git fork. For example, it is possible to merge new sentences
into existing translation files.

I know it is much to ask for, but if you would volunteer to maintain the
Chinese translation, we could offer an official translation on
bottlepy.org/cn

Tell me what you think.

詹青朋

unread,
Nov 5, 2012, 10:59:05 AM11/5/12
to bott...@googlegroups.com
It's my pleasure to maintain this translation. I will do it!

I'm likely to use "make gettext" to get the *.po files and translate again. And I have enough time to finish this.

But I don't know how to merge new sentences into existing translation files. It seems that "make gettext" generates untranslated *.po files. How can I trace the changes of original doc. 

Any good idea will be appreciated. Surely it is not a good idea to maintain a fork of bottle.

2012/11/4 Marcel Hellkamp <ma...@gsites.de>

Marcel Hellkamp

unread,
Nov 7, 2012, 4:43:10 AM11/7/12
to bott...@googlegroups.com
On 11/05/2012 04:59 PM, 詹青朋 wrote:
> It's my pleasure to maintain this translation. I will do it!
>
> I'm likely to use "make gettext" to get the *.po files and translate
> again. And I have enough time to finish this.
>
> But I don't know how to merge new sentences into existing translation
> files. It seems that "make gettext" generates untranslated *.po files.
> How can I trace the changes of original doc.
>
> Any good idea will be appreciated. Surely it is not a good idea to
> maintain a fork of bottle.
>

I pushed some changes to the repository that automates some steps. Look
into the docs/_locale/ directory.

The docs/_locale/update.sh script creates new *.po files for all
configured languages. If the *.po file already exists, it merges new
sentences from the docs into the existing *.po file. Look into the
script if you want to learn how that works.

The script should print errors if something goes wrong. Don't forget to
add the *.po files to the repository when you are done.

Take your time. I'll prepare the bottlepy.org server for multi-language
support and we can publish as soon as we have some decent coverage.

If you need anything or have an idea how to improve the workflow, let me
know.

詹青朋

unread,
Nov 8, 2012, 8:41:59 AM11/8/12
to bott...@googlegroups.com
Cool~ update.sh works as I expect.

When the original sentence are changed, it will add "fuzzy" to my
translated sentence. I think that is enough for me.

Can you add *.mo to .gitignore? That will make things easier.

2012/11/7, Marcel Hellkamp <ma...@gsites.de>:

詹青朋

unread,
Nov 9, 2012, 6:37:34 AM11/9/12
to bott...@googlegroups.com
Thanks to poedit. I have translated all *.po file in docs/_locale/cn !

Then I set language to "cn" in conf.py, try to run "make latex". I got
some output like this

>>> loading translations [cn]... locale not available

But it could still generate Bottle.tex with Chinese characters. After
adding CJK package and font settings to Bottle.tex, I could use
xelatex to generate a pdf file with lots of "Hyper reference
undefined" warnings.

All this works are done under a branch named "cn-doc".

2012/11/8, 詹青朋 <scau....@gmail.com>:

Marcel Hellkamp

unread,
Nov 9, 2012, 8:07:08 AM11/9/12
to bott...@googlegroups.com
Am 09.11.2012 12:37, schrieb 詹青朋:
> Thanks to poedit. I have translated all *.po file in docs/_locale/cn !

Wow, you are fast :)

> Then I set language to "cn" in conf.py, try to run "make latex". I got
> some output like this
>
>>>> loading translations [cn]... locale not available

It works for me ('de'). Did you run update.sh again to generate the *.mo
files?

> All this works are done under a branch named "cn-doc".

Youdid not publish your branch yet :) Try "git push cn-doc origin"

詹青朋

unread,
Nov 9, 2012, 9:39:57 AM11/9/12
to bott...@googlegroups.com
I know what problem it is now. Language code for Simplified Chinese is
zh_CN, not cn.

Now I replace "cn" with "zh_CN" in update.sh.

Since it's impossible to merge "bottle-doc-zh-cn", I forked bottle
again, located at https://github.com/myzhan/bottle , made your merger
a fast-forward :)

Files that I touched

docs/_locale/update.sh
docs/_locale/zh_CN/*.po

2012/11/9, Marcel Hellkamp <ma...@gsites.de>:
Reply all
Reply to author
Forward
0 new messages