Opened 15 years ago

Closed 14 years ago

Last modified 13 years ago

#12320 closed (fixed)

Translations hints in HTML are lost in PO file

Reported by: Torsten Bronger Owned by: nobody
Component: Internationalization Version: 1.1
Severity: Keywords:
Cc: bronger@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently, all translation hints ("extracted comments" in xgettext speak) in HTML files get lost because xgettext interprets HTML files as Python sources and doesn't know {# ... #} or <!-- ... -->.

Therefore, django.utils.translation.trans_real.templatize should convert HTML/Template comments to Python comments.

Attachments (1)

mark_template_comments.diff (4.9 KB ) - added by Claude Paroz 14 years ago.
Translator comments in Django templates

Download all attachments as: .zip

Change History (7)

comment:1 by Ramiro Morales, 15 years ago

If you are asking for context comments the #10004 is tracking adding that feature.

comment:2 by Torsten Bronger, 15 years ago

No. Even if gettext parses comments at all, it would miss those in HTML files because django.utils.translation.trans_real.templatize must convert them to a format which can be understood by gettext.

comment:3 by Russell Keith-Magee, 15 years ago

Triage Stage: UnreviewedAccepted

by Claude Paroz, 14 years ago

Attachment: mark_template_comments.diff added

Translator comments in Django templates

comment:4 by Claude Paroz, 14 years ago

Has patch: set
milestone: 1.3

Proposed patch uploaded. Note that it properly applies only on top of #10004 patch.

comment:5 by Jannis Leidel, 14 years ago

Resolution: fixed
Status: newclosed

(In [14595]) Fixed #10004 and #12320 -- Enabled the makemessages management command to collect comments for translators that start with the "Translators" keyword. Thanks for the report and patches, martinb and Claude Paroz.

comment:19 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top