﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
22262	Error in Translation Comments Documentation for Templates	av@…	Dejan Noveski	"I think the final example below (at the very bottom of this ticket) is missing some text.  Instead of : ""#. Translators:"", it should be ""# Translators: This is a text of the base template #"".

Thanks!

Comments for translators in templates
Just like with Python code, these notes for translators can be specified using comments, either with the comment tag:

{% comment %}Translators: View verb{% endcomment %}
{% trans ""View"" %}

{% comment %}Translators: Short intro blurb{% endcomment %}
<p>{% blocktrans %}A multiline translatable
literal.{% endblocktrans %}</p>
or with the {# ... #} one-line comment constructs:

{# Translators: Label of a button that triggers search #}
<button type=""submit"">{% trans ""Go"" %}</button>

{# Translators: This is a text of the base template #}
{% blocktrans %}Ambiguous translatable block of text{% endblocktrans %}
Note
Just for completeness, these are the corresponding fragments of the resulting .po file:

#. Translators: View verb
# path/to/template/file.html:10
msgid ""View""
msgstr """"

#. Translators: Short intro blurb
# path/to/template/file.html:13
msgid """"
""A multiline translatable""
""literal.""
msgstr """"

# ...

#. Translators: Label of a button that triggers search
# path/to/template/file.html:100
msgid ""Go""
msgstr """"

#. Translators:
# path/to/template/file.html:103
msgid ""Ambiguous translatable block of text""
msgstr """""	Cleanup/optimization	closed	Documentation	dev	Normal	fixed	templates, trans tags		Accepted	1	0	0	0	1	0
