Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to automatically determine an existing glossary for DeepL #124

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

fjaeger
Copy link
Contributor

@fjaeger fjaeger commented Sep 9, 2024

With this PR, DeepL glossaries are not forced to be re-created each time. Instead, by just using -g without specifying a glossaries directory, an existing DeppL glossary is determined/matched and used in all translations

README.md Outdated
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the README with the latest command-line parameter options

async getGlossary(from: string, to: string, recreate = false) {
const allGlossaries = await this.listGlossaries();
let glossary = allGlossaries
.filter((g) => (!!this.appName ? g.name === this.appName : true)) // Only of this app, if defined
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matching of appName is now optional (if provided)

Copy link
Owner

@leolabs leolabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you for your PR!

@leolabs leolabs merged commit e4e4008 into leolabs:master Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants