From ff88ce44c355b95f620a118b480796f9ebff9524 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Thu, 4 Nov 2021 18:14:17 +0100 Subject: [PATCH] Make wrap to actually wrap, not just check. (#1765) --- CONTRIBUTING.rst | 29 ++++++++++------------------- Makefile | 9 +++++---- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 9115ec0b..2e53aad4 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -141,30 +141,21 @@ Ou lancez simplement Poedit puis « Fichier » → « Ouvrir ». Traduction ~~~~~~~~~~ -Vous pouvez dès à présent commencer à traduire le fichier en respectant les `conventions`_ du projet. -Pour vous aider à ne pas faire de fautes d'orthographe, vous pouvez vérifier que tous les mots utilisés sont -bien dans le dictionnaire (ça ne vérifie pas la grammaire, pour cela utilisez `padpo (beta)`_). En cas -de doute, un `glossaire`_ répertorie déjà les traductions retenues pour certains termes techniques ou faux amis -en anglais. - -.. code-block:: bash - - make spell - - -Vous pouvez aussi réindenter les fichiers avec : - -.. code-block:: bash - - make wrap - - -Et pour faire les deux à la fois, lancez : +Vous pouvez dès à présent commencer à traduire le fichier en +respectant les `conventions`_ du projet. Pour vous y aider, la commande : .. code-block:: bash make verifs +vérifie la longueur des lignes et l'orthographe (mais pas la +grammaire, pour cela utilisez `padpo (beta)`_). En cas de doute, un +`glossaire`_ répertorie déjà les traductions retenues pour certains +termes techniques ou faux amis en anglais. + +Si ``make verifs`` trouve des problèmes de longueurs de ligne, +vérifiez votre configuration ``poedit`` (Édition → Préférences → +Avancé → Passer à la ligne à 79) ou utilisez ``make wrap``. Une fois la traduction finie, il faut compiler la documentation, c'est-à-dire générer les fichiers HTML affichés par le site, pour les relire. Si la commande précédente s'est exécutée sans erreur, la diff --git a/Makefile b/Makefile index 7a5ad9e1..af2ae671 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ # - make # Automatically build an HTML local version # - make todo # To list remaining tasks and show current progression # - make verifs # To check for correctness: wrapping, spelling -# - make wrap # To check for wrapping +# - make wrap # To rewrap modified files # - make spell # To check for spelling # - make clean # To remove build artifacts # - make fuzzy # To find fuzzy strings @@ -106,8 +106,8 @@ todo: ensure_prerequisites .PHONY: wrap wrap: ensure_prerequisites - @echo "Verify wrapping" - powrap --check --quiet *.po **/*.po + @echo "Re wrapping modified files" + powrap -m SRCS = $(shell git diff --name-only $(BRANCH) | grep '.po$$') # foo/bar.po => $(POSPELL_TMP_DIR)/foo/bar.po.out @@ -126,7 +126,8 @@ fuzzy: ensure_prerequisites potodo -f --exclude venv .venv $(EXCLUDED) .PHONY: verifs -verifs: wrap spell +verifs: spell + powrap --check --quiet *.po */*.po .PHONY: clean clean: