o
    g7                     @   s`   U d Z ddlmZmZmZ dgZee ed< ddlm	Z	 ddee
ef d	ed
ee fddZdS )zTranslations.    )ListOptionalUnionget_client_error__all__   )	errorcodeengerrorlanguagereturnc                 C   s   zt d| t t dg}W n ty   td| ddw |j}t| tr<| }tj	 D ]\}}||kr;|}  nq/t| t
rRzt|| W S  tyQ   Y dS w td)a  Lookup client error

    This function will lookup the client error message based on the given
    error and return the error message. If the error was not found,
    None will be returned.

    Error can be either an integer or a string. For example:
        error: 2000
        error: CR_UNKNOWN_ERROR

    The language attribute can be used to retrieve a localized message, when
    available.

    Returns a string or None.
    zmysql.connector.locales.client_errorz&No localization support for language ''Nz6error argument needs to be either an integer or string)
__import__globalslocalsImportErrorr   
isinstanceintr   __dict__itemsstrgetattrAttributeError
ValueError)r
   r   tmpr   errnokeyvalue r   Z/var/www/html/api-tag/env/lib/python3.10/site-packages/mysql/connector/locales/__init__.pyr   &   s:   


N)r	   )__doc__typingr   r   r   r   r   __annotations__ r   r   r   r   r   r   r    <module>   s
   (