Skip to content

Commit

Permalink
chore: update templates
Browse files Browse the repository at this point in the history
  • Loading branch information
danoscarmike committed Jul 31, 2020
1 parent 82a7d87 commit f9f2ac8
Show file tree
Hide file tree
Showing 6 changed files with 497 additions and 6 deletions.
1 change: 1 addition & 0 deletions translation/samples/AUTHORING_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md
1 change: 1 addition & 0 deletions translation/samples/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/CONTRIBUTING.md
32 changes: 28 additions & 4 deletions translation/samples/snippets/README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

.. This file is automatically generated. Do not edit this file directly.
Google Translation API Python Samples
Expand All @@ -14,10 +15,12 @@ This directory contains samples for Google Translation API. With `Google Transla

.. _Google Translation API: https://cloud.google.com/translate/docs


Setup
-------------------------------------------------------------------------------



Authentication
++++++++++++++

Expand All @@ -28,6 +31,9 @@ credentials for applications.
.. _Authentication Getting Started Guide:
https://cloud.google.com/docs/authentication/getting-started




Install Dependencies
++++++++++++++++++++

Expand All @@ -42,7 +48,7 @@ Install Dependencies
.. _Python Development Environment Setup Guide:
https://cloud.google.com/python/setup

#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+.
#. Create a virtualenv. Samples are compatible with Python 3.6+.

.. code-block:: bash
Expand All @@ -58,9 +64,15 @@ Install Dependencies
.. _pip: https://pip.pypa.io/
.. _virtualenv: https://virtualenv.pypa.io/






Samples
-------------------------------------------------------------------------------


Quickstart
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand All @@ -77,6 +89,8 @@ To run this sample:
$ python quickstart.py
Snippets
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand All @@ -92,6 +106,7 @@ To run this sample:
$ python snippets.py
usage: snippets.py [-h]
{detect-language,list-languages,list-languages-with-target,translate-text}
...
Expand All @@ -109,8 +124,9 @@ To run this sample:
list-languages-with-target
Lists all available languages and localizes them to
the target language. Target must be an ISO 639-1
language code. See https://g.co/cloud/translate/v2
/translate-reference#supported_languages
language code. See
https://g.co/cloud/translate/v2/translate-
reference#supported_languages
translate-text Translates text into the target language. Target must
be an ISO 639-1 language code. See
https://g.co/cloud/translate/v2/translate-
Expand All @@ -121,6 +137,8 @@ To run this sample:
Beta Snippets
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Expand All @@ -136,6 +154,7 @@ To run this sample:
$ python beta_snippets.py
usage: beta_snippets.py [-h]
{translate-text,batch-translate-text,detect-language,list-languages,list-languages-with-target,create-glossary,get-glossary,list-glossaries,delete-glossary,translate-with-glossary}
...
Expand All @@ -160,6 +179,10 @@ To run this sample:
The client library
-------------------------------------------------------------------------------
Expand All @@ -175,4 +198,5 @@ to `browse the source`_ and `report issues`_.
https://github.com/GoogleCloudPlatform/google-cloud-python/issues
.. _Google Cloud SDK: https://cloud.google.com/sdk/
.. _Google Cloud SDK: https://cloud.google.com/sdk/
21 changes: 19 additions & 2 deletions translation/samples/snippets/hybrid_glossaries/README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

.. This file is automatically generated. Do not edit this file directly.
Google Translation API Python Samples
Expand All @@ -14,10 +15,12 @@ This directory contains samples for Google Translation API. With `Google Transla

.. _Google Translation API: https://cloud.google.com/translate/docs


Setup
-------------------------------------------------------------------------------



Authentication
++++++++++++++

Expand All @@ -28,6 +31,9 @@ credentials for applications.
.. _Authentication Getting Started Guide:
https://cloud.google.com/docs/authentication/getting-started




Install Dependencies
++++++++++++++++++++

Expand All @@ -42,7 +48,7 @@ Install Dependencies
.. _Python Development Environment Setup Guide:
https://cloud.google.com/python/setup

#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+.
#. Create a virtualenv. Samples are compatible with Python 3.6+.

.. code-block:: bash
Expand All @@ -58,9 +64,15 @@ Install Dependencies
.. _pip: https://pip.pypa.io/
.. _virtualenv: https://virtualenv.pypa.io/






Samples
-------------------------------------------------------------------------------


Using glossaries with vision and text-to-speech
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand All @@ -79,6 +91,10 @@ To run this sample:
The client library
-------------------------------------------------------------------------------

Expand All @@ -94,4 +110,5 @@ to `browse the source`_ and `report issues`_.
https://github.com/GoogleCloudPlatform/google-cloud-python/issues


.. _Google Cloud SDK: https://cloud.google.com/sdk/

.. _Google Cloud SDK: https://cloud.google.com/sdk/
Loading

0 comments on commit f9f2ac8

Please sign in to comment.