Commit 68535bc7b531637dd5e55b52abe03860fbe4e3e3
1 parent
93bb928f
Shell script to regenerate the PO template file.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5296 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
38 additions
and
0 deletions
bin/genpo.sh
0 → 100755
| 1 | +#!/bin/sh | ||
| 2 | +# | ||
| 3 | +# Copyright (c) 1999 Neil Blakey-Milner | ||
| 4 | +# All rights reserved. | ||
| 5 | +# | ||
| 6 | +# Redistribution and use in source and binary forms, with or without | ||
| 7 | +# modification, are permitted provided that the following conditions | ||
| 8 | +# are met: | ||
| 9 | +# 1. Redistributions of source code must retain the above copyright | ||
| 10 | +# notice, this list of conditions and the following disclaimer. | ||
| 11 | +# 2. Redistributions in binary form must reproduce the above copyright | ||
| 12 | +# notice, this list of conditions and the following disclaimer in the | ||
| 13 | +# documentation and/or other materials provided with the distribution. | ||
| 14 | +# | ||
| 15 | +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | ||
| 16 | +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 17 | +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 18 | +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 19 | +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 20 | +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 21 | +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 22 | +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 23 | +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 24 | +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 25 | +# SUCH DAMAGE. | ||
| 26 | +# | ||
| 27 | + | ||
| 28 | +DIR=`dirname $0` | ||
| 29 | +cd $DIR | ||
| 30 | +cd .. | ||
| 31 | +pwd | ||
| 32 | + | ||
| 33 | +rm -f i18n/templates.c | ||
| 34 | +find resources -name "*.js" | sort | python ./bin/jsi18n.py > templates/ktcore/javascript_i18n.smarty | ||
| 35 | +php bin/smarty_to_gettext.php . > i18n/templates.c | ||
| 36 | +find . -type f -name "*.php" -o -name "*.inc" | sort | xgettext --no-wrap -d knowledgeTree -L PHP -s -f - --keyword=_kt -o i18n/knowledgeTree.po | ||
| 37 | +echo i18n/templates.c i18n/permissions.c | xargs -n 1 | sort | xgettext --no-wrap -d knowledgeTree -j -s -f - -o i18n/knowledgeTree.po | ||
| 38 | + |