
    ^hL                         S r SSKJr  SSKrSSKJr  SSKJr  SS jr " S S\5      r	\S	 5       r
\S
:X  a  \" 5         gg)zFHatch build hook to compile Portable Object (.po) translations to .mo.    )PathN)BuildHookInterface)hookimplc                  0   [        [        5      R                  R                  5       n [	        U R                  S5      5      nU H  nUR                  R                  nS H}  nX$ S3-  nX$ S3-  nUR                  5       (       d  [        SU S35        M7  SSS	US
SUS[        U5      S[        U5      /n [        R                  " USS9  [        SU SU 35        M     M     g! [        R                   a  n[        SU SU 35         SnAM  SnAff = f)zCCompile the .po files into .mo files that contain the translations.z*/LC_MESSAGES)	nbclassicnbuiz.poz.moz	Warning: z does not exist, skipping.pybabelcompilez-Dz-fz-lz-iz-oT)checkz
Compiled: z -> zError compiling z: N)r   __file__parentabsolutelistglobnameexistsprintstr
subprocessrunCalledProcessError)	i18n_dirpathspLANG	componentpo_filemo_filecmdes	            ^/home/james-whalen/.local/lib/python3.13/site-packages/nbclassic/i18n/build_py_translations.pycompile_translationsr"   
   s   H~$$--/H/0Exx}}.IKs++GKs++G>>##	'*DEF 9idc'lc'lC9s$/
7)4y9:' / . 00 9(	A37889s   6&C%%D9DDc                   "    \ rS rSrSrSS jrSrg)CompileTranslationsHook+   z+Build hook for compiling translation files.Nc                     [        5         g)z4Finalize the build hook - compile translation files.N)r"   )selfargss     r!   finalize CompileTranslationsHook.finalize.   s         returnN)__name__
__module____qualname____firstlineno____doc__r)   __static_attributes__r,   r+   r!   r$   r$   +   s
    5r+   r$   c                      [         $ )N)r$   r,   r+   r!   hatch_register_build_hookr6   3   s    ""r+   __main__r-   )r3   pathlibr   r   )hatchling.builders.hooks.plugin.interfacer   hatchling.pluginr   r"   r$   r6   r/   r,   r+   r!   <module>r;      sP    L   H %9B0  
# 
# z r+   