checkout: don't confuse ref and object flags
[git/jnareb-git.git] / git-gui / po / glossary / txt-to-pot.sh
blob49bf7c5365130ec290948ee8abba28d757774381
1 #!/bin/sh
2 # This is a very, _very_, simple script to convert a tab-separated
3 # .txt file into a .pot/.po.
4 # Its not clever but it took me 2 minutes to write :)
5 # Michael Twomey <michael.twomey@ireland.sun.com>
6 # 23 March 2001
7 # with slight GnuCash modifications by Christian Stimming <stimming@tuhh.de>
8 # 19 Aug 2001, 23 Jul 2007
10 #check args
11 if [ $# -eq 0 ]
12 then
13 cat <<!
14 Usage: `basename $0` git-gui-glossary.txt > git-gui-glossary.pot
16 exit 1;
19 GLOSSARY_CSV="$1";
21 if [ ! -f "$GLOSSARY_CSV" ]
22 then
23 echo "Can't find $GLOSSARY_CSV.";
24 exit 1;
27 cat <<!
28 # SOME DESCRIPTIVE TITLE.
29 # Copyright (C) YEAR Free Software Foundation, Inc.
30 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
32 #, fuzzy
33 msgid ""
34 msgstr ""
35 "Project-Id-Version: PACKAGE VERSION\n"
36 "POT-Creation-Date: `date +'%Y-%m-%d %H:%M%z'`\n"
37 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
38 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
39 "Language-Team: LANGUAGE <LL@li.org>\n"
40 "MIME-Version: 1.0\n"
41 "Content-Type: text/plain; charset=CHARSET\n"
42 "Content-Transfer-Encoding: ENCODING\n"
46 #Yes this is the most simple awk script you've ever seen :)
47 awk -F'\t' '{if ($2 != "") print "#. "$2; print "msgid "$1; print "msgstr \"\"\n"}' \
48 $GLOSSARY_CSV