lyqht/deepl-translate-github-action

Feature Request: DeepL Glossary

lyqht opened this issue · 1 comments

lyqht commented

Context

At the moment, if users run the github action multiple times, it may be possible that for some languages, the translated text may be slightly different than the previous translation results. If users want to keep them/ override them, they would have to make a separate commit.

Hence, it will be good if users can create their own custom dictionary of translation resutls based on the previous translation result that the github action has already provided for them before. In the DeepL API docs , this is known as glossaries.

Acceptance criteria

At the github action side, we need to add an action prop for glossary_name for users to input their own glossary, while adding logic to check for existing glossary translation results before overriding them. For now, this feature only needs to work for JSON files since it will be quite complicated to do so with HTML-like files.

ocaisa commented

Would it be possible to support people to provide the path to their own glossary in a csv format (i.e., as part of their repository) and use createGlossaryWithCsv()? Then one could:

  • Upload the glossary to get the necessary glossary ID
  • Use the glossary ID when making translations
  • Delete the glossary when the action finishes