bloxstrap/Scripts/Translations/prep.py
2024-07-09 00:17:04 +04:00

11 lines
371 B
Python

import glob, shutil, re
exports = input("Path of folder of exported Crowdin files: ")
dest = input("Destination resources folder: ")
for filename in glob.glob(f"{exports}\\**\\*.*", recursive=True):
print(f"Copying {filename}")
localeCode = re.search("\\\\([a-zA-Z\\-]+)\\\\Strings.", filename).group(1)
shutil.copy(filename, dest + f"\\Strings.{localeCode}.resx")