From fc5c1fd16afadfafd5fb2c5c1c4ee6a254088a13 Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Wed, 5 Feb 2020 05:46:11 -0800 Subject: [PATCH] correct missing french translation --- pylib/anki/stats.py | 4 ++++ qt/aqt/addons.py | 5 +++++ qt/aqt/browser.py | 2 +- qt/aqt/deckchooser.py | 4 +--- qt/aqt/main.py | 2 +- qt/aqt/modelchooser.py | 4 +--- qt/designer/dyndconf.ui | 2 +- 7 files changed, 14 insertions(+), 9 deletions(-) diff --git a/pylib/anki/stats.py b/pylib/anki/stats.py index 50a4ccf7c..3ea278475 100644 --- a/pylib/anki/stats.py +++ b/pylib/anki/stats.py @@ -457,6 +457,10 @@ group by day order by day""" self._line( i, _("Average answer time"), + # T: For example, in the statistics line: " Average + # answer time: 16.8s (3.6 cards/minute)", then + # "%(a)0.1fs" represents "16.8s" and "%(b)s" represents + # "3.6 cards/minutes") _("%(a)0.1fs (%(b)s)") % dict(a=(tot * 60) / total, b=text), ) return self._lineTbl(i), int(tot) diff --git a/qt/aqt/addons.py b/qt/aqt/addons.py index 63e8039c4..3c0db3741 100644 --- a/qt/aqt/addons.py +++ b/qt/aqt/addons.py @@ -1053,6 +1053,11 @@ class DownloaderInstaller(QObject): def _progress_callback(self, up: int, down: int) -> None: self.dl_bytes += down self.mgr.mw.progress.update( + # T: "%(a)d" is the index of the element currently + # downloaded. "%(b)d" is the number of element to download, + # and "%(kb)0.2f" is the number of downloaded + # kilobytes. This lead for example to "Downloading 3/5 + # (27KB)" label=_("Downloading %(a)d/%(b)d (%(kb)0.2fKB)...") % dict(a=len(self.log) + 1, b=len(self.ids), kb=self.dl_bytes / 1024) ) diff --git a/qt/aqt/browser.py b/qt/aqt/browser.py index 6080dab34..e5333986b 100644 --- a/qt/aqt/browser.py +++ b/qt/aqt/browser.py @@ -573,7 +573,7 @@ class Browser(QMainWindow): f = self.form f.previewButton.clicked.connect(self.onTogglePreview) f.previewButton.setToolTip( - _("Preview Selected Card (%s)") % shortcut(_("Ctrl+Shift+P")) + _("Preview Selected Card (%s)") % shortcut("Ctrl+Shift+P") ) f.previewButton.setShortcut("Ctrl+Shift+P") diff --git a/qt/aqt/deckchooser.py b/qt/aqt/deckchooser.py index a7cf5863e..c677902bf 100644 --- a/qt/aqt/deckchooser.py +++ b/qt/aqt/deckchooser.py @@ -29,9 +29,7 @@ class DeckChooser(QHBoxLayout): self.deck = QPushButton(clicked=self.onDeckChange) self.deck.setAutoDefault(False) self.deck.setToolTip(shortcut(_("Target Deck (Ctrl+D)"))) - s = QShortcut( - QKeySequence(_("Ctrl+D")), self.widget, activated=self.onDeckChange - ) + s = QShortcut(QKeySequence("Ctrl+D"), self.widget, activated=self.onDeckChange) self.addWidget(self.deck) # starting label if self.mw.col.conf.get("addToCur", True): diff --git a/qt/aqt/main.py b/qt/aqt/main.py index 07a69b4dc..10d68772d 100644 --- a/qt/aqt/main.py +++ b/qt/aqt/main.py @@ -1086,7 +1086,7 @@ title="%s" %s>%s""" % ( m.actionAbout.triggered.connect(self.onAbout) m.actionUndo.triggered.connect(self.onUndo) if qtminor < 11: - m.actionUndo.setShortcut(QKeySequence(_("Ctrl+Alt+Z"))) + m.actionUndo.setShortcut(QKeySequence("Ctrl+Alt+Z")) m.actionFullDatabaseCheck.triggered.connect(self.onCheckDB) m.actionCheckMediaDatabase.triggered.connect(self.onCheckMediaDB) m.actionDocumentation.triggered.connect(self.onDocumentation) diff --git a/qt/aqt/modelchooser.py b/qt/aqt/modelchooser.py index 3a4d209aa..57b5c8db8 100644 --- a/qt/aqt/modelchooser.py +++ b/qt/aqt/modelchooser.py @@ -29,9 +29,7 @@ class ModelChooser(QHBoxLayout): self.models = QPushButton() # self.models.setStyleSheet("* { text-align: left; }") self.models.setToolTip(shortcut(_("Change Note Type (Ctrl+N)"))) - s = QShortcut( - QKeySequence(_("Ctrl+N")), self.widget, activated=self.onModelChange - ) + s = QShortcut(QKeySequence("Ctrl+N"), self.widget, activated=self.onModelChange) self.models.setAutoDefault(False) self.addWidget(self.models) self.models.clicked.connect(self.onModelChange) diff --git a/qt/designer/dyndconf.ui b/qt/designer/dyndconf.ui index f7dc99e86..5c5443f16 100644 --- a/qt/designer/dyndconf.ui +++ b/qt/designer/dyndconf.ui @@ -170,7 +170,7 @@ false - 1 10 + 1 10