Bug 25067: Move PO file manipulation code into gulp tasks
[koha.git] / t / misc / translator / sample.tt
blob3fd4fca2a5077c929b716c07b66ba19dc96d652a
1 [% USE raw %]
2 [% PROCESS 'i18n.inc' %]
3 [% t('hello ツ') | $raw %]
4 [% tx('hello {name}', { name = 'Bob' }) | $raw %]
5 [% tn('item', 'items', count) | $raw %]
6 [% tnx('{count} item', '{count} items', count, { count = count }) | $raw %]
7 [% tp('context', 'hello') | $raw %]
8 [% tpx('context', 'hello {name}', { name = 'Bob' }) | $raw %]
9 [% tnp('context', 'item', 'items', count) | $raw %]
10 [% tnpx('context', '{count} item', '{count} items', count, { count = count }) | $raw %]
12 [% # it also works on multiple lines
13     tnpx (
14         'context',
15         '{count} item',
16         '{count} items',
17         count,
18         {
19             count = count,
20         }
21     ) | $raw
24 [% # and t* calls can be nested
25     tx('status is {status}', {
26         status = active ? t('active') : t('inactive')
27     }) | $raw
30 [%# but a TT comment won't get picked
31     t('not translatable')
34 [% BLOCK %]
35     [% t('Inside block') | $raw %]
36 [% END %]