Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit 442b616

Browse files
committed
Add guide on how to prepare translations
1 parent e73a6fe commit 442b616

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/CONTRIBUTING.rst

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,4 +241,28 @@ to the master doc (toctree): **src/index.txt**.
241241
How to translate
242242
================
243243

244-
.. todo
244+
There is a target defined in Makefile to build and/or update translations
245+
called ``locales``. To gather newly added or updated strings and prepare
246+
portable object files, do:
247+
248+
.. code-block:: shell
249+
250+
make locales
251+
252+
This will create/update po files in *src/_locales* directory. Navigate to
253+
the file and perform translations.
254+
255+
Original strings are marked as ``msgid``, and the translated versions are
256+
marked as ``msgstr``.
257+
258+
Using software like `poedit`_ can make the translation process more efficient.
259+
260+
In case, you don't have cmake/make installed on your computer, you may use
261+
the full commands to gather the text, and prepare po file:
262+
263+
.. code-block:: shell
264+
265+
sphinx-build -b gettext src _build/gettext
266+
sphinx-intl -c src/conf.py update -p _build/gettext
267+
268+
Actually, ``make locales`` is the shortcut to the same set of commands.

0 commit comments

Comments
 (0)