Code

Opened 7 years ago

Closed 7 years ago

#4535 closed (worksforme)

I18n in templates - multiline messages

Reported by: rohan@… Owned by: nobody
Component: Internationalization Version: master
Severity: Keywords: trans blocktrans i18n
Cc: permonik@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Three issues regarding multiline messages in templates to be translated:

  1. Messages spanning multiple lines don't seem to be accepted, e.g. the following gives an error (even using unix \n line ends):

{% blocktrans %}
Thank you very much for your
payment. Your transaction has been completed.
{% endblocktrans %}

  1. It isn't clear in the documents that this will cause a problem, or how such cases should be treated.
  1. In some cases it's possible for a template to cause make-messages.py to "freeze" (never return to the command prompt, no error messages). Attached is a template file which causes this behavior. After changing all the {% blocktrans %} to {% trans } the problem went away.

Attachments (1)

Copy_of_own_plantation.html (11.4 KB) - added by mtredinnick 7 years ago.
Template file that is causing the trouble.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 7 years ago by rohan@…

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Unable to attach the template file (trac error). Contact me should you want it.

Changed 7 years ago by mtredinnick

Template file that is causing the trouble.

comment:2 Changed 7 years ago by Simon G. <dev@…>

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 7 years ago by permonik@…

  • Cc permonik@… added

Is it still problem in current trunk? I've tried your template with r6110 and have not noticed any problems.

comment:4 Changed 7 years ago by permon

  • Resolution set to worksforme
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.