Files
opensourcepos/tools/ci4-upgrade-language-interpolation/run_sed_scripts.sh
BudsieBuds e83c23cf0c Improve code style and PSR-12 compliance (#4204)
* Improve code style and PSR-12 compliance
- refactored code formatting to adhere to PSR-12 guidelines
- standardized coding conventions across the codebase
- added missing framework files and reverted markup changes
- reformatted arrays for enhanced readability
- updated language files for consistent styling and clarity
- minor miscellaneous improvements
2025-05-02 19:37:06 +02:00

22 lines
894 B
Bash
Executable File

#!/usr/bin/bash
#This Linux bash script is part of OSPOS CI4 Upgrade
#Developed and tested on Fedora 38
echo -n "Counting ..."
BASEURL="../../"
DONE=`find ${BASEURL}app/Language -name "*.php" -exec grep -oP "{[0-9]}" {} \; | wc -l`
TODO=`find ${BASEURL}app/Language -name "*.php" -exec grep -oP "%[0-9]|٪[0-9]|[0-9]٪|[0-9]%|% [0-9]|٪ [0-9]|{[a-z].*?}" {} \; | wc -l`
echo " $DONE placeholders are converted and $TODO yet to do"
FILES="sed_*.sh"
for f in $FILES
do
echo -n "Processing $f file..."
bash "$f" "$BASEURL"
echo "completed."
done
echo -n "Counting ..."
COMPLETE=`find ${BASEURL}app/Language -name "*.php" -exec grep -oP "{[0-9]}" {} \; | wc -l`
MISSED=`find ${BASEURL}app/Language -name "*.php" -exec grep -oP "%[0-9]|٪[0-9]|[0-9]٪|[0-9]%|% [0-9]|٪ [0-9]|{[a-z].*?}" {} \; | wc -l`
echo " $COMPLETE placeholders are converted and $MISSED were missed"
echo "All done"