Skip to content

Commit feffa88

Browse files
gguussdanoscarmike
authored andcommitted
Adds six for 2/3 compatibility
1 parent f071e53 commit feffa88

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

translation/samples/snippets/snippets.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828

2929
from google.cloud import translate
30+
from six import python_2_unicode_compatible
3031

3132

3233
def detect_language(text):
@@ -89,6 +90,7 @@ def translate_text_with_model(target, text, model=translate.NMT):
8990
result['detectedSourceLanguage']))
9091

9192

93+
@python_2_unicode_compatible
9294
def translate_text(target, text):
9395
"""Translates text into the target language.
9496

0 commit comments

Comments
 (0)