Hi,
As far as i understood, after i have updated the “messages.po” translation file, I should run the following command:
“bash 1-update-pot-files.sh playsms-1.2.1/contrib/tools/language”
However, when i run this command i am getting the following errors (missing files):
touch: cannot touch ‘language/messages.pot’: No such file or directory touch: cannot touch ‘language/index.html’: No such file or directory xgettext: error while opening “language/messages.pot” for reading: No such file or directory xgettext: error while opening “language/messages.pot” for reading: No such file or directory find: ‘…/lib/’: No such file or directory find: ‘…/inc/’: No such file or directory find: ‘themes/common/’: No such file or directory
Please advise me how can i overcome this issue and update my translation file because in my system those files does not exists in the above paths (i do see those file in several other paths but do not know what is the write path and where shell i update it).
Odd, i could not find “1-update-pot-files.sh” in my “playsms” folder but i do see it in “playsms-1.2.1” folder.
Can i run it from “playsms-1.2.1” folder and direct it to “playsms” folder ?
By the way, if it helps, my “1-update-pot-files.sh” file looks like this:
#!/bin/bash
PLAYSMS=$1
if [ -z “$PLAYSMS” ]; then
echo "Usage: $0 "
exit 1
fi
CWD=$(pwd)
##Common strings
cd $PLAYSMS/plugin
touch language/messages.pot
touch language/index.html
xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot …/init.php
xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot …/index.php ##Themes,plugins and tools strings
find …/lib/ -iname “.php" -exec xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot {} ;cd $PLAYSMS/web/plugin
find …/inc/ -iname ".php” -exec xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot {} ;find . -type d -name “language” | grep -v “grep” | sed -e “s//[^/]$//" > /tmp/.lang_folders
find themes/common/ -iname ".php” -exec xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot {} ;for i in cat /tmp/.lang_folders ; do mkdir -p “$i/language” ; done
for i in cat /tmp/.lang_folders ; do rm -f “$i/language/messages.pot” ; done
for i in cat /tmp/.lang_folders ; do touch “$i/language/messages.pot” ; done
for i in cat /tmp/.lang_folders ; do
find $i -iname ‘*.php’ -exec xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o “$i/language/messages.pot” {} ; ;
touch "$i/language/index.html"
done
rm /tmp/.lang_folders
cd $CWD