def pgettext(context, string, **variables):
    """Like :func:`gettext` but with a context.
    """
    t = get_translations()
    if variables:
        if t is None:
            return string % variables
        return t.upgettext(context, string) % variables
    if t is None:
        return string
    return t.upgettext(context, string)
dataset/ETHPy150Open gengo/decanter/decanter/lib/i18n.py/pgettext/original