1
0
mirror of https://github.com/LibreTranslate/LibreTranslate.git synced 2024-12-24 10:06:43 +02:00
LibreTranslate/compile_locales.py

17 lines
360 B
Python
Raw Normal View History

2023-01-04 22:36:26 +02:00
#!/usr/bin/env python
import sys
import os
from babel.messages.frontend import main as pybabel
if __name__ == "__main__":
locales_dir = os.path.join("libretranslate", "locales")
if not os.path.isdir(locales_dir):
os.makedirs(locales_dir)
print("Compiling locales")
2023-01-05 20:12:35 +02:00
sys.argv = ["", "compile", "-f", "-d", locales_dir]
2023-01-04 22:36:26 +02:00
pybabel()