File translator
This microservice is served with multiple APIs to transform the data in the file to form JSON file and download the translated files of type DOCX, PPTX, and HTML.
Modules
Workflow Code
WF_A_FTTKTR
Steps:
Transformation Flow
Use the data in DOCX, PPTX, or HTML file to create a JSON file.
Tokenizer Flow
Read the JSON file created in the Transformation Flow and tokenize each paragraph.
Tokenization is a process where we extract all the sentences in a paragraph.
Translation Flow
Translate each sentence.
WF_S_FT
Steps:
WF_A_FTTKTR Flow
This flow must be completed before calling the download flow.
Download Flow
Fetch content for the file, replace original sentences with translated ones, and download the file.
Through WF Manager
Transform Flow
Mandatory Params for File Translator:
Path
Type
Locale
Actions:
Validate input parameters.
Generate a JSON file from the data of the given file.
Convert the given file to HTML, PDF, and push it to S3 (For showing it on UI).
Get the S3 link of the converted file and call content handler API to store the link.
Download Flow
Mandatory Params for File Translator:
Path
Type
Locale
Actions:
Validate input parameters.
Call fetch-content to get the translation of the file passed in the param.
Replace the original text in the file with the translated text.
Return the path of the translated file.
Last updated