
    h                     :    d dl mZ d dlmZ d dlmZ d Zd Zd Zy)    Path)Local)appsc                 8    | j                   j                  d      S )z7Return True if the given module is nested under Django.zdjango.)__name__
startswith)modules    d/var/www/html/ranktracker/api/venv/lib/python3.12/site-packages/django/utils/translation/reloader.py_is_django_moduler      s    ??%%i00    c                    ddl m} |j                  rrt        d      g}|j	                  d t        j                         D               |j	                  d |j                  D               |D ]  }| j                  |d        yy)z?Register file watchers for .mo files in potential locale paths.r   )settingslocalec              3   v   K   | ]1  }t        |j                        st        |j                        d z   3 yw)r   N)r   r
   r   path).0configs     r   	<genexpr>z0watch_for_translation_changes.<locals>.<genexpr>   s2      
$V]]3 (
s   79c              3   2   K   | ]  }t        |        y w)Nr   )r   ps     r   r   z0watch_for_translation_changes.<locals>.<genexpr>   s     Bq47Bs   z**/*.moN)	django.confr   USE_I18Nr   extendr   get_app_configsLOCALE_PATHS	watch_dir)senderkwargsr   directoriesr   s        r   watch_for_translation_changesr!      s~    $H~& 
..0
 	

 	BH,A,ABB 	.DT9-	. r   c                     |j                   dk(  r/ddl}ddlm} i |_        i |_        d|_        t               |_        yy)z@Clear the internal translations cache if a .mo file is modified.z.mor   N)
trans_realT)suffixgettextdjango.utils.translationr#   _translations_defaultr   _active)r   	file_pathr   r%   r#   s        r   translation_file_changedr+      s@    5 7 "#%
 "
"W
 !r   N)	pathlibr   asgiref.localr   django.appsr   r   r!   r+    r   r   <module>r0      s      1
. 
r   