
    -Phi                     T    d Z dZddlmZ ddlmZ  G d d          Z e            ZdS )zL
This package contains modules for language-dependent features of Docutils.
reStructuredText    )import_module)normalize_language_tagc                   :    e Zd ZdZdZdZdZd Zd
dZd Z	d
d	Z
dS )LanguageImportera  Import language modules.

    When called with a BCP 47 language tag, instances return a module
    with localisations from `docutils.languages` or the PYTHONPATH.

    If there is no matching module, warn (if a `reporter` is passed)
    and fall back to English.
    )zdocutils.languages. zHLanguage "%s" not supported: Docutils-generated text will be in English.enc                     i | _         d S N)cache)selfs    [/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/docutils/languages/__init__.py__init__zLanguageImporter.__init__"   s    


    Nc                    d}| j         D ]}}	 t          ||z             }|                     |           nR# t          t          f$ r> |r|r|                    | d           n|r|                    d||z    d           Y yw xY w |S )z/Try loading module `name` from `self.packages`.Nz) is no complete Docutils language module.zModule "z" not found.)packagesr   check_contentImportErrorAttributeErrorinfo)r   namereportermodulepackages        r   import_from_packagesz%LanguageImporter.import_from_packages%   s    } 	 	G	&wt|44""6****0    I IMMV #> #> #> ? ? ? ? IMM"GWT\"G"G"GHHH s   '5ABBc                     t          |j        t                    r4t          |j        t                    rt          |j        t
                    st          dS )z+Check if we got a Docutils language module.N)
isinstancelabelsdictbibliographic_fieldsauthor_separatorslistr   )r   r   s     r   r   zLanguageImporter.check_content6   sR    6=$// 	v:DAA	v7>>	 	 	r   c                    	 | j         |         S # t          $ r Y nw xY wt          |          D ]2}|                    dd          }|                     ||          }| nA3|r|                    | j        |z             | j        r|                     | j                  }|r"|dk    r|                    d|d|d           || j         |<   |S )N-_r	   zUsing z for language "z".)	r   KeyErrorr   replacer   warningwarn_msgfallbackr   )r   language_coder   tagr   s        r   __call__zLanguageImporter.__call__=   s   	:m,, 	 	 	D	)-88 		B 		BC++c3''C..sH==F! "  @  !>???} B224=AA 	5$..MMM#VV]]]4 5 5 5$*
=!s    
r   )__name__
__module____qualname____doc__r   r)   r*   r   r   r   r-    r   r   r   r      sw          +H>HH     "       r   r   N)r1   __docformat__	importlibr   docutils.utilsr   r   get_languager2   r   r   <module>r7      sw     # # # # # # # 1 1 1 1 1 1= = = = = = = =@  !!r   