Skip to content

Commit d8c9fcf

Browse files
authored
standardizes translate samples (GoogleCloudPlatform#500)
1 parent 4418ed5 commit d8c9fcf

21 files changed

+128
-2098
lines changed

translate/api/README.md renamed to translate/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ https://cloud.google.com/translate/).
1313
3. **Clone the repo** and cd into this directory
1414
```
1515
$ git clone https://github.com/GoogleCloudPlatform/php-docs-samples
16-
$ cd php-docs-samples/translate/api
16+
$ cd php-docs-samples/translate
1717
```
1818
4. **Install dependencies** via [Composer](http://getcomposer.org/doc/00-intro.md).
1919
Run `php composer.phar install` (if composer is installed locally) or `composer install`
2020
(if composer is installed globally).
2121
5. **Run**:
2222
```
23-
$ php translate.php
23+
$ php translate.php
2424
Console Tool
2525
2626
Usage:
@@ -36,12 +36,12 @@ Options:
3636
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
3737
3838
Available commands:
39-
detect Detect which language text was written in using Google Cloud Translate API
40-
help Displays help for a command
41-
list Lists commands
42-
list-codes List all the language codes in the Google Cloud Translate API
43-
list-langs List language codes and names in the Google Cloud Translate API
44-
translate Translate text using Google Cloud Translate API
39+
detect-language Detect which language text was written in using Google Cloud Translate API
40+
help Displays help for a command
41+
list Lists commands
42+
list-codes List all the language codes in the Google Cloud Translate API
43+
list-langs List language codes and names in the Google Cloud Translate API
44+
translate Translate text using Google Cloud Translate API
4545
```
4646

4747
6. Run `php translate.php COMMAND --help` to print information about the usage of each command.

translate/api/src/DetectLanguageCommand.php

Lines changed: 0 additions & 57 deletions
This file was deleted.

translate/api/src/ListCodesCommand.php

Lines changed: 0 additions & 50 deletions
This file was deleted.

translate/api/src/ListLanguagesCommand.php

Lines changed: 0 additions & 58 deletions
This file was deleted.

translate/api/src/TranslateCommand.php

Lines changed: 0 additions & 76 deletions
This file was deleted.

translate/api/translate.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

translate/api/composer.json renamed to translate/composer.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
"google/cloud-translate": "^0.2",
66
"symfony/console": "^3.1"
77
},
8-
"autoload": {
9-
"psr-4": {
10-
"Google\\Cloud\\Samples\\Translate\\": "src/"
11-
}
12-
},
138
"require-dev": {
149
"phpunit/phpunit": "~4"
1510
}
File renamed without changes.

translate/api/phpunit.xml.dist renamed to translate/phpunit.xml.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@
2828
<directory suffix=".php">./srcdirectory>
2929
whitelist>
3030
filter>
31+
<php>
32+
<env name="PHPUNIT_TESTS" value="1"/>
33+
php>
3134
phpunit>
File renamed without changes.

translate/quickstart/composer.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)