Skip to content

Commit

Permalink
Backport qqq.json message changes. Fix Puzzle (issue 12).
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilFraser committed Jan 11, 2015
1 parent 07db9a7 commit 815b5c7
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 98 deletions.
2 changes: 1 addition & 1 deletion appengine/bird/template.soy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{call BlocklyGames.soy.messages /}
<div style="display: none">
<span id="Bird_noWorm">{msg meaning="Bird.noWorm" desc="block text - Bird is not in possession of a worm. This phrase is prefixed with 'if'."}does not have worm{/msg}</span>
<span id="Bird_heading">{msg meaning="Bird.heading" desc="block text - the compass direction toward which a traveler or vehicle is or should be moving; course."}heading{/msg}</span>
<span id="Bird_heading">{{msg meaning="Bird.heading" desc="block text - the compass direction toward which a traveler or vehicle is or should be moving; course.\n{lb}{lb}Identical|Heading{rb}{rb}"}}heading{{/msg}}</span>
<span id="Bird_noWormTooltip">{msg meaning="Bird.noWormTooltip" desc="tooltip - The bird wants to get the worm."}The condition when the bird has not gotten the worm.{/msg}</span>
<span id="Bird_headingTooltip">{msg meaning="Bird.headingTooltip" desc="tooltip - Move in the direction of the given angle, where 0 means going horizontally to the right, and 90 straight up and 270 straight down."}Move in the direction of the given angle: 0 is to the right, 90 is straight up, etc.{/msg}</span>
<span id="Bird_positionTooltip">{msg meaning="Bird.positionTooltip" desc="tooltip - (x, y) marks the coordinate of bird, (0, 0) is the bottom left corner and (100, 100) top right."}x and y mark the bird's position. When x = 0 the bird is near the left edge, when x = 100 it's near the right edge. When y = 0 the bird is at the bottom, when y = 100 it's at the top.{/msg}</span>
Expand Down
4 changes: 2 additions & 2 deletions appengine/index/template.soy
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{else}
<a href="about?lang={$ij.lang}">
{/if}
{msg meaning="Index.moreInfo" desc="Brief description of Blockly Games."}More info...{/msg}
{{msg meaning="Index.moreInfo" desc="Brief description of Blockly Games.\n{lb}{lb}Identical|More information{rb}{rb}"}}More info...{{/msg}}
</a>
</div>
</div>
Expand Down Expand Up @@ -112,7 +112,7 @@
<p id="clearDataPara" style="visibility: hidden">
{msg meaning="Index.startOver" desc="Label next to button for deleting all the user's data."}Want to start over?{/msg}
<button class="secondary" id="clearData">
{msg meaning="Index.clearData" desc="Text on button for deleting all the user's data."}Clear data{/msg}</span>
{{msg meaning="Index.clearData" desc="Text on button for deleting all the user's data.\n{lb}{lb}Identical|Clear data{rb}{rb}"}}Clear data{{/msg}}</span>
</button>
</p>
{/template}
Expand Down
8 changes: 4 additions & 4 deletions appengine/maze/template.soy
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
<span id="Maze_turnLeft">{msg meaning="Maze.turnLeft" desc="[[Translating:Blockly#Drop-Down_Menus dropdown]] - Imperative or infinitive of a verb for a person turning his head and body one quarter rotation counter-clockwise. Prefer a translation that has text in common with the translation of 'turn right'. See [[Translating:Blockly#Drop-Down_Menus]]."}turn left{/msg}</span>
<span id="Maze_turnRight">{msg meaning="Maze.turnRight" desc="[[Translating:Blockly#Drop-Down_Menus dropdown]] - Imperative or infinitive of a verb for a person turning his head and body one quarter rotation clockwise. Prefer a translation that has text in common with the translation of 'turn left'. See [[Translating:Blockly#Drop-Down_Menus]]."}turn right{/msg}</span>
<span id="Maze_doCode">{msg meaning="Maze.doCode" desc="block text - Imperative or infinitive of a verb preceding one or more commands to a person. This is part of [https://github.com/google/blockly/wiki/Loops#repeat repeat] and [https://github.com/google/blockly/wiki/IfElse#If_blocks if] blocks."}do{/msg}</span>
<span id="Maze_elseCode">{msg meaning="Maze.elseCode" desc="block text - Conjunction meaning 'otherwise', introducing commands to be performed if a previous condition was not true, as in 'if x\u003E3, do this, else do that'. See [https://github.com/google/blockly/wiki/IfElse#If-Else_blocks]."}else{/msg}</span>
// This definition was copied up here ahead of when it is needed so that it is adjacent
// to the previous definition.
<span id="Maze_elseCode">{msg meaning="Maze.elseCode" desc="block text - Conjunction meaning 'otherwise', introducing commands to be performed if a previous condition was not true, as in 'if x>3, do this, else do that'. See [https://github.com/google/blockly/wiki/IfElse#If-Else_blocks]."}else{/msg}</span>
// The helpIfElse definition was copied up here ahead of when it is needed
// so that it is adjacent to the previous definition.
<span id="Maze_helpIfElse">{msg meaning="Maze.helpIfElse" desc="callout - This is shown when the 'if-else' block is introduced. For 'if-else' concatenate the words for 'if' and 'else/otherwise'."}If-else blocks will do one thing or the other.{/msg}</span>
<span id="Maze_pathAhead">{msg meaning="Maze.pathAhead" desc="[[Translating:Blockly#Drop-Down_Menus dropdown]] - Condensed form of 'if there is a path ahead', as in: 'if path ahead, go forward'. Prefer translation that has text in common with 'if path to the left' and 'if path to the right'."}if path ahead{/msg}</span>
<span id="Maze_pathLeft">{msg meaning="Maze.pathLeft" desc="[[Translating:Blockly#Drop-Down_Menus dropdown]] - Condensed form of 'if there is a path to the left', as in: 'if path to the left, turn left'."}if path to the left{/msg}</span>
Expand Down Expand Up @@ -224,7 +224,7 @@
<table><tr><td>
<img src="common/help.png">
</td><td>&nbsp;</td><td>
{msg meaning="Maze.helpWallFollow" desc="callout - This advises the user to solve a maze by keeping his/her left hand in contact with the wall while proceding through it. The final sentence is a warning that only advanced programmers should attempt this problem, as beginners tend to get frustrated."}
{msg meaning="Maze.helpWallFollow" desc="callout - This advises the user to solve a maze by keeping his/her left hand in contact with the wall while proceeding through it. The final sentence is a warning that only advanced programmers should attempt this problem, as beginners tend to get frustrated."}
Can you solve this complicated maze? Try following the left-hand wall. Advanced programmers only!
{/msg}
{call BlocklyGames.soy.ok /}
Expand Down
12 changes: 6 additions & 6 deletions appengine/movie/template.soy
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
<span id="Movie_y1">{msg meaning="Movie.y1" desc="Label for the y-coordinate of the start of a line"}start y{/msg}</span>
<span id="Movie_x2">{msg meaning="Movie.x2" desc="Label for the x-coordinate of the end of a line."}end x{/msg}</span>
<span id="Movie_y2">{msg meaning="Movie.y2" desc="Label for the y-coordinate of the end of a line."}end y{/msg}</span>
<span id="Movie_radius">{msg meaning="Movie.radius" desc="Label for a circle's radius input."}radius{/msg}</span>
<span id="Movie_width">{msg meaning="Movie.width" desc="Label for a rectangle or line's width input."}width{/msg}</span>
<span id="Movie_height">{msg meaning="Movie.height" desc="Label for a rectangle's height input."}height{/msg}</span>
<span id="Movie_radius">{{msg meaning="Movie.radius" desc="Label for a circle's radius input.\n{lb}{lb}Identical|Radius{rb}{rb}"}}radius{{/msg}}</span>
<span id="Movie_width">{{msg meaning="Movie.width" desc="Label for a rectangle or line's width input.\n{lb}{lb}Identical|Width{rb}{rb}"}}width{{/msg}}</span>
<span id="Movie_height">{{msg meaning="Movie.height" desc="Label for a rectangle's height input.\n{lb}{lb}Identical|Height{rb}{rb}"}}height{{/msg}}</span>
<span id="Movie_circleTooltip">{msg meaning="Movie.circleTooltip" desc="tooltip"}Draws a circle at the specified location and with the specified radius.{/msg}</span>
<span id="Movie_circleDraw">{msg meaning="Movie.circleDraw" desc="Command to draw a circle."}circle{/msg}</span>
<span id="Movie_circleDraw">{{msg meaning="Movie.circleDraw" desc="Command to draw a circle.\n{lb}{lb}Identical|Circle{rb}{rb}"}}circle{{/msg}}</span>
<span id="Movie_rectTooltip">{msg meaning="Movie.rectTooltip" desc="tooltip"}Draws a rectangle at the specified location and with the specified width and height.{/msg}</span>
<span id="Movie_rectDraw">{msg meaning="Movie.rectDraw" desc="Command to draw a rectangle."}rectangle{/msg}</span>
<span id="Movie_rectDraw">{{msg meaning="Movie.rectDraw" desc="Command to draw a rectangle.\n{lb}{lb}Identical|Rectangle{rb}{rb}"}}rectangle{{/msg}}</span>
<span id="Movie_lineTooltip">{msg meaning="Movie.lineTooltip" desc="tooltip"}Draws a line from one point to another with the specified width.{/msg}</span>
<span id="Movie_lineDraw">{msg meaning="Movie.lineDraw" desc="Command to draw a rectangle."}line{/msg}</span>
<span id="Movie_lineDraw">{{msg meaning="Movie.lineDraw" desc="Command to draw a rectangle.\n{lb}{lb}Identical|Line{rb}{rb}"}}line{{/msg}}</span>
<span id="Movie_timeTooltip">{msg meaning="Movie.timeTooltip" desc="tooltip"}Returns the current time in the animation (0-100).{/msg}</span>
Expand Down
18 changes: 9 additions & 9 deletions appengine/pond/template.soy
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
{template .messages}
{call BlocklyGames.soy.messages /}
<div style="display: none">
<span id="Pond_playerName">{msg meaning="Pond.playerName" desc="Generic name for the player."}Player{/msg}</span>
<span id="Pond_targetName">{msg meaning="Pond.targetName" desc="Name for a player that does nothing."}Target{/msg}</span>
<span id="Pond_rabbitName">{msg meaning="Pond.rabbitName" desc="Name for a player that runs like a rabbit."}Rabbit{/msg}</span>
<span id="Pond_counterName">{msg meaning="Pond.counterName" desc="Name for a player that counts methodically."}Counter{/msg}</span>
<span id="Pond_rookName">{msg meaning="Pond.rookName" desc="Name for a player that behaves like a rook (castle) in chess."}Rook{/msg}</span>
<span id="Pond_sniperName">{msg meaning="Pond.sniperName" desc="Name for a player that hides in a corner and shoots."}Sniper{/msg}</span>
<span id="Pond_pendulumName">{msg meaning="Pond.pendulumName" desc="Name for a player that moves back and forth."}Pendulum{/msg}</span>
<span id="Pond_scaredName">{msg meaning="Pond.scaredName" desc="Name for a player that is scared."}Scared{/msg}</span>
<span id="Pond_playerName">{{msg meaning="Pond.playerName" desc="Generic name for the player of this video game.\n{lb}{lb}Identical|Player{rb}{rb}"}}Player{{/msg}}</span>
<span id="Pond_targetName">{{msg meaning="Pond.targetName" desc="Name for a player that does nothing.\n{lb}{lb}Identical|Target{rb}{rb}"}}Target{{/msg}}</span>
<span id="Pond_rabbitName">{{msg meaning="Pond.rabbitName" desc="Name for a player that runs like a rabbit.\n{lb}{lb}Identical|Rabbit{rb}{rb}"}}Rabbit{{/msg}}</span>
<span id="Pond_counterName">{{msg meaning="Pond.counterName" desc="Name for a player that counts methodically.\n{lb}{lb}Identical|Counter{rb}{rb}"}}Counter{{/msg}}</span>
<span id="Pond_rookName">{{msg meaning="Pond.rookName" desc="Name for a player that behaves like a rook (castle) in chess.\n{lb}{lb}Identical|Rook{rb}{rb}"}}Rook{{/msg}}</span>
<span id="Pond_sniperName">{{msg meaning="Pond.sniperName" desc="Name for a player that hides in a corner and shoots.\n{lb}{lb}Identical|Sniper{rb}{rb}"}}Sniper{{/msg}}</span>
<span id="Pond_pendulumName">{{msg meaning="Pond.pendulumName" desc="Name for a player that moves back and forth.\n{lb}{lb}Identical|Pendulum{rb}{rb}"}}Pendulum{{/msg}}</span>
<span id="Pond_scaredName">{{msg meaning="Pond.scaredName" desc="Name for a player that is scared.\n{lb}{lb}Identical|Scared{rb}{rb}"}}Scared{{/msg}}</span>

<span id="Pond_scanTooltip">{msg meaning="Pond.scanTooltip" desc="Tooltip for the block that allows players to scan for enemies."}Scan for enemies. Specify a direction (0-360). Returns the distance to the closest enemy in that direction. Returns Infinity if no enemy found.{/msg}</span>
<span id="Pond_cannonTooltip">{msg meaning="Pond.cannonTooltip" desc="Tooltip for the block that allows players to shoot at other players."}Fire the cannon. Specify a direction (0-360) and a range (0-70).{/msg}</span>
Expand Down Expand Up @@ -55,7 +55,7 @@
<tr>
<td style="width: 190px; text-align: center; vertical-align: top;">
<button id="docsButton" title="{msg meaning="Pond.docsTooltip" desc="Tooltip for the button that opens the language reference documentation."}Display the language documentation.{/msg}">
{msg meaning="Pond.documentation" desc="Text on the button that opens the language reference documentation."}Documentation{/msg}
{{msg meaning="Pond.documentation" desc="Text on the button that opens the language reference documentation.\n{lb}{lb}Identical|Documentation{rb}{rb}"}}Documentation{{/msg}}
</button>
</td>
<td>
Expand Down
4 changes: 2 additions & 2 deletions appengine/puzzle/js/puzzle.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Puzzle.init = function() {
var totalArea = 0;
// Measure the surface area of each block.
for (var i = 0, block; block = blocks[i]; i++) {
var blockBox = block.svg_.getRootElement().getBBox();
var blockBox = block.getSvgRoot().getBBox();
block.cached_width_ = blockBox.width;
block.cached_height_ = blockBox.height;
block.cached_area_ = blockBox.width * blockBox.height;
Expand All @@ -131,7 +131,7 @@ Puzzle.init = function() {
workspaceBox.height -= MARGIN;
var countedArea = 0;
for (var i = 0, block; block = blocks[i]; i++) {
var blockBox = block.svg_.getRootElement().getBBox();
var blockBox = block.getSvgRoot().getBBox();
// Spread the blocks horizontally, grouped by type.
// Spacing is proportional to block's area.
if (rtl) {
Expand Down
Loading

0 comments on commit 815b5c7

Please sign in to comment.