commit 65b2fe4462ed66a204535f125ca293e93af9aef0
parent cb9a6bf730979a8d8dc1a23551a4af4306597187
Author: Jaromil <jaromil@dyne.org>
Date: Mon, 9 May 2011 13:26:36 +0200
internationalization
now the internal command tomb translate
generates a list of strings used inside tomb ready for translation
(as a .po file)
help needed: translations and autotools integration
Diffstat:
4 files changed, 315 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
@@ -1 +1 @@
-SUBDIRS = src share doc
+SUBDIRS = src share doc po intl
diff --git a/configure.ac b/configure.ac
@@ -66,6 +66,11 @@ dnl Checks for reguired programs.
AC_PROG_CC
AC_PROG_INSTALL
+dnl translation infrastructure
+dnl waiting for translations..
+dnl AM_GNU_GETTEXT
+dnl AM_GNU_GETTEXT_VERSION(0.12)
+
dnl ---------------------------------------------------------------
dnl Checks for external programs.
diff --git a/po/tomb.pot b/po/tomb.pot
@@ -0,0 +1,264 @@
+# Tomb - The Crypto Undertaker.
+# Copyright (C) 2007-2011 Dyne.org Foundation
+# Denis Roio <jaromil@dyne.org>, 2011.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: Tomb 1.0\n"
+"PO-Revision-Date: 2011-05-09 12:57+0200\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 ""
+"Tomb 1.0 - a strong and gentle undertaker for your secrets"
+""
+" Copyright (C) 2007-2011 Dyne.org Foundation, License GNU GPL v3+"
+" This is free software: you are free to change and redistribute it"
+" The latest Tomb sourcecode is published on <http://tomb.dyne.org>"
+""
+"Syntax: tomb [options] command [file] [place]"
+""
+"Commands:"
+""
+" create create a new tomb FILE and its keys"
+" open open an existing tomb FILE on PLACE"
+" list list all open tombs or the one called FILE"
+" close close the open tomb called FILE (or all)"
+" slam close tomb FILE and kill all pids using it"
+" bury hide a tomb key FILE inside a jpeg PLACE"
+" exhume extract a tomb key FILE from a jpeg PL"
+""
+"Options:"
+""
+" -s size of the tomb file when creating one (in MB)"
+" -k path to the key to use for opening a tomb"
+" -n don't process the hooks found in tomb"
+""
+" -h print this help"
+" -v version information for this tool"
+" -q run quietly without printing informations"
+" -D print debugging information at runtime"
+""
+"For more informations on Tomb read the manual: man tomb"
+"Please report bugs on <http://bugs.dyne.org>."
+msgstr ""
+
+#
+# tomb internal messages
+#
+
+#: act
+msgid "tomb found: ${tombdir}/${tombfile}"
+msgstr ""
+
+#: act
+msgid "tomb key specified manually: $tombkey"
+msgstr ""
+
+#: act
+msgid "key found for tomb '${tombname}': ${tombkey}"
+msgstr ""
+
+#: notice
+msgid "Creating a new tomb in ${tombdir}/${tombfile}"
+msgstr ""
+
+#: act
+msgid "No size specified, summoning the Tomb Undertaker to guide us in the creation."
+msgstr ""
+
+#: act
+msgid "Generating ${tombfile} of ${tombsize}Mb (${tombsize_4k} blocks of 4Kb)"
+msgstr ""
+
+#: act
+msgid "OK: `ls -lh ${tombdir}/${tombfile}`"
+msgstr ""
+
+#: act
+msgid "Generating secret key..."
+msgstr ""
+
+#: act
+msgid "this operation takes time, keep using this computer on other tasks,"
+msgstr ""
+
+#: act
+msgid "once done you will be asked to choose a password for your tomb."
+msgstr ""
+
+#: act
+msgid "To make it faster you can move the mouse around"
+msgstr ""
+
+#: notice
+msgid "Setup your secret key file ${tombname}.tomb.key"
+msgstr ""
+
+#: act
+msgid "formatting Luks mapped device"
+msgstr ""
+
+#: act
+msgid "operation aborted."
+msgstr ""
+
+#: act
+msgid "formatting your Tomb with Ext3/Ext4 filesystem"
+msgstr ""
+
+#: act
+msgid "done creating $tombname encrypted storage (using Luks dm-crypt AES/SHA256)"
+msgstr ""
+
+#: notice
+msgid "Your tomb is ready in ${tombdir}/${tombfile} and secured with key ${tombfile}.key"
+msgstr ""
+
+#: act
+msgid "mountpoint not specified, using default: $tombmount"
+msgstr ""
+
+#: notice
+msgid "mounting $tombfile on mountpoint $tombmount"
+msgstr ""
+
+#: act
+msgid "check for a valid LUKS encrypted device"
+msgstr ""
+
+#: notice
+msgid "Password is required for key ${keyname}"
+msgstr ""
+
+#: act
+msgid "encrypted storage filesystem check"
+msgstr ""
+
+#: act
+msgid "tomb engraved as $tombname"
+msgstr ""
+
+#: notice
+msgid "encrypted storage $tombfile succesfully mounted on $tombmount"
+msgstr ""
+
+#: notice
+msgid "Encoding key $tombkey inside image $imagefile"
+msgstr ""
+
+#: act
+msgid "please choose a password for the encoding"
+msgstr ""
+
+#: notice
+msgid "tomb key encoded succesfully into image ${imagefile}"
+msgstr ""
+
+#: notice
+msgid "Trying to exhume a key out of image $imagefile"
+msgstr ""
+
+#: act
+msgid "${keyfile} succesfully decoded"
+msgstr ""
+
+#: act
+msgid "post hooks found, executing as user $SUDO_USER"
+msgstr ""
+
+#: notice
+msgid "Closing $tombs"
+msgstr ""
+
+#: notice
+msgid "Tombs are all closed, cemetery is quiet."
+msgstr ""
+
+#: notice
+msgid "Slamming tomb $tombname mounted on $tombmount"
+msgstr ""
+
+#: act
+msgid "Kill all processes busy inside the tomb"
+msgstr ""
+
+#: notice
+msgid "Closing tomb $tombname mounted on $tombmount"
+msgstr ""
+
+#: act
+msgid "closing tomb hook: $hook"
+msgstr ""
+
+#: notice
+msgid "Slamming tomb: killing all processes using this hook"
+msgstr ""
+
+#: notice
+msgid "Killing PID $p of $pname..."
+msgstr ""
+
+#: act
+msgid "closing tomb $tombname mounted on $tombmount"
+msgstr ""
+
+#: notice
+msgid "Slamming tomb killing all processes using it"
+msgstr ""
+
+#: notice
+msgid "Tomb $tombname closed: your bones will rest in peace."
+msgstr ""
+
+#: act
+msgid "updating mimetypes..."
+msgstr ""
+
+#: act
+msgid "updating desktop..."
+msgstr ""
+
+#: act
+msgid "updating menus..."
+msgstr ""
+
+#: act
+msgid "updating mime info..."
+msgstr ""
+
+#: act
+msgid "updating application entry..."
+msgstr ""
+
+#: act
+msgid "Tomb is now installed."
+msgstr ""
+
+#: notice
+msgid "Tomb - simple commandline tool for encrypted storage"
+msgstr ""
+
+#: act
+msgid "version $VERSION ($DATE) by Jaromil @ dyne.org"
+msgstr ""
+
+#: act
+msgid ""
+msgstr ""
+
+#: act
+msgid ""
+msgstr ""
+
+#: act
+msgid "try -h for help"
+msgstr ""
diff --git a/src/tomb b/src/tomb
@@ -245,6 +245,50 @@ Please report bugs on <http://bugs.dyne.org>.
EOF
}
+generate_translatable_strings() {
+ cat <<EOF
+# Tomb - The Crypto Undertaker.
+# Copyright (C) 2007-2011 Dyne.org Foundation
+# Denis Roio <jaromil@dyne.org>, 2011.
+#
+#, 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
+
+ usage | awk '
+{ print "\"" $0 "\"" }'
+cat <<EOF
+msgstr ""
+
+#
+# tomb internal messages
+#
+
+EOF
+
+ cat $TOMBEXEC | awk '
+/notice ".*"$/ { sub( /notice/ , "");
+ print "#: notice"; print "msgid " $0; print "msgstr \"\"\n" }
+
+/act ".*"$/ { sub( /act/ , "");
+ print "#: act"; print "msgid " $0; print "msgstr \"\"\n" }
+'
+}
+
create_tomb() {
if ! [ ${CMD2} ]; then
error "no tomb name specified for creation"
@@ -1014,6 +1058,7 @@ main () {
askpass) ask_password $CMD2 ;;
status) tomb-status ;;
mktemp) safe_dir ${CMD2} ;;
+ translate) generate_translatable_strings ;;
*) error "command \"$CMD\" not recognized"
act "try -h for help"
return 1