mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-03 06:44:27 -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.
14 lines
769 B
Bash
Executable File
14 lines
769 B
Bash
Executable File
#!/usr/bin/bash
|
|
#This Linux bash script is part of OSPOS CI4 Upgrade
|
|
#Developed and tested on Fedora 38
|
|
#Converts CI3 %x parameters into CI4 {x} parameters
|
|
#Multiple parameters must be processed individually to ensure
|
|
#correct handling of parameters in different positions depending
|
|
#upon whether the language is L to R or R to L
|
|
#Revereses changes previously made to files in en-US language.
|
|
|
|
echo -n "fixing en-US..."
|
|
find ${1}app/Language -type f -name Attributes.php -exec sed -i -E -e 's/("definition_error_adding_updating")(.*?)(\{definition_name\})(.*?)/\1\2{0}\4/;' {} \;
|
|
echo -n "fixing others..."
|
|
find ${1}app/Language -type f -name Attributes.php -exec sed -i -E -e 's/("definition_error_adding_updating")(.*?)(%1|٪1|1٪|1%|% 1|٪ 1)(.*)/\1\2{0}\4/;' {} \;
|