tomb

the crypto undertaker
git clone git://parazyd.org/tomb.git
Log | Files | Refs | README | LICENSE

commit 7cbd03d3708093fa0ca28020cf2a80c7f75e47d1
parent 671350585ea3535835be04b3867aca60d30471f3
Author: Jaromil <jaromil@dyne.org>
Date:   Tue, 28 May 2013 11:59:11 +0200

Translatable text strings generation

set out of the main tomb script, into extras

Diffstat:
Aextras/po/Makefile | 4++++
Aextras/po/generate_translatable_strings.sh | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 60 insertions(+), 0 deletions(-)

diff --git a/extras/po/Makefile b/extras/po/Makefile @@ -0,0 +1,4 @@ +all: + @rm -f tomb.pot + @./generate_translatable_strings.sh > tomb.pot + @echo "Strings generated in tomb.pot" diff --git a/extras/po/generate_translatable_strings.sh b/extras/po/generate_translatable_strings.sh @@ -0,0 +1,56 @@ +#!/bin/zsh + +cat <<EOF +# Tomb - The Crypto Undertaker. +# Copyright (C) 2007-2013 Dyne.org Foundation +# Denis Roio <jaromil@dyne.org>, 2013. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tomb $VERSION\n" +"PO-Revision-Date: `date`\n" +"Last-Translator: Denis Roio <jaromil@dyne.org>\n" +"Language-Team: Tomb developers <crypto@lists.dyne.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +# +#: commandline help +# + +msgid "" +EOF + + ../../tomb help | awk ' +{ print "\"" $0 "\"" }' + cat <<EOF +msgstr "" + +# +# tomb internal messages +# + +EOF + + cat ../../tomb | awk ' +/(_verbose|xxx) ".*"$/ { sub( /^(_verbose|xxx)/ , ""); + print "#: _verbose"; shift; print "msgid " substr($0, index($0,$2)); print "msgstr \"\"\n" } + +/(_success|yes) ".*"$/ { sub( /^(_success|yes)/ , ""); + print "#: _success"; print "msgid " substr($0, index($0,$2)); print "msgstr \"\"\n" } + +/(_warning|no) ".*"$/ { sub( /^(_warning|no)/ , ""); + print "#: _warning"; print "msgid " substr($0, index($0,$2)); print "msgstr \"\"\n" } + +/(_failure|die) ".*"$/ { sub( /^(_failure|die)/ , ""); + print "#: _failure"; print "msgid " substr($0, index($0,$2)); print "msgstr \"\"\n" } + +/(_message|say) ".*"$/ { sub( /^(_message|say)/ , ""); + print "#: _message"; print "msgid " substr($0, index($0,$2)); print "msgstr \"\"\n" } + +/(_message -n|act) ".*"$/ { sub( /^(_message -n|act)/ , ""); + print "#: _message -n"; print "msgid " substr($0, index($0,$2)); print "msgstr \"\"\n" } +' +