localize strings for python

This commit is contained in:
c-holtermann 2020-02-29 15:51:07 +01:00
parent 41dc6ddbe2
commit 22848c6b0a

View File

@ -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)