Files
openproject/script
David F 29de1eaeb3 feat(i18n): add locale key sorter and pre-commit hook
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>
2026-06-11 10:41:45 +02:00
..
2026-05-13 10:16:26 +02:00
2026-02-25 11:05:33 +01:00