mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-12-23 10:38:59 +00:00
Translatable text strings generation
set out of the main tomb script, into extras
This commit is contained in:
parent
671350585e
commit
7cbd03d370
4
extras/po/Makefile
Normal file
4
extras/po/Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
all:
|
||||
@rm -f tomb.pot
|
||||
@./generate_translatable_strings.sh > tomb.pot
|
||||
@echo "Strings generated in tomb.pot"
|
56
extras/po/generate_translatable_strings.sh
Executable file
56
extras/po/generate_translatable_strings.sh
Executable file
@ -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" }
|
||||
'
|
||||
|
Loading…
Reference in New Issue
Block a user