Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/constants.py
diff options
context:
space:
mode:
Diffstat (limited to 'constants.py')
-rw-r--r--constants.py150
1 files changed, 142 insertions, 8 deletions
diff --git a/constants.py b/constants.py
index f275395..351feb9 100644
--- a/constants.py
+++ b/constants.py
@@ -31,7 +31,7 @@ TOP_LAYER = 1000
# block palette categories
#
-PALETTE_NAMES = ['turtle', 'pen', 'colors', 'number', 'flow', 'blocks',
+PALETTE_NAMES = ['turtle', 'pen', 'colors', 'numbers', 'flow', 'blocks',
'extras', 'portfolio', 'trash']
PALETTES = [['forward', 'back', 'clean', 'left', 'right', 'show',
@@ -140,12 +140,12 @@ OLD_DOCK = ['and', 'or']
CONTENT_BLOCKS = ['number', 'string', 'description', 'audio', 'journal']
#
-# block name dictionary
+# block name dictionary used for labels
#
BLOCK_NAMES = {
'and2':[_('and')],
'arc':[_('arc'),_('angle'),_('radius')],
- 'audio':[' '],
+ 'audio':[''],
'back':[_('back')],
'blue':[_('blue')],
'bottompos':[_('bottom')],
@@ -169,11 +169,11 @@ BLOCK_NAMES = {
'heading':[_('heading')],
'height':[_('height')],
'hideblocks':[_('hide blocks')],
- 'hspace':[' '],
+ 'hspace':[''],
'identity2':['←'],
'if':['',_('if'),_('then')],
'ifelse':['',_('if'),_('then else')],
- 'journal':[' '],
+ 'journal':[''],
'kbinput':[_('query keyboard')],
'keyboard':[_('keyboard')],
'left':[_('left')],
@@ -182,7 +182,7 @@ BLOCK_NAMES = {
'list':[_('list')],
'minus2':['–'],
'myfunc':[_('Python'),_('code'),_('value')],
- 'nop':[_(' ')],
+ 'nop':[_('')],
'not':[_('not')],
'number':['100'],
'orange':[_('orange')],
@@ -231,7 +231,7 @@ BLOCK_NAMES = {
'textsize':[_('text size')],
'toppos':[_('top')],
'turtle':[_('turtle')],
- 'vspace':[' '],
+ 'vspace':[''],
'wait':[_('wait')],
'width':[_('width')],
'xcor':[_('xcor')],
@@ -415,7 +415,7 @@ OLD_NAMES = {'product':'product2', 'storeinbox':'storein',
'descriptionoff':'description','template3':'list',
'template1':'template1x1', 'template2':'template2x1',
'template6':'template1x2', 'template7':'template2x2',
- 'template4':'template1x1', 'hres':'width', 'vres':'height' }
+ 'template4':'template1x1a', 'hres':'width', 'vres':'height' }
#
# Define the relative size and postion of media objects
@@ -430,6 +430,140 @@ TEMPLATES = {'t1x1': (0.5, 0.5, 0.0625, 0.125, 1.05, 0),
'insertimage': (0.333, 0.333)}
#
+# Names for blocks without names for popup help
+#
+SPECIAL_NAMES = {
+ 'audio':_('audio'),
+ 'division2':_('divide'),
+ 'equal2':_('equal'),
+ 'greater2':_('greater than'),
+ 'hspace':_('horizontal space'),
+ 'identity2':_('identity'),
+ 'if':_('if then'),
+ 'ifelse':_('if then else'),
+ 'journal':_('journal'),
+ 'less2':_('less than'),
+ 'minus2':_('minus'),
+ 'myfunc':_('Python code'),
+ 'nop':_('Python code'),
+ 'number':_('number'),
+ 'plus2':_('plus'),
+ 'product2':_('multiply'),
+ 'sqrt':_('square root'),
+ 'template1x1':_('presentation 1x1'),
+ 'template1x2':_('presentation 1x2'),
+ 'template2x1':_('presentation 2x1'),
+ 'template2x2':_('presentation 2x2'),
+ 'textsize':_('text size'),
+ 'vspace':_('vertical space')}
+
+#
+# Help messages
+#
+HELP_STRINGS = {
+ 'and2':_("logical AND operator"),
+ 'arc':_("move turtle along an arc"),
+ 'audio':_("Sugar Journal audio object"),
+ 'back':_("move turtle backward"),
+ 'blocks':_("palette of variable blocks"),
+ 'bottompos':_("ycor of bottom of screen"),
+ '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"),
+ 'color':_("holds current pen color (can be used in place of a number block)"),
+ 'colors':_("a palette of pen colors"),
+ 'description':_("Sugar Journal description field"),
+ 'division2':_("divides top numeric input (numerator) by bottom numeric input (denominator)"),
+ 'equal2':_("logical equal-to operator"),
+ 'extras':_("palette of extra options"),
+ 'fillscreen':_("fills the background with (color, shade)"),
+ 'flow':_("palette of flow operators"),
+ 'forever':_("loop forever"),
+ 'forward':_("move turtle forward"),
+ 'greater2':_("logical greater-than operator"),
+ '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"),
+ 'width':_("the canvas width"),
+ 'hspace':_("jog 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"),
+ 'journal':_("Sugar Journal media object"),
+ '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)"),
+ '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)"),
+ '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"),
+ '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"),
+ 'plus2':_("adds two numeric inputs"),
+ 'pop':_("pop value off FILO"),
+ 'portfolio':_("palette of presentation templates"),
+ 'print':_("prints value in status block at bottom of the screen"),
+ 'printheap':_("show FILO in status block"),
+ 'product2':_("multiplies two numeric inputs"),
+ 'push':_("push value onto FILO (first-in last-out) heap"),
+ 'random':_("returns random number between minimum (left) and maximum (right) values"),
+ 'remainder2':_("modular (remainder) operator"),
+ 'repeat':_("loop specified number of times"),
+ 'restore':_("restore blocks from trash"),
+ 'rightpos':_("xcor of right of screen"),
+ 'right':_("turn turtle clockwise (angle in degrees)"),
+ '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"),
+ 'sqrt':_("calculate square root"),
+ 'stack1':_("invoke action 1 stack"),
+ 'stack2':_("invoke action 2 stack"),
+ 'stack':_("invoke 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"),
+ 'string':_("string value"),
+ 'template1x1':_("presentation template: select Journal object (with description)"),
+ 'template2x1':_("presentation template: select two Journal objects"),
+ 'list':_("presentation template: list of bullets"),
+ 'template1x1a':_("presentation template: select Journal object (no description)"),
+ 'template1x2':_("presentation template: select two Journal objects"),
+ 'template2x2':_("presentation template: select four Journal objects"),
+ 'textcolor':_("holds current text color (can be used in place of a number block)"),
+ 'textsize':_("holds current text size (can be used in place of a number block)"),
+ 'toppos':_("ycor of top of screen"),
+ '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"),
+ '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)")}
+
+
+#
# 'dead key' Unicode dictionaries
#