mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-02 06:14:51 -04:00
* CI4: Bugfix string interpolation language files
These are the language files with all placeholders converted to CI4 numbered style eg {0}.
* CI4: Bugfix string interpolation source code files
These are the controllers and views which call lang() with parameters to be interpolated.
* CI4: Bugfix string interpolation shell scripts
These are the Linux bash scripts which use the sed (stream editor) utility to convert earlier forms of placeholders to CI4 numeric type. A number of typographical errors in the original Language files were corrected by these scripts.
21 lines
893 B
Bash
Executable File
21 lines
893 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"
|