Skip to content

Commit

Permalink
Merge pull request #12020 from oge1ata/devDocsBranch
Browse files Browse the repository at this point in the history
Added code for deletion of csv files in line #397
  • Loading branch information
rtibbles authored Apr 11, 2024
2 parents b242136 + 85510fa commit 8c84488
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/kolibri-tools/lib/i18n/crowdin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import glob
import io
import logging
import os
Expand Down Expand Up @@ -392,6 +393,11 @@ def download_translations(branch, project, locale_data_folder):
code = lang_object[KEY_CROWDIN_CODE]
locale_dir_path = local_locale_path(lang_object, locale_data_folder)
logging.info("\tExtracting {} to {}".format(code, locale_dir_path))

csv_files = glob.glob(os.path.join(locale_dir_path, "*.csv"))
for csv_file in csv_files:
os.remove(csv_file)

MESSAGES = os.path.join(zip_dir, code)
if os.path.exists(MESSAGES):
for msg_file in os.listdir(MESSAGES):
Expand Down

0 comments on commit 8c84488

Please sign in to comment.