Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions packages/google-cloud-translate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "Apache-2.0",
"author": "Google Inc.",
"engines": {
"node": ">=12.0.0"
"node": ">=14.0.0"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -53,20 +53,21 @@
"@google-cloud/promisify": "^3.0.0",
"arrify": "^2.0.0",
"extend": "^3.0.2",
"google-gax": "^3.5.8",
"google-gax": "^4.0.3",
"is-html": "^2.0.0"
},
"devDependencies": {
"@types/extend": "^3.0.0",
"@types/mocha": "^9.0.0",
"@types/node": "^18.0.0",
"@types/node": "^20.4.5",
"@types/proxyquire": "^1.3.28",
"@types/request": "^2.47.1",
"@types/sinon": "^10.0.0",
"c8": "^7.0.0",
"codecov": "^3.0.2",
"gapic-tools": "^0.1.8",
"google-auth-library": "^8.0.0",
"gts": "^3.1.0",
"gts": "^5.0.0",
"http2spy": "^2.0.0",
"jsdoc": "^4.0.0",
"jsdoc-fresh": "^2.0.0",
Expand All @@ -77,7 +78,7 @@
"pack-n-play": "^1.0.0-2",
"proxyquire": "^2.0.1",
"sinon": "^15.0.0",
"typescript": "^4.6.4"
"typescript": "^5.1.6"
},
"homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-translate"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -637,17 +637,17 @@ message DocumentOutputConfig {
//
// For a DocumentInputConfig.gcs_uri provided document, the output file will
// have a name according to its URI. For example: an input file with URI:
// "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name
// `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 according to its
// mime type.
//
//
// If the document was directly provided through the request, then the
// output document will have the format:
// "gs://my_bucket/translated_document_[trg]_translations.[ext], where
// `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where
// - [trg] corresponds to the translated file's language code,
// - [ext] corresponds to the translated file's extension according to its
// mime type.
Expand All @@ -656,7 +656,7 @@ message DocumentOutputConfig {
// translation will be equal to the default output URI 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 @@ -1362,15 +1362,15 @@ message BatchDocumentOutputConfig {
//
// 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] The
// `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
// [trg]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt`
// `glossary_error_output`:
// gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
// `gs://translation_test/a_b_c_[trg]_glossary_translation.txt`. The error
// output is a txt file containing error details.
GcsDestination gcs_destination = 1;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -552,10 +552,10 @@ message OutputConfig {
// If input file extension is a txt or html, the translation is 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]
// `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 input, if it's not
Expand All @@ -567,7 +567,7 @@ message OutputConfig {
//
// 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]`
GcsDestination gcs_destination = 1;
}
}
Expand Down Expand Up @@ -628,17 +628,17 @@ message DocumentOutputConfig {
//
// For a DocumentInputConfig.gcs_uri provided document, the output file will
// have a name according to its URI. For example: an input file with URI:
// "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name
// `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 according to its
// mime type.
//
//
// If the document was directly provided through the request, then the
// output document will have the format:
// "gs://my_bucket/translated_document_[trg]_translations.[ext], where
// `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where
// - [trg] corresponds to the translated file's language code,
// - [ext] corresponds to the translated file's extension according to its
// mime type.
Expand All @@ -647,7 +647,7 @@ message DocumentOutputConfig {
// translation will be equal to the default output URI 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 @@ -1202,7 +1202,7 @@ message BatchTranslateDocumentRequest {

// Required. The BCP-47 language code of the input document if known, for
// example, "en-US" or "sr-Latn". Supported language codes are listed in
// Language Support (https://cloud.google.com/translate/docs/languages).
// [Language Support](https://cloud.google.com/translate/docs/languages).
string source_language_code = 2 [(google.api.field_behavior) = REQUIRED];

// Required. The BCP-47 language code to use for translation of the input
Expand Down Expand Up @@ -1321,19 +1321,19 @@ message BatchDocumentOutputConfig {
// Since index.csv will be keeping updated during the process, please make
// sure there is no custom retention policy applied on the output bucket
// that may avoid file updating.
// (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
// (https://cloud.google.com/storage/docs/bucket-lock#retention-policy)
//
// 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] The
// `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
// [trg]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt`
// `glossary_error_output`:
// gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error
// `gs://translation_test/a_b_c_[trg]_glossary_translation.txt` The error
// output is a txt file containing error details.
GcsDestination gcs_destination = 1;
}
Expand Down
Loading