Skip to content

Commit 46cfb74

Browse files
bcoeAce Nassri
authored and
Ace Nassri
committed
docs: generate new samples/README.md, README.md (#268)
* Add README with instructions to run v3 translate * Remove extra blank line * docs: generate new samples/README.md, README.md * docs: finish porting over changes to samples/README.md * docs: add issue tracker link * chore: address code review * Move region tag
1 parent 8b5a980 commit 46cfb74

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

translate/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"node": ">=8"
99
},
1010
"scripts": {
11-
"test": "mocha --recursive --timeout 90000"
11+
"test": "mocha --recursive --timeout 90000",
12+
"test-v3": "mocha ./test/v3beta1/*.js"
1213
},
1314
"dependencies": {
1415
"@google-cloud/automl": "^1.0.0",

translate/quickstart.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515

1616
'use strict';
1717

18-
// [START translate_quickstart]
19-
async function quickstart(
18+
async function main(
2019
projectId = 'YOUR_PROJECT_ID' // Your GCP Project Id
2120
) {
21+
// [START translate_quickstart]
2222
// Imports the Google Cloud client library
2323
const {Translate} = require('@google-cloud/translate');
2424

@@ -39,4 +39,4 @@ async function quickstart(
3939
// [END translate_quickstart]
4040

4141
const args = process.argv.slice(2);
42-
quickstart(...args).catch(console.error);
42+
main(...args).catch(console.error);

0 commit comments

Comments
 (0)