ILIAS
ILIAS copied to clipboard
#32512: Added a sorting checkup and added the check to the workflow
The actual script workes fine and like intended.
Regarding https://mantis.ilias.de/view.php?id=32512 I've added a check if the language file needs sorting. If so the commit will be rejected by the pre-commit-hook. The check is enabled by just adding a keyword to the execution of the script: ./CI/sort_langfile_entries.sh check
. If you don't pass the check
argument the script will sort and modify the language files.
@mjansenDatabay Would you do the honour and look into this?
@klees I'll try to provide feedback this week.
-- UPDATE --
DONE :-)
Jour Fixe, 27 JUN 2022 : The current PR does not solve the reported problem (different sorting depending from OS). It will only mark a commit with an error message when the sorting is different than expected. We suggest to use PHP on the local computer for sorting with LOCALE EN to get an identical order of language entries independent from the used operation system.
Hi @alex40724 ,
today I had a chat with @lauraherzog . According to Laura, the actual issue that occured on MacOS
should be fixed with this PR. Laura had to adjust some arguments used in the former version of (head -n $header_length ${file} && tail -n +$((header_length + 1)) ${file} | sort) > ${file}.tmp
, so the current/fixed implementation in this PR should be fine. She doubts that there is a Locale
based problem with the proposed script.
Can you please check whether this is still in issue with your infrastructure and provide a feedback here? If this is indeed still a problem, Laura will implement a PHP script as an alternative.
Best regards, @mjansenDatabay
This uses php code for the sorting now. I hope this will be stable...