From 44eea3bd8e9021ebbdf1d3371c72a0bb1c1ac3aa Mon Sep 17 00:00:00 2001 From: John Livingston Date: Mon, 13 Feb 2023 18:26:25 +0100 Subject: [PATCH] Documentation: how to add a language to the doc. --- .../content/contributing/document/_index.en.md | 10 ++++++++++ .../content/contributing/document/_index.fr.md | 12 ++++++++++++ 2 files changed, 22 insertions(+) diff --git a/support/documentation/content/contributing/document/_index.en.md b/support/documentation/content/contributing/document/_index.en.md index 6ab42044..0e1b07fe 100644 --- a/support/documentation/content/contributing/document/_index.en.md +++ b/support/documentation/content/contributing/document/_index.en.md @@ -34,6 +34,16 @@ Please note that a missing translation file will not appear in the menus of the For this, there is a script `doc-generate-missing-translations.sh` in the root of the repository. When you add a new file, you just have to create the english version, then run this script. It will create all missing translations, putting a sample message inviting the user to read the english version. +## Add a new language + +In the `support/documentation/config.toml` file, please copy and modify the `[Languages.fr]` section. + +Then, run the `doc-generate-missing-translations.sh` script. +It will create all the missing files. + +Then you can translate them one by one. +If the translations are not complete, it does not matter, the generated files will display a message suggesting to change the language. + ## Preview To preview your modifications, just run: diff --git a/support/documentation/content/contributing/document/_index.fr.md b/support/documentation/content/contributing/document/_index.fr.md index b1d19991..51152989 100644 --- a/support/documentation/content/contributing/document/_index.fr.md +++ b/support/documentation/content/contributing/document/_index.fr.md @@ -45,6 +45,18 @@ anglaise, puis de lancer ce script. Il va créer toutes les traductions manquantes, on y mettant un message type invitant l'utilisateur⋅rice à lire la version anglaise. +## Ajout d'une nouvelle langue + +Dans le fichier `support/documentation/config.toml`, inspirez vous de la +section `[Languages.fr]` pour déclarer la nouvelle langue. + +Ensuite, lancez le script `doc-generate-missing-translations.sh` à la racine +du dépot. Celui-ci crééra tous les fichiers manquants pour la nouvelle langue. + +Il ne vous reste plus qu'à les traduire. +Si les traductions ne sont pas complètes, ce n'est pas grave, les fichiers +générés afficherons un message proposant de changer de langue. + ## Prévisualiser Pour prévisualiser vos modification, il suffit de lancer: