Enable Gettext localisation, add German translation
authorPhilipp Zabel <philipp.zabel@gmail.com>
Wed, 20 Jan 2010 20:22:01 +0000 (21:22 +0100)
committerPhilipp Zabel <philipp.zabel@gmail.com>
Wed, 20 Jan 2010 20:23:01 +0000 (21:23 +0100)
po/de.po [new file with mode: 0644]
src/status-area-applet-tor.vala

diff --git a/po/de.po b/po/de.po
new file mode 100644 (file)
index 0000000..3c7281b
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,54 @@
+# German translation for the Tor Status Area Applet
+# Copyright (C) 2010 Philipp Zabel
+# This file is distributed under the same license as the status-area-applet-tor package.
+# Philipp Zabel <philipp.zabel@gmail.com>, 2010.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: tor-status 0.0.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-01-19 23:49+0100\n"
+"PO-Revision-Date: 2010-01-19 23:50+0100\n"
+"Last-Translator: Philipp Zabel <philipp.zabel@gmail.com>\n"
+"Language-Team: German <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../src/status-area-applet-tor.vala:111
+msgid "Connected"
+msgstr "Verbunden"
+
+#: ../src/status-area-applet-tor.vala:111
+msgid "Connecting ..."
+msgstr "Verbinde ..."
+
+#: ../src/status-area-applet-tor.vala:114
+msgid "Disconnected"
+msgstr "Getrennt"
+
+#: ../src/status-area-applet-tor.vala:114
+#: ../src/status-area-applet-tor.vala:365
+msgid "Disabled"
+msgstr "Deaktiviert"
+
+#: ../src/status-area-applet-tor.vala:285
+msgid "Tor: anonymity online"
+msgstr "Tor: Anonymität online"
+
+#: ../src/status-area-applet-tor.vala:288
+msgid "Enable onion routing"
+msgstr "Onion routing aktiviert"
+
+#: ../src/status-area-applet-tor.vala:292
+msgid "Save"
+msgstr "Speichern"
+
+#: ../src/status-area-applet-tor.vala:364
+msgid "The Onion Router"
+msgstr "The Onion Router"
+
+#: ../src/status-area-applet-tor.vala:365
+msgid "Enabled"
+msgstr "Aktiviert"
index 7647239..24c577a 100644 (file)
@@ -108,10 +108,10 @@ class TorStatusMenuItem : HD.StatusMenuItem {
 
                if (conic_connected && tor_enabled) {
                        pixbuf = tor_connected ? icon_connected : icon_connecting;
-                       button.set_value (tor_connected ? "Connected" : "Connecting ...");
+                       button.set_value (tor_connected ? _("Connected") : _("Connecting ..."));
                } else {
                        pixbuf = conic_connected ? icon_disabled : null;
-                       button.set_value (tor_enabled ? "Disconnected" : "Disabled");
+                       button.set_value (tor_enabled ? _("Disconnected") : _("Disabled"));
                }
                set_status_area_icon (pixbuf);
        }
@@ -282,14 +282,14 @@ class TorStatusMenuItem : HD.StatusMenuItem {
                var dialog = new Gtk.Dialog ();
                var content = (Gtk.VBox) dialog.get_content_area ();
 
-               dialog.set_title ("The Onion Router");
+               dialog.set_title (_("Tor: anonymity online"));
 
                var check = new Hildon.CheckButton (Hildon.SizeType.FINGER_HEIGHT);
-               check.set_label ("Enable onion routing");
+               check.set_label (_("Enable onion routing"));
                check.set_active (tor_enabled);
                content.pack_start (check, true, true, 0);
 
-               dialog.add_button ("Save", Gtk.ResponseType.ACCEPT);
+               dialog.add_button (_("Save"), Gtk.ResponseType.ACCEPT);
                dialog.response.connect ((response_id) => {
                        if (response_id == Gtk.ResponseType.ACCEPT) {
                                if (!tor_enabled && check.get_active ()) {
@@ -361,8 +361,8 @@ class TorStatusMenuItem : HD.StatusMenuItem {
                // Status menu button
                button = new Hildon.Button.with_text (Hildon.SizeType.FINGER_HEIGHT,
                                                      Hildon.ButtonArrangement.VERTICAL,
-                                                     "The Onion Router",
-                                                     tor_enabled ? "Enabled" : "Disabled");
+                                                     _("The Onion Router"),
+                                                     tor_enabled ? _("Enabled") : _("Disabled"));
                icon_theme = Gtk.IconTheme.get_default();
                try {
                        pixbuf = icon_theme.load_icon ("tor_onion",
@@ -385,6 +385,11 @@ class TorStatusMenuItem : HD.StatusMenuItem {
        }
 
        construct {
+               // Gettext hook-up
+               Intl.setlocale (LocaleCategory.ALL, "");
+               Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR);
+               Intl.textdomain (Config.GETTEXT_PACKAGE);
+
                // GConf hook-up
                gconf = GConf.Client.get_default ();
                try {