Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
docs: Minor formatting (#507)
Browse files Browse the repository at this point in the history
* docs: Minor formatting

PiperOrigin-RevId: 551881351

Source-Link: googleapis/googleapis@b0df582

Source-Link: https://github.com/googleapis/googleapis-gen/commit/b587001fbf8f25e36a9e132bdb4d38d6e75f2dfa
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjU4NzAwMWZiZjhmMjVlMzZhOWUxMzJiZGI0ZDM4ZDZlNzVmMmRmYSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* remove workaround in owlbot.py causing issue with generated docs

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people authored Jul 28, 2023
1 parent 7caca44 commit c689b04
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 29 deletions.
20 changes: 10 additions & 10 deletions google/cloud/translate_v3/types/translation_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ class OutputConfig(proto.Message):
The format of translations_file (for target language code
'trg') is:
``gs://translation_test/a_b_c\_'trg'_translations.[extension]``
``gs://translation_test/a_b_c_'trg'_translations.[extension]``
If the input file extension is tsv, the output has the
following columns: Column 1: ID of the request provided in
Expand All @@ -659,10 +659,10 @@ class OutputConfig(proto.Message):
directly written to the output file. If glossary is
requested, a separate glossary_translations_file has format
of
gs://translation_test/a_b_c\_'trg'_glossary_translations.[extension]
``gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]``
The format of errors file (for target language code 'trg')
is: gs://translation_test/a_b_c\_'trg'_errors.[extension]
is: ``gs://translation_test/a_b_c_'trg'_errors.[extension]``
If the input file extension is tsv, errors_file contains the
following: Column 1: ID of the request provided in the
Expand All @@ -675,7 +675,7 @@ class OutputConfig(proto.Message):
If the input file extension is txt or html,
glossary_error_file will be generated that contains error
details. glossary_error_file has format of
gs://translation_test/a_b_c\_'trg'_glossary_errors.[extension]
``gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]``
This field is a member of `oneof`_ ``destination``.
"""
Expand Down Expand Up @@ -768,7 +768,7 @@ class DocumentOutputConfig(proto.Message):
example: an input file with URI: ``gs://a/b/c.[extension]``
stored in a gcs_destination bucket with name "my_bucket"
will have an output URI:
``gs://my_bucket/a_b_c\_[trg]_translations.[ext]``, where
``gs://my_bucket/a_b_c_[trg]_translations.[ext]``, where
- [trg] corresponds to the translated file's language code,
- [ext] corresponds to the translated file's extension
Expand All @@ -788,7 +788,7 @@ class DocumentOutputConfig(proto.Message):
but have ``glossary_translations`` instead of
``translations``. For the previous example, its glossary URI
would be:
``gs://my_bucket/a_b_c\_[trg]_glossary_translations.[ext]``.
``gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]``.
Thus the max number of output files will be 2 (Translated
document, Glossary translated document).
Expand Down Expand Up @@ -1939,17 +1939,17 @@ class BatchDocumentOutputConfig(proto.Message):
The naming format of translation output files follows (for
target language code [trg]): ``translation_output``:
``gs://translation_output/a_b_c\_[trg]_translation.[extension]``
``gs://translation_output/a_b_c_[trg]_translation.[extension]``
``glossary_translation_output``:
``gs://translation_test/a_b_c\_[trg]_glossary_translation.[extension]``.
``gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]``.
The output document will maintain the same file format as
the input document.
The naming format of error output files follows (for target
language code [trg]): ``error_output``:
``gs://translation_test/a_b_c\_[trg]_errors.txt``
``gs://translation_test/a_b_c_[trg]_errors.txt``
``glossary_error_output``:
``gs://translation_test/a_b_c\_[trg]_glossary_translation.txt``.
``gs://translation_test/a_b_c_[trg]_glossary_translation.txt``.
The error output is a txt file containing error details.
This field is a member of `oneof`_ ``destination``.
Expand Down
20 changes: 10 additions & 10 deletions google/cloud/translate_v3beta1/types/translation_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ class OutputConfig(proto.Message):
The format of translations_file (for target language code
'trg') is:
``gs://translation_test/a_b_c\_'trg'_translations.[extension]``
``gs://translation_test/a_b_c_'trg'_translations.[extension]``
If the input file extension is tsv, the output has the
following columns: Column 1: ID of the request provided in
Expand All @@ -651,10 +651,10 @@ class OutputConfig(proto.Message):
directly written to the output file. If glossary is
requested, a separate glossary_translations_file has format
of
``gs://translation_test/a_b_c\_'trg'_glossary_translations.[extension]``
``gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]``
The format of errors file (for target language code 'trg')
is: ``gs://translation_test/a_b_c\_'trg'_errors.[extension]``
is: ``gs://translation_test/a_b_c_'trg'_errors.[extension]``
If the input file extension is tsv, errors_file contains the
following: Column 1: ID of the request provided in the
Expand All @@ -667,7 +667,7 @@ class OutputConfig(proto.Message):
If the input file extension is txt or html,
glossary_error_file will be generated that contains error
details. glossary_error_file has format of
``gs://translation_test/a_b_c\_'trg'_glossary_errors.[extension]``
``gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]``
This field is a member of `oneof`_ ``destination``.
"""
Expand Down Expand Up @@ -760,7 +760,7 @@ class DocumentOutputConfig(proto.Message):
example: an input file with URI: ``gs://a/b/c.[extension]``
stored in a gcs_destination bucket with name "my_bucket"
will have an output URI:
``gs://my_bucket/a_b_c\_[trg]_translations.[ext]``, where
``gs://my_bucket/a_b_c_[trg]_translations.[ext]``, where
- [trg] corresponds to the translated file's language code,
- [ext] corresponds to the translated file's extension
Expand All @@ -780,7 +780,7 @@ class DocumentOutputConfig(proto.Message):
but have ``glossary_translations`` instead of
``translations``. For the previous example, its glossary URI
would be:
``gs://my_bucket/a_b_c\_[trg]_glossary_translations.[ext]``.
``gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]``.
Thus the max number of output files will be 2 (Translated
document, Glossary translated document).
Expand Down Expand Up @@ -1888,17 +1888,17 @@ class BatchDocumentOutputConfig(proto.Message):
The naming format of translation output files follows (for
target language code [trg]): ``translation_output``:
``gs://translation_output/a_b_c\_[trg]_translation.[extension]``
``gs://translation_output/a_b_c_[trg]_translation.[extension]``
``glossary_translation_output``:
``gs://translation_test/a_b_c\_[trg]_glossary_translation.[extension]``.
``gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]``.
The output document will maintain the same file format as
the input document.
The naming format of error output files follows (for target
language code [trg]): ``error_output``:
``gs://translation_test/a_b_c\_[trg]_errors.txt``
``gs://translation_test/a_b_c_[trg]_errors.txt``
``glossary_error_output``:
``gs://translation_test/a_b_c\_[trg]_glossary_translation.txt``
``gs://translation_test/a_b_c_[trg]_glossary_translation.txt``
The error output is a txt file containing error details.
This field is a member of `oneof`_ ``destination``.
Expand Down
9 changes: 0 additions & 9 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@
shutil.rmtree("samples/generated_samples", ignore_errors=True)
clean_up_generated_samples = False

if library.name.startswith("v3"):
# TODO(danoscarmike): remove once upstream protos have been fixed
# Escape underscores in gs:\\ URLs
s.replace(
library / "google/cloud/translate_v3*/types/translation_service.py",
"a_b_c_",
"a_b_c\_"
)

s.replace(library / ".coveragerc",
"""google/cloud/translate/__init__.py""",
"""google/__init__.py
Expand Down

0 comments on commit c689b04

Please sign in to comment.