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