nim-lang / Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
https://nim-lang.org
Other
16.63k stars 1.47k forks source link

create a multilingual translation project for Nim language documents #18821

Open VectorWorkshopBaoErJie opened 3 years ago

VectorWorkshopBaoErJie commented 3 years ago

Summary

It is recommended to create a multilingual translation project for NIM language documents.

Description

It is recommended to create a multilingual translation project for NIM language documents. Thus, I am willing to complete the Chinese translation of the document. For example, check out https://weblate.org/, where I've been involved in translating a lot of Godot documents. This has enabled Godot to maintain a good momentum of user growth in China.

VectorWorkshopBaoErJie commented 3 years ago

Given the need to translate into multiple languages, it may be necessary to create a separate library.

ringabout commented 3 years ago

There are two parts of Nim docs:

IMO The second one can be translated first as a start. I would like a switch button to shift languages.

For instance, the Python documentation handles it well

image

ghost commented 3 years ago

If this gets implemented, I can start contributing Russian translations. Also, some things like the tutorial were already translated to Russian by someone else in ~2015, so it's pretty easy to bring them up-to-date

ringabout commented 3 years ago

Hi @qjyqjyqjyqjy

it may be necessary to create a separate library.

Feel free to create a separate library which can be moved into nim-lang org later (if needed).

VectorWorkshopBaoErJie commented 3 years ago

https://github.com/nim-lang/website/tree/master/jekyll This page doesn't seem to have a good workflow to keep updating the translation to add content.

juancarlospaco commented 3 years ago

Would be better to implement it in the docgen somehow, instead of special case it.

FedericoCeratto commented 1 year ago

Related RFC: https://github.com/nim-lang/RFCs/issues/96 Previous PR: https://github.com/nim-lang/Nim/pull/8842

ringabout commented 1 year ago

@FedericoCeratto Hello, is it possible to set up a https://weblate.org/ without nimdoc changes? Since manuals and tutorials are written by rst files.

juancarlospaco commented 1 year ago

Weblate would be great, anyone can translate from browser.

FedericoCeratto commented 1 year ago

@ringabout I proposed using weblate in https://github.com/nim-lang/RFCs/issues/96. Yet, the manual and the library documentation are generated by Nim. At some point nimdoc has to pull in the translation files from weblate to output the HTML doc.

As a side note, having translation support in nimdoc would also enable Nim developers to translate the documentation of their own projects.

ringabout commented 1 year ago

Yeah, I'm in favor of using weblate. In a progressive view, I would like to have a weblate process first. I'm not familiar with its workflow. I would like to see a template so that I can set up a process for some Nim documentation (I tried but failed before).

Or we can maintain a forked nim doc extension to get the work done using the compilerapi, somehow. Now that we have std/importutils which make it easier to use internal procs and data structures. It seems feasible to me. Then we can set up the translation in a separate repo, pulling the Nim source from the main repo daily. @FedericoCeratto I can try to implement https://github.com/nim-lang/Nim/pull/8842 as a tool this weekend if I have some free time.