Merge pull request #132 from gdrooid/i18n

Internationalization of all human language in Tomb using gettext
This commit is contained in:
Jaromil 2014-09-16 18:56:45 +02:00
commit c7009e5c1b
9 changed files with 4996 additions and 1854 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ doc/web/public
doc/web/dyne doc/web/dyne
share/gtkrc share/gtkrc
.*.sw? .*.sw?
*.mo

View File

@ -5,11 +5,20 @@ all:
@rm -f tomb.pot @rm -f tomb.pot
@./generate_translatable_strings.sh > tomb.pot @./generate_translatable_strings.sh > tomb.pot
@echo "Strings generated in tomb.pot" @echo "Strings generated in tomb.pot"
@echo "\n WARNING!\n This script makes some mistakes you MUST fix by hand:\n * Reapeated msgids: remove them\n * msgids with \\\": They are most probably broken, look\n for the full strings in ../../tomb\n and replace them."
install: es.mo ru.mo fr.mo
.PHONY: install
install: es.mo ru.mo fr.mo de.mo
@install -Dm644 es.mo ${LOCALEDIR}/es/${TOMBFILE} @install -Dm644 es.mo ${LOCALEDIR}/es/${TOMBFILE}
@install -Dm644 ru.mo ${LOCALEDIR}/ru/${TOMBFILE} @install -Dm644 ru.mo ${LOCALEDIR}/ru/${TOMBFILE}
@install -Dm644 fr.mo ${LOCALEDIR}/fr/${TOMBFILE} @install -Dm644 fr.mo ${LOCALEDIR}/fr/${TOMBFILE}
@install -Dm644 de.mo ${LOCALEDIR}/de/${TOMBFILE}
@echo "Translations installed."
%.mo: %.po %.mo: %.po
msgfmt -o $@ $< msgfmt -o $@ $<
.PHONY: clean
clean:
@rm -f *.mo

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -9,48 +9,56 @@ cat <<EOF
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Tomb $VERSION\n" "Project-Id-Version: Tomb $VERSION\n"
"PO-Revision-Date: `date`\n" "PO-Revision-Date: `LANG=en date`\n"
"Last-Translator: Denis Roio <jaromil@dyne.org>\n" "Last-Translator: Denis Roio <jaromil@dyne.org>\n"
"Language: English\n"
"Language-Team: Tomb developers <crypto@lists.dyne.org>\n" "Language-Team: Tomb developers <crypto@lists.dyne.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#
#: commandline help
#
msgid ""
EOF
../../tomb help | awk '
{ print "\"" $0 "\"" }'
cat <<EOF
msgstr ""
#
# tomb internal messages
#
EOF EOF
cat ../../tomb | awk ' cat ../../tomb | awk '
/(_verbose|xxx) ".*"$/ { sub( /^(_verbose|xxx)/ , ""); /_verbose ".*"/ {
print "#: _verbose"; shift; print "msgid " substr($0, index($0,$2)); print "msgstr \"\"\n" } split($0, arr, "\"");
print "#: _verbose";
print "msgid \"" arr[2] "\"";
print "msgstr \"\"\n" }
/(_success|yes) ".*"$/ { sub( /^(_success|yes)/ , ""); /_success ".*"/ {
print "#: _success"; print "msgid " substr($0, index($0,$2)); print "msgstr \"\"\n" } split($0, arr, "\"");
print "#: _success";
print "msgid \"" arr[2] "\"";
print "msgstr \"\"\n" }
/(_warning|no) ".*"$/ { sub( /^(_warning|no)/ , ""); /_warning ".*"/ {
print "#: _warning"; print "msgid " substr($0, index($0,$2)); print "msgstr \"\"\n" } split($0, arr, "\"");
print "#: _warning";
print "msgid \"" arr[2] "\"";
print "msgstr \"\"\n" }
/(_failure|die) ".*"$/ { sub( /^(_failure|die)/ , ""); /_failure ".*"/ {
print "#: _failure"; print "msgid " substr($0, index($0,$2)); print "msgstr \"\"\n" } split($0, arr, "\"");
print "#: _failure";
print "msgid \"" arr[2] "\"";
print "msgstr \"\"\n" }
/(_message|say) ".*"$/ { sub( /^(_message|say)/ , ""); /_message ".*"/ {
print "#: _message"; print "msgid " substr($0, index($0,$2)); print "msgstr \"\"\n" } split($0, arr, "\"");
print "#: _message";
print "msgid \"" arr[2] "\"";
print "msgstr \"\"\n" }
/(_message -n|act) ".*"$/ { sub( /^(_message -n|act)/ , ""); /_message -n ".*"/ {
print "#: _message -n"; print "msgid " substr($0, index($0,$2)); print "msgstr \"\"\n" } split($0, arr, "\"");
print "#: _message -n";
print "msgid \"" arr[2] "\"";
print "msgstr \"\"\n" }
/_print ".*"/ {
split($0, arr, "\"");
print "#: _print";
print "msgid \"" arr[2] "\"";
print "msgstr \"\"\n" }
' '

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

461
tomb

File diff suppressed because it is too large Load Diff