2010-02-16 20:14:27 +08:00
{% load i18n %}
2011-03-19 20:56:38 +08:00
{% comment %}Translators: Django comment block for translators
string's meaning unveiled
{% endcomment %}
2019-09-23 23:31:21 +08:00
{% translate "This literal should be included." %}
{% translate "This literal should also be included wrapped or not wrapped depending on the use of the --no-wrap option." %}
2010-11-17 23:37:33 +08:00
2011-03-19 20:56:38 +08:00
{% comment %}Some random comment
Some random comment
Translators: One-line translator comment #1
{% endcomment %}
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal #1a" %}
2011-03-19 20:56:38 +08:00
{% comment %}Some random comment
Some random comment
Translators: Two-line translator comment #1
continued here.
{% endcomment %}
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal #1b" %}
2011-03-19 20:56:38 +08:00
{% comment %}Some random comment
Translators: One-line translator comment #2
{% endcomment %}
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal #2a" %}
2011-03-19 20:56:38 +08:00
{% comment %}Some random comment
Translators: Two-line translator comment #2
continued here.
{% endcomment %}
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal #2b" %}
2011-03-19 20:56:38 +08:00
{% comment %}
Translators: One-line translator comment #3
{% endcomment %}
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal #3a" %}
2011-03-19 20:56:38 +08:00
{% comment %}
Translators: Two-line translator comment #3
continued here.
{% endcomment %}
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal #3b" %}
2011-03-19 20:56:38 +08:00
{% comment %} Translators: One-line translator comment #4{% endcomment %}
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal #4a" %}
2011-03-19 20:56:38 +08:00
{% comment %} Translators: Two-line translator comment #4
continued here.{% endcomment %}
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal #4b" %}
2011-04-19 04:00:10 +08:00
{% comment %} Translators: One-line translator comment #5 -- with non ASCII characters: áéíóúö{% endcomment %}
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal #5a" %}
2011-04-19 04:00:10 +08:00
{% comment %} Translators: Two-line translator comment #5 -- with non ASCII characters: áéíóúö
continued here.{% endcomment %}
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal #6b" %}
2011-10-19 12:59:47 +08:00
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal #7a" context "Special trans context #1" %}
{% translate "Translatable literal #7b" as var context "Special trans context #2" %}
{% translate "Translatable literal #7c" context "Special trans context #3" as var %}
2011-10-19 12:59:47 +08:00
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal #7.1a" | upper context "context #7.1a" %}
{% translate "Translatable literal #7.1b" |upper as var context "context #7.1b" %}
{% translate "Translatable literal #7.1c"| upper context "context #7.1c" as var %}
2015-08-28 23:09:20 +08:00
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal #7.1d"|add:" foo" context "context #7.1d" %}
{% translate "Translatable literal #7.1e"|add:' ûè本' as var context "context #7.1e" %}
2015-08-28 23:09:20 +08:00
{% with foo=" foo" %}
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal #7.1f"|add:foo context "context #7.1f" as var %}
2015-08-28 23:09:20 +08:00
{% endwith %}
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal #7.1g"|add:2 context "context #7.1g" as var %}
{% translate "Translatable literal #7.1h" | add:"foo" | add:2 context "context #7.1h" as var %}
2015-08-28 23:09:20 +08:00
2016-04-29 03:18:55 +08:00
<!-- Source file inside a msgid, should be left as - is. -->
2019-09-23 23:31:21 +08:00
{% translate "#: templates/test.html.py" %}
2016-05-02 01:21:43 +08:00
<!-- Deliberate duplicated string. -->
2019-09-23 23:31:21 +08:00
{% translate "This literal should be included." %}
2016-04-29 03:18:55 +08:00
2019-09-23 23:31:21 +08:00
{% blocktranslate context "Special blocktranslate context #1" %}Translatable literal #8a{% endblocktranslate %}
{% blocktranslate count 2 context "Special blocktranslate context #2" %}Translatable literal #8b-singular{% plural %}Translatable literal #8b-plural{% endblocktranslate %}
{% blocktranslate context "Special blocktranslate context #3" count 2 %}Translatable literal #8c-singular{% plural %}Translatable literal #8c-plural{% endblocktranslate %}
{% blocktranslate with a=1 context "Special blocktranslate context #4" %}Translatable literal #8d {{ a }}{% endblocktranslate %}
2011-12-11 08:07:06 +08:00
2019-09-23 23:31:21 +08:00
{% translate "Translatable literal with context wrapped in single quotes" context 'Context wrapped in single quotes' as var %}
{% translate "Translatable literal with context wrapped in double quotes" context "Context wrapped in double quotes" as var %}
{% blocktranslate context 'Special blocktranslate context wrapped in single quotes' %}Translatable literal with context wrapped in single quotes{% endblocktranslate %}
{% blocktranslate context "Special blocktranslate context wrapped in double quotes" %}Translatable literal with context wrapped in double quotes{% endblocktranslate %}
2013-11-03 03:01:17 +08:00
2019-09-23 23:31:21 +08:00
{# Backwards compatability tests #}
{% blocktrans %}blocktrans text{% endblocktrans %}
{% trans "trans text" %}
2013-11-03 03:01:17 +08:00
2019-06-22 00:41:01 +08:00
{# BasicExtractorTests.test_blocktranslate_trimmed #}
{% blocktranslate %}
2013-11-03 03:01:17 +08:00
Text with a few
line breaks.
2019-09-23 23:31:21 +08:00
{% endblocktranslate %}
{% blocktranslate trimmed %}
2013-11-03 03:01:17 +08:00
Again some text with a few
line breaks, this time
should be trimmed.
2019-09-23 23:31:21 +08:00
{% endblocktranslate %}
{% translate "Get my line number" %}
2015-08-25 07:28:23 +08:00
2019-06-22 00:41:01 +08:00
{% blocktranslate trimmed count counter=mylist|length %}
First `translate`, then `blocktranslate` with a plural
2015-08-25 07:28:23 +08:00
{% plural %}
2019-06-22 00:41:01 +08:00
Plural for a `translate` and `blocktranslate` collision case
{% endblocktranslate %}
2016-01-20 01:45:50 +08:00
2019-09-23 23:31:21 +08:00
{% translate "Non-breaking space :" %}