def ngettext(singular, plural, num, **variables):
    """Translates a string with the current locale and passes in the
    given keyword arguments as mapping to a string formatting string.
    The `num` parameter is used to dispatch between singular and various
    plural forms of the message.  It is available in the format string
    as ``%(num)d`` or ``%(num)s``.
    """
    variables.setdefault('num', num)
    t = get_translations()
    if variables:
        if t is None:
            return (singular if num == 1 else plural) % variables
        return t.ungettext(singular, plural, num) % variables
    if t is None:
        return (singular if num == 1 else plural)
    return t.ungettext(singular, plural, num)
dataset/ETHPy150Open gengo/decanter/decanter/lib/i18n.py/ngettext/original