@@ -75,7 +75,7 @@ def tarfile_filter(tar_info):
7575x in name
7676for x in [
7777"__pycache__" ,
78- "friendly /locales" ,
78+ "friendly_traceback /locales" ,
7979"birdseye/static" ,
8080"pygments/lexers" ,
8181 ]
@@ -125,7 +125,15 @@ def main():
125125
126126with tarfile .open (frontend_src / "python_core.tar.load_by_url" ,"w" )as tar :
127127tar .add (this_dir ,arcname = this_dir .stem ,recursive = True ,filter = tarfile_filter )
128- tar .add (this_dir .parent / "translations" ,arcname = "translations" ,recursive = True ,filter = tarfile_filter )
128+ if t .current_language not in (None ,"en" ):
129+ for arcname in [
130+ f"translations/locales/{ t .current_language } " ,
131+ f"translations/codes.json" ,
132+ ]:
133+ tar .add (this_dir .parent / arcname ,arcname = arcname ,recursive = True ,filter = tarfile_filter )
134+ arcname = f"friendly_traceback/locales/{ t .current_language } /LC_MESSAGES/friendly_tb_{ t .current_language } .mo"
135+ tar .add (Path (site_packages )/ arcname ,arcname = arcname )
136+
129137for root in roots :
130138tar .add (
131139Path (site_packages )/ root ,