-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Premium translation sample. #274
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; I'm just nitpicking.
return translate.translate(input, options) | ||
.then((results) => { | ||
let translations = results[0]; | ||
translations = Array.isArray(translations) ? translations : [translations]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: not that we should use it, but there's a library for this. 😛
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I feel that using a library for something like this is taking the Node.js "module all the things" too far...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the brevity/idiomaticity of arrify(...)
vs. a ternary operator, but you're right in the sense that using it would add another dependency (= another potential point of failure).
fb868dc
to
5f367da
Compare
* updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip]
🤖 I have created a release \*beep\* \*boop\* --- ### [3.0.2](https://www.github.com/googleapis/nodejs-talent/compare/v3.0.1...v3.0.2) (2020-11-25) ### Bug Fixes * **browser:** check for fetch on window ([#274](https://www.github.com/googleapis/nodejs-talent/issues/274)) ([a25c71f](https://www.github.com/googleapis/nodejs-talent/commit/a25c71ff62a46138e088f01d5b9cd8b165588bbd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
🤖 I have created a release \*beep\* \*boop\* --- ### [3.0.2](https://www.github.com/googleapis/nodejs-talent/compare/v3.0.1...v3.0.2) (2020-11-25) ### Bug Fixes * **browser:** check for fetch on window ([#274](https://www.github.com/googleapis/nodejs-talent/issues/274)) ([a25c71f](https://www.github.com/googleapis/nodejs-talent/commit/a25c71ff62a46138e088f01d5b9cd8b165588bbd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
* updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip]
* updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip]
* updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip]
* updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip]
* updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip]
🤖 I have created a release \*beep\* \*boop\* --- ### [2.3.4](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.3.3...v2.3.4) (2021-07-21) ### Bug Fixes * **deps:** google-gax v2.17.1 ([#272](https://www.github.com/googleapis/nodejs-datacatalog/issues/272)) ([62ffcc6](https://www.github.com/googleapis/nodejs-datacatalog/commit/62ffcc6fd9a5b68936a57c1ac5a041527e38fec3)) * Updating WORKSPACE files to use the newest version of the Typescript generator. ([#274](https://www.github.com/googleapis/nodejs-datacatalog/issues/274)) ([3ebafcd](https://www.github.com/googleapis/nodejs-datacatalog/commit/3ebafcdbfaf50ff96f9d828e33cc355af33a7000)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release \*beep\* \*boop\* --- ### [2.3.4](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.3.3...v2.3.4) (2021-07-21) ### Bug Fixes * **deps:** google-gax v2.17.1 ([#272](https://www.github.com/googleapis/nodejs-datacatalog/issues/272)) ([62ffcc6](https://www.github.com/googleapis/nodejs-datacatalog/commit/62ffcc6fd9a5b68936a57c1ac5a041527e38fec3)) * Updating WORKSPACE files to use the newest version of the Typescript generator. ([#274](https://www.github.com/googleapis/nodejs-datacatalog/issues/274)) ([3ebafcd](https://www.github.com/googleapis/nodejs-datacatalog/commit/3ebafcdbfaf50ff96f9d828e33cc355af33a7000)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
No description provided.