Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: tests/test_site/templates/translatable-template.tmpl

Issue 29659605: Issue 6231 - Add tests for translation string substitution (Closed)
Left Patch Set: Created Jan. 8, 2018, 5:31 p.m.
Right Patch Set: Add tests for partial translation and for get_string Created Jan. 19, 2018, 3:26 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
LEFTRIGHT
(no file at all)
1 {{ body|safe }}
2
3 Simple TS with default: {{ 'Translate' | translate('simple') }}.
4
5 Same TS with no default: doesn't work in templates.
6
7 TS with fixed text: {{ 'Fixed <fix>text</fix>' | translate('fix-ts') }}.
8
9 Nested translation: {{ '<a href="{{nested-link http://foo.com/}}">Foo</a> and <a href="{{nested-link2 http://baz.com/}}">Baz</a>' | translate('nested-ts') }}.
10
11 Link resolving: {{ '<a href="translate">This page</a>' | translate('linked-ts') }}.
12
13 Entity escaping: {{ 'Drag&drop' | translate('entity-ts') }}.
14
15 Entity escaping in links: {{ '<a href="http://foo.com/?a&b">Foo</a>' | translate ('entity-lnk') }}.
LEFTRIGHT

Powered by Google App Engine
This is Rietveld