Merge commit 'resolve/master'

This commit is contained in:
Samson Melamed 2009-01-18 01:00:18 -05:00
commit af00f229f6
12 changed files with 5902 additions and 5026 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -629,6 +629,7 @@ class FactEdit(QTextEdit):
def insertFromMimeData(self, source):
pics = ("jpg", "jpeg", "png", "tif", "tiff", "gif")
audio = ("wav", "mp3", "ogg", "flac")
errtxt = _("An error occured while opening %s")
if source.hasHtml() and "qrichtext" in unicode(source.html()):
self.insertHtml(source.html())
return
@ -650,10 +651,7 @@ class FactEdit(QTextEdit):
# not image or sound, treat as plain text
self.insertPlainText(source.text())
except urllib2.URLError, e:
ui.utils.showWarning(_("""\
An error was ecountered while opening %s
%s""") % (txt, e))
ui.utils.showWarning(errtxt % e)
return
else:
self.insertPlainText(source.text())
@ -680,10 +678,7 @@ An error was ecountered while opening %s
name = self._retrieveURL(url, ext)
self.parent._addSound(name, widget=self)
except urllib2.URLError, e:
ui.utils.showWarning(_("""\
An error was ecountered while opening %s
%s""") % (txt, e))
ui.utils.showWarning(errtxt % e)
return
def _retrieveURL(self, url, ext):

View file

@ -1042,7 +1042,7 @@ day = :d""", d=yesterday)
anki.utils.fmtTimeSpan(ttoday, short=True, point=1))
h['timeTodayChg'] = str(anki.utils.fmtTimeSpan(
tyest, short=True, point=1))
stats1 = """\
stats1 = _("""\
<table>
<tr><td width=80>Cards/session:</td><td width=50><b>%(repsInSes)s</b></td>
<td>%(repsInSesChg)s</td></tr>
@ -1050,13 +1050,13 @@ day = :d""", d=yesterday)
<td>%(repsTodayChg)s</td></tr>
<tr><td>Time/day:</td><td><b>%(timeToday)s</b></td>
<td>%(timeTodayChg)s</td></tr>
</table>""" % h
stats2 = """\
</table>""") % h
stats2 = _("""\
<table>
<tr><td width=120>Reviews due:</td><td align=right><b>%(ret)s</b></td></tr>
<tr><td>New today:</td><td align=right><b>%(new)s</b></td></tr>
<tr><td>New total:</td><td align=right>%(newof)s</td></tr>
</table>""" % h
</table>""") % h
if (not dyest and not dtoday) or not self.config['showStudyStats']:
stats1 = ""
else: