get rid of 'deck is empty message'

This commit is contained in:
Damien Elmes 2008-10-12 00:19:58 +09:00
parent 0d87b6f32d
commit 23379cd600
3 changed files with 5 additions and 1 deletions

View file

@ -432,7 +432,7 @@ new cards</a> waiting''') % {
msg = (_("The next card will be shown in <b>%s</b>") %
self.earliestTimeStr())
else:
msg = _("The deck is empty. Please add some cards.")
msg = _("No cards are due.")
return msg
def earliestTime(self):

View file

@ -874,6 +874,7 @@ class HttpSyncServerProxy(SyncServer):
libanki=anki.version,
client=clientVersion,
sources=simplejson.dumps(self.sourcesToCheck))
socket.setdefaulttimeout(None)
if d['status'] != "OK":
raise SyncError(type="authFailed", status=d['status'])
self._mediaSupported = d['mediaSupported']

View file

@ -90,6 +90,9 @@ def parseTags(tags):
tags = [tag.strip() for tag in tags if tag.strip()]
return tags
def joinTags(tags):
return ", ".join(tags)
def findTag(tag, tags):
"True if TAG is in TAGS. Ignore case."
return tag.lower() in [t.lower() for t in tags]