Skip to content

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