mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-12-18 08:27:03 +02:00
17 lines
384 B
Python
Executable File
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()
|
|
|
|
|
|
|