
    <#(i&                       U d Z ddlmZ ddlZddlmZ dZerddlZddl	Z	g dZ
d ej                    iZded<    e            Zd	d
d	d	d
dZdd	ddddZd(dZd)dZ	 d*d+dZd,dZd-dZd.dZd/d!Zd-d"Zd0d%Zd1d&Zd1d'ZdS )2z*Activate, get and deactivate translations.    )annotationsN)localF)activate
deactivatedecimal_separatorthousands_separatorz1dict[str | None, gettext_module.NullTranslations]_TRANSLATIONS. )de_DEfr_FRit_ITpt_BRhu_HU,returnpathlib.Path | Nonec                     t           ot           j        } | sd S dd l}|j                            |j                            |                     5 }|dz  cd d d            S # 1 swxY w Y   d S )Nr   locale)__spec__parentimportlib.resources	resourcesas_filefiles)package	importlibpkgs      M/var/www/html/auto_sub_bot/venv/lib/python3.11/site-packages/humanize/i18n.py_get_default_locale_pathr    (   s    *8?G t			$	$Y%8%>%>w%G%G	H	H CX~                 s   A  A$'A$gettext_module.NullTranslationsc                 z    	 t           t          j                 S # t          t          f$ r t           d          cY S w xY wN)r	   _CURRENTr   AttributeErrorKeyError     r   get_translationr)   3   sE    #X_--H% # # #T""""#s    ::r   
str | Nonepathstr | os.PathLike[str] | Nonec                .   | |                      d          rdt          _        t          d         S |t	                      }|d}t          |          | t          vr!t          j        d|| g          }|t          | <   | t          _        t          |          S )a  Activate internationalisation.

    Set `locale` as current locale. Search for locale in directory `path`.

    Args:
        locale (str | None): Language name, e.g. `en_GB`. If `None`, defaults to no
            transaltion. Similar to calling ``deactivate()``.
        path (str | pathlib.Path): Path to search for locales.

    Returns:
        dict: Translations.

    Raises:
        Exception: If humanize cannot find the locale folder.
    NenznHumanize cannot determinate the default location of the 'locale' folder. You need to pass the path explicitly.humanize)
startswithr$   r   r	   r    	Exceptiongettext_moduletranslation)r   r+   msgr3   s       r   r   r   :   s    $ ~**400~T""|'))|4 	 nn]""$0TF8LL +fHO  r(   Nonec                     dt           _        dS )z Deactivate internationalisation.N)r$   r   r'   r(   r   r   r   `   s    HOOOr(   messagestrc                D    t                                          |           S )zvGet translation.

    Args:
        message (str): Text to translate.

    Returns:
        str: Translated text.
    )r)   gettextr7   s    r   _gettextr<   e   s     $$W---r(   msgctxtc                F    t                                          | |          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)r=   r7   s     r   	_pgettextr@   q   s      %%gw777r(   pluralnumintc                H    t                                          | ||          S )a6  Plural 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)r7   rA   rB   s      r   	_ngettextrF      s"     %%gvs;;;r(   c                    | S )aa  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.
    r'   r;   s    r   _gettext_nooprH      s	      Nr(   singulartuple[str, str]c                
    | |fS )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'   )rI   rA   s     r   _ngettext_nooprL      s    " Vr(   c                 j    	 t           t          j                 } n# t          t          f$ r d} Y nw xY w| S )ztReturn the thousands separator for a locale, default to comma.

    Returns:
         str: Thousands separator.
    r   )_THOUSANDS_SEPARATORr$   r   r%   r&   seps    r   r   r      sC    "8?3H%   J    00c                 j    	 t           t          j                 } n# t          t          f$ r d} Y nw xY w| S )znReturn the decimal separator for a locale, default to dot.

    Returns:
         str: Decimal separator.
    r
   )_DECIMAL_SEPARATORr$   r   r%   r&   rO   s    r   r   r      sC     1H%   JrQ   )r   r   )r   r!   r#   )r   r*   r+   r,   r   r!   )r   r5   )r7   r8   r   r8   )r=   r8   r7   r8   r   r8   )r7   r8   rA   r8   rB   rC   r   r8   )rI   r8   rA   r8   r   rJ   )r   r8   )__doc__
__future__r   r:   r2   	threadingr   TYPE_CHECKINGospathlib__all__NullTranslationsr	   __annotations__r$   rN   rS   r    r)   r   r   r<   r@   rF   rH   rL   r   r   r'   r(   r   <module>r]      s   0 0 0 " " " " " "               IIINNN
P
P
P 	
).
)
+
+D     577
         # # # # ?C#! #! #! #! #!L   
	. 	. 	. 	.8 8 8 8 < < < <   &   (
 
 
 

 
 
 
 
 
r(   