Skip to content
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

Merged
merged 1 commit into from
Dec 15, 2016
Merged

Add Premium translation sample. #274

merged 1 commit into from
Dec 15, 2016

Conversation

jmdobry
Copy link
Member

@jmdobry jmdobry commented Dec 14, 2016

No description provided.

@jmdobry jmdobry self-assigned this Dec 14, 2016
@jmdobry jmdobry requested a review from ace-n December 14, 2016 21:00
Copy link
Contributor

@ace-n ace-n left a 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];
Copy link
Contributor

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. 😛

Copy link
Member Author

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...

Copy link
Contributor

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).

@jmdobry jmdobry merged commit 8c649c4 into master Dec 15, 2016
@jmdobry jmdobry deleted the translate-premium branch December 15, 2016 21:55
ahrarmonsur pushed a commit that referenced this pull request Nov 8, 2022
* updated CHANGELOG.md [ci skip]

* updated package.json [ci skip]

* updated samples/package.json [ci skip]
telpirion pushed a commit that referenced this pull request Nov 9, 2022
🤖 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).
telpirion pushed a commit that referenced this pull request Nov 9, 2022
🤖 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).
ace-n pushed a commit that referenced this pull request Nov 10, 2022
* updated CHANGELOG.md [ci skip]

* updated package.json [ci skip]

* updated samples/package.json [ci skip]
NimJay pushed a commit that referenced this pull request Nov 11, 2022
ace-n pushed a commit that referenced this pull request Nov 11, 2022
grayside pushed a commit that referenced this pull request Nov 16, 2022
* updated CHANGELOG.md [ci skip]

* updated package.json [ci skip]

* updated samples/package.json [ci skip]
ace-n pushed a commit that referenced this pull request Nov 17, 2022
* updated CHANGELOG.md [ci skip]

* updated package.json [ci skip]

* updated samples/package.json [ci skip]
ace-n pushed a commit that referenced this pull request Nov 17, 2022
grayside pushed a commit that referenced this pull request Nov 17, 2022
* updated CHANGELOG.md [ci skip]

* updated package.json [ci skip]

* updated samples/package.json [ci skip]
ace-n pushed a commit that referenced this pull request Nov 17, 2022
ahrarmonsur pushed a commit that referenced this pull request Nov 17, 2022
* updated CHANGELOG.md [ci skip]

* updated package.json [ci skip]

* updated samples/package.json [ci skip]
ace-n pushed a commit that referenced this pull request Nov 17, 2022
ace-n pushed a commit that referenced this pull request Nov 17, 2022
ace-n pushed a commit that referenced this pull request Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants