Support 'format' option in Translation#2253
Support 'format' option in Translation#2253tcoffee-google merged 2 commits intogoogleapis:masterfrom
Conversation
tcoffee-google
left a comment
There was a problem hiding this comment.
Don't we also need changes in https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-translate/src/main/java/com/google/cloud/translate/Translation.java (analogous to changes to add support for "model" at e8e68f2#diff-e594e8c576a61de4c2dd27fe4854c1c4 )?
|
|
||
| /** | ||
| * Sets the format of the source text, in either HTML (default) or plain-text. | ||
| * A value of html indicates HTML and a value of text indicates plain-text. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * Sets the format of the source text, in either HTML (default) or plain-text. | ||
| * A value of html indicates HTML and a value of text indicates plain-text. | ||
| * | ||
| * @param format the format of the source text (html|text) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| .setSource(sourceLanguage) | ||
| .setKey(options.getApiKey()) | ||
| .set("model", Option.MODEL.getString(optionMap)) | ||
| .set(Option.FORMAT.value(), Option.FORMAT.getString(optionMap)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| @@ -126,6 +126,7 @@ public List<TranslationsResource> translate(List<String> texts, Map<Option, ?> o | |||
| .setSource(sourceLanguage) | |||
| .setKey(options.getApiKey()) | |||
| .set("model", Option.MODEL.getString(optionMap)) | |||
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
tcoffee-google
left a comment
There was a problem hiding this comment.
I'll submit this PR as is, since there's some additional cleanup to do in Translation.java.
* chore(deps): Update gapic-generator-java to 2.26.0 PiperOrigin-RevId: 567624307 Source-Link: googleapis/googleapis@2ecf4de Source-Link: https://github.com/googleapis/googleapis-gen/commit/a5cfbd9a05b3a134e92886114db776fb33cec9f2 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTVjZmJkOWEwNWIzYTEzNGU5Mjg4NjExNGRiNzc2ZmIzM2NlYzlmMiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
The REST api of google translate [1] supports 'format' option as query parameter. The library does not come with this option. This pull request will add support for that.
[1] https://cloud.google.com/translate/docs/reference/translate