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

Update translation info in README #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
// Specify file types to spell check.
"cSpell.enabledLanguageIds": [
"python",
"plaintext"
"plaintext",
"restructuredtext"
],

// Enable / Disable the spell checker.
Expand All @@ -41,6 +42,15 @@
// Set the delay before spell checking the document. Default is 50.
"cSpell.spellCheckDelayMs": 50,
"cSpell.words": [
"dirhtml",
"eamodio",
"gettext",
"IATI",
"python3-venv",
"scrollbars",
"SPHINXOPTS"
],
"cSpell.enableFiletypes": [
"restructuredtext"
]
}
44 changes: 39 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ IATI Validator Docs

Deployed to https://docs.validator.iatistandard.org/en/latest/

Docs should build automatically upon pull request.
Docs build automatically upon pull request.

Features of the docs
--------------------
Expand Down Expand Up @@ -42,7 +42,7 @@ Assuming a unix based system:
make dirhtml


Built docs are in `docs/_build/dirhtml`.
Built docs are in ``docs/_build/dirhtml``


Viewing the docs:
Expand All @@ -54,9 +54,21 @@ Viewing the docs:

Then go to http://localhost:8000/ in a browser.


Translations
------------

The translation workflow is:

* Extract strings into English-language .pot files
* Send the files for translation
* When translated .po files are received, check them in to the repo and rebuild the docs

On ReadTheDocs, there is a separate project for each language, each based on this repo. The projects for non-English languages are configured, on the English project, as translations.

Extract strings
^^^^^^^^^^^^^^^

Install requirements as above.

Extract English source strings:
Expand All @@ -67,13 +79,35 @@ Extract English source strings:
make gettext
# .pot files are in _build/locale

Then put the translated files in `docs/locale/fr/LC_MESSAGES/`.

Build a translated docs site:


Send files for translation
^^^^^^^^^^^^^^^^^^^^^^^^^^

Via email

Check translated files into the repo
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Put the files in ``docs/locale/fr/LC_MESSAGES/`` (substituting fr for the appropriate language code as required)


Build
^^^^^

Build a translated docs site locally:

.. code-block:: bash

cd docs
make -e SPHINXOPTS="-D language='fr'" dirhtml

Built docs are in `docs/_build/dirhtml`.

(substituting fr for the appropriate language code as required)

Built docs are in ``docs/_build/dirhtml``.

Build remotely:

All projects will build on a change to the repo, so a PR to the repo will trigger all languages to build.