Skip to content

Use po files #19

Description

@JulienPalard

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.

Activity

  1. humitos commented on Apr 22, 2017

    @humitos
    Member

    @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,

  2. JulienPalard commented on Apr 23, 2017

    @JulienPalard
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions