o
    <6jz                     @   s   U d dl mZ d dlmZ d dlmZmZ eejjd Z	g dZ
dZeee	d Zi Zeeef ed< e
D ]Zeegd	ged
dee< q7efdededefddZefdededefddZdS )    )Path)Optional)FluentLocalizationFluentResourceLoaderlocales)uzruenr   z	/{locale}_localizationszmessages.ftlF)r   resource_idsresource_loaderuse_isolatingkeylangreturnc                 K   s`   |t vrt}t | }|| |r|nd}|du r(|tkr(t t | |r%|nd}|p/d|  dS )z}
    Lokalizatsiya kaliti bo'yicha tarjimani olish.

    Foydalanish:
        get_text("welcome", lang="uz", name="Ali")
    N[])r
   DEFAULT_LANGformat_value)r   r   kwargslocresult r   >/var/www/www-root/data/www/ai-bot.pdev.uz/bot/services/i18n.pyget_text   s   r   c                 K   s   t | |fi |S )zget_text uchun qisqa alias)r   )r   r   r   r   r   r   __0   s   r   N)pathlibr   typingr   fluent.runtimer   r   __file__parentLOCALES_DIRSUPPORTED_LANGSr   str_loaderr
   dict__annotations__r   r   r   r   r   r   r   <module>   s"    