Page MenuHomePhabricator

line breaks in Wikipedia Library card text emails are probably wrong in translation
Open, Needs TriagePublic

Description

In translatewiki, in the text of text (non-HTML) emails the line breaks are replaced with spaces.

For example, in the file TWLight/emails/templates/emails/user_renewal_notice-body-text.html, the text of the email is:

Dear {{ user }},

According to our records, your access to {{ partner_name }} will soon expire and you may lose access.
If you want to continue making use of your free account, you can request renewal of your account by clicking the Renew button at {{ partner_link }}.

Best,

The Wikipedia Library

You can disable these emails in your user page preferences: https://wikipedialibrary.wmflabs.org/users/

For English, these line breaks seem correct to me.

However, when this is represented as a message in translatewiki, all the line breaks are collapsed into single spaces, so this English message appears to translators like this:

Dear %(user)s, According to our records, your access to %(partner_name)s will soon expire and you may lose access. If you want to continue making use of your free account, you can request renewal of your account by clicking the Renew button at %(partner_link)s. Best, The Wikipedia Library You can disable these emails in your user page preferences: https://wikipedialibrary.wmflabs.org/users/

So the translators cannot even know where are the line breaks supposed to appear, and translate everything as one paragraph.

This message is just one example. There are a bunch of several similar emails.

I'm not sure if it's an issue in TWLight's build system, the Translate extension, or the translatewiki website, so tagging all of them.