Debian Codegraph @

update-po.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 set -x
4
5 # Copyright (C) 2017 by Mike Gabriel <[email protected]>
6 #
7 # This package is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; version 3 of the License.
10 #
11 # This package 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 General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>
18
19 GETTEXT_DOMAIN=$(catscip-shell system . . cat. CMakeLists.txt | grepscip-shell system . . grep. 'set.*(.*GETTEXT_PACKAGE' | sedscip-shell system . . sed. -r -e 's/.*\"([^"]+)\"\)/\1/')
20
21 cpscip-shell system . . cp. po/${GETTEXT_DOMAIN}.pot po/${GETTEXT_DOMAIN}.pot~
22
23 cd po/
24 catscip-shell system . . cat. LINGUAS | while read lingua; do
25 if [scip-shell system . . `[`. ! -e ${lingua}.po ]; then
26 msginitscip-shell system . . msginit. --input=${GETTEXT_DOMAIN}.pot --locale=${lingua} --no-translator --output-file=$lingua.po
27 else
28 intltool-update --gettext-package ${GETTEXT_DOMAIN} $(basenamescip-shell system . . basename. ${lingua})
29 fi
30
31 sedscip-shell system . . sed. -E \
32 -e 's/\.xml\.in\.h:/.xml.in:/g' \
33 -e 's/\.ini\.in\.h:/.ini.in:/g' \
34 -e 's/\.xml\.h:/.xml:/g' \
35 -e 's/\.ini\.h:/.ini:/g' \
36 -e 's@^#: \.\./@#: @g' \
37 -e 's@(:[0-9]+) \.\./@\1 @g' \
38 -i ${lingua}.po
39
40 done
41 cd - 1>/dev/nullscip-shell filesystem . . `/dev/null`.
42
43 mvscip-shell system . . mv. po/${GETTEXT_DOMAIN}.pot~ po/${GETTEXT_DOMAIN}.pot