Skip to content

Commit 4858ddd

Browse files
committed
Rename internal Language Translator variable, part of watson-developer-cloud#273
1 parent 0f07e85 commit 4858ddd

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ var watson = {
207207
/**
208208
* @function
209209
* @param {{}} options
210-
* @returns {LanguageTranslation}
210+
* @returns {LanguageTranslator}
211211
*/
212212
language_translator: createServiceAPI('language_translator'),
213213

services/language_translator/v2.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var helper = require('../../lib/helper');
2929
* @param {string} params.password Password
3030
* @constructor
3131
*/
32-
function LanguageTranslation(options) {
32+
function LanguageTranslator(options) {
3333
// Default URL
3434
var serviceDefaults = {
3535
url: 'https://gateway.watsonplatform.net/language-translation/api'
@@ -49,7 +49,7 @@ function LanguageTranslation(options) {
4949
* @param {string} params.source Filter by source language
5050
* @param {string} params.target Filter by target language
5151
*/
52-
LanguageTranslation.prototype.getModels = function(params, callback) {
52+
LanguageTranslator.prototype.getModels = function(params, callback) {
5353
params = params || {};
5454

5555
var parameters = {
@@ -68,7 +68,7 @@ LanguageTranslation.prototype.getModels = function(params, callback) {
6868
* Return the translation model
6969
* @param {string} params.model_id The model identifier
7070
*/
71-
LanguageTranslation.prototype.getModel = function(params, callback) {
71+
LanguageTranslator.prototype.getModel = function(params, callback) {
7272
params = params || {};
7373

7474
var parameters = {
@@ -92,7 +92,7 @@ LanguageTranslation.prototype.getModel = function(params, callback) {
9292
* @param {stream} params.parallel_corpus A UTF-8 encoded TMX file that contains matching phrases in the source and target language that serve as examples for Watson. Parallel corpora differ from glossaries because they do not overwrite the original domain data.
9393
* @param {stream} params.monolingual_corpus A UTF-8 encoded plain text file that contains a body of text in the target language that is related to what you are translating. A monolingual corpus helps improve literal translations to be more fluent and human.
9494
*/
95-
LanguageTranslation.prototype.createModel = function(params, callback) {
95+
LanguageTranslator.prototype.createModel = function(params, callback) {
9696
params = params || {};
9797

9898
var missingParams = helper.getMissingParams(params, ['base_model_id']);
@@ -129,7 +129,7 @@ LanguageTranslation.prototype.createModel = function(params, callback) {
129129
* Deletes a model
130130
* @param {string} params.model_id The model identifier
131131
*/
132-
LanguageTranslation.prototype.deleteModel = function(params, callback) {
132+
LanguageTranslator.prototype.deleteModel = function(params, callback) {
133133
params = params || {};
134134

135135
var parameters = {
@@ -150,7 +150,7 @@ LanguageTranslation.prototype.deleteModel = function(params, callback) {
150150
* @param {string} params.source Source language
151151
* @param {string} params.target Target language
152152
*/
153-
LanguageTranslation.prototype.translate = function(params, callback) {
153+
LanguageTranslator.prototype.translate = function(params, callback) {
154154
params = params || {};
155155

156156
if (!(params.model_id || (params.source && params.target))){
@@ -174,7 +174,7 @@ LanguageTranslation.prototype.translate = function(params, callback) {
174174
/**
175175
* Returns the identifiable languages
176176
*/
177-
LanguageTranslation.prototype.getIdentifiableLanguages = function(params, callback) {
177+
LanguageTranslator.prototype.getIdentifiableLanguages = function(params, callback) {
178178
params = params || {};
179179

180180
var parameters = {
@@ -193,7 +193,7 @@ LanguageTranslation.prototype.getIdentifiableLanguages = function(params, callba
193193
* Identify the text based on the identifiable languages
194194
* @param {string} params.text text to identify
195195
*/
196-
LanguageTranslation.prototype.identify = function(params, callback) {
196+
LanguageTranslator.prototype.identify = function(params, callback) {
197197
if (!params || !params.text){
198198
callback(new Error('Missing required parameters: text'));
199199
return;
@@ -216,4 +216,4 @@ LanguageTranslation.prototype.identify = function(params, callback) {
216216
return requestFactory(parameters, callback);
217217
};
218218

219-
module.exports = LanguageTranslation;
219+
module.exports = LanguageTranslator;

0 commit comments

Comments
 (0)