ifUdZddlmZddlZddlZddlmZgdZ dej iZ de d<eZ dd ddd d Zd d d d d Zd&dZd'dZd(d)dZd*dZd+dZd,dZd-dZd+d Zd.d#Zd/d$Zd/d%ZdS)0z*Activate, get and deactivate translations.) annotationsN)local)activate deactivatedecimal_separatorthousands_separatorz1dict[str | None, gettext_module.NullTranslations] _TRANSLATIONS. )de_DEfr_FRit_ITpt_BRhu_HU,)r rrrreturn str | Nonec tdStjtjtdS#t $rYdSwxYw)Nlocale)__file__ospathjoindirname NameErrorm/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/humanize/i18n.py_get_default_locale_pathr"sX  4w||BGOOH55x@@@ ttsA AA AAgettext_module.NullTranslationscz ttjS#ttf$rtdcYSwxYwN)r _CURRENTrAttributeErrorKeyErrorrrrget_translationr&+sE#X_-- H %###T""""#s ::rstrrc|t}|d}t||tvr!tjd||g}|t|<|t _t|S)aRActivate internationalisation. Set `locale` as current locale. Search for locale in directory `path`. Args: locale (str): Language name, e.g. `en_GB`. path (str): Path to search for locales. Returns: dict: Translations. Raises: Exception: If humanize cannot find the locale folder. NznHumanize cannot determinate the default location of the 'locale' folder. You need to pass the path explicitly.humanize)r Exceptionr gettext_module translationr#r)rrmsgr,s rrr2sn |')) | 4 nn ]""$0TF8LL + fHO   rNonecdt_dS)z Deactivate internationalisation.N)r#rrrrrrQs HOOOrmessagecDt|S)zvGet translation. Args: message (str): Text to translate. Returns: str: Translated text. )r&gettextr0s r_gettextr4Vs    $ $W - --rmsgctxtcFt||S)a Fetches a particular translation. It works with `msgctxt` .po modifiers and allows duplicate keys with different translations. Args: msgctxt (str): Context of the translation. message (str): Text to translate. Returns: str: Translated text. )r&pgettext)r5r0s r _pgettextr8bs     % %gw 7 77rpluralnumintcHt|||S)a6Plural version of _gettext. Args: message (str): Singular text to translate. plural (str): Plural text to translate. num (int): The number (e.g. item count) to determine translation for the respective grammatical number. Returns: str: Translated text. )r&ngettext)r0r9r:s r _ngettextr>rs"    % %gvs ; ;;rc|S)aaMark a string as a translation string without translating it. Example usage: ```python CONSTANTS = [_gettext_noop('first'), _gettext_noop('second')] def num_name(n): return _gettext(CONSTANTS[n]) ``` Args: message (str): Text to translate in the future. Returns: str: Original text, unchanged. rr3s r _gettext_noopr@s Nrsingulartuple[str, str]c ||fS)aMark two strings as pluralized translations without translating them. Example usage: ```python CONSTANTS = [ngettext_noop('first', 'firsts'), ngettext_noop('second', 'seconds')] def num_name(n): return _ngettext(*CONSTANTS[n]) ``` Args: singular (str): Singular text to translate in the future. plural (str): Plural text to translate in the future. Returns: tuple: Original text, unchanged. r)rAr9s r_ngettext_nooprDs" V rcj ttj}n#ttf$rd}YnwxYw|S)ztReturn the thousands separator for a locale, default to comma. Returns: str: Thousands separator. r)_THOUSANDS_SEPARATORr#rr$r%seps rrrsC "8?3 H % J 00cj ttj}n#ttf$rd}YnwxYw|S)znReturn the decimal separator for a locale, default to dot. Returns: str: Decimal separator. r )_DECIMAL_SEPARATORr#rr$r%rGs rrrsC  1 H % JrI)rr)rr r")rr'rrrr )rr.)r0r'rr')r5r'r0r'rr')r0r'r9r'r:r;rr')rAr'r9r'rrB)rr')__doc__ __future__rr2r+os.pathr threadingr__all__NullTranslationsr __annotations__r#rFrKrr&rrr4r8r>r@rDrrrrrrSs000""""""  P P P ). ) + +D  577          ####!!!!!> . . . . 8 8 8 8 < < < <&(          r