From dc25ec8e13db4ccc676f61cd79b3666abc340a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Susanna=20Bj=C3=B6rverud?= Date: Thu, 30 Apr 2009 11:40:03 +0200 Subject: [PATCH] Split up two long texts Split up session options and its tooltip consisting of interlaced html and strings to translate into strings that should and need not be translated. --- ankiqt/ui/main.py | 71 ++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 74b827ede..ba9a945f5 100644 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -1103,20 +1103,27 @@ day = :d""", d=yesterday) anki.utils.fmtTimeSpan(ttoday, short=True, point=1)) h['timeTodayChg'] = str(anki.utils.fmtTimeSpan( tyest, short=True, point=1)) - stats1 = _("""\ + h['cs_header'] = _("Cards/session:") + h['cd_header'] = _("Cards/day:") + h['td_header'] = _("Time/day:") + h['rd_header'] = _("Reviews due:") + h['ntod_header'] = _("New today:") + h['ntot_header'] = _("New total:") + stats1 = ("""\ - + - + - +
Cards/session:%(repsInSesChg)s
%(cs_header)s%(repsInSesChg)s %(repsInSes)s
Cards/day:%(repsTodayChg)s
%(cd_header)s%(repsTodayChg)s %(repsToday)s
Time/day:%(timeTodayChg)s
%(td_header)s%(timeTodayChg)s %(timeToday)s
""") % h - stats2 = _("""\ + + stats2 = ("""\ - - - + + +
Reviews due:%(ret)s
New today:%(new)s
New total:%(newof)s
%(rd_header)s%(ret)s
%(ntod_header)s%(new)s
%(ntot_header)s%(newof)s
""") % h if (not dyest and not dtoday) or not self.config['showStudyStats']: stats1 = "" @@ -1127,33 +1134,27 @@ day = :d""", d=yesterday)

%s
%s
""" % (stats1, stats2)) - self.mainWin.optionsLabel.setToolTip(_("""\ -

Session Statistics

-
-
Cards/session
-
The number of cards you studied in the current session (blue) and previous -session (black)
-
-
-
Cards/day
-
The number of cards you studied today (blue) and yesterday (black)
-
-
-
Time/day
-
The number of minutes you studied today (blue) and yesterday (black)
-
-
-
Reviews due
-
The number of cards that are waiting to be reviewed today
-
-
-
New today
-
The number of new cards that are waiting to be learnt today
-
-
-
New total
-
The total number of new cards in the deck
-
""")) + h['tt_header'] = _("Session Statistics") + h['cs_tip'] = _("The number of cards you studied in the current \ +session (blue) and previous session (black)") + h['cd_tip'] = _("The number of cards you studied today (blue) and \ +yesterday (black)") + h['td_tip'] = _("The number of minutes you studied today (blue) and \ +yesterday (black)") + h['rd_tip'] = _("The number of cards that are waiting to be reviewed \ +today") + h['ntod_tip'] = _("The number of new cards that are waiting to be \ +learnt today") + h['ntot_tip'] = _("The total number of new cards in the deck") + statToolTip = ("""

%(tt_header)s

+
%(cs_header)s
%(cs_tip)s
+
%(cd_header)s
%(cd_tip)s
+
%(td_header)s
%(td_tip)s
+
%(rd_header)s
%(rd_tip)s
+
%(ntod_header)s
%(ntod_tip)s
+
%(ntot_header)s
%(ntot_tip)s<
""") % h + + self.mainWin.optionsLabel.setToolTip(statToolTip) def showStudyScreen(self): self.mainWin.optionsButton.setChecked(self.config['showStudyOptions'])