Skip to content

Commit f680273

Browse files
committed
Correção texto
Msg de erro
1 parent 7527543 commit f680273

4 files changed

Lines changed: 25 additions & 16 deletions

File tree

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@ The app has 3 commands, plus you can execute it with no arguments or with --help
4747

4848
### 1- TRANSLATE
4949

50-
This command performs the automatic translation using Google Translator. The idea here is to get a fast translation without the need for a translator. It is a good idea to either revise the translation or have someone revise for you. That's why you can your translation saved as a JSON or as a TSV.
50+
This command performs the automatic translation using Google Translator. The idea here is to get a fast translation without the need for a translator. It is a good idea to either revise the translation or have someone revise for you. That's why you can have your translation saved as a JSON or as a TSV.
5151

5252
You'll need to pass 5 arguments as shown below, none are optional.
5353

5454
```sh
5555
$ jsontrans translate ./myfile-pt.json pt en json
5656
```
57-
The first argument is the command translate, the second is a path that points to a JSON file with it's contents in your original language. From this file the translate command will generate a new file with the same structure as the one passed but with the contents translated into your language of choice.
57+
The first argument is the command translate, the second is a path that points to a JSON file with it's contents in your original language. From this file the translate command will generate a new file with the translation.
5858

59-
The third argument is the ISO language code of the file passed in the previous argument and the forth is the language you wish your file translated into. Last but not least, the fifth argument is the output format. It can be either JSON or TSV.
59+
The third argument is the ISO code of the language used in file passed in the previous argument and the forth is the language you wish your file translated into. Last but not least, the fifth argument is the output format. It can be either json or tsv.
6060

61-
If JSON is chosen, a JSON file with the translation is created. If TSV is chosen, a TSV file with columns for and identificator (internal use), the original language and the target language are created. This way you can provide a translator with a file that is already translated and need only a revision and possible corrections, making his/her job much easier.
61+
If JSON format is chosen, a JSON file with the translation is created. This file will have same structure as the one passed but with the contents translated into your language of choice. If TSV format is chosen, a TSV file with columns for and ID (internal use), the original language and the target language are created. This way you can provide a translator with a file that is already translated and need only a revision and possible corrections, making his/her job much faster and easier, perhaps even cheaper.
6262

6363
![TSV file with translation](./imgs/tsv-ready.png)
6464

@@ -79,19 +79,19 @@ This command prepares a JSON file to be manually translated by a human or system
7979
$ jsontrans prepare ./myfile-pt.json pt en
8080
```
8181

82-
The first argument is the command prepare, the second is a path that points to a JSON file with your original translation. The third argument is the ISO language code of the file passed in the previous argument and the forth is the language you wish your file translated into.
82+
The first argument is the command prepare, the second is a path that points to a JSON file with your original translation. The third argument is the ISO code of the language used in file passed in the previous argument and the forth is the language you wish your file translated into.
8383

8484
This command will generate a TSV file in the same folder and with the same name as the one passed, but with a tsv extension. The file will have 3 columns as follows:
8585

86-
1- Dot notation of the field in the original JSON file.
87-
2- The field's text in the original language
88-
3- Empty column for the translation to be entered
86+
- 1- Dot notation of the field in the original JSON file.
87+
- 2- The field's text in the original language
88+
- 3- Empty column for the translation to be entered
8989

9090
![TSV file ready to be translated](./imgs/tsv.png)
9191

9292
*The TSV file looks like this*
9393

94-
The idea is to give this file to the translator and instruct him to type the translations in the third column. Needless to say that if someone tampers
94+
The idea is to give this file to a translator and instruct him/her to type the translations in the third column. Needless to say that if someone tampers with the first column this app may not be able to reassemble the JSON file from the TSV file.
9595

9696
You'll need the original file to create a new JSON file with the translated text. That is done in the next command.
9797

@@ -111,8 +111,8 @@ The 4 arguments are as follows. The first is the command transform, the second i
111111

112112
- The TSV extension indicates tab separated files, much like CSVs but instead of commas or semicolons TABs are used to separate cells.
113113
- Existing files will be overwritten without warning.
114-
- The TSV files generated by this app must not be changed. The translator must be instructed to make changes only to the third column with the appropriate translations and nothing else.
115-
- The TSV files created by this app set the first line as a header. The first column is the Identificator, the second the original language and the third the target language.
114+
- The translator must be instructed to make changes only to the third column with the appropriate translations and nothing else.
115+
- The TSV files created by this app set the first line as a header. The first column is the Identificator (ID), the second the original language's ISO code and the third the target language.
116116
- Transform command expects the TSV file's first line to be a header and will ignored it.
117117
- You can open TSV files with a large number of applications, including Microsoft Excel (multiplatform) and OpenOffice Calc (multiplatform).
118118
- You can upload [TSV files](https://docs.fileformat.com/spreadsheet/tsv) to Google Sheets to view, edit, save, and convert the files.

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
fs.writeFileSync(tsvOutPath, newTSV, { encoding:'utf8' }); // Saves TSV
6262
}
6363
} catch (error) {
64+
log(error);
6465
endThis('An unexpected error has occurred!');
6566
}
6667
break;

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@
22
"name": "@wstaeblein/json-translator",
33
"version": "0.4.8",
44
"description": "Prepare for or translate any JSON file either with Google or human Translator",
5-
"keywords": ["translator", "json", "translation", "language", "international"],
5+
"keywords": [
6+
"translator",
7+
"json",
8+
"translation",
9+
"language",
10+
"international",
11+
"cli",
12+
"utility"
13+
],
614
"main": "index.js",
715
"scripts": {
8-
"test": "echo \"Error: no test specified\" && exit 1"
16+
"test": "echo \"No test specified\""
917
},
1018
"author": "Walter Staeblein",
1119
"license": {
@@ -19,7 +27,7 @@
1927
"repository": {
2028
"type": "git",
2129
"url": "https://github.com/wstaeblein/JSON-Translator"
22-
},
30+
},
2331
"bin": {
2432
"jsontrans": "./index.js"
2533
}

0 commit comments

Comments
 (0)