Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/locales/README.md
diff options
context:
space:
mode:
authorDaniel <blackrabbit256@gmail.com>2022-02-05 10:27:29 +1100
committerGitHub <noreply@github.com>2022-02-05 00:27:29 +0100
commitf6d133804b7fdfab5a00d95a1985c3e220935ac1 (patch)
tree7eeeedf57b2d8068ce8f382ebbe830af77f58df0 /archinstall/locales/README.md
parent68c2988358426e8d0074479cef539ddadc2a31e6 (diff)
Provide nationalization (#893)
* Nationalization * Add _ as builtins to flake8 * Removing conflict hash tag Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com> Co-authored-by: Anton Hvornum <anton@hvornum.se>
Diffstat (limited to 'archinstall/locales/README.md')
-rw-r--r--archinstall/locales/README.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/archinstall/locales/README.md b/archinstall/locales/README.md
new file mode 100644
index 00000000..a2c65f79
--- /dev/null
+++ b/archinstall/locales/README.md
@@ -0,0 +1,33 @@
+# Nationalization
+
+Archinstall supports multiple languages, which depend on translations coming from the community :)
+
+New languages can be added simply by creating a new folder with the proper language abbrevation (see list `languages.json` if unsure).
+Run the following command to create a new template for a language
+```
+ mkdir -p <abbr>/LC_MESSAGES/ && touch <abbr>/LC_MESSAGES/base.po
+```
+
+After that run the script `./locales_generator.sh` it will automatically populate the new `base.po` file with the strings that
+need to be translated into the new language.
+For example the `base.po` might contain something like the following now
+```
+#: lib/user_interaction.py:82
+msgid "Do you really want to abort?"
+msgstr ""
+```
+
+The `msgid` is the identifier of the string in the code as well as the default text to be displayed, meaning that if no
+translation is provided for a language then this is the text that is going to be shown.
+
+To provide a translation for the language, simply write the translation in the `msgstr` part
+
+```
+#: lib/user_interaction.py:82
+msgid "Do you really want to abort?"
+msgstr "Wollen sie wirklich abbrechen?"
+```
+
+After that run the script once more `./locales_generator.sh` and it will auto-generate the `base.mo` file with the included translations.
+After that you're all ready to go and enjoy Archinstall in the new language :)
+