
    BPc                     T   d Z ddlZddlZddlZej                            d          Zej                            d          Zej                            d          ZeefdZ	d Z
 e
            j        Z	  e
            j        Z	 d Zej        d	k    r e
            j        ZdS d
 ZdS )z)
Allow extensions to translate messages.
    NINKEX_GETTEXT_DOMAININKEX_GETTEXT_DIRECTORYINKSCAPE_LOCALEDIRc                     | 't          j                                                     dS d}t          j        | ||d          }|                                 dS )zVConfigure gettext and install _() function into builtins namespace for easy
    accessNTfallback)gettextNullTranslationsinstalltranslation)domain	localedir	languagestranss       4/usr/share/inkscape/extensions/inkex/localization.pylocalizer   $   sZ     ~ ""**,,,
 I	9tLLLE	MMOOOOO    c                  H    d} t           }d}t          j        | ||d          S )z
    Return internal Translations instance for translation of the inkex module itself
    Those will always use the 'inkscape' domain and attempt to lookup the same catalog
    Inkscape uses
    inkscapeNTr   )r   r	   r   )r   r   r   s      r   inkex_localizer   :   s-     F"IIvy)dKKKKr   c                 6     t          |           j        |i |S )a  
    Shortcut for gettext and subsequent formatting. Import as::

        from inkex.localize import inkex_fgettext as _f

    The positionals and keyword arguments are passed to ``str.format()``.

    The call to xgettext must contain::

        --keyword=_f
    )inkex_gettextformat)messageargskwargss      r   inkex_fgettextr   X   s$     )=!!($9&999r   )      c                     |S )N )contextr   s     r   <lambda>r#   u   s    g r   )__doc__r	   ossysenvirongetGETTEXT_DOMAINGETTEXT_DIRECTORYr   r   r   r   ngettextinkex_ngettextr   version_infopgettextinkex_pgettextr!   r   r   <module>r0      s  (     677JNN#<==  Z^^$899  #.?    ,L L L   (  !!*: : : v#^%%.N
 
 65NNNr   