OpenXML - add parameter to update texts in table of contents after translation

Issue #842 new
Philipp created an issue

Unfortunately, after translation of Word documents, the translated titles from the document body are not inserted automatically into the table of contents when opening the Word document. Instead, it´s necessary to update the toc fields manually via the macro. In the context of machine translation, this is quite an impediment because the user expects to get back documents fully translated w/o the need to perform any further manual steps.

In older Okapi Rainbow desktop versions (e.g. Okapi 0.24) strings from table of contents were extracted for translation and after writing the target document the table of content already showed the translations w/o having to updated the toc fields. This would be a solution to my request.

However, I also saw that this older approach extracted additional inline markup (from the macro?) whereas the corresponding title strings didn´t have/contain inline markup at all. Furthermore, there´s a certain risk that translators will translate table of content strings and the actual titles further down in the document differently, which is confusing.

(Is this why you stopped extracting toc strings for translation?)

I´d like to ask you if you could add another filter configuration parameter, e.g., updateTOCAfterTranslation = true/false (default = true), that writes the corresponding title translation into the toc when writing the target document?

Thank you very much!

Cheers,

Philipp

Comments (3)

  1. Chase Tingley

    (Is this why you stopped extracting toc strings for translation?)

    This is basically the issue, yes. The TOC data is auto-generated text – the representation in the word document is a giant macro, plus “cached” values of the current text. If we expose the current values for translation, we risk both inconsistent translation, and also the likelihood that these translations will be overwritten by Word itself when it recomputes the macro value.

    In theory, letting Word recompute the TOC once the document is translated is probably the best solution process-wise, but I agree that it’s inconvenient to do this by hand. I wonder if there is a flag we could set to force Word to automatically rebuild the TOC the next time it opens the document?

  2. Log in to comment