=
commited on
Commit
·
3a33d4e
1
Parent(s):
30768eb
test on bionic with sudo
Browse files- .travis.yml +2 -1
- deep_translator/cli.py +2 -2
- deep_translator/mymemory.py +0 -4
.travis.yml
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
# Config file for automatic testing at travis-ci.com
|
| 2 |
-
|
|
|
|
| 3 |
language: python
|
| 4 |
python:
|
| 5 |
- 3.8
|
|
|
|
| 1 |
# Config file for automatic testing at travis-ci.com
|
| 2 |
+
os: linux
|
| 3 |
+
sudo: enabled
|
| 4 |
language: python
|
| 5 |
python:
|
| 6 |
- 3.8
|
deep_translator/cli.py
CHANGED
|
@@ -21,8 +21,8 @@ def translate(args):
|
|
| 21 |
print("given translator is not supported. Please use a supported translator from the deep_translator tool")
|
| 22 |
|
| 23 |
res = translator.translate(args.text)
|
| 24 |
-
print(
|
| 25 |
-
print(
|
| 26 |
|
| 27 |
|
| 28 |
def main():
|
|
|
|
| 21 |
print("given translator is not supported. Please use a supported translator from the deep_translator tool")
|
| 22 |
|
| 23 |
res = translator.translate(args.text)
|
| 24 |
+
print(" | Translation from {} to {} |".format(args.source, args.target))
|
| 25 |
+
print("Translated text: \n {}".format(res))
|
| 26 |
|
| 27 |
|
| 28 |
def main():
|
deep_translator/mymemory.py
CHANGED
|
@@ -88,7 +88,3 @@ class MyMemoryTranslator(BaseTranslator):
|
|
| 88 |
except Exception as e:
|
| 89 |
raise e
|
| 90 |
|
| 91 |
-
|
| 92 |
-
if __name__ == '__main__':
|
| 93 |
-
res = MyMemoryTranslator(source="auto", target="fr").translate("you are cute")
|
| 94 |
-
print(res)
|
|
|
|
| 88 |
except Exception as e:
|
| 89 |
raise e
|
| 90 |
|
|
|
|
|
|
|
|
|
|
|
|