Files
Smarty-Extended/test/includes/templates/frontend/test.simple.tpl
Clemens Schwaighofer 856a88d891 Update to Smarty 5.7.0
Fix tests for translations, where missing in the po/mo files
Add original and post translation for compare for outside and inside smarty translation

Update documentation and only keep the git update path, the others are deprecated

Update phpunit to v11 and update tests according to this, including updated test template data file

Add the tools folder to git ignore
2026-01-07 10:06:39 +09:00

109 lines
2.9 KiB
Smarty

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>{$HTML_TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset={$DEFAULT_ENCODING}">
</head>
<body>
BASE: {$BASE}<br>
<hr>
<div>
SMARTY_TEST: {$SMARTY_TEST}
</div>
<div>
TEST INSTALL {$TEST_INSTALL}
</div>
<div>
MERGE DATA: {$adm_set}
</div>
<div>
<b>Outside translation test</b><br>
TRANSLATED ORIGINAL: {$TRANSLATED_ORIGINAL}<br>
TRANSLATED REPLACED: {$TRANSLATED_REPLACED}<br>
TRANSLATION CLASS (OUT): {$TRANSLATE_TEST}<br>
TRANSLATION CLASS (OUT FUNCTION): {$TRANSLATE_TEST_FUNCTION}<br>
TRANSLATION CLASS (SMARTY): {$TRANSLATE_TEST_SMARTY}<br>
</div>
<div>
<b>Translate Test with replace:</b><br>
ORIGINAL: Original with string: %1 ({$replace})<br>
TRANSLATED: Translated with string: %1 ({$replace})<br>
TRANSLATED: {t 1=$replace}Original with string: %1{/t}<br>
TRANSLATED (escape): {t escape=on 1=$replace}Original with string: %1{/t}<br>
{capture assign="extra_title"}{t}INPUT TEST{/t}{/capture}
Capture test: {$extra_title}<br>
{section name=plural_test start=0 loop=3}
Plural test {$smarty.section.plural_test.index}: {t count=$smarty.section.plural_test.index plural="multi"}single{/t}<br>
{/section}
</div>
<div>
<b>Plugin Test:</b><br>
ORIGINAL: Original with string: %1 ({$replace})<br>
TRANSLATED: {tp 1=$replace}Original with string: %1{/tp}<br>
</div>
<div>
<b>Variable variables:</b><br>
Test: {$test}<br>
Foo: {$foo}<br>
{assign var="bar" value="test"}
vFoo ($test = $foo = bar): {$test|getvar}<br>
vFoo ($bar = $test = foo): {$bar|getvar}
</div>
<div class="jq-container">
<div id="jq-test" class="jp-test">
<div id="test-div" class="test-div">
Some content here or asdfasdfasf
</div>
<div id="translate-div">
TRANSLATION SMARTY: {t}I should be translated{/t}
</div>
</div>
</div>
<div class="loop-test">
<div><b>LOOP TEST</b></div>
{section name=page_list start=1 loop=$loop_start+1}
<div>LOOP OUTPUT: {$smarty.section.page_list.index}</div>
{/section}
</div>
<div>
Drop Down simple
</div>
<div>
<select id="drop_down_test" name="drop_down_test">
{html_options options=$drop_down_test selected=$drop_down_test_selected}
</select>
</div>
<div>
Drop Down nested
</div>
<div>
<select id="drop_down_test_nested" name="drop_down_test_nested">
{html_options options=$drop_down_test_nested selected=$drop_down_test_nested_selected}
</select>
</div>
<div>
radio plain
</div>
<div>
{html_radios name="radio_test" options=$radio_test selected=$radio_test_selected}
</div>
<div>
checkbox plain
</div>
<div>
{html_checkboxes name="checkbox_test" options=$checkbox_test selected=$checkbox_test_selected}
</div>
<div>
checkbox pos
</div>
<div>
{html_checkboxes name="checkbox_test_pos" options=$checkbox_test selected=$checkbox_test_pos_selected pos=$checkbox_test_pos}
</div>
<div>
{$lang_ex}
</div>
</body>
</html>