We want to start the 'Programming In D 'in Chinese, do you have any good suggestions?
Ali Çehreli via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jun 10 08:04:52 PDT 2016
On 06/10/2016 07:41 AM, Seb wrote:
> On Friday, 10 June 2016 at 14:26:31 UTC, FrankLike wrote:
>> Hi,everyone:
>> The 'Programming In D' is a good book for new D coders,we want to
>> start it in Chinese, do you have any good suggestions?
>>
>> Thank you.
>
> If you want you can also start to translate the DLang Tour
> (tour.dlang.org).
> It already has multi-lingual support, and we will start translating it
> soon - we just wait until the major wave of improvements is in.
>
> https://github.com/stonemaster/dlang-tour/issues/132
Agreed! I think that project has immediate impact and I think smaller in
scope.
> If you want to translate the 'Programming in D', you should ping Ali
> directly for help. You can find his contact details here:
> http://ddili.org/ders/d.en/
Right. For convenience, here are some information to the translators:
The following is a modified version of what I had written for a German
translation (which did not happened). The information assumes that the
translation remains as a subdirectory of the ddili project. Otherwise,
the translator can simply translate files one by one to a target
location. Anyway, here is the information:
First, I would have to create the directory structure for the Chinese
translation.
You would have to clone the repo after that:
https://bitbucket.org/acehreli/ddili
If you clone that repository and 'make' everything, there should be the
following files generated:
src/ders/d.cn/编程在D.print.pdf
src/ders/d.cn/编程在D.pdf
public_html_test/ders/d.cn/*
(Or we can leave the file names in Latin characters as
Programming_in_D.print.pdf, etc.)
Chapter files end with .d and the solutions for a chapter are in the
file that ends with .cozum.d (e.g. hello_world.d and hello_world.cozum.d).
As described in the top-level README, you have to have Prince XML
installed as well as a recent dmd compiler. (I think I've neglected to
write there that Linux is a requirement as well.)
Also, you need to add a new ChineseAlphabet class to alphabet.d and
associate it with the "chinese" language in that file. Temporarily, it
uses EnglishAlphabet.
To make the editing process easier, you should only make the 'test'
target and open the relevant chapter on your local browser. For example,
open the following file:
public_html_test/ders/d.cn/hello_world.html
Of course, feel free to rename the chapter files to Chinese ones.
This is what I constantly do when editing a chapter:
1) Open the file in my browser
2) Edit the chapter in most amazing editor
3) Alt-Tab to switch to the browser
4) F5 to update the page
I recommend against building the pdf versions frequently because that
takes a lot of time.
Please contact me at acehreli at yahoo.com to start the process and to see
how it goes. Would you be open to having one or more technical editors
review the chapters as you post a pull request? That would improve the
quality.
Ali
More information about the Digitalmars-d
mailing list