Debian Codegraph @

bin/update-po.sh

raw symbols SCIP
1 #!/bin/sh
2 # SPDX-FileCopyrightText: 2026 Dr. Tobias Quathamer <[email protected]>
3 #
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 set -eu
7
8 # Generate pot file for program messages
9 xgettext \
10 --files-from=po/POTFILES.in \
11 --output=po/isoquery.pot \
12 --package-name=isoquery \
13 --from-code=UTF-8 \
14 --language=C \
15 --keyword=_ \
16 --keyword=N_ \
17 --copyright-holder="Dr. Tobias Quathamer" \
18 [email protected] \
19 --add-comments
20
21 # Generate pot file for manpage
22 cat man/po4a.cfg.in | \
23 sed -e \
24 "s/@sourcedir@/man/g; s/@builddir@/man/g; s/@lang@/\$lang/g" \
25 > man/po4a.cfg
26 po4a --no-translations man/po4a.cfg
27 rm -f man/po4a.cfg
28 sed -i -e "/^#: /d" man/isoquery-man.pot
29
30 # Update .po files for program messages
31 for i in po/*.po; do
32 msgmerge --previous "$i" po/isoquery.pot > tmp.po && mv tmp.po "$i"
33 done
34
35 # Update .po files for manpage
36 for i in man/*.po; do
37 msgmerge --previous --no-location "$i" man/isoquery-man.pot > tmp.po && mv tmp.po "$i"
38 done