From 0e30e61d9f83be110197ba965cf14d54be77d163 Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Wed, 20 Jan 2010 21:22:01 +0100 Subject: [PATCH] Enable Gettext localisation, add German translation --- po/de.po | 54 +++++++++++++++++++++++++++++++++++++++ src/status-area-applet-tor.vala | 19 +++++++++----- 2 files changed, 66 insertions(+), 7 deletions(-) create mode 100644 po/de.po diff --git a/po/de.po b/po/de.po new file mode 100644 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 , 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 \n" +"Language-Team: German \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" diff --git a/src/status-area-applet-tor.vala b/src/status-area-applet-tor.vala index 7647239..24c577a 100644 --- a/src/status-area-applet-tor.vala +++ b/src/status-area-applet-tor.vala @@ -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 { -- 1.7.9.5