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

translate: Add support for target option to translate.getLanguages. #1524

Closed
wants to merge 2 commits into from
Closed

translate: Add support for target option to translate.getLanguages. #1524

wants to merge 2 commits into from

Conversation

jmdobry
Copy link
Contributor

@jmdobry jmdobry commented Aug 23, 2016

Did I do the JSDoc comments right?

This adds support for:

translate.getLanguages({
  target: 'en'
}, function (err, languages) {
  console.log(languages[0]); // { language: 'ar', name: 'Arabic' }
});
translate.getLanguages({
  target: 'ru'
}, function (err, languages) {
  console.log(languages[0]); // { language: 'ar', name: 'арабский' }
});

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 23, 2016
@jmdobry jmdobry changed the title Add support for target option to translate.getLanguages. translate: Add support for target option to translate.getLanguages. Aug 23, 2016
@@ -166,10 +166,12 @@ Translate.prototype.detect = function(input, callback) {
*
* @resource [Discover Supported Languages]{@link https://cloud.google.com/translate/v2/using_rest#supported-languages}

This comment was marked as spam.

This comment was marked as spam.

@stephenplusplus stephenplusplus added the api: translate Issues related to the Cloud Translation API. label Aug 24, 2016
*
* @param {string=} target - Include the languages names in the response

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@coveralls
Copy link

coveralls commented Aug 29, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling ffe9e7a on jmdobry:update-translate into 069d827 on GoogleCloudPlatform:master.

@stephenplusplus
Copy link
Contributor

Made some small style changes to the tests and docs, merged in 581c3b7.

@stephenplusplus
Copy link
Contributor

Thank you for this!

@jmdobry
Copy link
Contributor Author

jmdobry commented Aug 30, 2016

Cool! When can I expect 0.2.0 to be published? Is there a set release schedule?

@jmdobry jmdobry deleted the update-translate branch August 30, 2016 14:50
@stephenplusplus
Copy link
Contributor

A batch of releases is coming today 👍

@stephenplusplus
Copy link
Contributor

Published: https://www.npmjs.com/package/@google-cloud/translate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: translate Issues related to the Cloud Translation API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants