403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/sphinx/locale/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/sphinx/locale/__pycache__/__init__.cpython-39.pyc
a

�ab�"�@s�UdZddlZddlZddlmZmZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZmZGdd�de�Zee�ae
eeefefed<d,ee
ee
eeeeeefd�dd
�Zd-eeeeefdd�dd�Zeeeeefd�dd�Zd.eeed�dd�Zd/eeed�dd�Zeeeed�dd�Zd0eee	d�dd�Zed	�Zed	d�Zed�ed �ed!�ed"�ed#�ed$�ed%�ed&�ed'�ed(�d)�
ZiZ e
eefed*<iZ!e
eefed+<dS)1z�
    sphinx.locale
    ~~~~~~~~~~~~~

    Locale utilities.

    :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�
UserString�defaultdict)�NullTranslations)�Any�Callable�Dict�Iterable�List�Optional�Tuple�Unionc@sVeZdZdZdZeeed�dd�Ze	ed�dd�Z
eed	d�d
d�Zeed�dd
��Z
d/eeed�dd�Zeed�dd�Zed�dd�Zeed�dd�Zeed�dd�Zeed�dd�Zeed�dd�Zeed�dd�Zeed�d d!�Zeed"�d#d$�Ze	ee	ed%ffd�d&d'�Ze	ee	efd	d(�d)d*�Zdd�d+d,�Zed�d-d.�Zd	S)0�_TranslationProxya
    Class for proxy strings from gettext translations. This is a helper for the
    lazy_* functions from this module.

    The proxy implementation attempts to be as complete as possible, so that
    the lazy objects should mostly work as expected, for example for sorting.

    This inherits from UserString because some docutils versions use UserString
    for their Text nodes, which then checks its argument for being either a
    basestring or UserString, otherwise calls str() -- not unicode() -- on it.
    �Z_func�_args)�func�args�returncGs|st|�St�|�S�N)�str�object�__new__)�clsrr�r�:/usr/lib/python3.9/site-packages/sphinx/locale/__init__.pyr sz_TranslationProxy.__new__)rcCs|jf|jSrr��selfrrr�__getnewargs__&sz _TranslationProxy.__getnewargs__NcGs||_||_dSrr)rrrrrr�__init__)sz_TranslationProxy.__init__cCs|j|j�Srrrrrr�data-sz_TranslationProxy.data)�encoding�errorsrcCs2|r$|r|j�||�S|j�|�Sn
|j��SdSr)r�encode)rrr rrrr!4s
z_TranslationProxy.encodecCstt�Sr)�dirrrrrr�__dir__=sz_TranslationProxy.__dir__cCs
t|j�Sr)rrrrrr�__str__@sz_TranslationProxy.__str__)�otherrcCs
|j|Sr�r�rr%rrr�__add__Csz_TranslationProxy.__add__cCs
||jSrr&r'rrr�__radd__Fsz_TranslationProxy.__radd__cCs
|j|Srr&r'rrr�__mod__Isz_TranslationProxy.__mod__cCs
||jSrr&r'rrr�__rmod__Lsz_TranslationProxy.__rmod__cCs
|j|Srr&r'rrr�__mul__Osz_TranslationProxy.__mul__cCs
||jSrr&r'rrr�__rmul__Rsz_TranslationProxy.__rmul__)�namercCs|dkr|��St|j|�S)N�__members__)r#�getattrr)rr.rrr�__getattr__Usz_TranslationProxy.__getattr__.cCs|j|jfSrrrrrr�__getstate__Zsz_TranslationProxy.__getstate__)�tuprcCs|\|_|_dSrr)rr3rrr�__setstate__]sz_TranslationProxy.__setstate__cCs|Srrrrrr�__copy__`sz_TranslationProxy.__copy__cCs8zdtt|j��WSty2d|jjYS0dS)N�iz<%s broken>)�reprrr�	Exception�	__class__�__name__rrrr�__repr__csz_TranslationProxy.__repr__)NN)r:�
__module__�__qualname__�__doc__�	__slots__rrrrrrr�propertyr�bytesr!r	r#r$r(r)r*r+rr,r-r1r2r4r5r;rrrrr
s*	r
�translators�sphinx�general)�locale_dirs�language�catalog�	namespacerc		Cs�t�||f�}|jturd}d}|r@d|vr@||�d�dg}n|rL|g}nd}|D]D}z,tj|||d�}|durx|}n
|�|�WqTty�YqT0qT|dur�t�}d}|t||f<||fS)aLook for message catalogs in `locale_dirs` and *ensure* that there is at
    least a NullTranslations catalog set in `translators`. If called multiple
    times or if several ``.mo`` files are found, their contents are merged
    together (thus making ``init`` reentrant).
    NT�_r)�	localedir�	languagesF)	rB�getr9r�split�gettext�translation�add_fallbackr8)	rErFrGrH�
translatorZhas_translationrKZdir_Ztransrrr�initms,
rR)�category�valuercCs*zt�||�Wntjy$Yn0dS)a�Update locale settings.

    This does not throw any exception even if update fails.
    This is workaround for Python's bug.

    For more details:

    * https://github.com/sphinx-doc/sphinx/issues/5724
    * https://bugs.python.org/issue18378#msg215215

    .. note:: Only for internal use.  Please don't call this method from extensions.
              This will be removed in future.
    N)�locale�	setlocale�Error)rSrTrrrrV�srV)�
locale_dirrGrcCs<zt�tj�\}}Wnty*d}Yn0t|g||d�S)z>Initialize locale for console.

    .. versionadded:: 1.8
    N�console)rU�	getlocale�LC_MESSAGES�AttributeErrorrR)rXrGrFrIrrr�init_console�s

r])rGrHrcCst||fSr�rB�rGrHrrr�get_translator�sr`cCs||ftvSrr^r_rrr�is_translator_registered�sra)rGrH�messagercCst||�}|�|�S)zcUsed instead of _ when creating TranslationProxy, because _ is
    not bound yet at that time.
    )r`rN)rGrHrbrQrrr�_lazy_translate�s
rccstttd���fdd�}|S)aAGet a translation function based on the *catalog* and *namespace*.

    The extension can use this API to translate the messages on the
    extension::

        import os
        from sphinx.locale import get_translation

        MESSAGE_CATALOG_NAME = 'myextension'  # name of *.pot, *.po and *.mo files
        _ = get_translation(MESSAGE_CATALOG_NAME)
        text = _('Hello Sphinx!')


        def setup(app):
            package_dir = os.path.abspath(os.path.dirname(__file__))
            locale_dir = os.path.join(package_dir, 'locales')
            app.add_message_catalog(MESSAGE_CATALOG_NAME, locale_dir)

    With this code, sphinx searches a message catalog from
    ``${package_dir}/locales/${language}/LC_MESSAGES/myextension.mo``.
    The :confval:`language` is used for the searching.

    .. versionadded:: 1.8
    )rbrrcsRt���stt��|�St���}t|�dkr8|�|�S|�||d|d�SdS)N�r)rar
rcr`�lenrN�ngettext)rbrrQr_rrrN�s


z get_translation.<locals>.gettext)rr)rGrHrNrr_r�get_translation�srgrYZ	AttentionZCautionZDangerrWZHintZ	ImportantZNotezSee alsoZTip�Warning)
Z	attentionZcautionZdanger�error�hintZ	importantZnoteZseealsoZtipZwarning�
versionlabels�pairindextypes)rCrD)N)rCrD)rCrD)rD)"r>rNrU�collectionsrrr�typingrrrrr	r
rrr
rBr�__annotations__�boolrR�intrVr]r`rarcrgrI�__Zadmonitionlabelsrkrlrrrr�<module>s@
(X ��* *
�

Youez - 2016 - github.com/yon3zu
LinuXploit