From 051b1d2036c6aff2fbd046d4a2ef8e1e0d9b22ea Mon Sep 17 00:00:00 2001 From: Thomas Meire Date: Thu, 3 Jan 2008 09:10:39 +0100 Subject: [PATCH 1/3] Display a translatable error when an import fails. When importing the VTE-bindings fails, the error is shown in a nice gtk dialog. Updated the .pot file with the new strings. Closes LP #179961 --- po/terminator.pot | 42 +++++++++++++++++++++++++++--------------- terminator | 35 +++++++++++++++++++++-------------- 2 files changed, 48 insertions(+), 29 deletions(-) diff --git a/po/terminator.pot b/po/terminator.pot index 954ec764..6a2078d9 100644 --- a/po/terminator.pot +++ b/po/terminator.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-12-29 02:52+0000\n" +"POT-Creation-Date: 2008-01-02 23:27+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,43 +16,55 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: terminator:307 -msgid "_Open Link" +#: terminator:42 +msgid "" +"You need to install the python bindings for gobject, gnome, gtk, gcond and " +"pango." msgstr "" -#: terminator:308 -msgid "_Copy Link Address" -msgstr "" - -#: terminator:314 -msgid "_Send Mail To..." +#: terminator:51 +msgid "" +"You need to install python bindings for libvte (\"python-vte\" in debian/" +"ubuntu)" msgstr "" #: terminator:315 +msgid "_Open Link" +msgstr "" + +#: terminator:316 +msgid "_Copy Link Address" +msgstr "" + +#: terminator:322 +msgid "_Send Mail To..." +msgstr "" + +#: terminator:323 msgid "_Copy Email Address" msgstr "" -#: terminator:340 +#: terminator:348 msgid "Show scrollbar" msgstr "" -#: terminator:348 +#: terminator:356 msgid "Split _Horizontally" msgstr "" -#: terminator:352 +#: terminator:360 msgid "Split _Vertically" msgstr "" -#: terminator:414 +#: terminator:422 msgid "Close?" msgstr "" -#: terminator:419 +#: terminator:427 msgid "Close all terminals?" msgstr "" -#: terminator:422 +#: terminator:430 #, python-format msgid "" "This window has %s terminals open. Closing the window will also close all " diff --git a/terminator b/terminator index b9c57281..628fe7c7 100755 --- a/terminator +++ b/terminator @@ -25,24 +25,32 @@ Usage: terminator [OPTION] ... -p, --profile=PROFILE Take settings from gnome-terminal profile PROFILE """ -import os +# import standard python libs +import os, sys, string, time, getopt, math + +import gettext +gettext.install ('terminator') + +# import unix-lib import pwd -import sys -import string -import gobject -import gtk + +# import gtk/gnome libs +# check just in case anyone runs it on a non-gnome system. +try: + import gobject, gtk, gnome, gconf, pango +except: + print >> sys.stderr, _("You need to install the python bindings for " \ + "gobject, gnome, gtk, gcond and pango.") + sys.exit(1) + +# import vte-bindings try: import vte except: - print '''You need to install python bindings for libvte ("python-vte" in debian/ubuntu)''' + error = gtk.MessageDialog (None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, + _('You need to install python bindings for libvte ("python-vte" in debian/ubuntu)')) + error.run() sys.exit (1) -import gconf -import pango -import gnome -import time -import getopt -import math -import gettext class TerminatorTerm: @@ -625,7 +633,6 @@ if __name__ == '__main__': if opt in ("-p", "--profile"): profile = arg - gettext.install ('terminator') term = Terminator (profile) # Set the Terminator in fullscreen state or maximize it. From 46d4ae278c1bfca58501894897d0616464f9a4b0 Mon Sep 17 00:00:00 2001 From: Thomas Meire Date: Thu, 3 Jan 2008 09:23:20 +0100 Subject: [PATCH 2/3] Fix a typo in an error-message. Updated terminator.pot accordingly. --- po/terminator.pot | 6 +++--- terminator | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/po/terminator.pot b/po/terminator.pot index 6a2078d9..10fef361 100644 --- a/po/terminator.pot +++ b/po/terminator.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-01-02 23:27+0100\n" +"POT-Creation-Date: 2008-01-03 09:22+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,8 +18,8 @@ msgstr "" #: terminator:42 msgid "" -"You need to install the python bindings for gobject, gnome, gtk, gcond and " -"pango." +"You need to install the python bindings for gobject, gnome, gtk, gconf and " +"pango to run Terminator." msgstr "" #: terminator:51 diff --git a/terminator b/terminator index 628fe7c7..9844db4b 100755 --- a/terminator +++ b/terminator @@ -40,7 +40,7 @@ try: import gobject, gtk, gnome, gconf, pango except: print >> sys.stderr, _("You need to install the python bindings for " \ - "gobject, gnome, gtk, gcond and pango.") + "gobject, gnome, gtk, gconf and pango to run Terminator.") sys.exit(1) # import vte-bindings From 31c559ff7134787866d65c55b3b0d48ecd56c347 Mon Sep 17 00:00:00 2001 From: Thomas Meire Date: Thu, 3 Jan 2008 09:44:01 +0100 Subject: [PATCH 3/3] Added dutch-translations --- po/nl.pot | 78 ++++++++++++++++++++++++++++++++++++++++++++++ terminator.desktop | 8 ++--- 2 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 po/nl.pot diff --git a/po/nl.pot b/po/nl.pot new file mode 100644 index 00000000..c1d05342 --- /dev/null +++ b/po/nl.pot @@ -0,0 +1,78 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Thomas Meire , 2008. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2008-01-03 09:22+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Thomas Meire \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: terminator:42 +msgid "" +"You need to install the python bindings for gobject, gnome, gtk, gconf and " +"pango to run Terminator." +msgstr "" +"Je moet de python-bindingen installeren voor gobject, gnome, gtk, gconf en" +"pango om Terminator te kunnen uitvoeren." + +#: terminator:51 +msgid "" +"You need to install python bindings for libvte (\"python-vte\" in debian/" +"ubuntu)" +msgstr "" +"Je moet de python-bindingen installeren voor libvte (\"python-vte\" in debian/" +"ubuntu)" + +#: terminator:315 +msgid "_Open Link" +msgstr "_Open Koppeling" + +#: terminator:316 +msgid "_Copy Link Address" +msgstr "Kopieer Koppeling Adres" + +#: terminator:322 +msgid "_Send Mail To..." +msgstr "_Stuur Email Naar..." + +#: terminator:323 +msgid "_Copy Email Address" +msgstr "Kopieer Email Adres" + +#: terminator:348 +msgid "Show scrollbar" +msgstr "Toon schijfbalk" + +#: terminator:356 +msgid "Split _Horizontally" +msgstr "Splits _Horizontaal" + +#: terminator:360 +msgid "Split _Vertically" +msgstr "Splits _Verticaal" + +#: terminator:422 +msgid "Close?" +msgstr "Sluiten?" + +#: terminator:427 +msgid "Close all terminals?" +msgstr "Sluit alle terminals?" + +#: terminator:430 +#, python-format +msgid "" +"This window has %s terminals open. Closing the window will also close all " +"terminals." +msgstr "" +"Dit venster heeft %s terminals open. Als je dit venster sluit, worden alle" +"terminals ook gesloten" diff --git a/terminator.desktop b/terminator.desktop index 41a80ecc..caa67213 100644 --- a/terminator.desktop +++ b/terminator.desktop @@ -5,8 +5,8 @@ Name[am]= Name[ar]= Name[as]= Name[az]= -Name[be]= -Name[be@latin]= +Name[be]=Terminator +Name[be@latin]=Terminator Name[bg]= Name[bn]= Name[bn_IN]= @@ -80,8 +80,8 @@ Name[zh_TW]= Comment=Multiple terminals in one window Comment[ar]= Comment[as]= -Comment[be]= -Comment[be@latin]= +Comment[be]=Meerdere terminals in een venster +Comment[be@latin]=Meerdere terminals in een venster Comment[bg]= Comment[bn]= Comment[bn_IN]=