Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ca3796b

Browse filesBrowse files
committed
Adds six for 2/3 compatibility
1 parent bc4f12f commit ca3796b
Copy full SHA for ca3796b

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎translate/cloud-client/snippets.py

Copy file name to clipboardExpand all lines: translate/cloud-client/snippets.py
+2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.