Skip to content

Commit

Permalink
feat(FgForrest#3): add Deepl automation integration - change params
Browse files Browse the repository at this point in the history
  • Loading branch information
Stepan Kamenik committed Feb 29, 2024
1 parent b9403fb commit e2b495d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ public static Arguments parseArguments(String... args) {
arguments.setConfigFileName(args[1]);
arguments.setGoogleSheetId(args[2]);
if (args.length > 3){
arguments.setCombineSheets(Boolean.parseBoolean(args[3]));
arguments.setDeeplApiKey(args[3]);
if (args.length > 4){
arguments.setDeeplApiKey(args[4]);

arguments.setCombineSheets(Boolean.parseBoolean(args[4]));
}
}
return arguments;
Expand All @@ -88,8 +87,8 @@ private static void printRequiredArguments() {
log.info("1 - expected action (import, export)");
log.info("2 - path to translator-config.json file");
log.info("3 - ID of the google sheet (e.g. 1xhnBAOpy8-9KWhl8NP0ZIy6mhlgXKnKcLJwKcIeyjPc)");
log.info("4 - arg to specify combineSheets mode");
log.info("5 - arg to specify deepl api key");
log.info("4 - arg to specify deepl api key");
log.info("5 - arg to specify combineSheets mode");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ private String[] getArguments() {
arg[0] = getAction().name();
arg[1] = this.configFileName;
arg[2] = this.googleSheetId;
arg[3] = String.valueOf(this.combineSheets);
arg[4] = this.deeplApiKey;
arg[3] = this.deeplApiKey;
arg[4] = String.valueOf(this.combineSheets);

return arg;
}

Expand Down

0 comments on commit e2b495d

Please sign in to comment.