aboutsummaryrefslogtreecommitdiff
path: root/doc/developer/localize.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/developer/localize.rst')
-rw-r--r--doc/developer/localize.rst17
1 files changed, 16 insertions, 1 deletions
diff --git a/doc/developer/localize.rst b/doc/developer/localize.rst
index 91a51eb..d33b22d 100644
--- a/doc/developer/localize.rst
+++ b/doc/developer/localize.rst
@@ -52,6 +52,11 @@ The :file:`justfile` (requires just_) contains a shortcut for this command:
Creating a New Language
-----------------------
+.. note::
+
+ Consider creating a :doc:`Language Pack <language-pack>` instead, that way
+ you can update the translation independently of fietsboek development.
+
If you want to add a translation for a language that does not yet exist, first
generate the ``.po`` file containing the messages using :program:`pybabel`:
@@ -62,7 +67,7 @@ generate the ``.po`` file containing the messages using :program:`pybabel`:
This will create the directory :file:`fietsboek/locale/{language}`.
-Finally, you need to copy the non-gettext messages. This is best done by
+Then, you need to copy the non-gettext messages. This is best done by
copying over the english original texts:
.. code:: bash
@@ -70,6 +75,16 @@ copying over the english original texts:
# Replace nl with the locale that you just generated
cp -r fietsboek/locale/en/html fietsboek/locale/nl/
+Finally, you can adjust the name under which the language is shown by adjusting
+the content of the :file:`DISPLAY_NAME` file in the locale's folder:
+
+.. code:: bash
+
+ echo "Nederlands" > fietsboek/locale/nl/DISPLAY_NAME
+
+Note that this file should be UTF-8 encoded, and you can use country flag
+emojies to add visual representations.
+
Again, there is a shortcut in the :file:`justfile` that does both steps:
.. code:: bash