From 22848c6b0aeb8c5527b2f51e762fa64c42653929 Mon Sep 17 00:00:00 2001 From: c-holtermann Date: Sat, 29 Feb 2020 15:51:07 +0100 Subject: [PATCH] localize strings for python --- gnucash/python/init.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gnucash/python/init.py b/gnucash/python/init.py index c364b2dd4e..81a38b388d 100644 --- a/gnucash/python/init.py +++ b/gnucash/python/init.py @@ -101,7 +101,7 @@ class Console (cons.Console): def quit (self): """ quit """ - self.write("\nHave a nice day !\n") + self.write("\n" + _("Have a nice day!") + "\n") return super(Console, self).quit() @@ -110,9 +110,14 @@ class Console (cons.Console): # shelltype can either be "python" or "ipython" (the latter is not yet fully functional) if False: shelltype = "python" - title = "gnucash "+shelltype+" shell" + if shelltype=="python": + shelltypeName = "Python" + else: + shelltypeName = "IPython" banner_style = 'title' - banner = "Welcome to "+title+"!\n" + # TRANSLATORS: %s is either Python or IPython + banner = _("Welcome to GnuCash %s Shell") % shelltypeName + console = Console(argv = [], shelltype = shelltype, banner = [[banner, banner_style]], size = 100) window = Gtk.Window(type = Gtk.WindowType.TOPLEVEL) window.set_position(Gtk.WindowPosition.CENTER)