weblate icon indicating copy to clipboard operation
weblate copied to clipboard

Document-based markdown translation

Open benmccann opened this issue 1 month ago • 4 comments

Describe the problem

Most translation tools have historically been geared towards applications such as inserting strings into a programming language. However, markdown is a fairly different use case because the idea behind it is that it's a human-readable document format.

While I'm not overly familiar with the internals, I believe that the current markdown implementation tries to split the document up into smaller po strings, translate them, and then output a markdown document from that. This process can be error prone, make it harder to see context, and is harder to implement than handling the entire document as a single string. Most importantly, it has a huge caveat highlighted in the docs:

Unlike most other formats, the changes in the translation files will not be imported to Weblate because it can not be done reliably. The source of truth for the translations is Weblate not the translated file.

Describe the solution you would like

Let translators handle the document in its entirety. Store versions of the document and provide a diff tool so that when a document is updated, translators can more easily see which portions changed.

This could either replace the current implementation or users could have the option of choosing between the two

Describe alternatives you have considered

Possibly improve the current implementation. However, it seems that there are fundamental limitations of the current approach that would make it not possible to solve some of the difficulties.

Additional context

See also issues like https://github.com/WeblateOrg/weblate/issues/10008 and https://github.com/WeblateOrg/weblate/issues/9786

benmccann avatar Jun 16 '24 15:06 benmccann