#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)
Change History (7)
comment:1 by , 15 years ago
comment:2 by , 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 , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 14 years ago
Attachment: | mark_template_comments.diff added |
---|
Translator comments in Django templates
comment:4 by , 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 , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
If you are asking for context comments the #10004 is tracking adding that feature.