diff --git a/src/services/deepl.ts b/src/services/deepl.ts index a0b8766..8418b2d 100644 --- a/src/services/deepl.ts +++ b/src/services/deepl.ts @@ -274,7 +274,8 @@ export class DeepL implements TranslationService { }; // Should a glossary be used? - if (this.glossariesDir || this.automaticGlossary) { + const glossaryFilePath = path.join(this.glossariesDir, `${from}-${to}.json`); + if (fs.existsSync(glossaryFilePath) || this.automaticGlossary) { // Find the glossary that matches the source and target language: const glossary = await this.getGlossary( from,