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

Function dngettext

Lib/gettext.py:595–604  ·  view source on GitHub ↗
(domain, msgid1, msgid2, n)

Source from the content-addressed store, hash-verified

593
594
595def dngettext(domain, msgid1, msgid2, n):
596 try:
597 t = translation(domain, _localedirs.get(domain, None))
598 except OSError:
599 n = _as_int2(n)
600 if n == 1:
601 return msgid1
602 else:
603 return msgid2
604 return t.ngettext(msgid1, msgid2, n)
605
606
607def dpgettext(domain, context, message):

Callers 1

ngettextFunction · 0.85

Calls 4

translationFunction · 0.85
_as_int2Function · 0.85
getMethod · 0.45
ngettextMethod · 0.45

Tested by

no test coverage detected