123
113
return (count, result, all_verifiable)
125
115
def valid_commits_message(self, count):
126
return i18n.gettext(u"{0} commits with valid signatures").format(
116
return gettext(u"{0} commits with valid signatures").format(
127
117
count[SIGNATURE_VALID])
129
119
def unknown_key_message(self, count):
130
return i18n.ngettext(u"{0} commit with unknown key",
120
return ngettext(u"{0} commit with unknown key",
131
121
u"{0} commits with unknown keys",
132
122
count[SIGNATURE_KEY_MISSING]).format(
133
123
count[SIGNATURE_KEY_MISSING])
135
125
def commit_not_valid_message(self, count):
136
return i18n.ngettext(u"{0} commit not valid",
126
return ngettext(u"{0} commit not valid",
137
127
u"{0} commits not valid",
138
128
count[SIGNATURE_NOT_VALID]).format(
139
129
count[SIGNATURE_NOT_VALID])
141
131
def commit_not_signed_message(self, count):
142
return i18n.ngettext(u"{0} commit not signed",
132
return ngettext(u"{0} commit not signed",
143
133
u"{0} commits not signed",
144
134
count[SIGNATURE_NOT_SIGNED]).format(
145
135
count[SIGNATURE_NOT_SIGNED])
147
137
def expired_commit_message(self, count):
148
return i18n.ngettext(u"{0} commit with key now expired",
149
u"{0} commits with key now expired",
150
count[SIGNATURE_EXPIRED]).format(
138
return ngettext(u"{0} commit with key now expired",
139
u"{0} commits with key now expired",
140
count[SIGNATURE_EXPIRED]).format(
151
141
count[SIGNATURE_EXPIRED])
433
423
signers[fingerprint] += 1
435
425
for fingerprint, number in signers.items():
436
result.append( i18n.ngettext(u"Unknown key {0} signed {1} commit",
426
result.append( ngettext(u"Unknown key {0} signed {1} commit",
437
427
u"Unknown key {0} signed {1} commits",
438
428
number).format(fingerprint, number) )
451
441
fingerprint_to_authors[fingerprint] = authors
453
443
for fingerprint, number in signers.items():
454
result.append( i18n.ngettext(u"{0} commit by author {1} with "\
455
"key {2} now expired",
456
u"{0} commits by author {1} with key {2} now "\
458
number).format(number,
444
result.append(ngettext(u"{0} commit by author {1} with "\
445
"key {2} now expired",
446
u"{0} commits by author {1} with key {2} now "\
448
number).format(number,
459
449
fingerprint_to_authors[fingerprint], fingerprint) )
462
452
def valid_commits_message(self, count):
463
453
"""returns message for number of commits"""
464
return i18n.gettext(u"{0} commits with valid signatures").format(
454
return gettext(u"{0} commits with valid signatures").format(
465
455
count[SIGNATURE_VALID])
467
457
def unknown_key_message(self, count):
468
458
"""returns message for number of commits"""
469
return i18n.ngettext(u"{0} commit with unknown key",
470
u"{0} commits with unknown keys",
471
count[SIGNATURE_KEY_MISSING]).format(
459
return ngettext(u"{0} commit with unknown key",
460
u"{0} commits with unknown keys",
461
count[SIGNATURE_KEY_MISSING]).format(
472
462
count[SIGNATURE_KEY_MISSING])
474
464
def commit_not_valid_message(self, count):
475
465
"""returns message for number of commits"""
476
return i18n.ngettext(u"{0} commit not valid",
477
u"{0} commits not valid",
478
count[SIGNATURE_NOT_VALID]).format(
466
return ngettext(u"{0} commit not valid",
467
u"{0} commits not valid",
468
count[SIGNATURE_NOT_VALID]).format(
479
469
count[SIGNATURE_NOT_VALID])
481
471
def commit_not_signed_message(self, count):
482
472
"""returns message for number of commits"""
483
return i18n.ngettext(u"{0} commit not signed",
484
u"{0} commits not signed",
485
count[SIGNATURE_NOT_SIGNED]).format(
473
return ngettext(u"{0} commit not signed",
474
u"{0} commits not signed",
475
count[SIGNATURE_NOT_SIGNED]).format(
486
476
count[SIGNATURE_NOT_SIGNED])
488
478
def expired_commit_message(self, count):
489
479
"""returns message for number of commits"""
490
return i18n.ngettext(u"{0} commit with key now expired",
491
u"{0} commits with key now expired",
492
count[SIGNATURE_EXPIRED]).format(
493
count[SIGNATURE_EXPIRED])
480
return ngettext(u"{0} commit with key now expired",
481
u"{0} commits with key now expired",
482
count[SIGNATURE_EXPIRED]).format(
483
count[SIGNATURE_EXPIRED])