Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/git-gui/po/glossary/txt-to-pot.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / git-gui / po / glossary / txt-to-pot.sh` 48 lines ยท 1203 bytes Raw Blame History 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 6 # 23 March 2001 7 # with slight GnuCash modifications by Christian Stimming 8 # 19 Aug 2001, 23 Jul 2007 9 10 #check args 11 if [ $# -eq 0 ] 12 then 13 cat < git-gui-glossary.pot 15 ! 16 exit 1; 17 fi 18 19 GLOSSARY_CSV="$1"; 20 21 if [ ! -f "$GLOSSARY_CSV" ] 22 then 23 echo "Can't find $GLOSSARY_CSV."; 24 exit 1; 25 fi 26 27 cat <, YEAR. 31 # 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 \n" 39 "Language-Team: LANGUAGE \n" 40 "MIME-Version: 1.0\n" 41 "Content-Type: text/plain; charset=CHARSET\n" 42 "Content-Transfer-Encoding: ENCODING\n" 43 44 ! 45 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