diff options
author | necoro <> | 2007-08-05 04:11:46 +0000 |
---|---|---|
committer | necoro <> | 2007-08-05 04:11:46 +0000 |
commit | 8fe46a012d17eaa874abf63b9be93c6f11b8df97 (patch) | |
tree | 517e994fa610586e83d297997a4865f7b3b86af4 /portato/gui/gtk/dialogs.py | |
parent | 0087f656a2d9fe962d874ae73f5759dbfc09f634 (diff) | |
download | portato-8fe46a012d17eaa874abf63b9be93c6f11b8df97.tar.gz portato-8fe46a012d17eaa874abf63b9be93c6f11b8df97.tar.bz2 portato-8fe46a012d17eaa874abf63b9be93c6f11b8df97.zip |
i18n support and german translations
Diffstat (limited to 'portato/gui/gtk/dialogs.py')
-rw-r--r-- | portato/gui/gtk/dialogs.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/portato/gui/gtk/dialogs.py b/portato/gui/gtk/dialogs.py index 24d1a20..4750bb2 100644 --- a/portato/gui/gtk/dialogs.py +++ b/portato/gui/gtk/dialogs.py @@ -11,9 +11,10 @@ # Written by René 'Necoro' Neumann <necoro@necoro.net> import gtk +from gettext import lgettext as _ def queue_not_empty_dialog(): - dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_OK_CANCEL, "There are some packages in the emerge queue and/or an emerge process is running.\nDo you really want to quit?") + dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_OK_CANCEL, _("There are some packages in the emerge queue and/or an emerge process is running.\nDo you really want to quit?")) ret = dialog.run() dialog.destroy() return ret @@ -29,44 +30,44 @@ def io_ex_dialog (io_ex): return ret def blocked_dialog (blocked, blocks): - dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, blocked+" is blocked by "+blocks+".\nPlease unmerge the blocking package.") + dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, _("%(blocked)s is blocked by %(blocks)s.\nPlease unmerge the blocking package.") % {"blocked":blocked, "blocks" : blocks}) ret = dialog.run() dialog.destroy() return ret def not_root_dialog (): - errorMB = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, "You are not root.") + errorMB = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, "_(You are not root.")) ret = errorMB.run() errorMB.destroy() return ret def unmask_dialog (cpv): - dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, cpv+" seems to be masked.\nDo you want to unmask it and its dependencies?") + dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, _("%s seems to be masked.\nDo you want to unmask it and its dependencies?") % cpv) ret = dialog.run() dialog.destroy() return ret def nothing_found_dialog (): - dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, "Package not found!") + dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, _("Package not found!")) ret = dialog.run() dialog.destroy() return ret def changed_flags_dialog (what = "flags"): hintMB = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, - "You have changed %s. Portato will write these changes into the appropriate files. Please backup them if you think it is necessairy." % what) + _("You have changed %s. Portato will write these changes into the appropriate files. Please backup them if you think it is necessairy.") % what) ret = hintMB.run() hintMB.destroy() return ret def remove_deps_dialog (): - infoMB = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, "You cannot remove dependencies. :)") + infoMB = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, _("You cannot remove dependencies. :)")) ret = infoMB.run() infoMB.destroy() return ret def remove_queue_dialog (): - askMB = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, "Do you really want to clear the whole queue?") + askMB = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, _("Do you really want to clear the whole queue?")) ret = askMB.run() askMB.destroy() return ret |