mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-25 17:31:00 +00:00
16 lines
360 B
Python
Executable file
16 lines
360 B
Python
Executable file
#!/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")
|
|
sys.argv = ["", "compile", "-f", "-d", locales_dir]
|
|
pybabel()
|
|
|
|
|
|
|