403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.117.232.234
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python38/lib/python3.8/site-packages/humanize/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python38/lib/python3.8/site-packages/humanize/__pycache__/i18n.cpython-38.pyc
U

su]a��@s�dZddlZddlZddlmZdddddgZde��iZ	e�Z
d	d
iZdd�Zd
d�Z
ddd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zed�dd�ZdS)z*Activate, get and deactivate translations.�N)�local�activate�
deactivate�gettext�ngettext�thousands_separator�fr_FR� cCsBz&tdkrWdStj�tj�t�d�WStk
r<YdSXdS)N�locale)�__file__�os�path�join�dirname�	NameError�rr�>/opt/alt/python38/lib/python3.8/site-packages/humanize/i18n.py�_get_default_locale_pathsrc	Cs2zttjWSttfk
r,tdYSXdS)N)�
_TRANSLATIONS�_CURRENTr
�AttributeError�KeyErrorrrrr�get_translationsrcCsL|dkrt�}|dkrtd��|tkr>t�d||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.Zhumanize)r�	Exceptionr�gettext_module�translationrr
)r
r
rrrrr"s�cCs
dt_dS)z Deactivate internationalisation.N)rr
rrrrr@scCst��|�S)zvGet translation.

    Args:
        message (str): Text to translate.

    Returns:
        str: Translated text.
    )rr��messagerrrrEs	cCsRzt��||�WStk
rL|d|}t��|�}||krD|n|YSXdS)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.
    �N)r�pgettextrr)Zmsgctxtr�keyrrrrrQsrcCst��|||�S)a5Plural version of gettext.

    Args:
        message (str): Singular text to translate.
        plural (str): Plural text to translate.
        num (str): The number (e.g. item count) to determine translation for the
            respective grammatical number.

    Returns:
        str: Translated text.
    )rr)r�plural�numrrrrjscCs|S)a^Mark 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.
    rrrrr�gettext_noopysr#cCs||fS)a�Mark 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)Zsingularr!rrr�
ngettext_noop�sr$)�returnc	Cs0zttj}Wnttfk
r*d}YnX|S)ztReturn the thousands separator for a locale, default to comma.

    Returns:
         str: Thousands separator.
    �,)�_THOUSANDS_SEPARATORrr
rr)�seprrrr�s

)N)�__doc__rr�os.pathr�	threadingr�__all__�NullTranslationsrrr'rrrrrrr#r$�strrrrrr�<module>s&�	


Youez - 2016 - github.com/yon3zu
LinuXploit