-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Transifex integration and the generation of .po files in the locale directory. #1303
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
Comments
Many Thanks! I'll take a look now. I also found come code in RTD in fabfile.py in section def i18n_docs(): that runs 'sphinx-intl build' so it looks like at least part of this should be running as part of a build. |
I'll answer my own question here just in case the information helps someone else. Q. How are the .po files in locale/en/LC_MESSAGES/ generated? I'm able to build successfully but these files do not seem to appear. A. There is a Makefile that if copied into a documentation project when you run the 'sphinx-quickstart' command. See here for more info: http://docs.readthedocs.org/en/latest/getting_started.html If you 'make gettext' using that makefile it will generate a _build directory with the .pot files in it. The _build directory does not need to be retained so you can add it to your .gitignore file After building, run 'sphinx-intl update -l en' to create the po files in locale/en/LC_MESSAGES/ I also create a symbolic link called pot in the locale directory that points to ../_build/locale . Note that you then have to populate your own .tx/config file. I've written a python script that I'll put on github after I've fully debugged that generates a config that creates entries based on the .pot files in the locale/pot directory (that links into _build/locale . Q. Do the sections in the config file ([readthedocs-docs.api] for example) relate to a directory or are they related to a project within Transifex? A. Before the dot is your TRANSIFEX project name. After the dot is the file name without an extension. Q. Does the config file need to be managed manually or is this done as part of the build? A. Regrettably the config file needs to be built (and updated) by hand... Which is a pain if you have an ever growing number of files. The script really helped me and I'll make sure to get it up for all to use. |
Would be great to document this in our official docs! If you send over a On Mon, Jun 1, 2015 at 2:05 PM, Christopher Caruk [email protected]
Eric Holscher |
It would be my pleasure to do that. I've not done much with GitHub so it will take me a couple days to get to it but I'll do when I set up the script project. Am I correct in assuming that I fork, add the content and then send you the pull request? Chris On 1 Jun 2015, at 22:38, Eric Holscher <[email protected]mailto:[email protected]> wrote: Would be great to document this in our official docs! If you send over a On Mon, Jun 1, 2015 at 2:05 PM, Christopher Caruk <[email protected]mailto:[email protected]>
Eric Holscher Reply to this email directly or view it on GitHubhttps://github.com//issues/1303#issuecomment-107718559. |
Hello,
I have been trying to get Transifex integration working all week. After much trial and error and a review of other projects I've discovered that the tx (transifex-client) command relies on .po files that are stored in ../user_builds/checkouts/latest/docs//,lang>/LC_MESSAGES/ directory and indexed in a .tx/config file. The indexed entries in the config file are delineated by square brackets ([a.name]).
The .tx directory and config file are created using 'tx init' (in my case in the docs folder of my project). 'tx init' also creates a .transifexrc file in the project user's home directory and stores Transifex account info.
It looks like the initial 'tx push -s' command can be run from pretty much anywhere and will search for the .tx directory and config files.
So far so good... the questions are...
Thanks for the help
Chris
+1 for the 'Simplify Translation Workflow #810' request. I think that integrating translations could definitely be streamlined.
The text was updated successfully, but these errors were encountered: