ILIAS icon indicating copy to clipboard operation
ILIAS copied to clipboard

#32512: Added a sorting checkup and added the check to the workflow

Open lauraherzog opened this issue 2 years ago • 4 comments

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.

lauraherzog avatar May 24 '22 09:05 lauraherzog

@mjansenDatabay Would you do the honour and look into this?

klees avatar May 24 '22 11:05 klees

@klees I'll try to provide feedback this week.

-- UPDATE --

DONE :-)

mjansenDatabay avatar May 24 '22 12:05 mjansenDatabay

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.

matthiaskunkel avatar Jun 27 '22 12:06 matthiaskunkel

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

mjansenDatabay avatar Jun 29 '22 13:06 mjansenDatabay

This uses php code for the sorting now. I hope this will be stable...

klees avatar Aug 19 '22 13:08 klees