File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,17 @@ echo "[ * ] Remove old hestiacp.pot and generate new one"
1212rm hestiacp.pot
1313echo " " > hestiacp.pot
1414find ../.. \( -name ' *.php' -o -name ' *.html' -o -name ' *.sh' \) | xgettext --output=hestiacp.pot --language=PHP --join-existing -f -
15+ OLDIFS=$IFS
16+ IFS=$' \n '
17+ for string in $( awk -F' SYSTEM=' ' /data=".+ SYSTEM=[^"]/ {print $2}' $HESTIA /bin/v-list-sys-services | cut -d\' -f2) ; do
18+ if [ -z " $( grep " $string " hestiacp.pot) " ]; then
19+ echo -e " \n#: ../../bin/v-list-sys-services:" $( grep -n " $string " $HESTIA /bin/v-list-sys-services | cut -d: -f1) " \nmsgid \" $string \" \nmsgstr \"\" " >> hestiacp.pot
20+ fi
21+ done
22+ IFS=$OLDIFS
1523
1624echo " [ * ] Scan language folders"
17- languages=$( ls -d $HESTIA /web/locale/* / | awk -F' /' ' {print $(NF-1)}' ) ;
25+ languages=$( ls -d $HESTIA /web/locale/* / | awk -F' /' ' {print $(NF-1)}' ) ;
1826echo " [ * ] Update hestiacp.pot with new files"
1927for lang in $languages ; do
2028 if [ -e " $HESTIA /web/locale/$lang /LC_MESSAGES/hestiacp.po" ]; then
You can’t perform that action at this time.
0 commit comments