mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
29de1eaeb3
Add script/i18n/sort_locales.py (ruamel.yaml round-trip) that sorts mapping keys into yamllint key-ordering while preserving comments, quoting, block scalars and the license header. It splits off the document header verbatim, re-anchors own-line comments to the key they precede, normalizes end-of-line comment spacing to >= 2 spaces, sorts by the literal YAML scalar text (so true/false keys match yamllint), and refuses to write unless key-paths and values are unchanged. Wire it into a lefthook pre-commit hook so the yamllint-checked locale files stay sorted; the existing reviewdog yamllint check remains the CI gate. requirements.txt pins only the runtime dependency (ruamel.yaml); pytest is a dev-only tool and is not pinned. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>