File tree Expand file tree Collapse file tree 4 files changed +9
-0
lines changed
Expand file tree Collapse file tree 4 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ $ npx i18n-auto-translation -k SUBSCRIPTION_KEY -d PROJECT_DIR -t DESIRED_LANGUA
7272| --trim | -i | Trim string after translation. | true |
7373| --delay | -e | Delay between every request made to the translate api. | 250 |
7474| --saveTo | -v | Override where translated file should be saved. (use only with ` --filePath ` option) | / |
75+ | --glossary | -g | Specify the glossary to use for the translation. Used only by the DeepL API. | / |
7576
7677## Demo
7778
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ interface Arguments {
1818 trim : boolean ;
1919 delay : number ;
2020 saveTo ?: string ;
21+ glossary ?: string ;
2122}
2223
2324export const argv : Arguments = yargs ( process . argv . slice ( 2 ) )
@@ -128,5 +129,10 @@ export const argv: Arguments = yargs(process.argv.slice(2))
128129 description :
129130 'Override where translated file should be saved. (use only with `--filePath` option)' ,
130131 } ,
132+ glossary : {
133+ type : 'string' ,
134+ alias : 'g' ,
135+ description : 'Specify the glossary to use for the translation. Used only by the DeepL API.' ,
136+ } ,
131137 } )
132138 . parseSync ( ) ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ export class DeepLFreeAPI extends Translate {
3131 preserve_formatting : true ,
3232 context : argv . context ,
3333 formality : argv . formality ,
34+ glossary_id : argv . glossary ,
3435 } ,
3536 DeepLFreeAPI . axiosConfig ,
3637 ) ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ export class DeepLProAPI extends Translate {
3131 preserve_formatting : true ,
3232 context : argv . context ,
3333 formality : argv . formality ,
34+ glossary_id : argv . glossary ,
3435 } ,
3536 DeepLProAPI . axiosConfig ,
3637 ) ;
You can’t perform that action at this time.
0 commit comments