Ticket #423: i18n.patch
| File i18n.patch, 1.2 KB (added by antti@…, 12 years ago) |
|---|
-
Genshi-0.6/genshi/filters/i18n.py
y x 375 375 plural_msgbuf = None 376 376 377 377 numeral = self.numeral.evaluate(ctxt) 378 is_plural = self._is_plural(numeral , ngettext)378 is_plural = self._is_plural(numeral) 379 379 380 380 for event in stream: 381 381 if event[0] is SUB and any(isinstance(d, ChooseBranchDirective) … … 478 478 (singular_msgbuf.format(), plural_msgbuf.format()), \ 479 479 comment_stack[-1:] 480 480 481 def _is_plural(self, numeral, ngettext): 482 # XXX: should we test which form was chosen like this!?!?!? 483 # There should be no match in any catalogue for these singular and 484 # plural test strings 485 singular = u'O\x85\xbe\xa9\xa8az\xc3?\xe6\xa1\x02n\x84\x93' 486 plural = u'\xcc\xfb+\xd3Pn\x9d\tT\xec\x1d\xda\x1a\x88\x00' 487 return ngettext(singular, plural, numeral) == plural 488 481 def _is_plural(self, numeral): 482 return numeral != 1 489 483 490 484 class DomainDirective(I18NDirective): 491 485 """Implementation of the ``i18n:domain`` directive which allows choosing
