Search code examples
weblate

How do you translate a full page with a lot of text, and some images with Weblate?


I'm am using Weblate for an application, and already translated many simple word and sentence.

But now, in my application, I would like to create a long description page with some images.

Assuming images does not contains text, how could I export the page to Weblate to let contributors translate the full page ?

Should I cut the page into many paragraphes and titles, or does someone already did something like that ?

I already searched an answer here https://stackoverflow.com/questions/tagged/weblate and in weblate documentation with keywords "full page", "page", "long text", but I don't find anything.


Solution

  • Finally I ended up by splitting the whole text into sentences.

    As being said by Michal Čihař, it has the following advantages:

    • Easier to translate, many people can translate a single sentence
    • If I change one sentence in paragraph, it will be reported in Weblate that the single sentence has changed, and no need to translate all the paragraph.

    For exemple here is an extract of my translated react template: https://github.com/alcalyn/openhex/blob/adbf6edaba1da00d3227763c39ccefab6fff1cf7/src/components/GameRules/GameRules.js#L468-L487

    And the english translation file: https://github.com/alcalyn/openhex/blob/adbf6edaba1da00d3227763c39ccefab6fff1cf7/src/components/GameRules/locales/en.json

    Don't forget to use a translation key which is independent to the text. You may want to be able to fix a typo in the text without update all translations.

    Alternative solution

    However, as it is a good solution in my case, sometimes it is better to translate the whole paragraph in one translation, for exemple a blog post, as done in F-Droid project: https://hosted.weblate.org/translate/f-droid/website-posts/fr/?checksum=2a62bd1efaa9b2fa

    As a blog post is not meant to change, or maintened, translating the whole paragraph makes sense.