mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
6706b0ab72
commit
67213b5502
@ -90,14 +90,15 @@ class JobManager(QAbstractTableModel, AdaptSQP): # {{{
|
||||
def get_tooltip(self):
|
||||
running_jobs = [j for j in self.jobs if j.run_state == j.RUNNING]
|
||||
waiting_jobs = [j for j in self.jobs if j.run_state == j.WAITING]
|
||||
lines = [_('There are %d running jobs:')%len(running_jobs)]
|
||||
lines = [ngettext('There is a running job:', 'There are {} running jobs:', len(running_jobs)).format(len(running_jobs))]
|
||||
for job in running_jobs:
|
||||
desc = job.description
|
||||
if not desc:
|
||||
desc = _('Unknown job')
|
||||
p = 100. if job.is_finished else job.percent
|
||||
lines.append('%s: %.0f%% done'%(desc, p))
|
||||
lines.extend(['', _('There are %d waiting jobs:')%len(waiting_jobs)])
|
||||
l = ngettext('There is a waiting job', 'There are {} waiting jobs', len(waiting_jobs)).format(len(waiting_jobs))
|
||||
lines.extend(['', l])
|
||||
for job in waiting_jobs:
|
||||
desc = job.description
|
||||
if not desc:
|
||||
@ -692,5 +693,3 @@ class JobsDialog(QDialog, Ui_JobsDialog):
|
||||
self.proxy_model.find(query)
|
||||
|
||||
# }}}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user