]>
git.p6c8.net - jirafeau_mojo42.git/blob - update-po.sh
b8d36e80848432ea00c33d074ee8ff25d4b2b127
3 # Jyraphe, your web file repository
4 # Copyright (C) 2008 Julien "axolotl" BERNARD <axolotl@magieeternelle.org>
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as
8 # published by the Free Software Foundation, either version 3 of the
9 # License, or (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU Affero General Public License for more details.
16 # You should have received a copy of the GNU Affero General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
23 POTFILES
=`ls ${WD}/pub/*.php ${WD}/pub/lib/*.php ${WD}/pub/lib/template/*.php`
24 POT
="${WD}/l10n/${PACKAGE}.pot"
26 xgettext
--language=PHP
--output "${WD}/${PACKAGE}.po" ${POTFILES}
28 if cmp -s "${WD}/${PACKAGE}.po" "${POT}"
30 rm -f "${WD}/${PACKAGE}.po
"
32 mv -f "${WD}/${PACKAGE}.po" "${WD}/l10n/${PACKAGE}.pot
"
35 for PO in `ls ${WD}/l10n/po/*.po`
37 LANG=`basename "${PO}" | sed 's/.po//'`
38 if msgmerge "${PO}" "${POT}" > "${WD}/${LANG}.pot
"
40 mv -f "${WD}/${LANG}.pot" "${PO}"
41 echo "msgmerge of
${LANG} succeeded
"
43 echo "msgmerge of
${LANG} failed
"
44 rm -f "${WD}/${LANG}.pot
"
patrick-canterino.de