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

Use po files #19

Open
JulienPalard opened this issue Dec 11, 2016 · 2 comments
Open

Use po files #19

JulienPalard opened this issue Dec 11, 2016 · 2 comments

Comments

@JulienPalard
Copy link

Hi, I'm Julien, the french translator of Python.

I'm working on python/docsbuild-scripts#8 to build each translations of the python documentation, we currently have japanese, french, and chinese.

We would be able to build your documentation too if you expose po files in your repository. If you want to do it, consider "gettext_compact=0" (used by fr, ja, and zh-tw) and maybe join the common transifex project: transifex.com/python-doc/.

You can still use any hierarchy you want, there's still no guidelines about it:

  • fr use a directory per python version
  • ja use a repository per python version
  • zh use a branch per python version

Docsbuild script is compatible with this three possibilities.

@humitos
Copy link
Member

humitos commented Apr 22, 2017

@JulienPalard hi! I'm one of the maintainers of this translation and we try to keep it always updated. We have online the 3.6 version of the official tutorial, which is the latest one.

We don't translate all the Python documentation, only the tutorial.

I would like to expose the po files so you can build this tutorial also, but I will need some help on the process. Please, let me know where I can read more about this or if you have time to chat/talk.

Thanks,

@JulienPalard
Copy link
Author

Hi,

You can read more about our current work here: https://www.python.org/dev/peps/pep-0545/.

The typical process we use to translate the documentation is, in broad lines:

  • Clone cpython
  • Use sphinx-build to extract pot files from rst: sphinx-build -Q -b gettext -D gettext_compact=0 Doc pot/
  • Work with tools like poedit to translate the po files
  • Use msgfmt to compole po files to mo files
  • We then use the cpython Docs/Makefile to build the doc in our language with: make SPHINXOPTS='-D locale_dirs=../mo -D language=fr -D gettext_compact=0' autobuild-html

This process is shared by all translations but each of use automate this with our own tools as we still not shared this, for french translation we use a Makefile.

In this process, as we all work with po files, we're versionning them on github allowing one to use any po editor to modify them and do a pull request.

We're also synchronizing our po files with transifex, allowing one to translate without the burden of learning git/poedit/github.

Are you using po files too, internally or are your translating rst docs? html docs?

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

No branches or pull requests

2 participants