MCPcopy Index your code
hub / github.com/RustPython/RustPython / ngettext

Method ngettext

Lib/gettext.py:449–459  ·  view source on GitHub ↗
(self, msgid1, msgid2, n)

Source from the content-addressed store, hash-verified

447 return message
448
449 def ngettext(self, msgid1, msgid2, n):
450 try:
451 tmsg = self._catalog[(msgid1, self.plural(n))]
452 except KeyError:
453 if self._fallback:
454 return self._fallback.ngettext(msgid1, msgid2, n)
455 if n == 1:
456 tmsg = msgid1
457 else:
458 tmsg = msgid2
459 return tmsg
460
461 def pgettext(self, context, message):
462 ctxt_msg_id = self.CONTEXT % (context, message)

Callers 4

test_translationsMethod · 0.95
ngettextMethod · 0.45
dngettextFunction · 0.45

Calls 1

pluralMethod · 0.45

Tested by 2

test_translationsMethod · 0.76