Gradience/po/update_linguas.py

16 lines
308 B
Python
Raw Normal View History

2022-08-13 16:59:06 +00:00
import os
def list_po():
files = []
for _, _, filesname in os.walk("po"):
for file in filesname:
if file.endswith(".po"):
files.append(file.strip(".po"))
return files
with open("LINGUAS", "w") as file:
po = "\n".join(list_po())
file.write(po)