(self, context, msgid1, msgid2, n)
| 472 | return message |
| 473 | |
| 474 | def npgettext(self, context, msgid1, msgid2, n): |
| 475 | ctxt_msg_id = self.CONTEXT % (context, msgid1) |
| 476 | try: |
| 477 | tmsg = self._catalog[ctxt_msg_id, self.plural(n)] |
| 478 | except KeyError: |
| 479 | if self._fallback: |
| 480 | return self._fallback.npgettext(context, msgid1, msgid2, n) |
| 481 | if n == 1: |
| 482 | tmsg = msgid1 |
| 483 | else: |
| 484 | tmsg = msgid2 |
| 485 | return tmsg |
| 486 | |
| 487 | |
| 488 | # Locate a .mo file using the gettext strategy |