update copyright year and team list
[claws.git] / tools / update-po
blobc79b526860754886fe1d6f4868a116f3e8e0b2f2
1 #!/bin/sh
3 # * Copyright © 2002 Wilbert Berendsen <wilbert@oswf.org>
4 # *
5 # * This file is free software; you can redistribute it and/or modify it
6 # * under the terms of the GNU General Public License as published by
7 # * the Free Software Foundation; either version 3 of the License, or
8 # * (at your option) any later version.
9 # *
10 # * This program is distributed in the hope that it will be useful, but
11 # * WITHOUT ANY WARRANTY; without even the implied warranty of
12 # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # * General Public License for more details.
14 # *
15 # * You should have received a copy of the GNU General Public License
16 # * along with this program; if not, write to the Free Software
17 # * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 # *
20 # update-po -- for Claws Mail
21 # by Wilbert Berendsen
22 # This script updates the .po files named on the command line.
23 # Run this script from within the po/ directory!
25 if [ "$1" -a -f "$1" ] ; then
29 # Make a messages.pot file containing all the msgid's from
30 # the source
32 make -C .. -f - <<EOF
34 sources = \$(shell cat po/POTFILES.in)
35 po/messages.pot: \$(sources) po/POTFILES.in
36 xgettext --keyword=N_ --keyword=_ --keyword=Q_ --file=po/POTFILES.in \
37 --output=po/messages.pot
38 EOF
41 # Update all the xx.po files named on the commandline.
43 for po in $@ ; do
45 # Save xx.po in xx.po.old
47 cp $po $po.old
48 echo "Updating $po..."
49 msgmerge $po.old messages.pot > $po
50 done
52 else
54 echo
55 echo "Usage:"
56 echo
57 echo " ./`basename $0` lang.po lang2.po ..."
58 echo
59 echo "to update one or more <yourlang>.po files from the sourcecode files"
60 echo "named in POTFILES.in. The old .po file is save in a .po.old file."
61 echo
62 echo "When you e.g. want to update fr.po, run ./`basename $0` fr.po, then"
63 echo "edit fr.po to update your translation."
64 echo