CI: check-style + nettoyage TRADUCTIONS.txt#2545
Merged
Merged
Conversation
Checks changed XML files in PRs for: - Direct address forms (vous/votre/vos) → warnings - French grammar errors (etc..., comme par exemple, si il) → errors - Incorrect terminology (librairie, chiffrage, encryption) → warnings Inspired by doc-ja's textlint+prh approach but simpler: runs directly on XML sources, no PhD render needed. Only errors (grammar/spelling) fail the CI. Style warnings appear as PR annotations without blocking.
This reverts commit 7c1d523.
- 174x "Notez que" → "Il est à noter que" - 50x "depuis PHP X" → "à partir de PHP X" - 50x "votre" → le/la/du - 15x "si il" → "s'il" - 14x "Vous pouvez" → "Il est possible de" - 14x "encryption" (faux positifs entity refs exclus) - 12x "assurez-vous" → "il faut s'assurer" - 12x "Vous devez" → "Il faut" - 11x "vos" → les/des - 9x "comme par exemple" → "par exemple" - 6x "Vous devriez" → "Il est recommandé de" - 2x "optionel" → "optionnel" - 2x "reportez-vous" → "se reporter" Toutes les règles passent désormais en erreur dans la CI.
- integrate.yaml → build.yml (extension + nom cohérent)
- check-style-fr.yml → check-style.yml ("-fr" redondant)
- Aligner les noms de workflow et job
Le script parse TRADUCTIONS.txt au démarrage et génère les règles de vérification automatiquement. Plus aucune règle en dur.
Le script CI lit les lignes INTERDIT de TRADUCTIONS.txt pour générer les règles de vérification. Plus aucune règle en dur dans le script. Corrige les 27 violations restantes (Depuis PHP → À partir de PHP).
cb33087 to
0b5163b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ajout d'un workflow CI qui vérifie les règles de style de TRADUCTIONS.txt sur les fichiers XML modifiés dans chaque PR, et nettoyage de toutes les violations existantes.
Fonctionnement
Le script
.github/scripts/check-style-fr.mjslit dynamiquement les règles depuis TRADUCTIONS.txt. Toute ligne au format :devient automatiquement une règle de CI. Aucune règle n'est codée en dur dans le script.
Règles actuelles (19)
Toutes bloquent la CI :
Vous pouvez/devez/devriez,votre,vos,assurez-vous,reportez-vous,référez-vous,Notez queetc...,comme par exemple,si il,optionel,abrévier,chiffragelibrairie,encryption,decrypterdepuis PHP x.yNettoyage
371 violations existantes corrigées dans ~240 fichiers.
Autres changements
.yaml→.yml, noms cohérents)INTERDIT :parsableInspiré de doc-ja (textlint + prh).