-
-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Hello Dejan,
I noticed that i18n-auto-translation saves the output file into the working directory on Windows instead of the source folder / dirPath.
Currently in translate.ts
(line 65), the code is:
this.saveTo = path.join(
filePath.substring(0, filePath.lastIndexOf('/')),
`${argv.to}.json`,
);
This works on Linux but not on Windows.
To support both Linux and Windows paths, you can change it to:
this.saveTo = path.join(
filePath.replace(/[\\/][^\\/]*$/, ''),
`${argv.to}.json`,
);
I have forked your repo to add an Azure OpenAI provider and included this fix.
See my initial commit here: Commit.
Adding the provider worked like a charm! 🚀
Metadata
Metadata
Assignees
Labels
No labels