MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / npgettext

Method npgettext

tools/python-3.11.9-amd64/Lib/gettext.py:464–475  ·  view source on GitHub ↗
(self, context, msgid1, msgid2, n)

Source from the content-addressed store, hash-verified

462 return message
463
464 def npgettext(self, context, msgid1, msgid2, n):
465 ctxt_msg_id = self.CONTEXT % (context, msgid1)
466 try:
467 tmsg = self._catalog[ctxt_msg_id, self.plural(n)]
468 except KeyError:
469 if self._fallback:
470 return self._fallback.npgettext(context, msgid1, msgid2, n)
471 if n == 1:
472 tmsg = msgid1
473 else:
474 tmsg = msgid2
475 return tmsg
476
477
478# Locate a .mo file using the gettext strategy

Callers 2

npgettextMethod · 0.45
dnpgettextFunction · 0.45

Calls 1

pluralMethod · 0.80

Tested by

no test coverage detected