diff --git a/README.rst b/README.rst index cd2c2d1fba72..7a37f448ff24 100644 --- a/README.rst +++ b/README.rst @@ -37,7 +37,7 @@ Cloud Platform services: - `Google Cloud DNS`_ (`DNS README`_) - `Stackdriver Error Reporting`_ (`Error Reporting README`_) - `Google Cloud Natural Language`_ (`Natural Language README`_) -- `Google Translate`_ (`Translate README`_) +- `Google Cloud Translation`_ (`Translation README`_) - `Google Cloud Vision`_ (`Vision README`_) - `Google Cloud Bigtable - HappyBase`_ (`HappyBase README`_) - `Google Cloud Runtime Configuration`_ (`Runtime Config README`_) @@ -68,8 +68,8 @@ updates. See `versioning`_ for more details. .. _Error Reporting README: https://github.com/GoogleCloudPlatform/google-cloud-python/tree/master/error_reporting .. _Google Cloud Natural Language: https://pypi.python.org/pypi/google-cloud-language .. _Natural Language README: https://github.com/GoogleCloudPlatform/google-cloud-python/tree/master/language -.. _Google Translate: https://pypi.python.org/pypi/google-cloud-translate -.. _Translate README: https://github.com/GoogleCloudPlatform/google-cloud-python/tree/master/translate +.. _Google Cloud Translation: https://pypi.python.org/pypi/google-cloud-translate +.. _Translation README: https://github.com/GoogleCloudPlatform/google-cloud-python/tree/master/translate .. _Google Cloud Vision: https://pypi.python.org/pypi/google-cloud-vision .. _Vision README: https://github.com/GoogleCloudPlatform/google-cloud-python/tree/master/vision .. _Google Cloud Bigtable - HappyBase: https://pypi.python.org/pypi/google-cloud-happybase/ diff --git a/docs/translate-client.rst b/docs/translate-client.rst index c724c9f2fe03..2bb0820ef5dd 100644 --- a/docs/translate-client.rst +++ b/docs/translate-client.rst @@ -1,5 +1,5 @@ -Translate Client -================ +Translation Client +================== .. automodule:: google.cloud.translate.client :members: diff --git a/docs/translate-usage.rst b/docs/translate-usage.rst index 501a402f9cef..54c86a37d706 100644 --- a/docs/translate-usage.rst +++ b/docs/translate-usage.rst @@ -1,10 +1,10 @@ Using the API ============= -With `Google Translate`_, you can dynamically translate text -between thousands of language pairs. The Google Translate API -lets websites and programs integrate with Google Translate -programmatically. Google Translate API is available as a +With `Google Cloud Translation`_, you can dynamically translate text +between thousands of language pairs. The Google Cloud Translation API +lets websites and programs integrate with Google Cloud Translation +programmatically. Google Cloud Translation is available as a paid service. See the `Pricing`_ and `FAQ`_ pages for details. Authentication / Configuration @@ -14,9 +14,9 @@ Authentication / Configuration your applications. - :class:`~google.cloud.translate.client.Client` objects hold both a ``key`` - and a connection to the Translate service. + and a connection to the Cloud Translation service. -- **An API key is required for Translate.** See +- **An API key is required for Google Cloud Translation.** See `Identifying your application to Google`_ for details. This is significantly different than the other clients in ``google-cloud-python``. @@ -39,13 +39,13 @@ well: >>> from google.cloud import translate >>> client = translate.Client('my-api-key', target_language='es') -The Google Translate API has three supported methods, and they +The Google Cloud Translation API has three supported methods, and they map to three methods on a client: :meth:`~google.cloud.translate.client.Client.get_languages`, :meth:`~google.cloud.translate.client.Client.detect_language` and :meth:`~google.cloud.translate.client.Client.translate`. -To get a list of languages supported by Google Translate +To get a list of languages supported by the Google Cloud Translation API .. code:: @@ -116,8 +116,8 @@ or to use a non-default target language: }, ] -.. _Google Translate: https://cloud.google.com/translate -.. _Pricing: https://cloud.google.com/translate/v2/pricing.html -.. _FAQ: https://cloud.google.com/translate/v2/faq.html -.. _Identifying your application to Google: https://cloud.google.com/translate/v2/using_rest#auth -.. _confidence: https://cloud.google.com/translate/v2/detecting-language-with-rest +.. _Google Cloud Translation: https://cloud.google.com/translation +.. _Pricing: https://cloud.google.com/translation/pricing +.. _FAQ: https://cloud.google.com/translation/faq +.. _Identifying your application to Google: https://cloud.google.com/translation/docs/translating-text +.. _confidence: https://cloud.google.com/translation/docs/detecting-language diff --git a/translate/README.rst b/translate/README.rst index 9a5c0f16e0fd..a85374ff5298 100644 --- a/translate/README.rst +++ b/translate/README.rst @@ -1,9 +1,9 @@ -Python Client for Google Translate -================================== +Python Client for Google Cloud Translation +========================================== - Python idiomatic client for `Google Translate`_ + Python idiomatic client for `Google Cloud Translation`_ -.. _Google Translate: https://cloud.google.com/translate/ +.. _Google Cloud Translation: https://cloud.google.com/translate/ |pypi| |versions| @@ -32,13 +32,13 @@ the ``google-cloud-*`` libraries to be helpful. Using the API ------------- -With the Google `Translate`_ API (`Translate API docs`_), you can +With the Google Cloud `Translation`_ API (`Translation API docs`_), you can dynamically translate text between thousands of language pairs. -.. _Translate: https://cloud.google.com/translate/ -.. _Translate API docs: https://cloud.google.com/translate/docs/apis +.. _Translation: https://cloud.google.com/translate/ +.. _Translation API docs: https://cloud.google.com/translate/docs/apis -See the ``google-cloud-python`` API Translate `Documentation`_ to learn +See the ``google-cloud-python`` API Translation `Documentation`_ to learn how to translate text using this library. .. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-translate.svg diff --git a/translate/google/cloud/translate/__init__.py b/translate/google/cloud/translate/__init__.py index 83ff5f114435..006ac866ab8d 100644 --- a/translate/google/cloud/translate/__init__.py +++ b/translate/google/cloud/translate/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Google Cloud Translate API wrapper.""" +"""Google Cloud Translation API wrapper.""" from google.cloud.translate.client import BASE from google.cloud.translate.client import Client diff --git a/translate/google/cloud/translate/client.py b/translate/google/cloud/translate/client.py index ea5359007bb6..b105575944a3 100644 --- a/translate/google/cloud/translate/client.py +++ b/translate/google/cloud/translate/client.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Client for interacting with the Google Cloud Translate API.""" +"""Client for interacting with the Google Cloud Translation API.""" import six @@ -158,8 +158,7 @@ def translate(self, values, target_language=None, format_=None, model=None): """Translate a string or list of strings. - See: https://cloud.google.com/translate/v2/\ - translating-text-with-rest + See: https://cloud.google.com/translate/docs/translating-text :type values: str or list :param values: String or list of strings to translate. diff --git a/translate/google/cloud/translate/connection.py b/translate/google/cloud/translate/connection.py index 0582bcd22a3f..518e7e424a93 100644 --- a/translate/google/cloud/translate/connection.py +++ b/translate/google/cloud/translate/connection.py @@ -12,13 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Create / interact with Google Cloud Translate connections.""" +"""Create / interact with Google Cloud Translation connections.""" from google.cloud import _http class Connection(_http.JSONConnection): - """A connection to Google Cloud Translate via the JSON REST API.""" + """A connection to Google Cloud Translation API via the JSON REST API.""" API_BASE_URL = 'https://translation.googleapis.com' """The base of the API call URL.""" diff --git a/translate/setup.py b/translate/setup.py index 68351f553edb..d57f326631c3 100644 --- a/translate/setup.py +++ b/translate/setup.py @@ -56,7 +56,7 @@ setup( name='google-cloud-translate', version='0.22.0', - description='Python Client for Google Translate', + description='Python Client for Google Cloud Translation API', long_description=README, namespace_packages=[ 'google',