mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
make top bar translatable
This commit is contained in:
parent
0f483a6f59
commit
106ff34afc
1 changed files with 8 additions and 8 deletions
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
from aqt.webview import AnkiWebView
|
from aqt.webview import AnkiWebView
|
||||||
from anki.lang import _
|
|
||||||
|
|
||||||
class Toolbar(object):
|
class Toolbar(object):
|
||||||
|
|
||||||
|
@ -26,12 +25,13 @@ class Toolbar(object):
|
||||||
# Available links
|
# Available links
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
rightIcons = [
|
def _rightIconsList(self):
|
||||||
["stats", "qrc:/icons/view-statistics.png",
|
return [
|
||||||
_("Show statistics. Shortcut key: %s") % "S"],
|
["stats", "qrc:/icons/view-statistics.png",
|
||||||
["sync", "qrc:/icons/view-refresh.png",
|
_("Show statistics. Shortcut key: %s") % "S"],
|
||||||
_("Synchronize with AnkiWeb. Shortcut key: %s") % "y"],
|
["sync", "qrc:/icons/view-refresh.png",
|
||||||
]
|
_("Synchronize with AnkiWeb. Shortcut key: %s") % "y"],
|
||||||
|
]
|
||||||
|
|
||||||
def _centerLinks(self):
|
def _centerLinks(self):
|
||||||
links = [
|
links = [
|
||||||
|
@ -52,7 +52,7 @@ class Toolbar(object):
|
||||||
|
|
||||||
def _rightIcons(self):
|
def _rightIcons(self):
|
||||||
buf = ""
|
buf = ""
|
||||||
for ln, icon, title in self.rightIcons:
|
for ln, icon, title in self._rightIconsList():
|
||||||
buf += '<a class=hitem title="%s" href="%s"><img src="%s"></a>' % (
|
buf += '<a class=hitem title="%s" href="%s"><img src="%s"></a>' % (
|
||||||
title, ln, icon)
|
title, ln, icon)
|
||||||
return buf
|
return buf
|
||||||
|
|
Loading…
Reference in a new issue