1
0

Change string formatting to improve translation

For example, "Hide Console" would be "Konsole anzeigen" in German.
Currently, translators can only show "Anzeigen Konsole" which doesn't
make much sense.
This commit is contained in:
Johann Bauer
2019-01-12 21:58:21 +01:00
parent c60583293a
commit 019566b383

View File

@@ -255,7 +255,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
def toggle_tab(self, tab): def toggle_tab(self, tab):
show = not self.config.get('show_{}_tab'.format(tab.tab_name), False) show = not self.config.get('show_{}_tab'.format(tab.tab_name), False)
self.config.set_key('show_{}_tab'.format(tab.tab_name), show) self.config.set_key('show_{}_tab'.format(tab.tab_name), show)
item_text = (_("Hide") if show else _("Show")) + " " + tab.tab_description item_text = (_("Hide {}") if show else _("Show {}")).format(tab.tab_description)
tab.menu_action.setText(item_text) tab.menu_action.setText(item_text)
if show: if show:
# Find out where to place the tab # Find out where to place the tab