mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-06-02 21:49:33 +00:00
17 lines
384 B
Python
17 lines
384 B
Python
|
#!/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()
|
||
|
|
||
|
|
||
|
|