mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-01-17 17:44:29 +02:00
Allow execution of scripts even if lt package is not installed
This commit is contained in:
parent
230eee1490
commit
cfe904dfe2
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
from babel.messages.frontend import main as pybabel
|
from babel.messages.frontend import main as pybabel
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
import argparse
|
import argparse
|
||||||
from libretranslate.init import check_and_install_models
|
from libretranslate.init import check_and_install_models
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
import re
|
import re
|
||||||
import polib
|
import polib
|
||||||
import json
|
import json
|
||||||
|
Loading…
Reference in New Issue
Block a user