1
0
mirror of https://github.com/LibreTranslate/LibreTranslate.git synced 2024-12-18 08:27:03 +02:00
LibreTranslate/compile_translations.py
2023-01-04 12:15:18 -05:00

17 lines
384 B
Python
Executable File

#!/usr/bin/env python
import sys
import os
from babel.messages.frontend import main as pybabel
if __name__ == "__main__":
translations_dir = os.path.join("libretranslate", "translations")
if not os.path.isdir(translations_dir):
os.makedirs(translations_dir)
print("Compiling translations")
sys.argv = ["", "compile", "-d", translations_dir]
pybabel()