Koha/t/LangInstaller/templates/simple.tt
Julian Maurice eae72c6712 Bug 15395: Add unit tests for extract_messages_from_templates
Because LangInstaller use FindBin to define some paths, the test
produces warnings about a missing directory. I'm not sure how we can
avoid that.

Test plan:
  1. prove t/LangInstaller.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-08 15:55:51 +00:00

34 lines
807 B
Text

[% t('hello') %]
[% tx('hello {name}', { name = 'Bob' }) %]
[% tn('item', 'items', count) %]
[% tnx('{count} item', '{count} items', count, { count = count }) %]
[% tp('context', 'hello') %]
[% tpx('context', 'hello {name}', { name = 'Bob' }) %]
[% tnp('context', 'item', 'items', count) %]
[% tnpx('context', '{count} item', '{count} items', count, { count = count }) %]
[% # it also works on multiple lines
tnpx (
'context',
'{count} item',
'{count} items',
count,
{
count = count,
}
)
%]
[% # and t* calls can be nested
tx('status is {status}', {
status = active ? t('active') : t('inactive')
})
%]
[%# but a TT comment won't get picked
t('not translatable')
%]
[% BLOCK %]
[% t('Inside block') %]
[% END %]