scratch-blocks 2.1.20 → 2.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,90 +0,0 @@
1
- const es = require('event-stream')
2
- const fs = require('fs')
3
- const path = require('path')
4
- const assert = require('assert')
5
-
6
- // current locale and keys for the locale
7
- let locale = ''
8
- let keys = []
9
-
10
- // current English keys
11
- let en = fs.readFileSync(path.resolve(__dirname, '../msg/json/en.json'))
12
- en = JSON.parse(en)
13
- const enKeys = Object.keys(en)
14
-
15
- // File paths
16
- const PATH_INPUT = path.resolve(__dirname, '../msg/scratch_msgs.js')
17
-
18
- // Match lines of the scratch_msgs file
19
- // Blockly.ScratchMsgs.locales indicates the start of a new locale
20
- // ": " marks a "key": "value" pair
21
- // Also match the end of the generated file so the last set of keys can be checked
22
- const match = function (str) {
23
- if (str.indexOf('Blockly.ScratchMsgs.locales') !== 0) return true
24
- if (str.indexOf('": "') !== 0) return true
25
- if (str.indexOf('End of combined translations') !== 0) return true
26
- return false
27
- }
28
-
29
- // Extract key and value from message definition, or locale when it changes
30
- const extract = function (str) {
31
- let m = str.match(/locales\["(.+)"\]/)
32
- if (m) {
33
- // locale changed
34
- return m[1]
35
- }
36
- m = str.match(/"(.*)": "(.*)",?$/)
37
- if (m) {
38
- return {
39
- key: m[1],
40
- value: m[2],
41
- }
42
- }
43
- // return a string for the end of the file so that validate will check the last set of keys
44
- m = str.match(/^\/\/ End of combined translations$/)
45
- if (m) return 'last'
46
- return null
47
- }
48
-
49
- const validateKeys = function () {
50
- // ignore empty keys first time through
51
- if (keys.length === 0) return
52
- assert.strictEqual(keys.length, Object.keys(en).length, `scratch_msgs-${locale}: number of keys doesn't match`)
53
- keys.map((item) => assert(enKeys.includes(item), `scratch_msgs-${locale}: has key ${item} not in en`))
54
- enKeys.map((item) => assert(keys.includes(item), `scratch_msgs-${locale}: is missing key ${item}`))
55
- }
56
-
57
- // Stream input and push each match to the storage object
58
- const stream = fs.createReadStream(PATH_INPUT)
59
- stream
60
- .pipe(es.split('\n'))
61
- .pipe(
62
- es.mapSync(function (str) {
63
- if (!match(str)) return
64
- const result = extract(str)
65
- if (!result) return
66
- if (typeof result === 'string') {
67
- // locale changed or end of file, validate the current collection of keys
68
- try {
69
- validateKeys()
70
- } catch (err) {
71
- console.error('Key validation FAILED: %O', err)
72
- process.exit(1)
73
- }
74
- // change locale, and reset keys array
75
- locale = result
76
- keys = []
77
- } else {
78
- keys.push(result.key)
79
- }
80
- }),
81
- )
82
- .pipe(
83
- es.wait(function (err) {
84
- if (err) {
85
- console.error(err)
86
- process.exit(1)
87
- }
88
- process.exit(0)
89
- }),
90
- )
package/i18n/tests.py DELETED
@@ -1,47 +0,0 @@
1
- #!/usr/bin/python
2
- # -*- coding: utf-8 -*-
3
-
4
- # Tests of i18n scripts.
5
- #
6
- # Copyright 2013 Google Inc.
7
- # https://developers.google.com/blockly/
8
- #
9
- # Licensed under the Apache License, Version 2.0 (the "License");
10
- # you may not use this file except in compliance with the License.
11
- # You may obtain a copy of the License at
12
- #
13
- # http://www.apache.org/licenses/LICENSE-2.0
14
- #
15
- # Unless required by applicable law or agreed to in writing, software
16
- # distributed under the License is distributed on an "AS IS" BASIS,
17
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- # See the License for the specific language governing permissions and
19
- # limitations under the License.
20
-
21
- import common
22
- import re
23
- import unittest
24
-
25
- class TestSequenceFunctions(unittest.TestCase):
26
- def test_insert_breaks(self):
27
- spaces = re.compile(r'\s+|\\n')
28
- def contains_all_chars(orig, result):
29
- return re.sub(spaces, '', orig) == re.sub(spaces, '', result)
30
-
31
- sentences = [u'Quay Pegman qua bên trái hoặc bên phải 90 độ.',
32
- u'Foo bar baz this is english that is okay bye.',
33
- u'If there is a path in the specified direction, \nthen ' +
34
- u'do some actions.',
35
- u'If there is a path in the specified direction, then do ' +
36
- u'the first block of actions. Otherwise, do the second ' +
37
- u'block of actions.']
38
- for sentence in sentences:
39
- output = common.insert_breaks(sentence, 30, 50)
40
- self.assertTrue(contains_all_chars(sentence, output),
41
- u'Mismatch between:\n{0}\n{1}'.format(
42
- re.sub(spaces, '', sentence),
43
- re.sub(spaces, '', output)))
44
-
45
-
46
- if __name__ == '__main__':
47
- unittest.main()
@@ -1,232 +0,0 @@
1
- #!/usr/bin/python
2
-
3
- # Converts .xlf files into .json files for use at http://translatewiki.net.
4
- #
5
- # Copyright 2013 Google Inc.
6
- # https://developers.google.com/blockly/
7
- #
8
- # Licensed under the Apache License, Version 2.0 (the "License");
9
- # you may not use this file except in compliance with the License.
10
- # You may obtain a copy of the License at
11
- #
12
- # http://www.apache.org/licenses/LICENSE-2.0
13
- #
14
- # Unless required by applicable law or agreed to in writing, software
15
- # distributed under the License is distributed on an "AS IS" BASIS,
16
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- # See the License for the specific language governing permissions and
18
- # limitations under the License.
19
-
20
- import argparse
21
- import os
22
- import re
23
- import subprocess
24
- import sys
25
- from xml.dom import minidom
26
- from common import InputError
27
- from common import write_files
28
-
29
- # Global variables
30
- args = None # Parsed command-line arguments.
31
-
32
-
33
- def _parse_trans_unit(trans_unit):
34
- """Converts a trans-unit XML node into a more convenient dictionary format.
35
-
36
- Args:
37
- trans_unit: An XML representation of a .xlf translation unit.
38
-
39
- Returns:
40
- A dictionary with useful information about the translation unit.
41
- The returned dictionary is guaranteed to have an entry for 'key' and
42
- may have entries for 'source', 'target', 'description', and 'meaning'
43
- if present in the argument.
44
-
45
- Raises:
46
- InputError: A required field was not present.
47
- """
48
-
49
- def get_value(tag_name):
50
- elts = trans_unit.getElementsByTagName(tag_name)
51
- if not elts:
52
- return None
53
- elif len(elts) == 1:
54
- return ''.join([child.toxml() for child in elts[0].childNodes])
55
- else:
56
- raise InputError('', 'Unable to extract ' + tag_name)
57
-
58
- result = {}
59
- key = trans_unit.getAttribute('id')
60
- if not key:
61
- raise InputError('', 'id attribute not found')
62
- result['key'] = key
63
-
64
- # Get source and target, if present.
65
- try:
66
- result['source'] = get_value('source')
67
- result['target'] = get_value('target')
68
- except InputError as e:
69
- raise InputError(key, e.msg)
70
-
71
- # Get notes, using the from value as key and the data as value.
72
- notes = trans_unit.getElementsByTagName('note')
73
- for note in notes:
74
- from_value = note.getAttribute('from')
75
- if from_value and len(note.childNodes) == 1:
76
- result[from_value] = note.childNodes[0].data
77
- else:
78
- raise InputError(key, 'Unable to extract ' + from_value)
79
-
80
- return result
81
-
82
-
83
- def _process_file(filename):
84
- """Builds list of translation units from input file.
85
-
86
- Each translation unit in the input file includes:
87
- - an id (opaquely generated by Soy)
88
- - the Blockly name for the message
89
- - the text in the source language (generally English)
90
- - a description for the translator
91
-
92
- The Soy and Blockly ids are joined with a hyphen and serve as the
93
- keys in both output files. The value is the corresponding text (in the
94
- <lang>.json file) or the description (in the qqq.json file).
95
-
96
- Args:
97
- filename: The name of an .xlf file produced by Closure.
98
-
99
- Raises:
100
- IOError: An I/O error occurred with an input or output file.
101
- InputError: The input file could not be parsed or lacked required
102
- fields.
103
-
104
- Returns:
105
- A list of dictionaries produced by parse_trans_unit().
106
- """
107
- try:
108
- results = [] # list of dictionaries (return value)
109
- names = [] # list of names of encountered keys (local variable)
110
- try:
111
- parsed_xml = minidom.parse(filename)
112
- except IOError:
113
- # Don't get caught by below handler
114
- raise
115
- except Exception as e:
116
- print()
117
- raise InputError(filename, str(e))
118
-
119
- # Make sure needed fields are present and non-empty.
120
- for trans_unit in parsed_xml.getElementsByTagName('trans-unit'):
121
- unit = _parse_trans_unit(trans_unit)
122
- for key in ['description', 'meaning', 'source']:
123
- if not key in unit or not unit[key]:
124
- raise InputError(filename + ':' + unit['key'],
125
- key + ' not found')
126
- if unit['description'].lower() == 'ibid':
127
- if unit['meaning'] not in names:
128
- # If the term has not already been described, the use of 'ibid'
129
- # is an error.
130
- raise InputError(
131
- filename,
132
- 'First encountered definition of: ' + unit['meaning']
133
- + ' has definition: ' + unit['description']
134
- + '. This error can occur if the definition was not'
135
- + ' provided on the first appearance of the message'
136
- + ' or if the source (English-language) messages differ.')
137
- else:
138
- # If term has already been described, 'ibid' was used correctly,
139
- # and we output nothing.
140
- pass
141
- else:
142
- if unit['meaning'] in names:
143
- raise InputError(filename,
144
- 'Second definition of: ' + unit['meaning'])
145
- names.append(unit['meaning'])
146
- results.append(unit)
147
-
148
- return results
149
- except IOError as e:
150
- print('Error with file {0}: {1}'.format(filename, e.strerror))
151
- sys.exit(1)
152
-
153
-
154
- def sort_units(units, templates):
155
- """Sorts the translation units by their definition order in the template.
156
-
157
- Args:
158
- units: A list of dictionaries produced by parse_trans_unit()
159
- that have a non-empty value for the key 'meaning'.
160
- templates: A string containing the Soy templates in which each of
161
- the units' meanings is defined.
162
-
163
- Returns:
164
- A new list of translation units, sorted by the order in which
165
- their meaning is defined in the templates.
166
-
167
- Raises:
168
- InputError: If a meaning definition cannot be found in the
169
- templates.
170
- """
171
- def key_function(unit):
172
- match = re.search(
173
- '\\smeaning\\s*=\\s*"{0}"\\s'.format(unit['meaning']),
174
- templates)
175
- if match:
176
- return match.start()
177
- else:
178
- raise InputError(args.templates,
179
- 'msg definition for meaning not found: ' +
180
- unit['meaning'])
181
- return sorted(units, key=key_function)
182
-
183
-
184
- def main():
185
- """Parses arguments and processes the specified file.
186
-
187
- Raises:
188
- IOError: An I/O error occurred with an input or output file.
189
- InputError: Input files lacked required fields.
190
- """
191
- # Set up argument parser.
192
- parser = argparse.ArgumentParser(description='Create translation files.')
193
- parser.add_argument(
194
- '--author',
195
- default='Ellen Spertus <ellen.spertus@gmail.com>',
196
- help='name and email address of contact for translators')
197
- parser.add_argument('--lang', default='en',
198
- help='ISO 639-1 source language code')
199
- parser.add_argument('--output_dir', default='json',
200
- help='relative directory for output files')
201
- parser.add_argument('--xlf', help='file containing xlf definitions')
202
- parser.add_argument('--templates', default=['template.soy'], nargs='+',
203
- help='relative path to Soy templates, comma or space '
204
- 'separated (used for ordering messages)')
205
- global args
206
- args = parser.parse_args()
207
-
208
- # Make sure output_dir ends with slash.
209
- if (not args.output_dir.endswith(os.path.sep)):
210
- args.output_dir += os.path.sep
211
-
212
- # Process the input file, and sort the entries.
213
- units = _process_file(args.xlf)
214
- files = []
215
- for arg in args.templates:
216
- for filename in arg.split(','):
217
- filename = filename.strip();
218
- if filename:
219
- with open(filename) as myfile:
220
- files.append(' '.join(line.strip() for line in myfile))
221
- sorted_units = sort_units(units, ' '.join(files))
222
-
223
- # Write the output files.
224
- write_files(args.author, args.lang, args.output_dir, sorted_units, True)
225
-
226
- # Delete the input .xlf file.
227
- os.remove(args.xlf)
228
- print('Removed ' + args.xlf)
229
-
230
-
231
- if __name__ == '__main__':
232
- main()
package/msg/js/en.js DELETED
@@ -1,293 +0,0 @@
1
- // This file was automatically generated. Do not modify.
2
-
3
- 'use strict'
4
-
5
- goog.provide('Blockly.Msg.en')
6
- goog.require('Blockly.Msg')
7
-
8
- Blockly.Msg['CONTROL_FOREVER'] = 'forever'
9
- Blockly.Msg['CONTROL_REPEAT'] = 'repeat %1'
10
- Blockly.Msg['CONTROL_IF'] = 'if %1 then'
11
- Blockly.Msg['CONTROL_ELSE'] = 'else'
12
- Blockly.Msg['CONTROL_STOP'] = 'stop'
13
- Blockly.Msg['CONTROL_STOP_ALL'] = 'all'
14
- Blockly.Msg['CONTROL_STOP_THIS'] = 'this script'
15
- Blockly.Msg['CONTROL_STOP_OTHER'] = 'other scripts in sprite'
16
- Blockly.Msg['CONTROL_WAIT'] = 'wait %1 seconds'
17
- Blockly.Msg['CONTROL_WAITUNTIL'] = 'wait until %1'
18
- Blockly.Msg['CONTROL_REPEATUNTIL'] = 'repeat until %1'
19
- Blockly.Msg['CONTROL_WHILE'] = 'while %1'
20
- Blockly.Msg['CONTROL_FOREACH'] = 'for each %1 in %2'
21
- Blockly.Msg['CONTROL_STARTASCLONE'] = 'when I start as a clone'
22
- Blockly.Msg['CONTROL_CREATECLONEOF'] = 'create clone of %1'
23
- Blockly.Msg['CONTROL_CREATECLONEOF_MYSELF'] = 'myself'
24
- Blockly.Msg['CONTROL_DELETETHISCLONE'] = 'delete this clone'
25
- Blockly.Msg['CONTROL_COUNTER'] = 'counter'
26
- Blockly.Msg['CONTROL_INCRCOUNTER'] = 'increment counter'
27
- Blockly.Msg['CONTROL_CLEARCOUNTER'] = 'clear counter'
28
- Blockly.Msg['CONTROL_ALLATONCE'] = 'all at once'
29
- Blockly.Msg['DATA_SETVARIABLETO'] = 'set %1 to %2'
30
- Blockly.Msg['DATA_CHANGEVARIABLEBY'] = 'change %1 by %2'
31
- Blockly.Msg['DATA_SHOWVARIABLE'] = 'show variable %1'
32
- Blockly.Msg['DATA_HIDEVARIABLE'] = 'hide variable %1'
33
- Blockly.Msg['DATA_ADDTOLIST'] = 'add %1 to %2'
34
- Blockly.Msg['DATA_DELETEOFLIST'] = 'delete %1 of %2'
35
- Blockly.Msg['DATA_DELETEALLOFLIST'] = 'delete all of %1'
36
- Blockly.Msg['DATA_INSERTATLIST'] = 'insert %1 at %2 of %3'
37
- Blockly.Msg['DATA_REPLACEITEMOFLIST'] = 'replace item %1 of %2 with %3'
38
- Blockly.Msg['DATA_ITEMOFLIST'] = 'item %1 of %2'
39
- Blockly.Msg['DATA_ITEMNUMOFLIST'] = 'item # of %1 in %2'
40
- Blockly.Msg['DATA_LENGTHOFLIST'] = 'length of %1'
41
- Blockly.Msg['DATA_LISTCONTAINSITEM'] = '%1 contains %2?'
42
- Blockly.Msg['DATA_SHOWLIST'] = 'show list %1'
43
- Blockly.Msg['DATA_HIDELIST'] = 'hide list %1'
44
- Blockly.Msg['DATA_INDEX_ALL'] = 'all'
45
- Blockly.Msg['DATA_INDEX_LAST'] = 'last'
46
- Blockly.Msg['DATA_INDEX_RANDOM'] = 'random'
47
- Blockly.Msg['EVENT_WHENFLAGCLICKED'] = 'when %1 clicked'
48
- Blockly.Msg['EVENT_WHENTHISSPRITECLICKED'] = 'when this sprite clicked'
49
- Blockly.Msg['EVENT_WHENSTAGECLICKED'] = 'when stage clicked'
50
- Blockly.Msg['EVENT_WHENTOUCHINGOBJECT'] = 'when this sprite touches %1'
51
- Blockly.Msg['EVENT_WHENBROADCASTRECEIVED'] = 'when I receive %1'
52
- Blockly.Msg['EVENT_WHENBACKDROPSWITCHESTO'] = 'when backdrop switches to %1'
53
- Blockly.Msg['EVENT_WHENGREATERTHAN'] = 'when %1 > %2'
54
- Blockly.Msg['EVENT_WHENGREATERTHAN_TIMER'] = 'timer'
55
- Blockly.Msg['EVENT_WHENGREATERTHAN_LOUDNESS'] = 'loudness'
56
- Blockly.Msg['EVENT_BROADCAST'] = 'broadcast %1'
57
- Blockly.Msg['EVENT_BROADCASTANDWAIT'] = 'broadcast %1 and wait'
58
- Blockly.Msg['EVENT_WHENKEYPRESSED'] = 'when %1 key pressed'
59
- Blockly.Msg['EVENT_WHENKEYPRESSED_SPACE'] = 'space'
60
- Blockly.Msg['EVENT_WHENKEYPRESSED_LEFT'] = 'left arrow'
61
- Blockly.Msg['EVENT_WHENKEYPRESSED_RIGHT'] = 'right arrow'
62
- Blockly.Msg['EVENT_WHENKEYPRESSED_DOWN'] = 'down arrow'
63
- Blockly.Msg['EVENT_WHENKEYPRESSED_UP'] = 'up arrow'
64
- Blockly.Msg['EVENT_WHENKEYPRESSED_ANY'] = 'any'
65
- Blockly.Msg['LOOKS_SAYFORSECS'] = 'say %1 for %2 seconds'
66
- Blockly.Msg['LOOKS_SAY'] = 'say %1'
67
- Blockly.Msg['LOOKS_HELLO'] = 'Hello!'
68
- Blockly.Msg['LOOKS_THINKFORSECS'] = 'think %1 for %2 seconds'
69
- Blockly.Msg['LOOKS_THINK'] = 'think %1'
70
- Blockly.Msg['LOOKS_HMM'] = 'Hmm...'
71
- Blockly.Msg['LOOKS_SHOW'] = 'show'
72
- Blockly.Msg['LOOKS_HIDE'] = 'hide'
73
- Blockly.Msg['LOOKS_HIDEALLSPRITES'] = 'hide all sprites'
74
- Blockly.Msg['LOOKS_EFFECT_COLOR'] = 'color'
75
- Blockly.Msg['LOOKS_EFFECT_FISHEYE'] = 'fisheye'
76
- Blockly.Msg['LOOKS_EFFECT_WHIRL'] = 'whirl'
77
- Blockly.Msg['LOOKS_EFFECT_PIXELATE'] = 'pixelate'
78
- Blockly.Msg['LOOKS_EFFECT_MOSAIC'] = 'mosaic'
79
- Blockly.Msg['LOOKS_EFFECT_BRIGHTNESS'] = 'brightness'
80
- Blockly.Msg['LOOKS_EFFECT_GHOST'] = 'ghost'
81
- Blockly.Msg['LOOKS_CHANGEEFFECTBY'] = 'change %1 effect by %2'
82
- Blockly.Msg['LOOKS_SETEFFECTTO'] = 'set %1 effect to %2'
83
- Blockly.Msg['LOOKS_CLEARGRAPHICEFFECTS'] = 'clear graphic effects'
84
- Blockly.Msg['LOOKS_CHANGESIZEBY'] = 'change size by %1'
85
- Blockly.Msg['LOOKS_SETSIZETO'] = 'set size to %1 %'
86
- Blockly.Msg['LOOKS_SIZE'] = 'size'
87
- Blockly.Msg['LOOKS_CHANGESTRETCHBY'] = 'change stretch by %1'
88
- Blockly.Msg['LOOKS_SETSTRETCHTO'] = 'set stretch to %1 %'
89
- Blockly.Msg['LOOKS_SWITCHCOSTUMETO'] = 'switch costume to %1'
90
- Blockly.Msg['LOOKS_NEXTCOSTUME'] = 'next costume'
91
- Blockly.Msg['LOOKS_SWITCHBACKDROPTO'] = 'switch backdrop to %1'
92
- Blockly.Msg['LOOKS_GOTOFRONTBACK'] = 'go to %1 layer'
93
- Blockly.Msg['LOOKS_GOTOFRONTBACK_FRONT'] = 'front'
94
- Blockly.Msg['LOOKS_GOTOFRONTBACK_BACK'] = 'back'
95
- Blockly.Msg['LOOKS_GOFORWARDBACKWARDLAYERS'] = 'go %1 %2 layers'
96
- Blockly.Msg['LOOKS_GOFORWARDBACKWARDLAYERS_FORWARD'] = 'forward'
97
- Blockly.Msg['LOOKS_GOFORWARDBACKWARDLAYERS_BACKWARD'] = 'backward'
98
- Blockly.Msg['LOOKS_BACKDROPNUMBERNAME'] = 'backdrop %1'
99
- Blockly.Msg['LOOKS_COSTUMENUMBERNAME'] = 'costume %1'
100
- Blockly.Msg['LOOKS_NUMBERNAME_NUMBER'] = 'number'
101
- Blockly.Msg['LOOKS_NUMBERNAME_NAME'] = 'name'
102
- Blockly.Msg['LOOKS_SWITCHBACKDROPTOANDWAIT'] = 'switch backdrop to %1 and wait'
103
- Blockly.Msg['LOOKS_NEXTBACKDROP_BLOCK'] = 'next backdrop'
104
- Blockly.Msg['LOOKS_NEXTBACKDROP'] = 'next backdrop'
105
- Blockly.Msg['LOOKS_PREVIOUSBACKDROP'] = 'previous backdrop'
106
- Blockly.Msg['LOOKS_RANDOMBACKDROP'] = 'random backdrop'
107
- Blockly.Msg['MOTION_MOVESTEPS'] = 'move %1 steps'
108
- Blockly.Msg['MOTION_TURNLEFT'] = 'turn %1 %2 degrees'
109
- Blockly.Msg['MOTION_TURNRIGHT'] = 'turn %1 %2 degrees'
110
- Blockly.Msg['MOTION_POINTINDIRECTION'] = 'point in direction %1'
111
- Blockly.Msg['MOTION_POINTTOWARDS'] = 'point towards %1'
112
- Blockly.Msg['MOTION_POINTTOWARDS_POINTER'] = 'mouse-pointer'
113
- Blockly.Msg['MOTION_POINTTOWARDS_RANDOM'] = 'random direction'
114
- Blockly.Msg['MOTION_GOTO'] = 'go to %1'
115
- Blockly.Msg['MOTION_GOTO_POINTER'] = 'mouse-pointer'
116
- Blockly.Msg['MOTION_GOTO_RANDOM'] = 'random position'
117
- Blockly.Msg['MOTION_GOTOXY'] = 'go to x: %1 y: %2'
118
- Blockly.Msg['MOTION_GLIDESECSTOXY'] = 'glide %1 secs to x: %2 y: %3'
119
- Blockly.Msg['MOTION_GLIDETO'] = 'glide %1 secs to %2'
120
- Blockly.Msg['MOTION_GLIDETO_POINTER'] = 'mouse-pointer'
121
- Blockly.Msg['MOTION_GLIDETO_RANDOM'] = 'random position'
122
- Blockly.Msg['MOTION_CHANGEXBY'] = 'change x by %1'
123
- Blockly.Msg['MOTION_SETX'] = 'set x to %1'
124
- Blockly.Msg['MOTION_CHANGEYBY'] = 'change y by %1'
125
- Blockly.Msg['MOTION_SETY'] = 'set y to %1'
126
- Blockly.Msg['MOTION_IFONEDGEBOUNCE'] = 'if on edge, bounce'
127
- Blockly.Msg['MOTION_SETROTATIONSTYLE'] = 'set rotation style %1'
128
- Blockly.Msg['MOTION_SETROTATIONSTYLE_LEFTRIGHT'] = 'left-right'
129
- Blockly.Msg['MOTION_SETROTATIONSTYLE_DONTROTATE'] = "don't rotate"
130
- Blockly.Msg['MOTION_SETROTATIONSTYLE_ALLAROUND'] = 'all around'
131
- Blockly.Msg['MOTION_XPOSITION'] = 'x position'
132
- Blockly.Msg['MOTION_YPOSITION'] = 'y position'
133
- Blockly.Msg['MOTION_DIRECTION'] = 'direction'
134
- Blockly.Msg['MOTION_SCROLLRIGHT'] = 'scroll right %1'
135
- Blockly.Msg['MOTION_SCROLLUP'] = 'scroll up %1'
136
- Blockly.Msg['MOTION_ALIGNSCENE'] = 'align scene %1'
137
- Blockly.Msg['MOTION_ALIGNSCENE_BOTTOMLEFT'] = 'bottom-left'
138
- Blockly.Msg['MOTION_ALIGNSCENE_BOTTOMRIGHT'] = 'bottom-right'
139
- Blockly.Msg['MOTION_ALIGNSCENE_MIDDLE'] = 'middle'
140
- Blockly.Msg['MOTION_ALIGNSCENE_TOPLEFT'] = 'top-left'
141
- Blockly.Msg['MOTION_ALIGNSCENE_TOPRIGHT'] = 'top-right'
142
- Blockly.Msg['MOTION_XSCROLL'] = 'x scroll'
143
- Blockly.Msg['MOTION_YSCROLL'] = 'y scroll'
144
- Blockly.Msg['MOTION_STAGE_SELECTED'] = 'Stage selected: no motion blocks'
145
- Blockly.Msg['OPERATORS_ADD'] = '%1 + %2'
146
- Blockly.Msg['OPERATORS_SUBTRACT'] = '%1 - %2'
147
- Blockly.Msg['OPERATORS_MULTIPLY'] = '%1 * %2'
148
- Blockly.Msg['OPERATORS_DIVIDE'] = '%1 / %2'
149
- Blockly.Msg['OPERATORS_RANDOM'] = 'pick random %1 to %2'
150
- Blockly.Msg['OPERATORS_GT'] = '%1 > %2'
151
- Blockly.Msg['OPERATORS_LT'] = '%1 < %2'
152
- Blockly.Msg['OPERATORS_EQUALS'] = '%1 = %2'
153
- Blockly.Msg['OPERATORS_AND'] = '%1 and %2'
154
- Blockly.Msg['OPERATORS_OR'] = '%1 or %2'
155
- Blockly.Msg['OPERATORS_NOT'] = 'not %1'
156
- Blockly.Msg['OPERATORS_JOIN'] = 'join %1 %2'
157
- Blockly.Msg['OPERATORS_JOIN_APPLE'] = 'apple'
158
- Blockly.Msg['OPERATORS_JOIN_BANANA'] = 'banana'
159
- Blockly.Msg['OPERATORS_LETTEROF'] = 'letter %1 of %2'
160
- Blockly.Msg['OPERATORS_LETTEROF_APPLE'] = 'a'
161
- Blockly.Msg['OPERATORS_LENGTH'] = 'length of %1'
162
- Blockly.Msg['OPERATORS_CONTAINS'] = '%1 contains %2?'
163
- Blockly.Msg['OPERATORS_MOD'] = '%1 mod %2'
164
- Blockly.Msg['OPERATORS_ROUND'] = 'round %1'
165
- Blockly.Msg['OPERATORS_MATHOP'] = '%1 of %2'
166
- Blockly.Msg['OPERATORS_MATHOP_ABS'] = 'abs'
167
- Blockly.Msg['OPERATORS_MATHOP_FLOOR'] = 'floor'
168
- Blockly.Msg['OPERATORS_MATHOP_CEILING'] = 'ceiling'
169
- Blockly.Msg['OPERATORS_MATHOP_SQRT'] = 'sqrt'
170
- Blockly.Msg['OPERATORS_MATHOP_SIN'] = 'sin'
171
- Blockly.Msg['OPERATORS_MATHOP_COS'] = 'cos'
172
- Blockly.Msg['OPERATORS_MATHOP_TAN'] = 'tan'
173
- Blockly.Msg['OPERATORS_MATHOP_ASIN'] = 'asin'
174
- Blockly.Msg['OPERATORS_MATHOP_ACOS'] = 'acos'
175
- Blockly.Msg['OPERATORS_MATHOP_ATAN'] = 'atan'
176
- Blockly.Msg['OPERATORS_MATHOP_LN'] = 'ln'
177
- Blockly.Msg['OPERATORS_MATHOP_LOG'] = 'log'
178
- Blockly.Msg['OPERATORS_MATHOP_EEXP'] = 'e ^'
179
- Blockly.Msg['OPERATORS_MATHOP_10EXP'] = '10 ^'
180
- Blockly.Msg['PROCEDURES_DEFINITION'] = 'define %1'
181
- Blockly.Msg['SENSING_TOUCHINGOBJECT'] = 'touching %1?'
182
- Blockly.Msg['SENSING_TOUCHINGOBJECT_POINTER'] = 'mouse-pointer'
183
- Blockly.Msg['SENSING_TOUCHINGOBJECT_EDGE'] = 'edge'
184
- Blockly.Msg['SENSING_TOUCHINGCOLOR'] = 'touching color %1?'
185
- Blockly.Msg['SENSING_COLORISTOUCHINGCOLOR'] = 'color %1 is touching %2?'
186
- Blockly.Msg['SENSING_DISTANCETO'] = 'distance to %1'
187
- Blockly.Msg['SENSING_DISTANCETO_POINTER'] = 'mouse-pointer'
188
- Blockly.Msg['SENSING_ASKANDWAIT'] = 'ask %1 and wait'
189
- Blockly.Msg['SENSING_ASK_TEXT'] = "What's your name?"
190
- Blockly.Msg['SENSING_ANSWER'] = 'answer'
191
- Blockly.Msg['SENSING_KEYPRESSED'] = 'key %1 pressed?'
192
- Blockly.Msg['SENSING_MOUSEDOWN'] = 'mouse down?'
193
- Blockly.Msg['SENSING_MOUSEX'] = 'mouse x'
194
- Blockly.Msg['SENSING_MOUSEY'] = 'mouse y'
195
- Blockly.Msg['SENSING_SETDRAGMODE'] = 'set drag mode %1'
196
- Blockly.Msg['SENSING_SETDRAGMODE_DRAGGABLE'] = 'draggable'
197
- Blockly.Msg['SENSING_SETDRAGMODE_NOTDRAGGABLE'] = 'not draggable'
198
- Blockly.Msg['SENSING_LOUDNESS'] = 'loudness'
199
- Blockly.Msg['SENSING_LOUD'] = 'loud?'
200
- Blockly.Msg['SENSING_TIMER'] = 'timer'
201
- Blockly.Msg['SENSING_RESETTIMER'] = 'reset timer'
202
- Blockly.Msg['SENSING_OF'] = '%1 of %2'
203
- Blockly.Msg['SENSING_OF_XPOSITION'] = 'x position'
204
- Blockly.Msg['SENSING_OF_YPOSITION'] = 'y position'
205
- Blockly.Msg['SENSING_OF_DIRECTION'] = 'direction'
206
- Blockly.Msg['SENSING_OF_COSTUMENUMBER'] = 'costume #'
207
- Blockly.Msg['SENSING_OF_COSTUMENAME'] = 'costume name'
208
- Blockly.Msg['SENSING_OF_SIZE'] = 'size'
209
- Blockly.Msg['SENSING_OF_VOLUME'] = 'volume'
210
- Blockly.Msg['SENSING_OF_BACKDROPNUMBER'] = 'backdrop #'
211
- Blockly.Msg['SENSING_OF_BACKDROPNAME'] = 'backdrop name'
212
- Blockly.Msg['SENSING_OF_STAGE'] = 'Stage'
213
- Blockly.Msg['SENSING_CURRENT'] = 'current %1'
214
- Blockly.Msg['SENSING_CURRENT_YEAR'] = 'year'
215
- Blockly.Msg['SENSING_CURRENT_MONTH'] = 'month'
216
- Blockly.Msg['SENSING_CURRENT_DATE'] = 'date'
217
- Blockly.Msg['SENSING_CURRENT_DAYOFWEEK'] = 'day of week'
218
- Blockly.Msg['SENSING_CURRENT_HOUR'] = 'hour'
219
- Blockly.Msg['SENSING_CURRENT_MINUTE'] = 'minute'
220
- Blockly.Msg['SENSING_CURRENT_SECOND'] = 'second'
221
- Blockly.Msg['SENSING_DAYSSINCE2000'] = 'days since 2000'
222
- Blockly.Msg['SENSING_ONLINE'] = 'online?'
223
- Blockly.Msg['SENSING_USERNAME'] = 'username'
224
- Blockly.Msg['SENSING_USERID'] = 'user id'
225
- Blockly.Msg['SOUND_PLAY'] = 'start sound %1'
226
- Blockly.Msg['SOUND_PLAYUNTILDONE'] = 'play sound %1 until done'
227
- Blockly.Msg['SOUND_STOPALLSOUNDS'] = 'stop all sounds'
228
- Blockly.Msg['SOUND_SETEFFECTO'] = 'set %1 effect to %2'
229
- Blockly.Msg['SOUND_CHANGEEFFECTBY'] = 'change %1 effect by %2'
230
- Blockly.Msg['SOUND_CLEAREFFECTS'] = 'clear sound effects'
231
- Blockly.Msg['SOUND_EFFECTS_PITCH'] = 'pitch'
232
- Blockly.Msg['SOUND_EFFECTS_PAN'] = 'pan left/right'
233
- Blockly.Msg['SOUND_CHANGEVOLUMEBY'] = 'change volume by %1'
234
- Blockly.Msg['SOUND_SETVOLUMETO'] = 'set volume to %1%'
235
- Blockly.Msg['SOUND_VOLUME'] = 'volume'
236
- Blockly.Msg['SOUND_RECORD'] = 'record...'
237
- Blockly.Msg['CATEGORY_MOTION'] = 'Motion'
238
- Blockly.Msg['CATEGORY_LOOKS'] = 'Looks'
239
- Blockly.Msg['CATEGORY_SOUND'] = 'Sound'
240
- Blockly.Msg['CATEGORY_EVENTS'] = 'Events'
241
- Blockly.Msg['CATEGORY_CONTROL'] = 'Control'
242
- Blockly.Msg['CATEGORY_SENSING'] = 'Sensing'
243
- Blockly.Msg['CATEGORY_OPERATORS'] = 'Operators'
244
- Blockly.Msg['CATEGORY_VARIABLES'] = 'Variables'
245
- Blockly.Msg['CATEGORY_MYBLOCKS'] = 'My Blocks'
246
- Blockly.Msg['DUPLICATE'] = 'Duplicate'
247
- Blockly.Msg['DELETE'] = 'Delete'
248
- Blockly.Msg['ADD_COMMENT'] = 'Add Comment'
249
- Blockly.Msg['REMOVE_COMMENT'] = 'Remove Comment'
250
- Blockly.Msg['DELETE_BLOCK'] = 'Delete Block'
251
- Blockly.Msg['DELETE_X_BLOCKS'] = 'Delete %1 Blocks'
252
- Blockly.Msg['DELETE_ALL_BLOCKS'] = 'Delete all %1 blocks?'
253
- Blockly.Msg['CLEAN_UP'] = 'Clean up Blocks'
254
- Blockly.Msg['HELP'] = 'Help'
255
- Blockly.Msg['UNDO'] = 'Undo'
256
- Blockly.Msg['REDO'] = 'Redo'
257
- Blockly.Msg['EDIT_PROCEDURE'] = 'Edit'
258
- Blockly.Msg['SHOW_PROCEDURE_DEFINITION'] = 'Go to definition'
259
- Blockly.Msg['WORKSPACE_COMMENT_DEFAULT_TEXT'] = 'Say something...'
260
- Blockly.Msg['COLOUR_HUE_LABEL'] = 'Color'
261
- Blockly.Msg['COLOUR_SATURATION_LABEL'] = 'Saturation'
262
- Blockly.Msg['COLOUR_BRIGHTNESS_LABEL'] = 'Brightness'
263
- Blockly.Msg['CHANGE_VALUE_TITLE'] = 'Change value:'
264
- Blockly.Msg['RENAME_VARIABLE'] = 'Rename variable'
265
- Blockly.Msg['RENAME_VARIABLE_TITLE'] = 'Rename all "%1" variables to:'
266
- Blockly.Msg['RENAME_VARIABLE_MODAL_TITLE'] = 'Rename Variable'
267
- Blockly.Msg['NEW_VARIABLE'] = 'Make a Variable'
268
- Blockly.Msg['NEW_VARIABLE_TITLE'] = 'New variable name:'
269
- Blockly.Msg['VARIABLE_MODAL_TITLE'] = 'New Variable'
270
- Blockly.Msg['VARIABLE_ALREADY_EXISTS'] = 'A variable named "%1" already exists.'
271
- Blockly.Msg['VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE'] =
272
- 'A variable named "%1" already exists for another variable of type "%2".'
273
- Blockly.Msg['DELETE_VARIABLE_CONFIRMATION'] = 'Delete %1 uses of the "%2" variable?'
274
- Blockly.Msg['CANNOT_DELETE_VARIABLE_PROCEDURE'] =
275
- 'Can\'t delete the variable "%1" because it\'s part of the definition of the function "%2"'
276
- Blockly.Msg['DELETE_VARIABLE'] = 'Delete the "%1" variable'
277
- Blockly.Msg['NEW_PROCEDURE'] = 'Make a Block'
278
- Blockly.Msg['PROCEDURE_ALREADY_EXISTS'] = 'A procedure named "%1" already exists.'
279
- Blockly.Msg['PROCEDURE_DEFAULT_NAME'] = 'block name'
280
- Blockly.Msg['PROCEDURE_USED'] = 'To delete a block definition, first remove all uses of the block'
281
- Blockly.Msg['NEW_LIST'] = 'Make a List'
282
- Blockly.Msg['NEW_LIST_TITLE'] = 'New list name:'
283
- Blockly.Msg['LIST_MODAL_TITLE'] = 'New List'
284
- Blockly.Msg['LIST_ALREADY_EXISTS'] = 'A list named "%1" already exists.'
285
- Blockly.Msg['RENAME_LIST_TITLE'] = 'Rename all "%1" lists to:'
286
- Blockly.Msg['RENAME_LIST_MODAL_TITLE'] = 'Rename List'
287
- Blockly.Msg['DEFAULT_LIST_ITEM'] = 'thing'
288
- Blockly.Msg['DELETE_LIST'] = 'Delete the "%1" list'
289
- Blockly.Msg['RENAME_LIST'] = 'Rename list'
290
- Blockly.Msg['NEW_BROADCAST_MESSAGE'] = 'New message'
291
- Blockly.Msg['NEW_BROADCAST_MESSAGE_TITLE'] = 'New message name:'
292
- Blockly.Msg['BROADCAST_MODAL_TITLE'] = 'New Message'
293
- Blockly.Msg['DEFAULT_BROADCAST_MESSAGE_NAME'] = 'message1'