Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language: add hook to sort entries in language files #3575

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CI/sort_langfile_entries.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

echo "sorting langfile entries"
HEADER_LENGTH=16
LANGFILES=$(git diff --cached --name-only --diff-filter=ACM -- '*.lang')
for FILE in $LANGFILES
do
(head -n $HEADER_LENGTH ${FILE} && tail ${FILE} -n +$((HEADER_LENGTH + 1)) | sort ) > ${FILE}.tmp
mv ${FILE}.tmp ${FILE}
done
exit 0
14 changes: 14 additions & 0 deletions captainhook.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,20 @@
]
}
]
},
{
"action": "CI/sort_langfile_entries.sh",
"options": [],
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\Any",
"args": [
[
"*.lang"
]
]
}
]
}
]
},
Expand Down
30,108 changes: 15,054 additions & 15,054 deletions lang/ilias_ar.lang

Large diffs are not rendered by default.

31,442 changes: 15,721 additions & 15,721 deletions lang/ilias_bg.lang

Large diffs are not rendered by default.

2,674 changes: 1,337 additions & 1,337 deletions lang/ilias_cs.lang

Large diffs are not rendered by default.

31,770 changes: 15,885 additions & 15,885 deletions lang/ilias_da.lang

Large diffs are not rendered by default.

33,374 changes: 16,687 additions & 16,687 deletions lang/ilias_de.lang

Large diffs are not rendered by default.

30,988 changes: 15,494 additions & 15,494 deletions lang/ilias_el.lang

Large diffs are not rendered by default.

33,334 changes: 16,667 additions & 16,667 deletions lang/ilias_en.lang

Large diffs are not rendered by default.

2,918 changes: 1,459 additions & 1,459 deletions lang/ilias_es.lang

Large diffs are not rendered by default.

17,628 changes: 8,814 additions & 8,814 deletions lang/ilias_et.lang

Large diffs are not rendered by default.

30,506 changes: 15,253 additions & 15,253 deletions lang/ilias_fa.lang

Large diffs are not rendered by default.

2,918 changes: 1,459 additions & 1,459 deletions lang/ilias_fr.lang

Large diffs are not rendered by default.

4,252 changes: 2,126 additions & 2,126 deletions lang/ilias_hr.lang

Large diffs are not rendered by default.

32,720 changes: 16,360 additions & 16,360 deletions lang/ilias_hu.lang

Large diffs are not rendered by default.

2,918 changes: 1,459 additions & 1,459 deletions lang/ilias_it.lang

Large diffs are not rendered by default.

17,540 changes: 8,770 additions & 8,770 deletions lang/ilias_ja.lang

Large diffs are not rendered by default.

30,108 changes: 15,054 additions & 15,054 deletions lang/ilias_ka.lang

Large diffs are not rendered by default.

31,180 changes: 15,590 additions & 15,590 deletions lang/ilias_lt.lang

Large diffs are not rendered by default.

28,536 changes: 14,268 additions & 14,268 deletions lang/ilias_nl.lang

Large diffs are not rendered by default.

2,918 changes: 1,459 additions & 1,459 deletions lang/ilias_pl.lang

Large diffs are not rendered by default.

2,674 changes: 1,337 additions & 1,337 deletions lang/ilias_pt.lang

Large diffs are not rendered by default.

31,178 changes: 15,589 additions & 15,589 deletions lang/ilias_ro.lang

Large diffs are not rendered by default.

18,678 changes: 9,339 additions & 9,339 deletions lang/ilias_ru.lang

Large diffs are not rendered by default.

30,578 changes: 15,289 additions & 15,289 deletions lang/ilias_sk.lang

Large diffs are not rendered by default.

31,186 changes: 15,593 additions & 15,593 deletions lang/ilias_sq.lang

Large diffs are not rendered by default.

31,186 changes: 15,593 additions & 15,593 deletions lang/ilias_sr.lang

Large diffs are not rendered by default.

30,108 changes: 15,054 additions & 15,054 deletions lang/ilias_tr.lang

Large diffs are not rendered by default.

Loading