Indent removed in outputs produced by Google Cloud Translate v3 with glossary

12 Views Asked by At

I'm using Google Cloud Translation v3 to translate markdown files from French to English.

This config works and respects the formatting from the original file :


    response = client.translate_text(
        request={
            "parent": parent,
            "contents": [origin],
            "mime_type": "text/plain",
            "source_language_code": "fr",
            "target_language_code": "en"
        }
    )

However, when adding the glossary_config parameter, then every indent is erased.

Is there a way to use the glossary AND keep the indents as they appear on the source file ?

Thanks in advance for your help :-)

0

There are 0 best solutions below