Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to translate the document into Chinese, but i met some troubles. #6840

Closed
hxnan opened this issue Jul 15, 2015 · 16 comments
Closed

I want to translate the document into Chinese, but i met some troubles. #6840

hxnan opened this issue Jul 15, 2015 · 16 comments
Labels

Comments

@hxnan
Copy link

hxnan commented Jul 15, 2015

I read the folder of /doc and the list.js ,the category of api is writed in JSON.
I want to know how the document be built. Do you write html of document directly, Or write text of docment in some software then built the folder of doc/ automatically.

I can write html, but maybe there is a easy way to do this.

@mrdoob
Copy link
Owner

mrdoob commented Jul 15, 2015

Yeah, right now we're writing the html directly. The system didn't take translations into account 😅

We could, maybe implement something like...

<div class="en">Hello</div>
<div class="cn">您好</div>

And filter those at display time?

@tschw
Copy link
Contributor

tschw commented Jul 15, 2015

The <meta charset="utf-8" /> tag must be in <head> of every file (it should already be in there).
Then some unicode-aware editor like Notepad++ using "UTF-8 without BOM" for the encoding should work quite conveniently...

@hxnan
Copy link
Author

hxnan commented Jul 15, 2015

Two languages or more in a html page will confuse the mainttainer in future.
Create a new folder named doc.cn/ in doc/ would be better.

@mrdoob
Copy link
Owner

mrdoob commented Jul 15, 2015

How about duplicating files?

docs/api/cameras/Camera.html
docs/api/cameras/CubeCamera.html
docs/api/cameras/OrthographicCamera.html
docs/api/cameras/PerspectiveCamera.html

Will become:

docs/api/cameras/Camera.html
docs/api/cameras/Camera.cn.html
docs/api/cameras/CubeCamera.html
docs/api/cameras/CubeCamera.cn.html
docs/api/cameras/OrthographicCamera.html
docs/api/cameras/OrthographicCamera.cn.html
docs/api/cameras/PerspectiveCamera.html
docs/api/cameras/PerspectiveCamera.cn.html

But that may be a bit messy... Maybe

docs/api/en/cameras/Camera.html
docs/api/en/cameras/CubeCamera.html
docs/api/en/cameras/OrthographicCamera.html
docs/api/en/cameras/PerspectiveCamera.html

docs/api/cn/cameras/Camera.html
docs/api/cn/cameras/CubeCamera.html
docs/api/cn/cameras/OrthographicCamera.html
docs/api/cn/cameras/PerspectiveCamera.html

@hxnan
Copy link
Author

hxnan commented Jul 15, 2015

I love the last idea . 👍
A simple but useful way.

@tiansijie
Copy link

I would like to help with the translation

@tschw
Copy link
Contributor

tschw commented Jul 16, 2015

The language code for Chinese is zh BTW - CN is the region. The whole locale for China is then called zh_CN.

@hxnan
Copy link
Author

hxnan commented Jul 16, 2015

Well, thank you for pointing out, so the folder should be /docs/api/zh_CN/*

@hxnan
Copy link
Author

hxnan commented Jul 16, 2015

The default document is

docs/api/cameras/PerspectiveCamera.html

and the Chinese could be

docs/api/zh_CN/cameras/PerspectiveCamera.html

The rules is :

docs/api/ ( language type) /cameras/PerspectiveCamera.html

We don't need to modify the doc exits now, just add the folder of doc writed by other language.

How about this?

@tschw
Copy link
Contributor

tschw commented Jul 16, 2015

Well, thank you for pointing out, so the folder should be /docs/api/zn_CN/*

Wouldn't do that for documentation, unless zn_CN (Chinese as written in China) and zn_TW (Chinese as written in Taiwan) are incompatibly different and there is actually someone doing a translation for the Taiwanese dialect. Otherwise can just define the default for the Chinese language and call the folder zn, just like the value of the lang attribute in the HTML should read, which is why I mentioned it ;-). For localizing software, regions play a more important role: The Date/Time notation may differ, for instance.

mrdoob added a commit that referenced this issue Jul 16, 2015
@mrdoob
Copy link
Owner

mrdoob commented Jul 16, 2015

Maybe we can follow wikipedia? They use zh as sub domain. I don't think they support zn_TW?
https://zh.wikipedia.org/wiki/Wikipedia:%E9%A6%96%E9%A1%B5

@WestLangley
Copy link
Collaborator

The language code for Chinese is zh
call the folder zn

Which is correct?

@hxnan
Copy link
Author

hxnan commented Jul 16, 2015

zh is correct @WestLangley ,
Wiki is excellent, but the https://zh.wikipedia.org/ has been polluted by the fuvk g.o.v. these day.

@mrdoob
Copy link
Owner

mrdoob commented Jul 17, 2015

I'm thinking about how the new urls should be. Probably this?

http://threejs.org/docs/en/#Reference/Core/BufferGeometry
http://threejs.org/docs/zh/#Reference/Core/BufferGeometry

@Pansaai
Copy link

Pansaai commented Dec 31, 2017

Hi guys, is this still being worked on ?

@hxnan
Copy link
Author

hxnan commented Jan 1, 2018

I am sorry for this ,I want to do this work when I was a college student and learning the graphics.
But I has got an Operation Engineer Job. So ...close this issue. @Pansaai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants