summaryrefslogtreecommitdiff
path: root/portato/gui/gtk/uncaughtException.py
diff options
context:
space:
mode:
authornecoro <>2007-08-05 04:11:46 +0000
committernecoro <>2007-08-05 04:11:46 +0000
commit8fe46a012d17eaa874abf63b9be93c6f11b8df97 (patch)
tree517e994fa610586e83d297997a4865f7b3b86af4 /portato/gui/gtk/uncaughtException.py
parent0087f656a2d9fe962d874ae73f5759dbfc09f634 (diff)
downloadportato-8fe46a012d17eaa874abf63b9be93c6f11b8df97.tar.gz
portato-8fe46a012d17eaa874abf63b9be93c6f11b8df97.tar.bz2
portato-8fe46a012d17eaa874abf63b9be93c6f11b8df97.zip
i18n support and german translations
Diffstat (limited to 'portato/gui/gtk/uncaughtException.py')
-rw-r--r--portato/gui/gtk/uncaughtException.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/portato/gui/gtk/uncaughtException.py b/portato/gui/gtk/uncaughtException.py
index d8ea13d..04f1a6e 100644
--- a/portato/gui/gtk/uncaughtException.py
+++ b/portato/gui/gtk/uncaughtException.py
@@ -17,17 +17,19 @@ import sys
import gtk, pango
from StringIO import StringIO
import traceback
+from gettext import lgettext as _
+
from portato.helper import error
class UncaughExceptionDialog(gtk.MessageDialog):
def __init__(self, type, value, tb):
- super(UncaughExceptionDialog,self).__init__(parent=None, flags=0, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_NONE, message_format="A programming error has been detected during the execution of this program.")
- self.set_title("Bug Detected")
- self.format_secondary_text("It probably isn't fatal, but should be reported to the developers nonetheless.")
+ super(UncaughExceptionDialog,self).__init__(parent=None, flags=0, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_NONE, message_format=_("A programming error has been detected during the execution of this program."))
+ self.set_title(_("Bug Detected"))
+ self.format_secondary_text(_("It probably isn't fatal, but should be reported to the developers nonetheless."))
- self.add_button("Show Details", 1)
+ self.add_button(_("Show Details"), 1)
self.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)
# Details
@@ -74,7 +76,7 @@ def get_trace(type, value, tb):
def register_ex_handler():
def handler(*args):
- error("An uncaught exception has occured: %s", get_trace(*args))
+ error(_("An uncaught exception has occured:\n%s"), get_trace(*args))
UncaughExceptionDialog(*args).run()
sys.excepthook = handler