From 49847cb5f050fd3f9585677a2e1ce0f24dbb2c69 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Tue, 09 Feb 2010 14:14:59 +0000 Subject: comment block --- (limited to 'taconstants.py') diff --git a/taconstants.py b/taconstants.py index e356826..fa3f1b5 100644 --- a/taconstants.py +++ b/taconstants.py @@ -124,8 +124,8 @@ PALETTES = [['forward', 'back', 'clean', 'left', 'right', 'show', 'storeinbox1', 'storeinbox2', 'string', 'box1', 'box2', 'box', 'storein', 'start'], ['kbinput', 'push', 'printheap', 'keyboard', 'pop', 'clearheap', - 'myfunc', 'nop', 'addturtle', 'print'], - ['journal', 'audio', 'description', 'templatelist', + 'myfunc', 'nop', 'addturtle', 'print', 'comment'], + ['journal', 'audio', 'description', 'list', 'hideblocks', 'showblocks', 'fullscreen', 'picture1x1', 'picture2x2', 'picture2x1', 'picture1x2', 'savepix'], ['empty', 'restoreall']] @@ -176,7 +176,7 @@ BASIC_STYLE = ['clean', 'penup', 'pendown', 'stack1', 'stack2', 'vspace', BASIC_STYLE_1ARG = ['forward', 'back', 'left', 'right', 'seth', 'show', 'setscale', 'setpensize', 'setcolor', 'setshade', 'print', 'showaligned', 'settextsize', 'settextcolor', 'print', 'wait', 'storeinbox1', 'savepix', - 'storeinbox2', 'wait', 'stack', 'push', 'nop', 'addturtle'] + 'storeinbox2', 'wait', 'stack', 'push', 'nop', 'addturtle', 'comment'] BASIC_STYLE_2ARG = ['arc', 'setxy', 'fillscreen', 'storein', 'write'] BOX_STYLE = ['number', 'xcor', 'ycor', 'heading', 'pensize', 'color', 'shade', 'textcolor', 'textsize', 'box1', 'box2', 'string', 'leftpos', 'scale', @@ -197,7 +197,7 @@ FLOW_STYLE_1ARG = ['repeat'] FLOW_STYLE_BOOLEAN = ['if'] FLOW_STYLE_ELSE = ['ifelse'] PORTFOLIO_STYLE_2x2 = ['template2x2'] -BULLET_STYLE = ['templatelist'] +BULLET_STYLE = ['templatelist', 'list'] PORTFOLIO_STYLE_1x1 = ['template1x1', 'template1x1a'] PORTFOLIO_STYLE_2x1 = ['template2x1'] PORTFOLIO_STYLE_1x2 = ['template1x2'] @@ -319,7 +319,7 @@ MACROS = { # # blocks that are expandable # -EXPANDABLE = ['vspace', 'hspace', 'templatelist', 'identity2'] +EXPANDABLE = ['vspace', 'hspace', 'templatelist', 'list', 'identity2'] # # Old block styles that need dock adjustments @@ -349,6 +349,7 @@ BLOCK_NAMES = { 'clean':[_('clean')], 'clearheap':[_('empty heap')], 'color':[_('color')], + 'comment':[_('comment')], 'cyan':[_('cyan')], 'division2':['/'], 'empty':[_('empty trash')], @@ -376,6 +377,7 @@ BLOCK_NAMES = { 'leftpos':[_('left')], 'leftx':[_('picture left')], 'less2':['<'], + 'list':['list'], 'minus2':['–'], 'myfunc':[_('Python'),_('code'),_('value')], 'nop':[_(' ')], @@ -466,6 +468,7 @@ PRIMITIVES = { 'clean':'clean', 'clearheap':'clearheap', 'color':'color', + 'comment':'comment', 'cyan':'cyan', 'division2':'division', 'equal2':'equal?', @@ -491,7 +494,7 @@ PRIMITIVES = { 'leftpos':'lpos', 'leftx':'leftx', 'less2':'less?', - 'templatelist':'bullet', + 'list':'bulletlist', 'minus2':'minus', 'myfunc':'myfunc', 'nop':'userdefined', @@ -543,6 +546,7 @@ PRIMITIVES = { 'template1x2':'t1x2', 'template2x1':'t2x1', 'template2x2':'t2x2', + 'templatelist':'bullet', 'textsize':'textsize', 'titlex':'titlex', 'titley':'titley', @@ -566,6 +570,7 @@ DEFAULTS = { 'audio':[None], 'back':[100], 'box':[_('my box')], + 'comment':[_('comment')], 'description':[None], 'fillscreen':[60, 80], 'forward':[100], @@ -574,6 +579,7 @@ DEFAULTS = { 'ifelse':[None, 'vspace', None, 'vspace'], 'journal':[None], 'left':[90], + 'list':['∙ ', '∙ '], 'media':[None], 'myfunc':[_('x'), 100], 'nop':[100], @@ -609,7 +615,7 @@ DEFAULTS = { # Blocks that can interchange strings and numbers for their arguments # STRING_OR_NUMBER_ARGS = ['plus2', 'equal2', 'less2', 'greater2', 'box', - 'template1x1', 'template1x2', 'template2x1', + 'template1x1', 'template1x2', 'template2x1', 'list', 'template2x2', 'template1x1a', 'templatelist', 'nop', 'print', 'stack', 'hat', 'addturtle'] @@ -693,20 +699,21 @@ SPECIAL_NAMES = { # Help messages # HELP_STRINGS = { - 'addturtle':_("choose which turtle to command"), + 'addturtle':_("chooses which turtle to command"), 'and2':_("logical AND operator"), - 'arc':_("move turtle along an arc"), + 'arc':_("moves turtle along an arc"), 'audio':_("Sugar Journal audio object"), - 'back':_("move turtle backward"), + 'back':_("moves turtle backward"), 'blocks':_("palette of variable blocks"), 'bottompos':_("ycor of bottom of screen"), - 'box1':_("variable 1 (numeric value)"), - 'box2':_("variable 2 (numeric value)"), + 'box1':_("Variable 1 (numeric value)"), + 'box2':_("Variable 2 (numeric value)"), 'box':_("named variable (numeric value)"), - 'clean':_("clear the screen and reset the turtle"), - 'clearheap':_("empty FILO"), + 'clean':_("clears the screen and reset the turtle"), + 'clearheap':_("emptys FILO (first-in-last-out heap)"), 'color':_("holds current pen color (can be used in place of a number block)"), 'colors':_("a palette of pen colors"), + 'comment':_("places a comment in your code"), 'description':_("Sugar Journal description field"), 'division2':_("divides top numeric input (numerator) by bottom numeric input (denominator)"), 'empty':_("permanently deletes items in trash"), @@ -714,17 +721,17 @@ HELP_STRINGS = { 'extras':_("palette of extra options"), 'fillscreen':_("fills the background with (color, shade)"), 'flow':_("palette of flow operators"), - 'forever':_("loop forever"), - 'forward':_("move turtle forward"), - 'fullscreen':_("hide the Sugar toolbars"), + 'forever':_("loops forever"), + 'forward':_("moves turtle forward"), + 'fullscreen':_("hides the Sugar toolbars"), 'greater2':_("logical greater-than operator"), - 'hat1':_("top of action 1 stack"), - 'hat2':_("top of action 2 stack"), + 'hat1':_("top of Action 1 stack"), + 'hat2':_("top of Action 2 stack"), 'hat':_("top of nameable action stack"), 'heading':_("holds current heading value of the turtle (can be used in place of a number block)"), - 'hideblocks':_("declutter canvas by hiding blocks"), + 'hideblocks':_("declutters canvas by hiding blocks"), 'width':_("the canvas width"), - 'hspace':_("jog stack right"), + 'hspace':_("jogs stack right"), 'identity2':_("identity operator used for extending blocks"), 'ifelse':_("if-then-else operator that uses boolean operators from Numbers palette"), 'if':_("if-then operator that uses boolean operators from Numbers palette"), @@ -732,56 +739,56 @@ HELP_STRINGS = { 'kbinput':_("query for keyboard input (results stored in keyboard block)"), 'keyboard':_("holds results of query-keyboard block"), 'leftpos':_("xcor of left of screen"), - 'left':_("turn turtle counterclockwise (angle in degrees)"), + 'left':_("turns turtle counterclockwise (angle in degrees)"), 'less2':_("logical less-than operator"), 'minus2':_("subtracts bottom numeric input from top numeric input"), - 'myfunc':_("a programmable block: add your own math equation in the block, e.g., sin(x)"), + 'myfunc':_("a programmable block: used to add advanced math equations, e.g., sin(x)"), 'nop':_("runs code found in the tamyblock.py module found in the Journal"), 'not':_("logical NOT operator"), 'numbers':_("palette of numeric operators"), 'number':_("used as numeric input in mathematic operators"), 'or':_("logical OR operator"), 'orientation':_("changes the orientation of the palette of blocks"), - 'pendown':_("turtle will draw when moved"), + 'pendown':_("Turtle will draw when moved."), 'pen':_("palette of pen commands"), 'pensize':_("holds current pen size (can be used in place of a number block)"), - 'penup':_("turtle will not draw when moved"), + 'penup':_("Turtle will not draw when moved."), 'plus2':_("adds two alphanumeric inputs"), - 'pop':_("pop value off FILO"), + 'pop':_("pops value off FILO (first-in last-out heap)"), 'portfolio':_("palette of presentation templates"), 'print':_("prints value in status block at bottom of the screen"), - 'printheap':_("show FILO in status block"), + 'printheap':_("shows values in FILO (first-in last-out heap)"), 'product2':_("multiplies two numeric inputs"), - 'push':_("push value onto FILO (first-in last-out) heap"), + 'push':_("pushes value onto FILO (first-in last-out heap)"), 'random':_("returns random number between minimum (top) and maximum (bottom) values"), 'remainder2':_("modular (remainder) operator"), - 'repeat':_("loop specified number of times"), - 'restore':_("restore most recent blocks from trash"), + 'repeat':_("loops specified number of times"), + 'restore':_("restores most recent blocks from trash"), 'restoreall':_("restore all blocks from trash"), 'rightpos':_("xcor of right of screen"), - 'right':_("turn turtle clockwise (angle in degrees)"), + 'right':_("turns turtle clockwise (angle in degrees)"), 'savepix':_("saves a picture to the Sugar Journal"), - 'scale':_("holds current scale value (can be used in place of a number block)"), - 'setcolor':_("set color of the line drawn by the turtle"), - 'seth':_("set the heading of the turtle (0 is towards the top of the screen.)"), - 'setpensize':_("set size of the line drawn by the turtle"), - 'setscale':_("set the scale of media"), - 'setshade':_("set shade of the line drawn by the turtle"), - 'settextcolor':_("set color of text drawn by the turtle"), - 'settextsize':_("set size of text drawn by turtle"), - 'setxy':_("move turtle to position xcor, ycor; (0, 0) is in the center of the screen."), - 'shade':_("holds current pen shade (can be used in place of a number block)"), - 'show':_("draw text or show media from the Journal"), + 'scale':_("holds current scale value"), + 'setcolor':_("sets color of the line drawn by the turtle"), + 'seth':_("sets the heading of the turtle (0 is towards the top of the screen.)"), + 'setpensize':_("sets size of the line drawn by the turtle"), + 'setscale':_("sets the scale of media"), + 'setshade':_("sets shade of the line drawn by the turtle"), + 'settextcolor':_("sets color of text drawn by the turtle"), + 'settextsize':_("sets size of text drawn by turtle"), + 'setxy':_("moves turtle to position xcor, ycor; (0, 0) is in the center of the screen."), + 'shade':_("holds current pen shade"), + 'show':_("draws text or show media from the Journal"), 'showblocks':_("restores hidden blocks"), - 'sqrt':_("calculate square root"), - 'stack1':_("invoke action 1 stack"), - 'stack2':_("invoke action 2 stack"), - 'stack':_("invoke named action stack"), + 'sqrt':_("calculates square root"), + 'stack1':_("invokes Action 1 stack"), + 'stack2':_("invokes Action 2 stack"), + 'stack':_("invokes named action stack"), 'start':_("connects action to toolbar run buttons"), - 'stopstack':_("do not continue current action"), - 'storeinbox1':_("store numeric value in variable 1"), - 'storeinbox2':_("store numeric value in variable 2"), - 'storein':_("store numeric value in named variable"), + 'stopstack':_("stops current action"), + 'storeinbox1':_("stores numeric value in Variable 1"), + 'storeinbox2':_("stores numeric value in Variable 2"), + 'storein':_("stores numeric value in named variable"), 'string':_("string value"), 'template1x1':_("presentation template: select Journal object (with description)"), 'template1x1a':_("presentation template: select Journal object (no description)"), @@ -795,8 +802,8 @@ HELP_STRINGS = { 'trash':_("a place to throw away blocks"), 'turtle':_("palette of turtle commands"), 'height':_("the canvas height"), - 'vspace':_("jog stack down"), - 'wait':_("wait specified number of seconds"), + 'vspace':_("jogs stack down"), + 'wait':_("pauses program execution a specified number of seconds"), 'xcor':_("holds current x-coordinate value of the turtle (can be used in place of a number block)"), 'ycor':_("holds current y-coordinate value of the turtle (can be used in place of a number block)")} -- cgit v0.9.1