blockly/apps/puzzle/template.soy
{namespace puzzlepage}
/**
* This is a Closure Template.
*
* To regenerate just en.js, run this command:
* java -jar ../_soy/SoyToJsSrcCompiler.jar --outputPathFormat generated/en.js --srcs ../common.soy,template.soy
*
* To regenerate all files, see: trunk/apps/common.soy
*/
/**
* Translated messages for use in JavaScript.
*/
{template .messages}
<div style="display: none">
<span id="Puzzle_country1">{{msg meaning="Puzzle.country1" desc="The name of the country Australia\n{lb}{lb}Identical|Australia{rb}{rb}"}}Australia{{/msg}}</span>
<span id="Puzzle_country1Flag">flag_au.png</span>
<span id="Puzzle_country1FlagHeight">50</span>
<span id="Puzzle_country1FlagWidth">100</span>
<span id="Puzzle_country1Language">
{{msg meaning="Puzzle.country1Language" desc="The English language.{lb}{lb}Identical|English{rb}{rb}"}}
English
{{/msg}}
</span>
<span id="Puzzle_country1City1">
{msg meaning="Puzzle.country1City1" desc="The city Melbourne in Australia."}
Melbourne
{/msg}
</span>
<span id="Puzzle_country1City2">
{msg meaning="Puzzle.country1City2" desc="The city Sydney in Australia."}
Sydney
{/msg}
</span>
<span id="Puzzle_country1HelpUrl">
{msg meaning="Puzzle.country1HelpUrl"
desc="The URL of a page with basic information about Australia."}
https://en.wikipedia.org/wiki/Australia
{/msg}
</span>
<span id="Puzzle_country2">
{{msg meaning="Puzzle.country2" desc="The country Germany.\n{lb}{lb}Identical|Germany{rb}{rb}"}}
Germany
{/msg}
</span>
<span id="Puzzle_country2Flag">flag_de.png</span>
<span id="Puzzle_country2FlagHeight">60</span>
<span id="Puzzle_country2FlagWidth">100</span>
<span id="Puzzle_country2Language">
{{msg meaning="Puzzle.country2Language" desc="The German language.\n{lb}{lb}Identical|German{rb}{rb}"}}
German
{{/msg}}
</span>
<span id="Puzzle_country2City1">
{msg meaning="Puzzle.country2City1" desc="The city Berlin in Germany."}
Berlin
{/msg}
</span>
<span id="Puzzle_country2City2">
{msg meaning="Puzzle.country2City2" desc="The city Munich (München) in Germany."}
Munich
{/msg}
</span>
<span id="Puzzle_country2HelpUrl">
{msg meaning="Puzzle.country2HelpUrl"
desc="The URL of a page with basic information about Germany."}
https://en.wikipedia.org/wiki/Germany
{/msg}
</span>
<span id="Puzzle_country3">
{msg meaning="Puzzle.country3" desc="The People's Republic of China."}
China
{/msg}
</span>
<span id="Puzzle_country3Flag">flag_cn.png</span>
<span id="Puzzle_country3FlagHeight">66</span>
<span id="Puzzle_country3FlagWidth">100</span>
<span id="Puzzle_country3Language">
{{msg meaning="Puzzle.country3Language" desc="The Chinese language.\n{lb}{lb}Identical|Chinese{rb}{rb}"}}
Chinese
{{/msg}}
</span>
<span id="Puzzle_country3City1">
{msg meaning="Puzzle.country3City1" desc="The capital city of China (also known as Peking)."}
Beijing
{/msg}
</span>
<span id="Puzzle_country3City2">
{msg meaning="Puzzle.country3City2" desc="The city Shanghai in China."}
Shanghai
{/msg}
</span>
<span id="Puzzle_country3HelpUrl">
{msg meaning="Puzzle.country3HelpUrl"
desc="The URL of a page with basic information about China."}
https://en.wikipedia.org/wiki/China
{/msg}
</span>
<span id="Puzzle_country4">
{msg meaning="Puzzle.country4" desc="The name of the country Brazil."}
Brazil
{/msg}
</span>
<span id="Puzzle_country4Flag">flag_br.png</span>
<span id="Puzzle_country4FlagHeight">70</span>
<span id="Puzzle_country4FlagWidth">100</span>
<span id="Puzzle_country4Language">
{{msg meaning="Puzzle.country4Language" desc="The Portuguese language.\n{lb}{lb}Identical|Portuguese{rb}{rb}"}}
Portuguese
{{/msg}}
</span>
<span id="Puzzle_country4City1">
{msg meaning="Puzzle.country4City1" desc="The city Rio de Janeiro in Brazil."}
Rio de Janeiro
{/msg}
</span>
<span id="Puzzle_country4City2">
{msg meaning="Puzzle.country4City2" desc="The city São Paulo in Brazil."}
São Paulo
{/msg}
</span>
<span id="Puzzle_country4HelpUrl">
{msg meaning="Puzzle.country4HelpUrl"
desc="The URL of a page with basic information about Brazil."}
https://en.wikipedia.org/wiki/Brazil
{/msg}
</span>
<span id="Puzzle_flag">
{{msg meaning="Puzzle.flag" desc="[[File:Config-language.png|left||32px]]\nnoun the official flag representing a country (the national flag).\n{lb}{lb}Identical|Flag{rb}{rb}"}}
flag:
{/msg}
</span>
<span id="Puzzle_language">
{{msg meaning="Puzzle.language"
desc="Prompt for the user to provide the official language of a country.\n{lb}{lb}Identical|Language{rb}{rb}"}}
language:
{{/msg}}
</span>
<span id="Puzzle_languageChoose">
{{msg meaning="Puzzle.languageChoose"
desc="Initial text displayed in a dropdown menu from which the user should choose the language spoken in the indicated country.\n{lb}{lb}Identical|Choose{rb}{rb}"}}
choose...
{{/msg}}
</span>
<span id="Puzzle_cities">
{{msg meaning="Puzzle.cities" desc="A label preceding a list of cities.\n{lb}{lb}Identical|City{rb}{rb}"}}
cities:
{{/msg}}
</span>
<span id="Puzzle_error0">
{msg meaning="Puzzle.error0"
desc="A congratulatory message displayed if the user placed all of the blocks correctly.\n\nParameters:\n* %1 - number of blocks correctly placed. It is always an integer greater than 1.\n\nThe use of a new line character is optional."}
Perfect!\nAll %1 blocks are correct.
{/msg}
</span>
<span id="Puzzle_error1">
{{msg meaning="Puzzle.error1"
desc="An encouraging error message displayed if the user placed all blocks except 1 correctly.\n\nIf the number of incorrect blocks is 2 or more, Puzzle.error2 is used instead."}}
Almost! One block is incorrect.
{{/msg}}
</span>
<span id="Puzzle_error2">
{{msg meaning="Puzzle.error2"
desc="An error message displayed if the user misplaced multiple blocks.\n\nParameters:\n* %1 - number of blocks incorrectly placed, which is always greater than 1 (or the message Puzzle.error1 would be used)."}}
%1 blocks are incorrect.
{{/msg}}
</span>
<span id="Puzzle_tryAgain">
{msg meaning="Puzzle.tryAgain"
desc="A message indicating that a visually distinguished block is incorrect and that the user should try to fix it.\n\nThe use of a new line character is optional."}
The highlighted block is not correct.\nKeep trying.
{/msg}
</span>
</div>
{/template}
/**
* Web page structure.
*/
{template .start}
{call .messages /}
<table id="header" width="100%">
<tr>
<td valign="bottom">
<h1>
<span id="title">
<a href="../index.html?lang={$ij.lang}">{msg meaning="Apps.blocklyMessage" desc="IBID"}Blockly{/msg}</a>
{sp}:{sp}
{msg meaning="Puzzle.title" desc="A brief title for page, not including the word for Blockly. Use the word for a jigsaw puzzle."}
Puzzle
{/msg}
</span>
</h1>
</td>
<td class="farSide">
<select id="languageMenu"></select>
<button id="helpButton">
{{msg meaning="Puzzle.help"
desc="The label on a button the user can press for help.\n{lb}{lb}Identical|Help{rb}{rb}"}}
Help
{{/msg}}
</button>
<button id="checkButton" class="primary">
{msg meaning="Puzzle.checkAnswers"
desc="A label on a button the user can press to check his/her answers."}
Check Answers
{/msg}
</button>
</td>
</tr>
</table>
<script type="text/javascript" src="../../blockly_compressed.js"></script>
<script type="text/javascript" src="../../{$ij.langSrc}"></script>
<script type="text/javascript" src="blocks.js"></script>
<div id="blockly"></div>
{call apps.dialog /}
<div id="help" class="dialogHiddenContent">
<div style="padding-bottom: 0.7ex">
{msg meaning="Puzzle.helpText"
desc="Instructions for the puzzle. For context, see [http://blockly-demo.appspot.com/static/apps/puzzle/index.html Blockly Puzzle]."}
For each country (green), attach its flag, choose its language, and make a stack of its cities.
{/msg}
</div>
<iframe style="height: 200px; width: 100%; border: none;" src="readonly.html?lang={$ij.lang}&xml=%3Cblock+type%3D%22country%22+x%3D%225%22+y%3D%225%22%3E%3Cmutation+country%3D%221%22%3E%3C%2Fmutation%3E%3Ctitle+name%3D%22LANG%22%3E1%3C%2Ftitle%3E%3Cvalue+name%3D%22FLAG%22%3E%3Cblock+type%3D%22flag%22%3E%3Cmutation+country%3D%221%22%3E%3C%2Fmutation%3E%3C%2Fblock%3E%3C%2Fvalue%3E%3Cstatement+name%3D%22CITIES%22%3E%3Cblock+type%3D%22city%22%3E%3Cmutation+country%3D%221%22+city%3D%222%22%3E%3C%2Fmutation%3E%3Cnext%3E%3Cblock+type%3D%22city%22%3E%3Cmutation+country%3D%221%22+city%3D%221%22%3E%3C%2Fmutation%3E%3C%2Fblock%3E%3C%2Fnext%3E%3C%2Fblock%3E%3C%2Fstatement%3E%3C%2Fblock%3E"></iframe>
{call apps.ok /}
</div>
<div id="answers" class="dialogHiddenContent">
<div id="answerMessage">
</div>
<div id="graph"><div id="graphValue"></div></div>
{call apps.ok /}
</div>
{/template}
/**
* Readonly Blockly in an iframe.
*/
{template .readonly}
{call .messages /}
<script type="text/javascript" src="../../blockly_compressed.js"></script>
<script type="text/javascript" src="../../{$ij.langSrc}"></script>
<script type="text/javascript" src="blocks.js"></script>
<div id="blockly"></div>
{/template}