mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-15 14:32:53 +00:00
Auto self-translation
This commit is contained in:
parent
50c9b62595
commit
3cbbd8ae16
10 changed files with 135 additions and 60 deletions
16
compile_locales.py
Executable file
16
compile_locales.py
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/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", "-d", locales_dir]
|
||||
pybabel()
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue