From 106ff34afc22863c0605c2b2c0ffaa96e4648933 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 17 Apr 2012 17:43:02 +0900 Subject: [PATCH] make top bar translatable --- aqt/toolbar.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/aqt/toolbar.py b/aqt/toolbar.py index 64f4a3064..53b3b10f4 100644 --- a/aqt/toolbar.py +++ b/aqt/toolbar.py @@ -4,7 +4,6 @@ from aqt.qt import * from aqt.webview import AnkiWebView -from anki.lang import _ class Toolbar(object): @@ -26,12 +25,13 @@ class Toolbar(object): # Available links ###################################################################### - rightIcons = [ - ["stats", "qrc:/icons/view-statistics.png", - _("Show statistics. Shortcut key: %s") % "S"], - ["sync", "qrc:/icons/view-refresh.png", - _("Synchronize with AnkiWeb. Shortcut key: %s") % "y"], - ] + def _rightIconsList(self): + return [ + ["stats", "qrc:/icons/view-statistics.png", + _("Show statistics. Shortcut key: %s") % "S"], + ["sync", "qrc:/icons/view-refresh.png", + _("Synchronize with AnkiWeb. Shortcut key: %s") % "y"], + ] def _centerLinks(self): links = [ @@ -52,7 +52,7 @@ class Toolbar(object): def _rightIcons(self): buf = "" - for ln, icon, title in self.rightIcons: + for ln, icon, title in self._rightIconsList(): buf += '' % ( title, ln, icon) return buf