TenshiTranslator.Translator.Translator module

class TenshiTranslator.Translator.Translator.Translator(outputOption: OutputFormat, preprocessGlossary: Glossary, postProcessGlossary: Glossary)

Bases: ABC

Abstract class for translators that translates a file

Parameters:
  • outputOption – the output format to use

  • preprocessGlossary – the glossary to use for preprocessing

  • postProcessGlossary – the glossary to use for postprocessing

translate(inputFilePath: str)

Translates a file and writes to inputFilePath-Translated.txt

Parameters:

inputFilePath – path to the file to be translated