Smarty v5 update test, initial code setup
This commit is contained in:
27
test/includes/locale/ja_JP.frontend.UTF-8.po
Normal file
27
test/includes/locale/ja_JP.frontend.UTF-8.po
Normal file
@@ -0,0 +1,27 @@
|
||||
# Project Name here
|
||||
# Language Name here
|
||||
# Copyright (C) 2012 E-GRAPHICS Japan
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Clemens Schwaigher <clemens.schwaighofer@e-graphics.com>, 2012/5/31
|
||||
#
|
||||
# to craete: msgfmt -o ja.mo messages.po
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Test for Smarty 3\n"
|
||||
"Report-Msgid-Bugs-To: clemens.schwaighofer@e-graphics.com\n"
|
||||
"POT-Creation-Date: 2012-05-31 14:27+0900\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: E-GRAPHICS Japan <info.japan@e-graphics.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
msgid "Original"
|
||||
msgstr "Translated"
|
||||
|
||||
msgid "Original with string: %1"
|
||||
msgstr "Translated with string: %1"
|
||||
|
||||
#msgid ""
|
||||
#msgstr ""
|
||||
BIN
test/includes/locale/ja_JP/LC_MESSAGES/frontend.mo
Normal file
BIN
test/includes/locale/ja_JP/LC_MESSAGES/frontend.mo
Normal file
Binary file not shown.
95
test/includes/templates/frontend/test.full.tpl
Normal file
95
test/includes/templates/frontend/test.full.tpl
Normal file
@@ -0,0 +1,95 @@
|
||||
<!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}">
|
||||
{popup_init src="./js/overlib/overlib.js"}
|
||||
</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 {popup width="250" caption="Info v5" text="Text block<br>Control<br>SMARTY 5" bgcolor="#ece86d" fgcolor="#ecb96d" capcolor="black"}>This is a test for Smarty 5</div>
|
||||
<div {popup width="250" caption="Info" text="Text block<br>Control"} style="border: 1px solid black; margin: 5px 0 5px 0; padding: 5px;">
|
||||
POPUP HERE (hover mouse)
|
||||
</div>
|
||||
<div>
|
||||
<b>Outside translation test</b><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: {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>
|
||||
<select id="drop_down_test" name="drop_down_test">
|
||||
{html_options options=$drop_down_test selected=$drop_down_test_selected}
|
||||
</select>
|
||||
</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>
|
||||
{html_radios name="radio_test" options=$radio_test selected=$radio_test_selected}
|
||||
</div>
|
||||
<div>
|
||||
{html_checkboxes name="checkbox_test" options=$checkbox_test selected=$checkbox_test_selected}
|
||||
</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>
|
||||
|
||||
|
||||
90
test/includes/templates/frontend/test.simple.tpl
Normal file
90
test/includes/templates/frontend/test.simple.tpl
Normal file
@@ -0,0 +1,90 @@
|
||||
<!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>
|
||||
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: {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>
|
||||
<select id="drop_down_test" name="drop_down_test">
|
||||
{html_options options=$drop_down_test selected=$drop_down_test_selected}
|
||||
</select>
|
||||
</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>
|
||||
{html_radios name="radio_test" options=$radio_test selected=$radio_test_selected}
|
||||
</div>
|
||||
<div>
|
||||
{html_checkboxes name="checkbox_test" options=$checkbox_test selected=$checkbox_test_selected}
|
||||
</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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user