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

Function dngettext

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

Source from the content-addressed store, hash-verified

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

Callers 2

messages.pyFile · 0.90
ngettextFunction · 0.85

Calls 4

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…