2012-12-18 00:24:44 +01:00
|
|
|
#! /bin/bash
|
|
|
|
|
2012-12-18 15:03:43 +01:00
|
|
|
cd ..
|
2012-12-18 00:24:44 +01:00
|
|
|
|
|
|
|
#generate a new .po file
|
|
|
|
#this will generate a file called messages.po
|
2021-08-16 23:00:01 +02:00
|
|
|
find airtime_mvc -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8
|
|
|
|
find airtime_mvc -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8 -k --keyword=_pro:1 -d pro --force-po
|
2012-12-18 00:24:44 +01:00
|
|
|
|
|
|
|
#merge the new messages from messages.po into each existing .po file
|
|
|
|
#this will generate new .po files
|
2014-11-04 22:57:40 +01:00
|
|
|
find ./airtime_mvc/locale/ -name "airtime.po" -exec msgmerge -N -U --no-wrap "{}" messages.po \;
|
|
|
|
find ./airtime_mvc/locale/ -name "pro.po" -exec msgmerge -N -U --no-wrap "{}" pro.po \;
|
2012-12-18 00:24:44 +01:00
|
|
|
|
|
|
|
#delete the old .po files
|
|
|
|
find ./airtime_mvc/locale/ -name "*.po~" -delete
|
2014-11-04 22:57:40 +01:00
|
|
|
|
|
|
|
#delete the temporary po files we create in the root directory
|
|
|
|
rm ./*.po
|