port duplicates message fix

This commit is contained in:
Damien Elmes 2012-09-10 09:26:17 +09:00
parent 38b92fedf5
commit ea3a5455c2

View file

@ -1180,10 +1180,11 @@ update cards set usn=?, mod=?, did=? where odid=0 and id in """ + ids2str(
self.mw.progress.start() self.mw.progress.start()
res = self.mw.col.findDupes(fname, search) res = self.mw.col.findDupes(fname, search)
t = "<html><body>" t = "<html><body>"
part1 = ngettext("Found %d duplicate in", "Found %d duplicates in", \ groups = len(res)
sum(len(r[1]) for r in res)) % sum(len(r[1]) for r in res) notes = sum(len(r[1]) for r in res)
part2 = ngettext("%d note.", "%d notes.", len(res)) % len(res) part1 = ngettext("%d group", "%d groups", groups) % groups
t += "%s %s" % (part1, part2) part2 = ngettext("%d note.", "%d notes.", notes) % notes
t += _("Found %(a)s across %(b)s") % dict(a=part1, b=part2)
t += "<p><ol>" t += "<p><ol>"
for val, nids in res: for val, nids in res:
t += '<li><a href="%s">%s</a>: %s</a>' % ( t += '<li><a href="%s">%s</a>: %s</a>' % (