MCPcopy Index your code
hub / github.com/python/cpython / dnpgettext

Function dnpgettext

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

Source from the content-addressed store, hash-verified

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

Callers 2

messages.pyFile · 0.90
npgettextFunction · 0.85

Calls 4

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…