6c351c30d3
Crowdin does not delete files from translations when the main language has a deleted file. This script will do that job for them.
16 lines
332 B
Python
16 lines
332 B
Python
import os
|
|
|
|
|
|
files_in_main = []
|
|
|
|
|
|
for i in os.listdir("_pages/en_US/"):
|
|
files_in_main.append(i)
|
|
|
|
for i in os.listdir("_pages/"):
|
|
if i == "en_US":
|
|
continue
|
|
for j in os.listdir(f"_pages/{i}"):
|
|
if j not in files_in_main:
|
|
print(f"Deleting _pages/{i}/{j}")
|
|
os.remove(f"_pages/{i}/{j}")
|