meta: Add translation ordering pre commit check

This commit is contained in:
Linnea Gräf
2024-11-13 14:13:53 +01:00
parent d267913e20
commit 1af4a0b826
2 changed files with 18 additions and 4 deletions

View File

@@ -3,7 +3,14 @@
# SPDX-License-Identifier: CC0-1.0
repos:
- repo: https://github.com/fsfe/reuse-tool
rev: v3.1.0a1
hooks:
- id: reuse
- repo: https://github.com/fsfe/reuse-tool
rev: v3.1.0a1
hooks:
- id: reuse
- repo: local
hooks:
- id: ordered_translations
name: "Check translation ordering"
language: script
files: translations/.*
entry: ./check-translation-ordering.sh

7
check-translation-ordering.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2023 Linnea Gräf <nea@nea.moe>
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -euo pipefail
jq -S --tab < translations/en_us.json | diff translations/en_us.json -