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 d707f24

Browse filesBrowse files
beccasaurushappyhuman
authored andcommitted
Translation v3beta1 samples (GoogleCloudPlatform#2084)
* Add in progress beta snippets Change-Id: I2cd8ddc2307a8e40d56ce7e493749dc05c34d164 * Add google-cloud-storage dependency Change-Id: Iff7bc9b2c82b1e829580a3d4ad628087dbeee8be * Non-'global' location required for BatchTranslateText Change-Id: I5198aa6368a088e8f5ee295dc55a5e9e4ca8f494 * Upgrade google-cloud-translate to 1.4.0 1.4.0 includes the new v3beta1 alongside V2 Change-Id: I5adfe78ea7e78d84678db343cd84516e3d05491f * Update Translate samples You can now provide your own glossary ID The tests now run within a randomly created bucket (deleted after each test) Change-Id: I5cb2680cd0e9e43c85932a6a0dc19e6fab5008c5 * pytest.fixture for random test bucket Change-Id: I8e816ed4c95a6235347a29849044b4cab02d40a8 * flake8 spec fixes Change-Id: I4932bcf856a9498b01d9661c90c6b45ee2958ee1 * Added pytest fixture for creating glossary (WIP) Change-Id: Iddb5ecbf0eefb9efd2243dc4bc56b585102e9351 * Add assertions, remove placeholder TODOs Change-Id: If1eb20bca5bfcc87dd0652d5488b2188afa626af
1 parent d487509 commit d707f24
Copy full SHA for d707f24

File tree

Expand file treeCollapse file tree

5 files changed

+533
-1
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+533
-1
lines changed

‎translate/cloud-client/README.rst

Copy file name to clipboardExpand all lines: translate/cloud-client/README.rst
+37Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,43 @@ To run this sample:
121121
122122
123123
124+
Beta Snippets
125+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
126+
127+
.. image:: https://gstatic.com/cloudssh/images/open-btn.png
128+
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=translate/cloud-client/beta_snippets.py,translate/cloud-client/README.rst
129+
130+
131+
132+
133+
To run this sample:
134+
135+
.. code-block:: bash
136+
137+
$ python beta_snippets.py
138+
139+
usage: beta_snippets.py [-h]
140+
{translate-text,batch-translate-text,detect-language,list-languages,list-languages-with-target,create-glossary,get-glossary,list-glossaries,delete-glossary,translate-with-glossary}
141+
...
142+
143+
positional arguments:
144+
{translate-text,batch-translate-text,detect-language,list-languages,list-languages-with-target,create-glossary,get-glossary,list-glossaries,delete-glossary,translate-with-glossary}
145+
translate-text
146+
batch-translate-text
147+
detect-language
148+
list-languages
149+
list-languages-with-target
150+
create-glossary
151+
get-glossary
152+
list-glossaries
153+
delete-glossary
154+
translate-with-glossary
155+
156+
optional arguments:
157+
-h, --help show this help message and exit
158+
159+
160+
124161
125162
126163
The client library

‎translate/cloud-client/README.rst.in

Copy file name to clipboardExpand all lines: translate/cloud-client/README.rst.in
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ samples:
1818
- name: Snippets
1919
file: snippets.py
2020
show_help: true
21+
- name: Beta Snippets
22+
file: beta_snippets.py
23+
show_help: true
2124

2225
cloud_client_library: true
2326

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.