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

Function dnpgettext

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

Source from the content-addressed store, hash-verified

613
614
615def dnpgettext(domain, context, msgid1, msgid2, n):
616 try:
617 t = translation(domain, _localedirs.get(domain, None))
618 except OSError:
619 n = _as_int2(n)
620 if n == 1:
621 return msgid1
622 else:
623 return msgid2
624 return t.npgettext(context, msgid1, msgid2, n)
625
626
627def gettext(message):

Callers 1

npgettextFunction · 0.85

Calls 4

translationFunction · 0.85
_as_int2Function · 0.85
getMethod · 0.45
npgettextMethod · 0.45

Tested by

no test coverage detected