├── .gitmodules ├── LICENSE ├── README.md ├── blockly ├── .gitignore ├── COPYING ├── README.md ├── appengine │ ├── README.txt │ ├── app.yaml │ ├── apple-touch-icon.png │ ├── favicon.ico │ ├── index.yaml │ ├── index_redirect.py │ ├── redirect.html │ ├── robots.txt │ ├── storage.js │ └── storage.py ├── blockly_compressed.js ├── blockly_uncompressed.js ├── blocks │ ├── colour.js │ ├── lists.js │ ├── logic.js │ ├── loops.js │ ├── math.js │ ├── pirobot.js │ ├── procedures.js │ ├── text.js │ └── variables.js ├── blocks_compressed.js ├── build.py ├── core │ ├── block.js │ ├── block_svg.js │ ├── blockly.js │ ├── blocks.js │ ├── bubble.js │ ├── comment.js │ ├── connection.js │ ├── contextmenu.js │ ├── css.js │ ├── field.js │ ├── field_angle.js │ ├── field_checkbox.js │ ├── field_colour.js │ ├── field_date.js │ ├── field_dropdown.js │ ├── field_image.js │ ├── field_label.js │ ├── field_textinput.js │ ├── field_variable.js │ ├── flyout.js │ ├── generator.js │ ├── icon.js │ ├── inject.js │ ├── input.js │ ├── msg.js │ ├── mutator.js │ ├── names.js │ ├── procedures.js │ ├── realtime-client-utils.js │ ├── realtime.js │ ├── scrollbar.js │ ├── toolbox.js │ ├── tooltip.js │ ├── trashcan.js │ ├── utils.js │ ├── variables.js │ ├── warning.js │ ├── widgetdiv.js │ ├── workspace.js │ ├── workspace_svg.js │ └── xml.js ├── dart_compressed.js ├── demos │ ├── blockfactory │ │ ├── blocks.js │ │ ├── factory.js │ │ ├── icon.png │ │ ├── index.html │ │ └── link.png │ ├── code │ │ ├── code.js │ │ ├── icon.png │ │ ├── icons.png │ │ ├── index.html │ │ ├── msg │ │ │ ├── ar.js │ │ │ ├── be-tarask.js │ │ │ ├── br.js │ │ │ ├── ca.js │ │ │ ├── cs.js │ │ │ ├── da.js │ │ │ ├── de.js │ │ │ ├── el.js │ │ │ ├── en.js │ │ │ ├── es.js │ │ │ ├── fa.js │ │ │ ├── fr.js │ │ │ ├── he.js │ │ │ ├── hrx.js │ │ │ ├── hu.js │ │ │ ├── ia.js │ │ │ ├── is.js │ │ │ ├── it.js │ │ │ ├── ja.js │ │ │ ├── ko.js │ │ │ ├── mk.js │ │ │ ├── ms.js │ │ │ ├── nb.js │ │ │ ├── nl.js │ │ │ ├── oc.js │ │ │ ├── pl.js │ │ │ ├── pms.js │ │ │ ├── pt-br.js │ │ │ ├── ro.js │ │ │ ├── ru.js │ │ │ ├── sc.js │ │ │ ├── sk.js │ │ │ ├── sr.js │ │ │ ├── sv.js │ │ │ ├── th.js │ │ │ ├── tlh.js │ │ │ ├── tr.js │ │ │ ├── uk.js │ │ │ ├── vi.js │ │ │ ├── zh-hans.js │ │ │ └── zh-hant.js │ │ └── style.css │ ├── fixed │ │ ├── icon.png │ │ └── index.html │ ├── generator │ │ ├── icon.png │ │ └── index.html │ ├── graph │ │ ├── icon.png │ │ └── index.html │ ├── headless │ │ ├── icon.png │ │ └── index.html │ ├── index.html │ ├── interpreter │ │ ├── acorn_interpreter.js │ │ ├── icon.png │ │ └── index.html │ ├── maxBlocks │ │ ├── icon.png │ │ └── index.html │ ├── plane │ │ ├── README.txt │ │ ├── blocks.js │ │ ├── generated │ │ │ ├── ar.js │ │ │ ├── be-tarask.js │ │ │ ├── br.js │ │ │ ├── ca.js │ │ │ ├── da.js │ │ │ ├── de.js │ │ │ ├── el.js │ │ │ ├── en.js │ │ │ ├── es.js │ │ │ ├── fa.js │ │ │ ├── fr.js │ │ │ ├── he.js │ │ │ ├── hrx.js │ │ │ ├── hu.js │ │ │ ├── ia.js │ │ │ ├── is.js │ │ │ ├── it.js │ │ │ ├── ja.js │ │ │ ├── ko.js │ │ │ ├── ms.js │ │ │ ├── nb.js │ │ │ ├── nl.js │ │ │ ├── pl.js │ │ │ ├── pms.js │ │ │ ├── pt-br.js │ │ │ ├── ro.js │ │ │ ├── ru.js │ │ │ ├── sc.js │ │ │ ├── sv.js │ │ │ ├── th.js │ │ │ ├── tr.js │ │ │ ├── uk.js │ │ │ ├── vi.js │ │ │ ├── zh-hans.js │ │ │ └── zh-hant.js │ │ ├── icon.png │ │ ├── index.html │ │ ├── plane.js │ │ ├── slider.js │ │ ├── soy │ │ │ ├── COPYING │ │ │ ├── README │ │ │ ├── SoyMsgExtractor.jar │ │ │ ├── SoyToJsSrcCompiler.jar │ │ │ └── soyutils.js │ │ ├── style.css │ │ ├── template.soy │ │ └── xlf │ │ │ ├── extracted_msgs.xlf │ │ │ ├── translated_msgs_ar.xlf │ │ │ ├── translated_msgs_be-tarask.xlf │ │ │ ├── translated_msgs_br.xlf │ │ │ ├── translated_msgs_ca.xlf │ │ │ ├── translated_msgs_da.xlf │ │ │ ├── translated_msgs_de.xlf │ │ │ ├── translated_msgs_el.xlf │ │ │ ├── translated_msgs_en.xlf │ │ │ ├── translated_msgs_es.xlf │ │ │ ├── translated_msgs_fa.xlf │ │ │ ├── translated_msgs_fr.xlf │ │ │ ├── translated_msgs_he.xlf │ │ │ ├── translated_msgs_hrx.xlf │ │ │ ├── translated_msgs_hu.xlf │ │ │ ├── translated_msgs_ia.xlf │ │ │ ├── translated_msgs_is.xlf │ │ │ ├── translated_msgs_it.xlf │ │ │ ├── translated_msgs_ja.xlf │ │ │ ├── translated_msgs_ko.xlf │ │ │ ├── translated_msgs_ms.xlf │ │ │ ├── translated_msgs_nb.xlf │ │ │ ├── translated_msgs_nl.xlf │ │ │ ├── translated_msgs_pl.xlf │ │ │ ├── translated_msgs_pms.xlf │ │ │ ├── translated_msgs_pt-br.xlf │ │ │ ├── translated_msgs_ro.xlf │ │ │ ├── translated_msgs_ru.xlf │ │ │ ├── translated_msgs_sc.xlf │ │ │ ├── translated_msgs_sv.xlf │ │ │ ├── translated_msgs_th.xlf │ │ │ ├── translated_msgs_tr.xlf │ │ │ ├── translated_msgs_uk.xlf │ │ │ ├── translated_msgs_vi.xlf │ │ │ ├── translated_msgs_zh-hans.xlf │ │ │ └── translated_msgs_zh-hant.xlf │ ├── prettify.css │ ├── prettify.js │ ├── realtime │ │ └── index.html │ ├── resizable │ │ ├── icon.png │ │ ├── index.html │ │ └── overlay.html │ ├── rtl │ │ ├── icon.png │ │ └── index.html │ ├── storage │ │ ├── icon.png │ │ └── index.html │ └── toolbox │ │ ├── icon.png │ │ └── index.html ├── generators │ ├── dart.js │ ├── dart │ │ ├── colour.js │ │ ├── lists.js │ │ ├── logic.js │ │ ├── loops.js │ │ ├── math.js │ │ ├── procedures.js │ │ ├── text.js │ │ └── variables.js │ ├── javascript.js │ ├── javascript │ │ ├── colour.js │ │ ├── lists.js │ │ ├── logic.js │ │ ├── loops.js │ │ ├── math.js │ │ ├── pirobot.js │ │ ├── procedures.js │ │ ├── text.js │ │ └── variables.js │ ├── python.js │ └── python │ │ ├── colour.js │ │ ├── lists.js │ │ ├── logic.js │ │ ├── loops.js │ │ ├── math.js │ │ ├── procedures.js │ │ ├── text.js │ │ └── variables.js ├── i18n │ ├── common.py │ ├── create_messages.py │ ├── dedup_json.py │ ├── js_to_json.py │ ├── json_to_js.py │ ├── tests.py │ └── xliff_to_json.py ├── javascript_compressed.js ├── media │ ├── 1x1.gif │ ├── anon.jpeg │ ├── click.mp3 │ ├── click.ogg │ ├── click.wav │ ├── delete.mp3 │ ├── delete.ogg │ ├── delete.wav │ ├── handclosed.cur │ ├── handdelete.cur │ ├── handopen.cur │ ├── icons.svg │ ├── progress.gif │ ├── quote0.png │ ├── quote1.png │ ├── sprites.png │ └── sprites.svg ├── msg │ ├── js │ │ ├── ar.js │ │ ├── az-latn.js │ │ ├── az.js │ │ ├── bcc.js │ │ ├── be-tarask.js │ │ ├── bg.js │ │ ├── br.js │ │ ├── ca.js │ │ ├── cs.js │ │ ├── da.js │ │ ├── de.js │ │ ├── el.js │ │ ├── en.js │ │ ├── en_us.js │ │ ├── es.js │ │ ├── fa.js │ │ ├── fi.js │ │ ├── fr.js │ │ ├── he.js │ │ ├── hi.js │ │ ├── hrx.js │ │ ├── hu.js │ │ ├── ia.js │ │ ├── id.js │ │ ├── is.js │ │ ├── it.js │ │ ├── ja.js │ │ ├── ko.js │ │ ├── lb.js │ │ ├── lrc.js │ │ ├── lt.js │ │ ├── mk.js │ │ ├── ms.js │ │ ├── nb.js │ │ ├── nl.js │ │ ├── no.js │ │ ├── oc.js │ │ ├── pl.js │ │ ├── pms.js │ │ ├── pt-br.js │ │ ├── pt.js │ │ ├── ro.js │ │ ├── ru.js │ │ ├── sc.js │ │ ├── sk.js │ │ ├── sq.js │ │ ├── sr.js │ │ ├── sv.js │ │ ├── ta.js │ │ ├── th.js │ │ ├── tl.js │ │ ├── tlh.js │ │ ├── tr.js │ │ ├── uk.js │ │ ├── vi.js │ │ ├── zh-hans.js │ │ └── zh-hant.js │ ├── json │ │ ├── ar.json │ │ ├── az.json │ │ ├── bcc.json │ │ ├── be-tarask.json │ │ ├── bg.json │ │ ├── br.json │ │ ├── ca.json │ │ ├── cs.json │ │ ├── da.json │ │ ├── de.json │ │ ├── el.json │ │ ├── en.json │ │ ├── es.json │ │ ├── fa.json │ │ ├── fi.json │ │ ├── fr.json │ │ ├── he.json │ │ ├── hi.json │ │ ├── hrx.json │ │ ├── hu.json │ │ ├── ia.json │ │ ├── id.json │ │ ├── is.json │ │ ├── it.json │ │ ├── ja.json │ │ ├── ko.json │ │ ├── lb.json │ │ ├── lrc.json │ │ ├── lt.json │ │ ├── mk.json │ │ ├── ms.json │ │ ├── nb.json │ │ ├── nl.json │ │ ├── oc.json │ │ ├── pl.json │ │ ├── pms.json │ │ ├── pt-br.json │ │ ├── pt.json │ │ ├── qqq.json │ │ ├── ro.json │ │ ├── ru.json │ │ ├── sc.json │ │ ├── sk.json │ │ ├── sq.json │ │ ├── sr.json │ │ ├── sv.json │ │ ├── synonyms.json │ │ ├── ta.json │ │ ├── th.json │ │ ├── tl.json │ │ ├── tlh.json │ │ ├── tr.json │ │ ├── uk.json │ │ ├── vi.json │ │ ├── zh-hans.json │ │ └── zh-hant.json │ └── messages.js ├── python_compressed.js ├── storage.js └── tests │ ├── generators │ ├── colour.xml │ ├── index.html │ ├── lists.xml │ ├── logic.xml │ ├── loops1.xml │ ├── loops2.xml │ ├── loops3.xml │ ├── math.xml │ ├── procedures.xml │ ├── text.xml │ ├── unittest.js │ ├── unittest_dart.js │ ├── unittest_javascript.js │ ├── unittest_python.js │ └── variables.xml │ ├── jsunit │ ├── blockly_test.js │ ├── generator_test.js │ ├── index.html │ ├── names_test.js │ ├── workspace_test.js │ └── xml_test.js │ └── playground.html ├── css ├── lib │ └── bootstrap.min.css ├── mam.css~ ├── page.css └── page.css~ ├── img └── demo │ └── demo.gif ├── index.html ├── js ├── blocklypipage.js └── lib │ ├── bootstrap.min.js │ ├── bower.json │ ├── jquery.min.js │ ├── jquery.xmlrpc.js │ ├── jquery.xmlrpc.min.js │ └── xmlrpc.jquery.json ├── js_interpreter ├── LICENSE ├── README.md ├── acorn.js ├── acorn_interpreter.js ├── docs.html ├── index.html └── interpreter.js ├── robot ├── __init__.py └── setMotorPower.py ├── server.py └── server_test.py /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "WebContent/blockly"] 2 | path = WebContent/blockly 3 | url = https://github.com/google/blockly.git 4 | [submodule "WebContent/js_interpreter"] 5 | path = WebContent/js_interpreter 6 | url = https://github.com/NeilFraser/JS-Interpreter.git 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BlocklyPi 2 | 3 | By *Iris Roelens* and *Karsten Daemen*. 4 | 5 | 6 | This project contains a python application that is meant to be deployed on a [Raspberry Pi](https://www.raspberrypi.org/) and will allow users to program it using [Blockly](https://developers.google.com/blockly/). We provide custom blocks for controlling components on the GPIO pins like motors and light sensors. 7 | 8 | ![Demo](https://github.com/karstenda/BlocklyPi/blob/master/img/demo/demo.gif?raw=true) 9 | 10 | ## Installation 11 | 12 | ### Step 1: Dependencies 13 | BlocklyPi only depends on the python [RPi.GPIO](https://pypi.python.org/pypi/RPi.GPIO) library (0.5.11). You therefore need to install this on your raspberry Pi. You can either do this through the repository (debian): 14 | ```shell 15 | sudo apt-get update 16 | sudo apt-get install rpi.gpio 17 | ``` 18 | Or manually from the package: 19 | ```shell 20 | wget https://pypi.python.org/packages/source/R/RPi.GPIO/RPi.GPIO-0.5.11.tar.gz 21 | tar -xvf RPi.GPIO-0.5.11.tar.gz 22 | cd RPi.GPIO-0.5.11 23 | sudo python setup.py install 24 | cd .. 25 | sudo rm -rf RPi.GPIO-0.* 26 | ``` 27 | 28 | ### Step 2: Download and Install 29 | On your Raspberry Pi, navigate to the desired directory where you want to install BlocklyPi (we use `\home\pi\bin`). 30 | ```shell 31 | mkdir \home\pi\bin 32 | cd \home\pi\bin 33 | ``` 34 | Download the BlocklyPi project from GitHub. 35 | ```shell 36 | git clone https://github.com/karstenda/BlocklyPi.git 37 | cd BlocklyPi 38 | ``` 39 | To start the server, execute the `server.py` python script. Super user privileges are required in order to acces the GPIO pins ... 40 | ```shell 41 | sudo python server.py 42 | ``` 43 | On your raspberry, navigate to `http://localhost:8080` in order to verify that the installation was succesfull. 44 | 45 | ### Step 3: Start on boot 46 | You may want to start BlocklyPi on startup of your RaspberryPi. To do this you need to edit `/etc/rc.local` file. A At the bottom of this file, you'll find the line `exit 0`, write before this: 47 | ```shell 48 | # Starting the BlocklyPi server from it's installation directory. 49 | cd /home/pi/bin/BlocklyPi 50 | python ./server.py 51 | ``` 52 | -------------------------------------------------------------------------------- /blockly/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.pyc 3 | *.komodoproject 4 | -------------------------------------------------------------------------------- /blockly/README.md: -------------------------------------------------------------------------------- 1 | # Blockly 2 | 3 | Google's Blockly is a web-based, visual programming editor. Users can drag 4 | blocks together to build programs. All code is free and open source. 5 | 6 | **The project page is https://developers.google.com/blockly/** 7 | 8 | ![](https://developers.google.com/blockly/sample.png) 9 | -------------------------------------------------------------------------------- /blockly/appengine/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Running an App Engine server 3 | 4 | This directory contains the files needed to setup the optional Blockly server. 5 | Although Blockly itself is 100% client-side, the server enables cloud storage 6 | and sharing. Store your programs in Datastore and get a unique URL that allows 7 | you to load the program on any computer. 8 | 9 | To run your own App Engine instance you'll need to create this directory 10 | structure: 11 | 12 | blockly/ 13 | |- app.yaml 14 | |- index.yaml 15 | |- index_redirect.py 16 | |- README.txt 17 | |- storage.js 18 | |- storage.py 19 | |- closure-library/ (Optional) 20 | `- static/ 21 | |- blocks/ 22 | |- core/ 23 | |- demos/ 24 | |- generators/ 25 | |- media/ 26 | |- msg/ 27 | |- tests/ 28 | |- blockly_compressed.js 29 | |- blockly_uncompressed.js (Optional) 30 | |- blocks_compressed.js 31 | |- dart_compressed.js 32 | |- javascript_compressed.js 33 | `- python_compressed.js 34 | 35 | Instructions for fetching the optional Closure library may be found here: 36 | https://developers.google.com/blockly/hacking/closure 37 | 38 | Go to https://appengine.google.com/ and create your App Engine application. 39 | Modify the 'application' name of app.yaml to your App Engine application name. 40 | 41 | Finally, upload this directory structure to your App Engine account, 42 | wait a minute, then go to http://YOURAPPNAME.appspot.com/ 43 | -------------------------------------------------------------------------------- /blockly/appengine/app.yaml: -------------------------------------------------------------------------------- 1 | application: blockly-demo 2 | version: 1 3 | runtime: python27 4 | api_version: 1 5 | threadsafe: no 6 | 7 | handlers: 8 | # Redirect obsolete URLs. 9 | # Blockly files moved from /blockly to /static on 5 Dec 2012. 10 | - url: /blockly/.* 11 | static_files: redirect.html 12 | upload: redirect.html 13 | # Code, Maze and Turtle moved from demos on 29 Dec 2012. 14 | - url: /static/demos/(maze|turtle)/.* 15 | static_files: redirect.html 16 | upload: redirect.html 17 | # Apps was disbanded on 20 Nov 2014. 18 | - url: /static/apps/.* 19 | static_files: redirect.html 20 | upload: redirect.html 21 | 22 | 23 | # Storage API. 24 | - url: /storage 25 | script: storage.py 26 | secure: always 27 | - url: /storage\.js 28 | static_files: storage.js 29 | upload: storage\.js 30 | secure: always 31 | 32 | # Blockly files. 33 | - url: /static 34 | static_dir: static 35 | secure: always 36 | 37 | # Closure library for uncompiled Blockly. 38 | - url: /closure-library 39 | static_dir: closure-library 40 | secure: always 41 | 42 | # Redirect for root directory. 43 | - url: / 44 | script: index_redirect.py 45 | secure: always 46 | 47 | # Favicon. 48 | - url: /favicon\.ico 49 | static_files: favicon.ico 50 | upload: favicon\.ico 51 | secure: always 52 | expiration: "30d" 53 | 54 | # Apple icon. 55 | - url: /apple-touch-icon\.png 56 | static_files: apple-touch-icon.png 57 | upload: apple-touch-icon\.png 58 | secure: always 59 | expiration: "30d" 60 | 61 | # robot.txt 62 | - url: /robots\.txt 63 | static_files: robots.txt 64 | upload: robots\.txt 65 | secure: always 66 | 67 | 68 | skip_files: 69 | # App Engine default patterns. 70 | - ^(.*/)?#.*#$ 71 | - ^(.*/)?.*~$ 72 | - ^(.*/)?.*\.py[co]$ 73 | - ^(.*/)?.*/RCS/.*$ 74 | - ^(.*/)?\..*$ 75 | # Custom skip patterns. 76 | - ^static/appengine/.*$ 77 | - ^static/demos/plane/soy/.+\.jar$ 78 | - ^static/demos/plane/template.soy$ 79 | - ^static/demos/plane/xlf/.*$ 80 | - ^static/i18n/.*$ 81 | - ^static/msg/json/.*$ 82 | - ^.+\.soy$ 83 | -------------------------------------------------------------------------------- /blockly/appengine/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/appengine/apple-touch-icon.png -------------------------------------------------------------------------------- /blockly/appengine/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/appengine/favicon.ico -------------------------------------------------------------------------------- /blockly/appengine/index.yaml: -------------------------------------------------------------------------------- 1 | indexes: 2 | 3 | # AUTOGENERATED 4 | 5 | # This index.yaml is automatically updated whenever the dev_appserver 6 | # detects that a new type of query is run. If you want to manage the 7 | # index.yaml file manually, remove the above marker line (the line 8 | # saying "# AUTOGENERATED"). If you want to manage some indexes 9 | # manually, move them above the marker line. The index.yaml file is 10 | # automatically uploaded to the admin console when you next deploy 11 | # your application using appcfg.py. 12 | -------------------------------------------------------------------------------- /blockly/appengine/index_redirect.py: -------------------------------------------------------------------------------- 1 | print("Status: 302") 2 | print("Location: /static/demos/index.html") 3 | -------------------------------------------------------------------------------- /blockly/appengine/redirect.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /blockly/appengine/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /storage 3 | -------------------------------------------------------------------------------- /blockly/appengine/storage.py: -------------------------------------------------------------------------------- 1 | """Blockly Demo: Storage 2 | 3 | Copyright 2012 Google Inc. 4 | https://developers.google.com/blockly/ 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | """ 18 | 19 | """Store and retrieve XML with App Engine. 20 | """ 21 | 22 | __author__ = "q.neutron@gmail.com (Quynh Neutron)" 23 | 24 | import cgi 25 | from random import randint 26 | from google.appengine.ext import db 27 | from google.appengine.api import memcache 28 | import logging 29 | 30 | print "Content-Type: text/plain\n" 31 | 32 | def keyGen(): 33 | # Generate a random string of length KEY_LEN. 34 | KEY_LEN = 6 35 | CHARS = "abcdefghijkmnopqrstuvwxyz23456789" # Exclude l, 0, 1. 36 | max_index = len(CHARS) - 1 37 | return "".join([CHARS[randint(0, max_index)] for x in range(KEY_LEN)]) 38 | 39 | class Xml(db.Model): 40 | # A row in the database. 41 | xml_hash = db.IntegerProperty() 42 | xml_content = db.TextProperty() 43 | 44 | forms = cgi.FieldStorage() 45 | if "xml" in forms: 46 | # Store XML and return a generated key. 47 | xml_content = forms["xml"].value 48 | xml_hash = hash(xml_content) 49 | lookup_query = db.Query(Xml) 50 | lookup_query.filter("xml_hash =", xml_hash) 51 | lookup_result = lookup_query.get() 52 | if lookup_result: 53 | xml_key = lookup_result.key().name() 54 | else: 55 | trials = 0 56 | result = True 57 | while result: 58 | trials += 1 59 | if trials == 100: 60 | raise Exception("Sorry, the generator failed to get a key for you.") 61 | xml_key = keyGen() 62 | result = db.get(db.Key.from_path("Xml", xml_key)) 63 | xml = db.Text(xml_content, encoding="utf_8") 64 | row = Xml(key_name = xml_key, xml_hash = xml_hash, xml_content = xml) 65 | row.put() 66 | print xml_key 67 | 68 | if "key" in forms: 69 | # Retrieve stored XML based on the provided key. 70 | key_provided = forms["key"].value 71 | # Normalize the string. 72 | key_provided = key_provided.lower().strip() 73 | # Check memcache for a quick match. 74 | xml = memcache.get("XML_" + key_provided) 75 | if xml is None: 76 | # Check datastore for a definitive match. 77 | result = db.get(db.Key.from_path("Xml", key_provided)) 78 | if not result: 79 | xml = "" 80 | else: 81 | xml = result.xml_content 82 | # Save to memcache for next hit. 83 | if not memcache.add("XML_" + key_provided, xml, 3600): 84 | logging.error("Memcache set failed.") 85 | print xml.encode("utf-8") 86 | -------------------------------------------------------------------------------- /blockly/blocks/pirobot.js: -------------------------------------------------------------------------------- 1 | Blockly.Blocks['robot_motor_power'] = { 2 | init : function() { 3 | this.setHelpUrl('http://www.example.com/'); 4 | this.setColour(0); 5 | this.appendValueInput("POWER").setCheck("Number").appendField( 6 | new Blockly.FieldDropdown([ 7 | [ "Set the power of the left motor to", "LEFT" ], 8 | [ "Set the power of the right motor to", "RIGHT" ] ]), 9 | "MOTOR"); 10 | this.setPreviousStatement(true); 11 | this.setNextStatement(true); 12 | this.setTooltip(''); 13 | } 14 | }; 15 | 16 | Blockly.Blocks['control_key_down'] = { 17 | init : function() { 18 | this.setHelpUrl('http://www.example.com/'); 19 | this.setColour(210); 20 | this.appendDummyInput().appendField(new Blockly.FieldDropdown([ 21 | [ "On ↓ key", "DOWN" ], [ "On ↑ key", "UP" ], 22 | [ "On ← key", "LEFT" ], [ "On → key", "RIGHT" ] ]), "KEY") 23 | .appendField(new Blockly.FieldDropdown([ [ "up", "UP" ], [ "down", "DOWN" ] ]), "TYPE"); 24 | 25 | this.appendStatementInput("STATEMENTS"); 26 | this.setTooltip(''); 27 | } 28 | }; -------------------------------------------------------------------------------- /blockly/core/field_label.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Visual Blocks Editor 4 | * 5 | * Copyright 2012 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 | 21 | /** 22 | * @fileoverview Non-editable text field. Used for titles, labels, etc. 23 | * @author fraser@google.com (Neil Fraser) 24 | */ 25 | 'use strict'; 26 | 27 | goog.provide('Blockly.FieldLabel'); 28 | 29 | goog.require('Blockly.Field'); 30 | goog.require('Blockly.Tooltip'); 31 | goog.require('goog.dom'); 32 | goog.require('goog.math.Size'); 33 | 34 | 35 | /** 36 | * Class for a non-editable field. 37 | * @param {string} text The initial content of the field. 38 | * @extends {Blockly.Field} 39 | * @constructor 40 | */ 41 | Blockly.FieldLabel = function(text) { 42 | this.sourceBlock_ = null; 43 | this.size_ = new goog.math.Size(0, 25); 44 | this.setText(text); 45 | }; 46 | goog.inherits(Blockly.FieldLabel, Blockly.Field); 47 | 48 | /** 49 | * Clone this FieldLabel. 50 | * @return {!Blockly.FieldLabel} The result of calling the constructor again 51 | * with the current values of the arguments used during construction. 52 | */ 53 | Blockly.FieldLabel.prototype.clone = function() { 54 | return new Blockly.FieldLabel(this.getText()); 55 | }; 56 | 57 | /** 58 | * Editable fields are saved by the XML renderer, non-editable fields are not. 59 | */ 60 | Blockly.FieldLabel.prototype.EDITABLE = false; 61 | 62 | /** 63 | * Install this text on a block. 64 | * @param {!Blockly.Block} block The block containing this text. 65 | */ 66 | Blockly.FieldLabel.prototype.init = function(block) { 67 | if (this.sourceBlock_) { 68 | // Text has already been initialized once. 69 | return; 70 | } 71 | this.sourceBlock_ = block; 72 | 73 | // Build the DOM. 74 | this.textElement_ = Blockly.createSvgElement('text', 75 | {'class': 'blocklyText'}, null); 76 | if (!this.visible_) { 77 | this.textElement_.style.display = 'none'; 78 | } 79 | block.getSvgRoot().appendChild(this.textElement_); 80 | 81 | // Configure the field to be transparent with respect to tooltips. 82 | this.textElement_.tooltip = this.sourceBlock_; 83 | Blockly.Tooltip.bindMouseEvents(this.textElement_); 84 | // Force a render. 85 | this.updateTextNode_(); 86 | }; 87 | 88 | /** 89 | * Dispose of all DOM objects belonging to this text. 90 | */ 91 | Blockly.FieldLabel.prototype.dispose = function() { 92 | goog.dom.removeNode(this.textElement_); 93 | this.textElement_ = null; 94 | }; 95 | 96 | /** 97 | * Gets the group element for this field. 98 | * Used for measuring the size and for positioning. 99 | * @return {!Element} The group element. 100 | */ 101 | Blockly.FieldLabel.prototype.getSvgRoot = function() { 102 | return /** @type {!Element} */ (this.textElement_); 103 | }; 104 | 105 | /** 106 | * Change the tooltip text for this field. 107 | * @param {string|!Element} newTip Text for tooltip or a parent element to 108 | * link to for its tooltip. 109 | */ 110 | Blockly.FieldLabel.prototype.setTooltip = function(newTip) { 111 | this.textElement_.tooltip = newTip; 112 | }; 113 | -------------------------------------------------------------------------------- /blockly/core/msg.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Visual Blocks Editor 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 | 21 | /** 22 | * @fileoverview Core JavaScript library for Blockly. 23 | * @author scr@google.com (Sheridan Rawlins) 24 | */ 25 | 'use strict'; 26 | 27 | /** 28 | * Name space for the Msg singleton. 29 | * Msg gets populated in the message files. 30 | */ 31 | goog.provide('Blockly.Msg'); 32 | 33 | // Back up original getMsg function. 34 | goog.getMsgOrig = goog.getMsg; 35 | 36 | /** 37 | * Gets a localized message. 38 | * Overrides the default Closure function to check for a Blockly.Msg first. 39 | * Used infrequently, only known case is TODAY button in date picker. 40 | * @param {string} str Translatable string, places holders in the form {$foo}. 41 | * @param {Object=} opt_values Maps place holder name to value. 42 | * @return {string} message with placeholders filled. 43 | * @suppress {duplicate} 44 | */ 45 | goog.getMsg = function(str, opt_values) { 46 | var key = goog.getMsg.blocklyMsgMap[str]; 47 | if (key) { 48 | str = Blockly.Msg[key]; 49 | } 50 | return goog.getMsgOrig(str, opt_values); 51 | }; 52 | 53 | /** 54 | * Mapping of Closure messages to Blockly.Msg names. 55 | */ 56 | goog.getMsg.blocklyMsgMap = { 57 | 'Today': 'TODAY' 58 | }; 59 | -------------------------------------------------------------------------------- /blockly/demos/blockfactory/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/blockfactory/icon.png -------------------------------------------------------------------------------- /blockly/demos/blockfactory/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/blockfactory/link.png -------------------------------------------------------------------------------- /blockly/demos/code/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/code/icon.png -------------------------------------------------------------------------------- /blockly/demos/code/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/code/icons.png -------------------------------------------------------------------------------- /blockly/demos/code/msg/ar.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "كود", 3 | blocks: "البلوكات", 4 | linkTooltip: "احفظ ووصلة إلى البلوكات.", 5 | runTooltip: "شغل البرنامج المعرف بواسطة البلوكات في مساحة العمل.", 6 | badCode: "خطأ في البرنامج:\n %1", 7 | timeout: "تم تجاوز الحد الأقصى لتكرارات التنفيذ .", 8 | discard: "حذف كل بلوكات %1؟", 9 | trashTooltip: "تجاهل كل البلوكات.", 10 | catLogic: "منطق", 11 | catLoops: "الحلقات", 12 | catMath: "رياضيات", 13 | catText: "نص", 14 | catLists: "قوائم", 15 | catColour: "لون", 16 | catVariables: "متغيرات", 17 | catFunctions: "إجراءات", 18 | listVariable: "قائمة", 19 | textVariable: "نص", 20 | httpRequestError: "كانت هناك مشكلة مع هذا الطلب.", 21 | linkAlert: "مشاركة كود بلوكلي الخاص بك مع هذا الرابط:\n %1", 22 | hashError: "عذراً،ال '%1' لا تتوافق مع أي برنامج تم حفظه.", 23 | xmlError: "تعذر تحميل الملف المحفوظة الخاصة بك. ربما تم إنشاؤه باستخدام إصدار مختلف من بلوكلي؟", 24 | badXml: "خطأ في توزيع ال \"XML\":\n %1\n\nحدد 'موافق' للتخلي عن التغييرات أو 'إلغاء الأمر' لمواصلة تحرير ال\"XML\"." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/be-tarask.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Код", 3 | blocks: "Блёкі", 4 | linkTooltip: "Захаваць і зьвязаць з блёкамі.", 5 | runTooltip: "Запусьціце праграму, вызначаную блёкамі ў працоўнай вобласьці.", 6 | badCode: "Памылка праграмы:\n%1", 7 | timeout: "Перавышана максымальная колькасьць ітэрацыяў.", 8 | discard: "Выдаліць усе блёкі %1?", 9 | trashTooltip: "Выдаліць усе блёкі.", 10 | catLogic: "Лёгіка", 11 | catLoops: "Петлі", 12 | catMath: "Матэматычныя формулы", 13 | catText: "Тэкст", 14 | catLists: "Сьпісы", 15 | catColour: "Колер", 16 | catVariables: "Зьменныя", 17 | catFunctions: "Функцыі", 18 | listVariable: "сьпіс", 19 | textVariable: "тэкст", 20 | httpRequestError: "Узьнікла праблема з запытам.", 21 | linkAlert: "Падзяліцца Вашым блёкам праз гэтую спасылку:\n\n%1", 22 | hashError: "Прабачце, '%1' не адпавядае ніводнай захаванай праграме.", 23 | xmlError: "Не атрымалася загрузіць захаваны файл. Магчыма, ён быў створаны з іншай вэрсіяй Блёклі?", 24 | badXml: "Памылка сынтаксічнага аналізу XML:\n%1\n\nАбярыце \"ОК\", каб адмовіцца ад зьменаў ці \"Скасаваць\" для далейшага рэдагаваньня XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/br.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Kod", 3 | blocks: "Bloc'hoù", 4 | linkTooltip: "Enrollañ ha liammañ d'ar bloc'hadoù.", 5 | runTooltip: "Lañsañ ar programm termenet gant ar bloc'hadoù en takad labour.", 6 | badCode: "Fazi programm :\n%1", 7 | timeout: "Tizhet eo bet an niver brasañ a iteradurioù seveniñ aotreet.", 8 | discard: "Diverkañ an holl vloc'hoù %1 ?", 9 | trashTooltip: "Disteurel an holl vloc'hoù.", 10 | catLogic: "Poell", 11 | catLoops: "Boukloù", 12 | catMath: "Matematik", 13 | catText: "Testenn", 14 | catLists: "Rolloù", 15 | catColour: "Liv", 16 | catVariables: "Argemmennoù", 17 | catFunctions: "Arc'hwelioù", 18 | listVariable: "roll", 19 | textVariable: "testenn", 20 | httpRequestError: "Ur gudenn zo gant ar reked.", 21 | linkAlert: "Rannañ ho ploc'hoù gant al liamm-mañ :\n\n%1", 22 | hashError: "Digarezit. \"%1\" ne glot gant programm enrollet ebet.", 23 | xmlError: "Ne c'haller ket kargañ ho restr enrollet. Marteze e oa bet krouet gant ur stumm disheñvel eus Blockly ?", 24 | badXml: "Fazi dielfennañ XML :\n%1\n\nDibabit \"Mat eo\" evit dilezel ar c'hemmoù-se pe \"Nullañ\" evit kemmañ an XML c'hoazh." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/ca.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Codi", 3 | blocks: "Blocs", 4 | linkTooltip: "Desa i enllaça als blocs.", 5 | runTooltip: "Executa el programa definit pels blocs de l'àrea de treball.", 6 | badCode: "Error de programa:\n %1", 7 | timeout: "S'ha superat el nombre màxim d'iteracions d'execució.", 8 | discard: "Esborrar els %1 blocs?", 9 | trashTooltip: "Descarta tots els blocs.", 10 | catLogic: "Lògica", 11 | catLoops: "Bucles", 12 | catMath: "Matemàtiques", 13 | catText: "Text", 14 | catLists: "Llistes", 15 | catColour: "Color", 16 | catVariables: "Variables", 17 | catFunctions: "Procediments", 18 | listVariable: "llista", 19 | textVariable: "text", 20 | httpRequestError: "Hi ha hagut un problema amb la sol·licitud.", 21 | linkAlert: "Comparteix els teus blocs amb aquest enllaç: %1", 22 | hashError: "Ho sentim, '%1' no es correspon amb cap fitxer desat de Blockly.", 23 | xmlError: "No s'ha pogut carregar el teu fitxer desat. Potser va ser creat amb una versió diferent de Blockly?", 24 | badXml: "Error d'anàlisi XML:\n%1\n\nSeleccioneu 'Acceptar' per abandonar els vostres canvis, o 'Cancel·lar' per continuar editant l'XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/cs.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Kód", 3 | blocks: "Bloky", 4 | linkTooltip: "Ulož a spoj bloky..", 5 | runTooltip: "", 6 | badCode: "Chyba programu:\n%1", 7 | timeout: "Maximum execution iterations exceeded.", 8 | discard: "Odstranit všechny bloky %1?", 9 | trashTooltip: "Zahodit všechny bloky.", 10 | catLogic: "Logika", 11 | catLoops: "Smyčky", 12 | catMath: "Matematika", 13 | catText: "Text", 14 | catLists: "Seznamy", 15 | catColour: "Barva", 16 | catVariables: "Proměnné", 17 | catFunctions: "Procedury", 18 | listVariable: "seznam", 19 | textVariable: "text", 20 | httpRequestError: "Došlo k potížím s požadavkem.", 21 | linkAlert: "Sdílej bloky tímto odkazem: \n\n%1", 22 | hashError: "Omlouváme se, '%1' nesouhlasí s žádným z uložených souborů.", 23 | xmlError: "Nepodařilo se uložit vás soubor. Pravděpodobně byl vytvořen jinou verzí Blockly?", 24 | badXml: "Chyba parsování XML:\n%1\n\nVybrat \"OK\" pro zahození vašich změn nebo 'Cancel' k dalšímu upravování XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/da.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Kode", 3 | blocks: "Blokke", 4 | linkTooltip: "Gem og link til blokke.", 5 | runTooltip: "Kør programmet, der er defineret af blokkene i arbejdsområdet.", 6 | badCode: "Programfejl:\n%1", 7 | timeout: "Maksimale antal udførelsesgentagelser overskredet.", 8 | discard: "Slet alle %1 blokke?", 9 | trashTooltip: "Kassér alle blokke.", 10 | catLogic: "Logik", 11 | catLoops: "Løkker", 12 | catMath: "Matematik", 13 | catText: "Tekst", 14 | catLists: "Lister", 15 | catColour: "Farve", 16 | catVariables: "Variabler", 17 | catFunctions: "Funktioner", 18 | listVariable: "liste", 19 | textVariable: "tekst", 20 | httpRequestError: "Der var et problem med forespørgslen.", 21 | linkAlert: "Del dine blokke med dette link:\n\n%1", 22 | hashError: "Beklager, '%1' passer ikke med nogen gemt Blockly fil.", 23 | xmlError: "Kunne ikke hente din gemte fil. Måske er den lavet med en anden udgave af Blockly?", 24 | badXml: "Fejl under fortolkningen af XML:\n%1\n\nVælg 'OK' for at opgive dine ændringer eller 'Afbryd' for at redigere XML-filen yderligere." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/de.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Code", 3 | blocks: "Bausteine", 4 | linkTooltip: "Speichern und auf Bausteine verlinken.", 5 | runTooltip: "Das Programm ausführen, das von den Bausteinen im Arbeitsbereich definiert ist.", 6 | badCode: "Programmfehler:\n%1", 7 | timeout: "Die maximalen Ausführungswiederholungen wurden überschritten.", 8 | discard: "Alle %1 Bausteine löschen?", 9 | trashTooltip: "Alle Bausteine verwerfen.", 10 | catLogic: "Logik", 11 | catLoops: "Schleifen", 12 | catMath: "Mathematik", 13 | catText: "Text", 14 | catLists: "Listen", 15 | catColour: "Farbe", 16 | catVariables: "Variablen", 17 | catFunctions: "Funktionen", 18 | listVariable: "Liste", 19 | textVariable: "Text", 20 | httpRequestError: "Mit der Anfrage gab es ein Problem.", 21 | linkAlert: "Teile deine Bausteine mit diesem Link:\n\n%1", 22 | hashError: "„%1“ stimmt leider mit keinem gespeicherten Programm überein.", 23 | xmlError: "Deine gespeicherte Datei konnte nicht geladen werden. Vielleicht wurde sie mit einer anderen Version von Blockly erstellt.", 24 | badXml: "Fehler beim Parsen von XML:\n%1\n\nWähle 'OK' zum Verwerfen deiner Änderungen oder 'Abbrechen' zum weiteren Bearbeiten des XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/el.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Κώδικας", 3 | blocks: "Μπλοκ", 4 | linkTooltip: "Αποθηκεύει και συνδέει σε μπλοκ.", 5 | runTooltip: "Εκτελεί το πρόγραμμα που ορίζεται από τα μπλοκ στον χώρο εργασίας.", 6 | badCode: "Σφάλμα προγράμματος:\n%1", 7 | timeout: "Υπέρβαση μέγιστου αριθμού επαναλήψεων.", 8 | discard: "Να διαγραφούν και τα %1 μπλοκ?", 9 | trashTooltip: "Απόρριψη όλων των μπλοκ.", 10 | catLogic: "Λογική", 11 | catLoops: "Επαναλήψεις", 12 | catMath: "Μαθηματικά", 13 | catText: "Κείμενο", 14 | catLists: "Λίστες", 15 | catColour: "Χρώμα", 16 | catVariables: "Μεταβλητές", 17 | catFunctions: "Συναρτήσεις", 18 | listVariable: "λίστα", 19 | textVariable: "κείμενο", 20 | httpRequestError: "Υπήρξε πρόβλημα με το αίτημα.", 21 | linkAlert: "Κοινοποίησε τα μπλοκ σου με αυτόν τον σύνδεσμο:\n\n%1", 22 | hashError: "Λυπάμαι, το «%1» δεν αντιστοιχεί σε κανένα αποθηκευμένο πρόγραμμα.", 23 | xmlError: "Δεν μπορώ να φορτώσω το αποθηκευμένο αρχείο σου. Μήπως δημιουργήθηκε από μία παλιότερη έκδοση του Blockly;", 24 | badXml: "Σφάλμα ανάλυσης XML:\n%1\n\nΕπίλεξε «Εντάξει» για να εγκαταλείψεις τις αλλαγές σου ή «Ακύρωση» για να επεξεργαστείς το XML κι άλλο." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/en.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Code", 3 | blocks: "Blocks", 4 | linkTooltip: "Save and link to blocks.", 5 | runTooltip: "Run the program defined by the blocks in the workspace.", 6 | badCode: "Program error:\n%1", 7 | timeout: "Maximum execution iterations exceeded.", 8 | discard: "Delete all %1 blocks?", 9 | trashTooltip: "Discard all blocks.", 10 | catLogic: "Logic", 11 | catLoops: "Loops", 12 | catMath: "Math", 13 | catText: "Text", 14 | catLists: "Lists", 15 | catColour: "Colour", 16 | catVariables: "Variables", 17 | catFunctions: "Functions", 18 | listVariable: "list", 19 | textVariable: "text", 20 | httpRequestError: "There was a problem with the request.", 21 | linkAlert: "Share your blocks with this link:\n\n%1", 22 | hashError: "Sorry, '%1' doesn't correspond with any saved program.", 23 | xmlError: "Could not load your saved file. Perhaps it was created with a different version of Blockly?", 24 | badXml: "Error parsing XML:\n%1\n\nSelect 'OK' to abandon your changes or 'Cancel' to further edit the XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/es.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Código", 3 | blocks: "Bloques", 4 | linkTooltip: "Guarda conexión a los bloques.", 5 | runTooltip: "Ejecute el programa definido por los bloques en el área de trabajo.", 6 | badCode: "Error del programa:\n%1", 7 | timeout: "Se excedio el máximo de iteraciones ejecutadas permitidas.", 8 | discard: "¿Eliminar todos los bloques %1?", 9 | trashTooltip: "Descartar todos los bloques.", 10 | catLogic: "Lógica", 11 | catLoops: "Secuencias", 12 | catMath: "Matemáticas", 13 | catText: "Texto", 14 | catLists: "Listas", 15 | catColour: "Color", 16 | catVariables: "Variables", 17 | catFunctions: "Funciones", 18 | listVariable: "lista", 19 | textVariable: "texto", 20 | httpRequestError: "Hubo un problema con la petición.", 21 | linkAlert: "Comparte tus bloques con este enlace:\n\n%1", 22 | hashError: "«%1» no corresponde con ningún programa guardado.", 23 | xmlError: "No se pudo cargar el archivo guardado. ¿Quizá fue creado con otra versión de Blockly?", 24 | badXml: "Error de análisis XML:\n%1\n\nSelecciona OK para abandonar tus cambios o Cancelar para seguir editando el XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/fa.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "کد", 3 | blocks: "بلوک‌ها", 4 | linkTooltip: "ذخیره و پیوند به بلوک‌ها.", 5 | runTooltip: "اجرای برنامهٔ تعریف‌شده توسط بلوک‌ها در فضای کار.", 6 | badCode: "خطای برنامه:\n%1", 7 | timeout: "حداکثر تکرارهای اجرا رد شده‌است.", 8 | discard: "حذف همهٔ بلاک‌های %1؟", 9 | trashTooltip: "دورریختن همهٔ بلوک‌ها.", 10 | catLogic: "منطق", 11 | catLoops: "حلقه‌ها", 12 | catMath: "ریاضی", 13 | catText: "متن", 14 | catLists: "فهرست‌ها", 15 | catColour: "رنگ", 16 | catVariables: "متغییرها", 17 | catFunctions: "توابع", 18 | listVariable: "فهرست", 19 | textVariable: "متن", 20 | httpRequestError: "مشکلی با درخواست وجود داشت.", 21 | linkAlert: "اشتراک‌گذاری بلاک‌هایتان با این پیوند:\n\n%1", 22 | hashError: "شرمنده، «%1» با هیچ برنامهٔ ذخیره‌شده‌ای تطبیق پیدا نکرد.", 23 | xmlError: "نتوانست پروندهٔ ذخیرهٔ شما بارگیری شود. احتمالاً با نسخهٔ متفاوتی از بلوکی درست شده‌است؟", 24 | badXml: "خطای تجزیهٔ اکس‌ام‌ال:\n%1\n\n«باشد» را برای ذخیره و «فسخ» را برای ویرایش بیشتر اکس‌ام‌ال انتخاب کنید." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/fr.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Code", 3 | blocks: "Blocs", 4 | linkTooltip: "Sauvegarder et lier aux blocs.", 5 | runTooltip: "Lancer le programme défini par les blocs dans l’espace de travail.", 6 | badCode: "Erreur du programme :\n%1", 7 | timeout: "Nombre maximum d’itérations d’exécution dépassé.", 8 | discard: "Supprimer tous les %1 blocs ?", 9 | trashTooltip: "Jeter tous les blocs.", 10 | catLogic: "Logique", 11 | catLoops: "Boucles", 12 | catMath: "Math", 13 | catText: "Texte", 14 | catLists: "Listes", 15 | catColour: "Couleur", 16 | catVariables: "Variables", 17 | catFunctions: "Fonctions", 18 | listVariable: "liste", 19 | textVariable: "texte", 20 | httpRequestError: "Il y a eu un problème avec la demande.", 21 | linkAlert: "Partagez vos blocs grâce à ce lien:\n\n%1", 22 | hashError: "Désolé, '%1' ne correspond à aucun programme sauvegardé.", 23 | xmlError: "Impossible de charger le fichier de sauvegarde. Peut être a t-il été créé avec une autre version de Blockly?", 24 | badXml: "Erreur d’analyse du XML :\n%1\n\nSélectionner 'OK' pour abandonner vos modifications ou 'Annuler' pour continuer à modifier le XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/he.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "קוד", 3 | blocks: "קטעי קוד", 4 | linkTooltip: "שמירה וקישור לקטעי קוד.", 5 | runTooltip: "הרצת התכנית שהוגדרה על ידי קטעי הקוד שבמרחב העבודה.", 6 | badCode: "שגיאה בתכנית: %1", 7 | timeout: "חריגה ממספר פעולות חוזרות אפשריות.", 8 | discard: "האם למחוק את כל %1 קטעי הקוד?", 9 | trashTooltip: "השלך את כל קטעי הקוד.", 10 | catLogic: "לוגיקה", 11 | catLoops: "לולאות", 12 | catMath: "מתמטיקה", 13 | catText: "טקסט", 14 | catLists: "רשימות", 15 | catColour: "צבע", 16 | catVariables: "משתנים", 17 | catFunctions: "פונקציות", 18 | listVariable: "רשימה", 19 | textVariable: "טקסט", 20 | httpRequestError: "הבקשה נכשלה.", 21 | linkAlert: "ניתן לשתף את קטעי הקוד שלך באמצעות קישור זה:\n\n%1", 22 | hashError: "לצערנו, '%1' איננו מתאים לאף אחת מהתוכניות השמורות", 23 | xmlError: "נסיון הטעינה של הקובץ השמור שלך נכשל. האם ייתכן שהוא נוצר בגרסא שונה של בלוקלי?", 24 | badXml: "תקלה בפענוח XML:\n\n%1\n\nנא לבחור 'אישור' כדי לנטוש את השינויים שלך או 'ביטול' כדי להמשיך ולערוך את ה־XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/hrx.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Code", 3 | blocks: "Bausten", 4 | linkTooltip: "Speichre und auf Bausten verlinke.", 5 | runTooltip: "Das Programm ausfüahre, das von den Bausten im Oorweitsbereich definiert ist.", 6 | badCode: "Programmfehler:\n%1", 7 | timeout: "Die maximale Ausführungswiederholunge woore üwerschritt.", 8 | discard: "All %1 Bausten lösche?", 9 | trashTooltip: "All Bausten verwerfe.", 10 | catLogic: "Logik", 11 | catLoops: "Schleife", 12 | catMath: "Mathematik", 13 | catText: "Text", 14 | catLists: "Liste", 15 | catColour: "Farreb", 16 | catVariables: "Variable", 17 | catFunctions: "Funktione", 18 | listVariable: "List", 19 | textVariable: "Text", 20 | httpRequestError: "Mit der Oonfroch hots en Problem geb.", 21 | linkAlert: "Tel von dein Bausten mit dem Link:\n\n%1", 22 | hashError: "„%1“ stimmt leider mit kenem üweren gespeicherte Programm.", 23 | xmlError: "Dein gespeicherte Datei könnt net gelood sin. Vielleicht woard se mit ener annre Version von Blockly erstellt.", 24 | badXml: "Fehler beim Parse von XML:\n%1\n\nWähle 'OK' zum Verwerfe von deiner Ändrunge orrer 'Abbreche' zum XML weiter beoorbeite." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/hu.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Kódszerkesztő", 3 | blocks: "Blokkok", 4 | linkTooltip: "Hivatkozás létrehozása", 5 | runTooltip: "Program futtatása.", 6 | badCode: "Program hiba:\n%1", 7 | timeout: "A program elérte a maximális végrehajtási időt.", 8 | discard: "Az összes %1 blokk törlése?", 9 | trashTooltip: "Összes blokk törlése.", 10 | catLogic: "Logikai műveletek", 11 | catLoops: "Ciklusok", 12 | catMath: "Matematikai műveletek", 13 | catText: "Sztring műveletek", 14 | catLists: "Listakezelés", 15 | catColour: "Színek", 16 | catVariables: "Változók", 17 | catFunctions: "Eljárások", 18 | listVariable: "lista", 19 | textVariable: "szöveg", 20 | httpRequestError: "A kéréssel kapcsolatban probléma merült fel.", 21 | linkAlert: "Ezzel a hivatkozással tudod megosztani a programodat:\n\n%1", 22 | hashError: "Sajnos a '%1' hivatkozás nem tartozik egyetlen programhoz sem.", 23 | xmlError: "A programodat nem lehet betölteni. Elképzelhető, hogy a Blockly egy másik verziójában készült?", 24 | badXml: "Hiba az XML feldolgozásakor:\n%1\n\nVáltozások elvetése?" 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/ia.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Codice", 3 | blocks: "Blocos", 4 | linkTooltip: "Salveguardar e ligar a blocos.", 5 | runTooltip: "Executar le programma definite per le blocos in le spatio de travalio.", 6 | badCode: "Error del programma:\n%1", 7 | timeout: "Le numero de iterationes executate ha excedite le maximo.", 8 | discard: "Deler tote le %1 blocos?", 9 | trashTooltip: "Abandonar tote le blocos.", 10 | catLogic: "Logica", 11 | catLoops: "Buclas", 12 | catMath: "Mathematica", 13 | catText: "Texto", 14 | catLists: "Listas", 15 | catColour: "Color", 16 | catVariables: "Variabiles", 17 | catFunctions: "Functiones", 18 | listVariable: "lista", 19 | textVariable: "texto", 20 | httpRequestError: "Il habeva un problema con le requesta.", 21 | linkAlert: "Divide tu blocos con iste ligamine:\n\n%1", 22 | hashError: "Infelicemente, '%1' non corresponde a alcun programma salveguardate.", 23 | xmlError: "Impossibile cargar le file salveguardate. Pote esser que illo ha essite create con un altere version de Blockly?", 24 | badXml: "Error de analyse del XML:\n%1\n\nSelige 'OK' pro abandonar le modificationes o 'Cancellar' pro continuar a modificar le codice XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/is.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Kóði", 3 | blocks: "Kubbar", 4 | linkTooltip: "Vista og tengja við kubba.", 5 | runTooltip: "Keyra forritið sem kubbarnir á vinnusvæðinu mynda.", 6 | badCode: "Villa í forriti:\n%1", 7 | timeout: "Forritið hefur endurtekið sig of oft.", 8 | discard: "Eyða öllum %1 kubbunum?", 9 | trashTooltip: "Fleygja öllum kubbum.", 10 | catLogic: "Rökvísi", 11 | catLoops: "Lykkjur", 12 | catMath: "Reikningur", 13 | catText: "Texti", 14 | catLists: "Listar", 15 | catColour: "Litir", 16 | catVariables: "Breytur", 17 | catFunctions: "Stefjur", 18 | listVariable: "listi", 19 | textVariable: "texti", 20 | httpRequestError: "Það kom upp vandamál með beiðnina.", 21 | linkAlert: "Deildu kubbunum þínum með þessari krækju:", 22 | hashError: "Því miður, '%1' passar ekki við neitt vistað forrit.", 23 | xmlError: "Gat ekki hlaðið vistuðu skrána þína. Var hún kannske búin til í annarri útgáfu af Blockly?", 24 | badXml: "Villa við úrvinnslu XML:\n%1\n\nVeldu 'Í lagi' til að sleppa breytingum eða 'Hætta við' til að halda áfram með XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/it.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Codice", 3 | blocks: "Blocchi", 4 | linkTooltip: "Salva e collega ai blocchi.", 5 | runTooltip: "Esegui il programma definito dai blocchi nell'area di lavoro.", 6 | badCode: "Errore programma:\n%1", 7 | timeout: "È stato superato il numero massimo consentito di interazioni eseguite.", 8 | discard: "Cancellare tutti i %1 blocchi?", 9 | trashTooltip: "Elimina tutti i blocchi.", 10 | catLogic: "Logica", 11 | catLoops: "Cicli", 12 | catMath: "Matematica", 13 | catText: "Testo", 14 | catLists: "Elenchi", 15 | catColour: "Colore", 16 | catVariables: "Variabili", 17 | catFunctions: "Funzioni", 18 | listVariable: "elenco", 19 | textVariable: "testo", 20 | httpRequestError: "La richiesta non è stata soddisfatta.", 21 | linkAlert: "Condividi i tuoi blocchi con questo collegamento:\n\n%1", 22 | hashError: "Mi spiace, '%1' non corrisponde ad alcun programma salvato.", 23 | xmlError: "Non è stato possibile caricare il documento. Forse è stato creato con una versione diversa di Blockly?", 24 | badXml: "Errore durante l'analisi XML:\n%1\n\nSeleziona 'OK' per abbandonare le modifiche o 'Annulla' per continuare a modificare l'XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/ja.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "コード", 3 | blocks: "ブロック", 4 | linkTooltip: "ブロックの状態を保存してリンクを取得します。", 5 | runTooltip: "ブロックで作成したプログラムを実行します。", 6 | badCode: "プログラムのエラー:\n%1", 7 | timeout: "命令の実行回数が制限値を超えました。", 8 | discard: "%1 個すべてのブロックを消しますか?", 9 | trashTooltip: "すべてのブロックを消します。", 10 | catLogic: "論理", 11 | catLoops: "繰り返し", 12 | catMath: "数学", 13 | catText: "テキスト", 14 | catLists: "リスト", 15 | catColour: "色", 16 | catVariables: "変数", 17 | catFunctions: "関数", 18 | listVariable: "リスト", 19 | textVariable: "テキスト", 20 | httpRequestError: "ネットワーク接続のエラーです。", 21 | linkAlert: "ブロックの状態をこのリンクで共有できます:\n\n%1", 22 | hashError: "すみません。「%1」という名前のプログラムは保存されていません。", 23 | xmlError: "保存されたファイルを読み込めませんでした。別のバージョンのブロックリーで作成された可能性があります。", 24 | badXml: "XML のエラーです:\n%1\n\nXML の変更をやめるには「OK」、編集を続けるには「キャンセル」を選んでください。" 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/ko.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "코드", 3 | blocks: "블록", 4 | linkTooltip: "블록을 저장하고 링크를 가져옵니다.", 5 | runTooltip: "작업 공간에서 블록으로 정의된 프로그램을 실행합니다.", 6 | badCode: "프로그램 오류:\n%1", 7 | timeout: "최대 실행 반복을 초과했습니다.", 8 | discard: "모든 블록 %1개를 삭제하겠습니까?", 9 | trashTooltip: "모든 블록을 버립니다.", 10 | catLogic: "논리", 11 | catLoops: "반복", 12 | catMath: "수학", 13 | catText: "텍스트", 14 | catLists: "목록", 15 | catColour: "색", 16 | catVariables: "변수", 17 | catFunctions: "기능", 18 | listVariable: "목록", 19 | textVariable: "텍스트", 20 | httpRequestError: "요청에 문제가 있습니다.", 21 | linkAlert: "다음 링크로 블록을 공유하세요:\n\n%1", 22 | hashError: "죄송하지만 '%1'은 어떤 저장된 프로그램으로 일치하지 않습니다.", 23 | xmlError: "저장된 파일을 불러올 수 없습니다. 혹시 블록리의 다른 버전으로 만들었습니까?", 24 | badXml: "XML 구문 분석 오류:\n%1\n\n바뀜을 포기하려면 '확인'을 선택하고 XML을 더 편집하려면 '취소'를 선택하세요." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/mk.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Код", 3 | blocks: "Блокчиња", 4 | linkTooltip: "Зачувај и стави врска до блокчињата.", 5 | runTooltip: "Пушти го програмот определен од блокчињата во работниот простор.", 6 | badCode: "Грешка во програмот:\n%1", 7 | timeout: "Го надминавте допуштениот број на повторувања во извршувањето.", 8 | discard: "Да ги избришам сите %1 блокчиња?", 9 | trashTooltip: "Отстрани ги сите блокчиња.", 10 | catLogic: "Логика", 11 | catLoops: "Јамки", 12 | catMath: "Математика", 13 | catText: "Текст", 14 | catLists: "Списоци", 15 | catColour: "Боја", 16 | catVariables: "Променливи", 17 | catFunctions: "Функции", 18 | listVariable: "список", 19 | textVariable: "текст", 20 | httpRequestError: "Се појави проблем во барањето.", 21 | linkAlert: "Споделете ги вашите блокчиња со оваа врска:\n\n%1", 22 | hashError: "„%1“ не одговара на ниеден зачуван програм.", 23 | xmlError: "Не можев да ја вчитам зачуваната податотека. Да не сте ја создале со друга верзија на Blockly?", 24 | badXml: "Грешка при расчленувањето на XML:\n%1\n\nСтиснете на „ОК“ за да ги напуштите промените или на „Откажи“ ако сакате уште да ја уредувате XML-податотеката." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/ms.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Kod", 3 | blocks: "Blok", 4 | linkTooltip: "Simpan dan pautkan kepada blok.", 5 | runTooltip: "Jalankan aturcara yang ditetapkan oleh blok-blok di dalam ruang kerja.", 6 | badCode: "Ralat atur cara:\n%1", 7 | timeout: "Takat maksimum lelaran pelaksanaan dicecah.", 8 | discard: "Hapuskan kesemua %1 blok?", 9 | trashTooltip: "Buang semua blok.", 10 | catLogic: "Logik", 11 | catLoops: "Gelung", 12 | catMath: "Matematik", 13 | catText: "Teks", 14 | catLists: "Senarai", 15 | catColour: "Warna", 16 | catVariables: "Pemboleh ubah", 17 | catFunctions: "Fungsi", 18 | listVariable: "senarai", 19 | textVariable: "teks", 20 | httpRequestError: "Permintaan itu terdapat masalah.", 21 | linkAlert: "Kongsikan blok-blok anda dengan pautan ini:\n\n%1", 22 | hashError: "Maaf, '%1' tidak berpadanan dengan sebarang aturcara yang disimpan.", 23 | xmlError: "Fail simpanan anda tidak dapat dimuatkan. Jangan-jangan ia dicipta dengan versi Blockly yang berlainan?", 24 | badXml: "Ralat ketika menghuraian XML:\n%1\n\nPilih 'OK' untuk melucutkan suntingan anda atau 'Batal' untuk bersambung menyunting XML-nya." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/nb.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Kode", 3 | blocks: "Blokker", 4 | linkTooltip: "Lagre og lenke til blokker.", 5 | runTooltip: "Kjør programmet definert av blokken i arbeidsområdet.", 6 | badCode: "Programfeil:\n%1", 7 | timeout: "Det maksimale antallet utførte looper er oversteget.", 8 | discard: "Slett alle %1 blokker?", 9 | trashTooltip: "Fjern alle blokker", 10 | catLogic: "Logikk", 11 | catLoops: "Looper", 12 | catMath: "Matte", 13 | catText: "Tekst", 14 | catLists: "Lister", 15 | catColour: "Farge", 16 | catVariables: "Variabler", 17 | catFunctions: "Funksjoner", 18 | listVariable: "Liste", 19 | textVariable: "Tekst", 20 | httpRequestError: "Det oppsto et problem med forespørselen din", 21 | linkAlert: "Del dine blokker med denne lenken:\n\n%1", 22 | hashError: "Beklager, '%1' samsvarer ikke med noe lagret program.", 23 | xmlError: "Kunne ikke laste inn filen. Kanskje den ble laget med en annen versjon av Blockly?", 24 | badXml: "Feil ved parsering av XML:\n%1\n\nVelg 'OK' for å avbryte endringene eller 'Cancel' for å fortsette å redigere XML-koden." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/nl.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Code", 3 | blocks: "Blokken", 4 | linkTooltip: "Opslaan en koppelen naar blokken.", 5 | runTooltip: "Voer het programma uit dat met de blokken in de werkruimte is gemaakt.", 6 | badCode: "Programmafout:\n%1", 7 | timeout: "Het maximale aantal iteraties is overschreden.", 8 | discard: "Alle %1 blokken verwijderen?", 9 | trashTooltip: "Alle blokken verwijderen", 10 | catLogic: "Logica", 11 | catLoops: "Lussen", 12 | catMath: "Formules", 13 | catText: "Tekst", 14 | catLists: "Lijsten", 15 | catColour: "Kleur", 16 | catVariables: "Variabelen", 17 | catFunctions: "Functies", 18 | listVariable: "lijst", 19 | textVariable: "tekst", 20 | httpRequestError: "Er is een probleem opgetreden tijdens het verwerken van het verzoek.", 21 | linkAlert: "Deel uw blokken via deze koppeling:\n\n%1", 22 | hashError: "\"%1\" komt helaas niet overeen met een opgeslagen bestand.", 23 | xmlError: "Uw opgeslagen bestand kan niet geladen worden. Is het misschien gemaakt met een andere versie van Blockly?", 24 | badXml: "Fout tijdens het verwerken van de XML:\n%1\n\nSelecteer \"OK\" om uw wijzigingen te negeren of \"Annuleren\" om de XML verder te bewerken." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/oc.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Còde", 3 | blocks: "Blòts", 4 | linkTooltip: "Salva e liga als blòts.", 5 | runTooltip: "Aviar lo programa definit pels blòts dins l’espaci de trabalh.", 6 | badCode: "Error del programa :\n%1", 7 | timeout: "Nombre maximum d’iteracions d’execucion depassat.", 8 | discard: "Suprimir totes los %1 blòts ?", 9 | trashTooltip: "Getar totes los blòts.", 10 | catLogic: "Logic", 11 | catLoops: "Boclas", 12 | catMath: "Math", 13 | catText: "Tèxte", 14 | catLists: "Listas", 15 | catColour: "Color", 16 | catVariables: "Variablas", 17 | catFunctions: "Foncions", 18 | listVariable: "lista", 19 | textVariable: "tèxte", 20 | httpRequestError: "I a agut un problèma amb la demanda.", 21 | linkAlert: "Partejatz vòstres blòts gràcia a aqueste ligam :\n\n%1", 22 | hashError: "O planhèm, '%1' correspond pas a un fichièr Blockly salvament.", 23 | xmlError: "Impossible de cargar lo fichièr de salvament. Benlèu qu'es estat creat amb una autra version de Blockly ?", 24 | badXml: "Error d’analisi del XML :\n%1\n\nSeleccionar 'D'acòrdi' per abandonar vòstras modificacions o 'Anullar' per modificar encara lo XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/pl.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Kod", 3 | blocks: "Bloki", 4 | linkTooltip: "Zapisz i podlinkuj do bloków", 5 | runTooltip: "Uruchom program zdefinowany przez bloki w obszarze roboczym", 6 | badCode: "Błąd programu:\n%1", 7 | timeout: "Maksymalna liczba iteracji wykonywań przekroczona", 8 | discard: "Usunąć wszystkie %1 bloki?", 9 | trashTooltip: "Odrzuć wszystkie bloki.", 10 | catLogic: "Logika", 11 | catLoops: "Pętle", 12 | catMath: "Matematyka", 13 | catText: "Tekst", 14 | catLists: "Listy", 15 | catColour: "Kolor", 16 | catVariables: "Zmienne", 17 | catFunctions: "Funkcje", 18 | listVariable: "lista", 19 | textVariable: "tekst", 20 | httpRequestError: "Wystąpił problem z żądaniem.", 21 | linkAlert: "Udpostępnij swoje bloki korzystając z poniższego linku : \n\n\n%1", 22 | hashError: "Przepraszamy, \"%1\" nie odpowiada żadnemu zapisanemu programowi.", 23 | xmlError: "Nie można załadować zapisanego pliku. Być może został utworzony za pomocą innej wersji Blockly?", 24 | badXml: "Błąd parsowania XML : \n%1\n\nZaznacz 'OK' aby odrzucić twoje zmiany lub 'Cancel', żeby w przyszłości edytować XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/pms.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Còdes", 3 | blocks: "Blòch", 4 | linkTooltip: "Argistré e lijé ai blòch.", 5 | runTooltip: "Fé andé ël programa definì dai blòch ant lë spassi ëd travaj.", 6 | badCode: "Eror dël programa:\n%1", 7 | timeout: "Nùmer màssim d'arpetission d'esecussion sorpassà.", 8 | discard: "Scancelé tuti ij %1 blòch?", 9 | trashTooltip: "Scarté tuti ij blòch.", 10 | catLogic: "Lògica", 11 | catLoops: "Liasse", 12 | catMath: "Matemàtica", 13 | catText: "Test", 14 | catLists: "Liste", 15 | catColour: "Color", 16 | catVariables: "Variàbij", 17 | catFunctions: "Fonsion", 18 | listVariable: "lista", 19 | textVariable: "test", 20 | httpRequestError: "A-i é staje un problema con l'arcesta.", 21 | linkAlert: "Ch'a partagia ij sò blòch grassie a sta liura: %1", 22 | hashError: "An dëspias, '%1 a corëspond a gnun programa salvà.", 23 | xmlError: "A l'é nen podusse carié so archivi salvà. Miraco a l'é stàit creà con na version diferenta ëd Blockly?", 24 | badXml: "Eror d'anàlisi dl'XML:\n%1\n\nSelessioné 'Va bin' për lassé perde toe modìfiche o 'Anulé' për modifiché ancora l'XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/pt-br.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Código", 3 | blocks: "Blocos", 4 | linkTooltip: "Salvar e ligar aos blocos.", 5 | runTooltip: "Execute o programa definido pelos blocos na área de trabalho.", 6 | badCode: "Erro no programa:\n%1", 7 | timeout: "Máximo de iterações de execução excedido.", 8 | discard: "Apagar todos os %1 blocos?", 9 | trashTooltip: "Descartar todos os blocos.", 10 | catLogic: "Lógica", 11 | catLoops: "Laços", 12 | catMath: "Matemática", 13 | catText: "Texto", 14 | catLists: "Listas", 15 | catColour: "Cor", 16 | catVariables: "Variáveis", 17 | catFunctions: "Funções", 18 | listVariable: "lista", 19 | textVariable: "texto", 20 | httpRequestError: "Houve um problema com a requisição.", 21 | linkAlert: "Compartilhe seus blocos com este link:\n\n%1", 22 | hashError: "Desculpe, '%1' não corresponde a um programa salvo.", 23 | xmlError: "Não foi possível carregar seu arquivo salvo. Talvez ele tenha sido criado com uma versão diferente do Blockly?", 24 | badXml: "Erro de análise XML:\n%1\n\nSelecione 'OK' para abandonar suas mudanças ou 'Cancelar' para editar o XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/ro.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Cod", 3 | blocks: "Blocuri", 4 | linkTooltip: "Salvează și adaugă la blocuri.", 5 | runTooltip: "Execută programul definit de către blocuri în spațiul de lucru.", 6 | badCode: "Eroare de program:\n%1", 7 | timeout: "Numărul maxim de iterații a fost depășit.", 8 | discard: "Ștergi toate cele %1 (de) blocuri?", 9 | trashTooltip: "Șterge toate blocurile.", 10 | catLogic: "Logic", 11 | catLoops: "Bucle", 12 | catMath: "Matematică", 13 | catText: "Text", 14 | catLists: "Liste", 15 | catColour: "Culoare", 16 | catVariables: "Variabile", 17 | catFunctions: "Funcții", 18 | listVariable: "listă", 19 | textVariable: "text", 20 | httpRequestError: "A apărut o problemă la solicitare.", 21 | linkAlert: "Distribuie-ți blocurile folosind această legătură:\n\n%1", 22 | hashError: "Scuze, „%1” nu corespunde nici unui program salvat.", 23 | xmlError: "Sistemul nu a putut încărca fișierul salvat. Poate că a fost creat cu o altă versiune de Blockly?", 24 | badXml: "Eroare de parsare XML:\n%1\n\nAlege „OK” pentru a renunța la modificările efectuate sau „Revocare” pentru a modifica în continuare fișierul XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/ru.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Код", 3 | blocks: "Блоки", 4 | linkTooltip: "Сохранить и показать ссылку на блоки.", 5 | runTooltip: "Запустить программу, заданную блоками в рабочей области.", 6 | badCode: "Ошибка программы:\n%1", 7 | timeout: "Превышено максимальное количество итераций.", 8 | discard: "Удалить все блоки (%1)?", 9 | trashTooltip: "Удалить все блоки.", 10 | catLogic: "Логические", 11 | catLoops: "Циклы", 12 | catMath: "Математика", 13 | catText: "Текст", 14 | catLists: "Списки", 15 | catColour: "Цвет", 16 | catVariables: "Переменные", 17 | catFunctions: "Функции", 18 | listVariable: "список", 19 | textVariable: "текст", 20 | httpRequestError: "Произошла проблема при запросе.", 21 | linkAlert: "Поделитесь своими блоками по этой ссылке:\n\n%1", 22 | hashError: "К сожалению, «%1» не соответствует ни одному сохраненному файлу Блокли.", 23 | xmlError: "Не удалось загрузить ваш сохраненный файл. Возможно, он был создан в другой версии Блокли?", 24 | badXml: "Ошибка синтаксического анализа XML:\n%1\n\nВыберите 'ОК', чтобы отказаться от изменений или 'Cancel' для дальнейшего редактирования XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/sc.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Còdixi", 3 | blocks: "Brocus", 4 | linkTooltip: "Sarva e alliòngia a is brocus.", 5 | runTooltip: "Arròllia su programa cumpostu de is brocus in s'àrea de traballu.", 6 | badCode: "Errori in su Programa:\n%1", 7 | timeout: "Giai lòmpius a su màssimu numeru de repicus.", 8 | discard: "Scancellu su %1 de is brocus?", 9 | trashTooltip: "Boganci totu is brocus.", 10 | catLogic: "Lògica", 11 | catLoops: "Lòrigas", 12 | catMath: "Matemàtica", 13 | catText: "Testu", 14 | catLists: "Lista", 15 | catColour: "Colori", 16 | catVariables: "Variabilis", 17 | catFunctions: "Funtzionis", 18 | listVariable: "lista", 19 | textVariable: "testu", 20 | httpRequestError: "Ddui fut unu problema cun sa pregunta", 21 | linkAlert: "Poni is brocus tuus in custu acàpiu:\n\n%1", 22 | hashError: "Mi dispraxit, '%1' non torrat a pari cun nimancu unu de is programas sarvaus.", 23 | xmlError: "Non potzu carrigai su file sarvau. Fortzis est stètiu fatu cun d-una versioni diferenti de Blockly?", 24 | badXml: "Errori in s'anàlisi XML:\n%1\n\nCraca 'OK' po perdi is mudàntzias 'Anudda' po sighì a scriri su XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/sk.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Kód", 3 | blocks: "Bloky", 4 | linkTooltip: "Uložiť a zdieľať odkaz na tento program.", 5 | runTooltip: "Spustiť program, zložený z dielcov na pracovnej ploche.", 6 | badCode: "Chyba v programe:\n%1", 7 | timeout: "Bol prekročený maximálny počet opakovaní.", 8 | discard: "Zmazať všetkých %1 dielcov?", 9 | trashTooltip: "Zahodiť všetky dielce.", 10 | catLogic: "Logika", 11 | catLoops: "Cykly", 12 | catMath: "Matematické", 13 | catText: "Text", 14 | catLists: "Zoznamy", 15 | catColour: "Farby", 16 | catVariables: "Premenné", 17 | catFunctions: "Funkcie", 18 | listVariable: "zoznam", 19 | textVariable: "text", 20 | httpRequestError: "Problém so spracovaním požiadavky.", 21 | linkAlert: "Zdieľať tento program skopírovaním odkazu\n\n%1", 22 | hashError: "Prepáč, '%1' nie je meno žiadnemu uloženému programu.", 23 | xmlError: "Nebolo možné načítať uložený súbor. Možno bol vytvorený v inej verzii Blocky.", 24 | badXml: "Chyba pri parsovaní XML:\n%1\n\nStlačte 'OK' ak chcete zrušiť zmeny alebo 'Zrušiť' pre pokračovanie v úpravách XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/sr.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Кôд", 3 | blocks: "Блокови", 4 | linkTooltip: "Сачувајте и повежите са блоковима.", 5 | runTooltip: "Покрените програм заснован на блоковима у радном простору.", 6 | badCode: "Грешка у програму:\n%1", 7 | timeout: "Достигнут је максималан број понављања у извршавању.", 8 | discard: "Обрисати %1 блокова?", 9 | trashTooltip: "Одбаците све блокове.", 10 | catLogic: "Логика", 11 | catLoops: "Петље", 12 | catMath: "Математика", 13 | catText: "Текст", 14 | catLists: "Спискови", 15 | catColour: "Боја", 16 | catVariables: "Променљиве", 17 | catFunctions: "Процедуре", 18 | listVariable: "списак", 19 | textVariable: "текст", 20 | httpRequestError: "Дошло је до проблема у захтеву.", 21 | linkAlert: "Делите своје блокове овом везом:\n\n%1", 22 | hashError: "„%1“ не одговара ниједном сачуваном програму.", 23 | xmlError: "Не могу да учитам сачувану датотеку. Можда је направљена другом верзијом Blockly-ја.", 24 | badXml: "Грешка при рашчлањивању XML-а:\n%1\n\nПритисните „У реду“ да напустите измене или „Откажи“ да наставите са уређивањем XML датотеке." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/sv.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Kod", 3 | blocks: "Block", 4 | linkTooltip: "Spara och länka till block.", 5 | runTooltip: "Kör programmet som definierats av blocken i arbetsytan.", 6 | badCode: "Programfel:\n%1", 7 | timeout: "Det maximala antalet utförda loopar har överskridits.", 8 | discard: "Radera alla %1 block?", 9 | trashTooltip: "Släng alla block.", 10 | catLogic: "Logik", 11 | catLoops: "Loopar", 12 | catMath: "Matematik", 13 | catText: "Text", 14 | catLists: "Listor", 15 | catColour: "Färg", 16 | catVariables: "Variabler", 17 | catFunctions: "Funktioner", 18 | listVariable: "lista", 19 | textVariable: "text", 20 | httpRequestError: "Det uppstod ett problem med begäran.", 21 | linkAlert: "Dela dina block med denna länk: \n\n%1", 22 | hashError: "Tyvärr, '%1' överensstämmer inte med något sparat program.", 23 | xmlError: "Kunde inte läsa din sparade fil. Den skapades kanske med en annan version av Blockly?", 24 | badXml: "Fel vid parsning av XML:\n%1\n\nKlicka på 'OK' för att strunta i dina ändringar eller 'Avbryt' för att fortsätta redigera XML-koden." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/th.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "เขียนโปรแกรม", 3 | blocks: "บล็อก", 4 | linkTooltip: "บันทึกและสร้างลิงก์มายังบล็อกเหล่านี้", 5 | runTooltip: "เรียกใช้โปรแกรมตามที่กำหนดไว้ด้วยบล็อกที่อยู่ในพื้นที่ทำงาน", 6 | badCode: "โปรแกรมเกิดข้อผิดพลาด:\n%1", 7 | timeout: "โปรแกรมทำงานซ้ำคำสั่งเดิมมากเกินไป", 8 | discard: "ต้องการลบบล็อกทั้ง %1 บล็อกใช่หรือไม่?", 9 | trashTooltip: "ยกเลิกบล็อกทั้งหมด", 10 | catLogic: "ตรรกะ", 11 | catLoops: "การวนซ้ำ", 12 | catMath: "คณิตศาสตร์", 13 | catText: "ข้อความ", 14 | catLists: "รายการ", 15 | catColour: "สี", 16 | catVariables: "ตัวแปร", 17 | catFunctions: "ฟังก์ชัน", 18 | listVariable: "รายการ", 19 | textVariable: "ข้อความ", 20 | httpRequestError: "มีปัญหาเกี่ยวกับการร้องขอ", 21 | linkAlert: "แบ่งปันบล็อกของคุณด้วยลิงก์นี้:\n\n%1", 22 | hashError: "เสียใจด้วย '%1' ไม่ตรงกับโปรแกรมใดๆ ที่เคยบันทึกเอาไว้เลย", 23 | xmlError: "ไม่สามารถโหลดไฟล์ที่บันทึกไว้ของคุณได้ บางทีมันอาจจะถูกสร้างขึ้นด้วย Blockly รุ่นอื่นที่แตกต่างกัน?", 24 | badXml: "เกิดข้อผิดพลาดในการแยกวิเคราะห์ XML:\n%1\n\nเลือก 'ตกลง' เพื่อละทิ้งการเปลี่ยนแปลงต่างๆ ที่ทำไว้ หรือเลือก 'ยกเลิก' เพื่อแก้ไข XML ต่อไป" 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/tlh.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "ngoq", 3 | blocks: "ngoghmey", 4 | linkTooltip: "", 5 | runTooltip: "", 6 | badCode: "Qagh:\n%1", 7 | timeout: "tlhoy nI'qu' poH.", 8 | discard: "Hoch %1 ngoghmey Qaw'?", 9 | trashTooltip: "", 10 | catLogic: "meq", 11 | catLoops: "vIHtaHbogh ghomey", 12 | catMath: "mI'QeD", 13 | catText: "ghItlhHommey", 14 | catLists: "tetlhmey", 15 | catColour: "rItlh", 16 | catVariables: "lIwmey", 17 | catFunctions: "mIwmey", 18 | listVariable: "tetlh", 19 | textVariable: "ghItlhHom", 20 | httpRequestError: "Qapbe' tlhobmeH QIn.", 21 | linkAlert: "latlhvaD ngoghmeylIj DangeHmeH Quvvam yIlo':\n\n%1", 22 | hashError: "Do'Ha', ngogh nab pollu'pu'bogh 'oHbe'law' \"%1\"'e'.", 23 | xmlError: "ngogh nablIj pollu'pu'bogh chu'qa'laHbe' vay'. chaq pollu'pu'DI' ghunmeH ngogh pIm lo'lu'pu'.", 24 | badXml: "XML yajchu'laHbe' vay':\n%1\n\nchoHmeylIj DalonmeH \"ruch\" yIwIv pagh XML DachoHqa'meH \"qIl\" yIwIv." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/tr.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Kod", 3 | blocks: "Bloklar", 4 | linkTooltip: "Blokları ve bağlantı adresini kaydet.", 5 | runTooltip: "Çalışma alanında bloklar tarafından tanımlanan programını çalıştırın.", 6 | badCode: "Program hatası:\n %1", 7 | timeout: "Maksimum yürütme yinelemeleri aşıldı.", 8 | discard: "Tüm %1 blok silinsin mi?", 9 | trashTooltip: "Bütün blokları at.", 10 | catLogic: "Mantık", 11 | catLoops: "Döngüler", 12 | catMath: "Matematik", 13 | catText: "Metin", 14 | catLists: "Listeler", 15 | catColour: "Renk", 16 | catVariables: "Değişkenler", 17 | catFunctions: "İşlevler", 18 | listVariable: "liste", 19 | textVariable: "metin", 20 | httpRequestError: "İstek ile ilgili bir problem var.", 21 | linkAlert: "Bloklarını bu bağlantı ile paylaş:\n\n%1", 22 | hashError: "Üzgünüz, '%1' hiç bir kaydedilmiş program ile uyuşmuyor.", 23 | xmlError: "Kaydedilen dosyanız yüklenemiyor\nBlockly'nin önceki sürümü ile kaydedilmiş olabilir mi?", 24 | badXml: "XML ayrıştırma hatası:\n%1\n\nDeğişikliklerden vazgeçmek için 'Tamam'ı, düzenlemeye devam etmek için 'İptal' seçeneğini seçiniz." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/uk.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Код", 3 | blocks: "Блоки", 4 | linkTooltip: "Зберегти і пов'язати з блоками.", 5 | runTooltip: "Запустіть програму, визначену блоками у робочій області.", 6 | badCode: "Помилка програми:\n%1", 7 | timeout: "Максимальне виконання ітерацій перевищено.", 8 | discard: "Вилучити всі блоки %1?", 9 | trashTooltip: "Відкинути всі блоки.", 10 | catLogic: "Логіка", 11 | catLoops: "Петлі", 12 | catMath: "Математика", 13 | catText: "Текст", 14 | catLists: "Списки", 15 | catColour: "Колір", 16 | catVariables: "Змінні", 17 | catFunctions: "Функції", 18 | listVariable: "список", 19 | textVariable: "текст", 20 | httpRequestError: "Виникла проблема із запитом.", 21 | linkAlert: "Поділитися вашим блоками через посилання:\n\n%1", 22 | hashError: "На жаль, \"%1\" не відповідає жодній збереженій програмі.", 23 | xmlError: "Не вдалося завантажити ваш збережений файл. Можливо, він був створений з іншої версії Blockly?", 24 | badXml: "Помилка синтаксичного аналізу XML:\n%1\n\nВиберіть \"Гаразд\", щоб відмовитися від змін або 'Скасувати' для подальшого редагування XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/vi.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "Chương trình", 3 | blocks: "Các mảnh", 4 | linkTooltip: "Lưu và lấy địa chỉ liên kết.", 5 | runTooltip: "Chạy chương trình.", 6 | badCode: "'Lỗi chương trình:\n%1", 7 | timeout: "Đã vượt quá số lần lặp cho phép.", 8 | discard: "Xóa hết %1 mảnh?", 9 | trashTooltip: "Xóa tất cả mọi mảnh.", 10 | catLogic: "Logic", 11 | catLoops: "Vòng lặp", 12 | catMath: "Công thức toán", 13 | catText: "Văn bản", 14 | catLists: "Danh sách", 15 | catColour: "Màu", 16 | catVariables: "Biến", 17 | catFunctions: "Hàm", 18 | listVariable: "danh sách", 19 | textVariable: "văn bản", 20 | httpRequestError: "Hoạt động bị trục trặc, không thực hiện được yêu cầu của bạn.", 21 | linkAlert: "Chia sẻ chương trình của bạn với liên kết sau:\n\n %1", 22 | hashError: "Không tìm thấy chương trình được lưu ở '%1'.", 23 | xmlError: "Không mở được chương trình của bạn. Có thể nó nằm trong một phiên bản khác của Blockly?", 24 | badXml: "Lỗi sử lý XML:\n %1\n\nChọn 'OK' để từ bỏ các thay đổi hoặc 'Hủy' để tiếp tục chỉnh sửa các XML." 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/zh-hans.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "代码", 3 | blocks: "块", 4 | linkTooltip: "保存模块并生成链接。", 5 | runTooltip: "于工作区中运行块所定义的程式。", 6 | badCode: "程序错误:\n%1", 7 | timeout: "超过最大执行行数。", 8 | discard: "删除所有%1块吗?", 9 | trashTooltip: "放弃所有块。", 10 | catLogic: "逻辑", 11 | catLoops: "循环", 12 | catMath: "数学", 13 | catText: "文本", 14 | catLists: "列表", 15 | catColour: "颜色", 16 | catVariables: "变量", 17 | catFunctions: "函数", 18 | listVariable: "列表", 19 | textVariable: "文本", 20 | httpRequestError: "请求存在问题。", 21 | linkAlert: "通过这个链接分享您的模块:\n\n%1", 22 | hashError: "对不起,没有任何已保存的程序对应'%1' 。", 23 | xmlError: "无法载入您保存的文件。您是否使用其他版本的Blockly创建该文件的?", 24 | badXml: "XML解析错误:\n%1\n\n选择“确定”以取消您对XML的修改,或选择“取消”以继续编辑XML。" 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/msg/zh-hant.js: -------------------------------------------------------------------------------- 1 | var MSG = { 2 | title: "程式碼", 3 | blocks: "積木", 4 | linkTooltip: "儲存積木組並提供連結。", 5 | runTooltip: "於工作區中執行積木組所定義的程式。", 6 | badCode: "程式錯誤:\n%1", 7 | timeout: "超過最大執行數。", 8 | discard: "刪除共%1個積木?", 9 | trashTooltip: "捨棄所有積木。", 10 | catLogic: "邏輯", 11 | catLoops: "迴圈", 12 | catMath: "數學式", 13 | catText: "文字", 14 | catLists: "列表", 15 | catColour: "顏色", 16 | catVariables: "變量", 17 | catFunctions: "流程", 18 | listVariable: "列表", 19 | textVariable: "文字", 20 | httpRequestError: "命令出現錯誤。", 21 | linkAlert: "透過此連結分享您的積木組:\n\n%1", 22 | hashError: "對不起,「%1」並未對應任何已保存的程式。", 23 | xmlError: "未能載入您保存的檔案。或許它是由其他版本的Blockly創建?", 24 | badXml: "解析 XML 時出現錯誤:\n%1\n\n選擇'確定'以放棄您的更改,或選擇'取消'以進一步編輯 XML。" 25 | }; 26 | -------------------------------------------------------------------------------- /blockly/demos/code/style.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | height: 100%; 3 | } 4 | 5 | body { 6 | background-color: #fff; 7 | font-family: sans-serif; 8 | margin: 0; 9 | overflow: hidden; 10 | } 11 | 12 | .farSide { 13 | text-align: right; 14 | } 15 | 16 | html[dir="RTL"] .farSide { 17 | text-align: left; 18 | } 19 | 20 | /* Buttons */ 21 | button { 22 | margin: 5px; 23 | padding: 10px; 24 | border-radius: 4px; 25 | border: 1px solid #ddd; 26 | font-size: large; 27 | background-color: #eee; 28 | color: #000; 29 | } 30 | button.primary { 31 | border: 1px solid #dd4b39; 32 | background-color: #dd4b39; 33 | color: #fff; 34 | } 35 | button.primary>img { 36 | opacity: 1; 37 | } 38 | button>img { 39 | opacity: 0.6; 40 | vertical-align: text-bottom; 41 | } 42 | button:hover>img { 43 | opacity: 1; 44 | } 45 | button:active { 46 | border: 1px solid #888 !important; 47 | } 48 | button:hover { 49 | box-shadow: 2px 2px 5px #888; 50 | } 51 | button.disabled:hover>img { 52 | opacity: 0.6; 53 | } 54 | button.disabled { 55 | display: none; 56 | } 57 | button.notext { 58 | font-size: 10%; 59 | } 60 | 61 | h1 { 62 | font-weight: normal; 63 | font-size: 140%; 64 | margin-left: 5px; 65 | margin-right: 5px; 66 | } 67 | 68 | /* Tabs */ 69 | #tabRow>td { 70 | border: 1px solid #ccc; 71 | border-bottom: none; 72 | } 73 | td.tabon { 74 | border-bottom-color: #ddd !important; 75 | background-color: #ddd; 76 | padding: 5px 19px; 77 | } 78 | td.taboff { 79 | cursor: pointer; 80 | padding: 5px 19px; 81 | } 82 | td.taboff:hover { 83 | background-color: #eee; 84 | } 85 | td.tabmin { 86 | border-top-style: none !important; 87 | border-left-style: none !important; 88 | border-right-style: none !important; 89 | } 90 | td.tabmax { 91 | border-top-style: none !important; 92 | border-left-style: none !important; 93 | border-right-style: none !important; 94 | width: 99%; 95 | padding-left: 10px; 96 | padding-right: 10px; 97 | text-align: right; 98 | } 99 | html[dir=rtl] td.tabmax { 100 | text-align: left; 101 | } 102 | 103 | table { 104 | border-collapse: collapse; 105 | margin: 0; 106 | padding: 0; 107 | border: none; 108 | } 109 | td { 110 | padding: 0; 111 | vertical-align: top; 112 | } 113 | .content { 114 | visibility: hidden; 115 | margin: 0; 116 | padding: 1ex; 117 | position: absolute; 118 | direction: ltr; 119 | } 120 | pre.content { 121 | border: 1px solid #ccc; 122 | overflow: scroll; 123 | } 124 | #content_blocks { 125 | padding: 0; 126 | } 127 | .blocklySvg { 128 | border-top: none !important; 129 | } 130 | #content_xml { 131 | resize: none; 132 | outline: none; 133 | border: 1px solid #ccc; 134 | font-family: monospace; 135 | overflow: scroll; 136 | } 137 | #languageMenu { 138 | vertical-align: top; 139 | margin-top: 15px; 140 | margin-right: 15px; 141 | } 142 | 143 | /* Buttons */ 144 | button { 145 | padding: 1px 10px; 146 | margin: 1px 5px; 147 | } 148 | 149 | /* Sprited icons. */ 150 | .icon21 { 151 | height: 21px; 152 | width: 21px; 153 | background-image: url(icons.png); 154 | } 155 | .trash { 156 | background-position: 0px 0px; 157 | } 158 | .link { 159 | background-position: -21px 0px; 160 | } 161 | .run { 162 | background-position: -42px 0px; 163 | } 164 | -------------------------------------------------------------------------------- /blockly/demos/fixed/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/fixed/icon.png -------------------------------------------------------------------------------- /blockly/demos/fixed/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Blockly Demo: Fixed Blockly 6 | 7 | 8 | 9 | 19 | 20 | 21 |

Blockly > 22 | Demos > Fixed Blockly

23 | 24 |

This is a simple demo of injecting Blockly into a fixed-sized 'div' element.

25 | 26 |

→ More info on injecting fixed-sized Blockly...

27 | 28 |
29 | 30 | 39 | 40 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /blockly/demos/generator/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/generator/icon.png -------------------------------------------------------------------------------- /blockly/demos/graph/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/graph/icon.png -------------------------------------------------------------------------------- /blockly/demos/headless/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/headless/icon.png -------------------------------------------------------------------------------- /blockly/demos/interpreter/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/interpreter/icon.png -------------------------------------------------------------------------------- /blockly/demos/maxBlocks/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/maxBlocks/icon.png -------------------------------------------------------------------------------- /blockly/demos/maxBlocks/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Blockly Demo: Maximum Block Limit 6 | 7 | 8 | 9 | 22 | 23 | 24 |

Blockly > 25 | Demos > Maximum Block Limit

26 | 27 |

This is a demo of Blockly which has been restricted to a maximum of five blocks.

28 | 29 |

You have block(s) left.

30 | 31 |
32 | 33 | 80 | 81 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /blockly/demos/plane/README.txt: -------------------------------------------------------------------------------- 1 | This Blockly demo uses Closure Templates to create a multilingual application. 2 | Any changes to the template.soy file require a recompile. Here is the command 3 | to generate a quick English version for debugging: 4 | 5 | java -jar soy/SoyToJsSrcCompiler.jar --outputPathFormat generated/en.js --srcs template.soy 6 | 7 | To generate a full set of language translations, first extract all the strings 8 | from template.soy using this command: 9 | 10 | java -jar soy/SoyMsgExtractor.jar --outputFile xlf/extracted_msgs.xlf template.soy 11 | 12 | This generates xlf/extracted_msgs.xlf, which may then be used by any 13 | XLIFF-compatible translation console to generate a set of files with the 14 | translated strings. These should be placed in the xlf directory. 15 | 16 | Finally, generate all the language versions wih this command: 17 | 18 | java -jar soy/SoyToJsSrcCompiler.jar --locales ar,be-tarask,br,ca,da,de,el,en,es,fa,fr,he,hrx,hu,ia,is,it,ja,ko,ms,nb,nl,pl,pms,pt-br,ro,ru,sc,sv,th,tr,uk,vi,zh-hans,zh-hant --messageFilePathFormat xlf/translated_msgs_{LOCALE}.xlf --outputPathFormat 'generated/{LOCALE}.js' template.soy 19 | 20 | This is the process that Google uses for maintaining Blockly Games in 40+ 21 | languages. The XLIFF fromat is simple enough that it is trival to write a 22 | Python script to reformat it into some other format (such as JSON) for 23 | compatability with other translation consoles. 24 | 25 | For more information, see message translation for Closure Templates: 26 | https://developers.google.com/closure/templates/docs/translation 27 | -------------------------------------------------------------------------------- /blockly/demos/plane/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/plane/icon.png -------------------------------------------------------------------------------- /blockly/demos/plane/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Blockly Demo: 7 | 8 | 9 | 10 | 11 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /blockly/demos/plane/soy/README: -------------------------------------------------------------------------------- 1 | // Copyright 2009 Google Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | 16 | Contents: 17 | 18 | + SoyToJsSrcCompiler.jar 19 | Executable jar that compiles template files into JavaScript files. 20 | 21 | + SoyMsgExtractor.jar 22 | Executable jar that extracts messages from template files into XLF files. 23 | 24 | + soyutils.js 25 | Helper utilities required by all JavaScript code that SoyToJsSrcCompiler 26 | generates. Equivalent functionality to soyutils_usegoog.js, but this 27 | version does not need Closure Library. 28 | 29 | 30 | Instructions: 31 | 32 | + A simple Hello World for JavaScript: 33 | http://code.google.com/closure/templates/docs/helloworld_js.html 34 | 35 | + Complete documentation: 36 | http://code.google.com/closure/templates/ 37 | 38 | + Closure Templates project on Google Code: 39 | http://code.google.com/p/closure-templates/ 40 | 41 | 42 | Notes: 43 | 44 | + Closure Templates requires Java 6 or higher: 45 | http://www.java.com/ 46 | -------------------------------------------------------------------------------- /blockly/demos/plane/soy/SoyMsgExtractor.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/plane/soy/SoyMsgExtractor.jar -------------------------------------------------------------------------------- /blockly/demos/plane/soy/SoyToJsSrcCompiler.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/plane/soy/SoyToJsSrcCompiler.jar -------------------------------------------------------------------------------- /blockly/demos/plane/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #fff; 3 | font-family: sans-serif; 4 | margin-top: 0; 5 | } 6 | h1 { 7 | font-weight: normal; 8 | font-size: 140%; 9 | } 10 | .farSide { 11 | text-align: right; 12 | } 13 | html[dir="RTL"] .farSide { 14 | text-align: left; 15 | } 16 | .tab { 17 | padding: 6px 12px; 18 | text-decoration: none; 19 | color: #000; 20 | } 21 | #selected { 22 | font-weight: bold; 23 | background-color: #ddd; 24 | border-radius: 20px; 25 | } 26 | 27 | /* Pulse the language menu once to draw attention to it. */ 28 | #languageBorder { 29 | border-radius: 4px; 30 | animation: pulse 2s ease-in-out forwards; 31 | -webkit-animation: pulse 2s ease-in-out forwards; 32 | animation-delay: 2s; 33 | -webkit-animation-delay: 2s; 34 | } 35 | @keyframes pulse { 36 | 0% { background-color: #fff } 37 | 50% { background-color: #f00 } 38 | 100% { background-color: #fff } 39 | } 40 | @-webkit-keyframes pulse { 41 | 0% { background-color: #fff } 42 | 50% { background-color: #f00 } 43 | 100% { background-color: #fff } 44 | } 45 | 46 | #blockly { 47 | height: 300px; 48 | width: 100%; 49 | border-style: solid; 50 | border-color: #ddd; 51 | border-width: 0 1px 1px 0; 52 | } 53 | 54 | /* SVG Plane. */ 55 | #plane { 56 | overflow: hidden; 57 | } 58 | #fuselage { 59 | fill: #fff; 60 | stroke: #000; 61 | } 62 | #wing, #tail { 63 | fill: #ddd; 64 | stroke: #444; 65 | } 66 | .crew { 67 | fill: #f44; 68 | stroke: #000; 69 | } 70 | .seat1st { 71 | fill: #88f; 72 | stroke: #000; 73 | } 74 | .seat2nd { 75 | fill: #8b8; 76 | stroke: #000; 77 | } 78 | #seatYes, #seatNo { 79 | font-size: 40pt; 80 | } 81 | text { 82 | font-family: sans-serif; 83 | font-size: 20pt; 84 | fill: #444; 85 | } 86 | 87 | /* Slider. */ 88 | .sliderTrack { 89 | stroke: #aaa; 90 | stroke-width: 6px; 91 | stroke-linecap: round; 92 | } 93 | .sliderKnob { 94 | fill: #ddd; 95 | stroke: #bbc; 96 | stroke-width: 1px; 97 | stroke-linejoin: round; 98 | } 99 | .sliderKnob:hover { 100 | fill: #eee; 101 | } 102 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_ar.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | الصفوف: %1 8 | 9 | 10 | seats = 11 | المقاعد = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | طائرة بمقعدين في مقطورة الطيّار (للطيار ومساعده) وعدد من المقاعد في صفوف الدرجة الأولى والثانية. كل صف من صفوف الدرجة الأولى يحتوي على أربعة مقاعد. ويحتوي كل صف في الدرجة الثانية على خمسة مقاعد. 16 | 17 | 18 | ? 19 | ؟ 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | لبناء صيغة (أدناه) تقوم بحساب إجمالي عدد المقاعد في الطائرة عند تغيير الصفوف (أعلاه). 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | طائرة بمقعدين في مقطورة الطيّار (للطيار ومساعده) وعدد من الصفوف يحتوي كل صف على أربعة مقاعد. 28 | 29 | 30 | 1st class rows (%1) 31 | صفوف الطبقة الأولى (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | صفوف الفئة الثانية: %1 36 | 37 | 38 | Seats: %1 39 | المقاعد: %1 40 | 41 | 42 | Plane Seat Calculator 43 | آلة حاسبة لمقعد الطائرة 44 | 45 | 46 | rows (%1) 47 | الصفوف (%1) 48 | 49 | 50 | 1st class rows: %1 51 | صفوف الطبقة الأولى: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | هنالك طائرة تحتوي على عدد من صفوف مقاعد الركاب. كل صف يحتوي على أربعة مقاعد. 56 | 57 | 58 | 2nd class rows (%1) 59 | صفوف الفئة الثانية: (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_be-tarask.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | Радкоў: %1 8 | 9 | 10 | seats = 11 | месцаў = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | Самалёт мае два месцы ў кабіне экіпажа (пілот і другі пілот), і некалькі пасажырскіх шэрагаў месцаў 1-га кляса і 2-га кляса. Кожны шэраг 1-га кляса утрымлівае чатыры месцы. Кожны шэраг 2-га кляса ўтрымлівае пяць месцаў. 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | Пабудаваць формулу (ніжэй), якая падлічвае агульную колькасьць месцаў у самалёце пры зьмене радоў (гл. вышэй). 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | Самалёт мае два месцы ў кабіне экіпажа (пілот і другі пілот), і некалькі шэрагаў пасажырскіх сядзеньняў. Кожны шэраг утрымлівае чатыры месцы. 28 | 29 | 30 | 1st class rows (%1) 31 | радкі першага клясу (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | Радкі другога клясу: %1 36 | 37 | 38 | Seats: %1 39 | Месцаў: %1 40 | 41 | 42 | Plane Seat Calculator 43 | Калькулятар месцаў у самалёце 44 | 45 | 46 | rows (%1) 47 | радкоў (%1) 48 | 49 | 50 | 1st class rows: %1 51 | Радкі першага клясу: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | Самалёт мае некалькі шэрагаў пасажырскіх сядзеньняў. Кожная шэраг утрымлівае чатыры месцы. 56 | 57 | 58 | 2nd class rows (%1) 59 | радкі другога клясу (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_da.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | Rækker: %1 8 | 9 | 10 | seats = 11 | sæder = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | Et fly har to pladser i cockpittet (til pilot og med-pilot), og et antal rækker af 1. klasses og 2. klasses passagersæder. Hver 1. klasses række indeholder fire sæder. Hver 2. klasses række indeholder fem sæder. 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | Opbyg en formel (nedenfor), der beregner det samlede antal pladser på flyet, hvis antal rækker ændres (ovenfor). 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | Et fly har to pladser i cockpittet (til pilot og med-pilot), og et antal rækker af passagersæder. Hver række indeholder fire sæder. 28 | 29 | 30 | 1st class rows (%1) 31 | 1. klasse rækker (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | 2. klasse rækker: %1 36 | 37 | 38 | Seats: %1 39 | Sæder: %1 40 | 41 | 42 | Plane Seat Calculator 43 | Flysædelommeregner 44 | 45 | 46 | rows (%1) 47 | rækker (%1) 48 | 49 | 50 | 1st class rows: %1 51 | 1. klasse rækker: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | Et fly har et antal rækker af passagersæder. Hver række indeholder fire sæder. 56 | 57 | 58 | 2nd class rows (%1) 59 | 2. klasse rækker (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_de.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | Reihen: %1 8 | 9 | 10 | seats = 11 | Sitze = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | Ein Flugzeug hat zwei Sitze im Pilotenstand (für den Piloten und Co-Piloten) und eine Anzahl an Reihen mit Passagiersitzen der 1. und 2. Klasse. Jede 1.-Klasse-Reihe enthält vier Sitze. Jede 2.-Klasse-Reihe enthält fünf Sitze. 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | Erstelle eine Formel (unten), die die gesamte Anzahl an Sitzen im Flugzeug berechnet, wenn die Reihen (oben) geändert werden. 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | Ein Flugzeug hat zwei Sitze im Pilotenstand (für den Piloten und Co-Piloten) und eine Anzahl an Reihen mit Passagiersitzen. Jede Reihe enthält vier Sitze. 28 | 29 | 30 | 1st class rows (%1) 31 | Reihen der 1. Klasse (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | Reihen der 2. Klasse: %1 36 | 37 | 38 | Seats: %1 39 | Sitze: %1 40 | 41 | 42 | Plane Seat Calculator 43 | Flugzeugsitzrechner 44 | 45 | 46 | rows (%1) 47 | Reihen (%1) 48 | 49 | 50 | 1st class rows: %1 51 | Reihen der 1. Klasse: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | Ein Flugzeug hat eine Anzahl an Reihen mit Passagiersitzen. Jede Reihe enthält vier Sitze. 56 | 57 | 58 | 2nd class rows (%1) 59 | Reihen der 2. Klasse (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_en.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | Rows: %1 8 | 9 | 10 | seats = 11 | seats = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 28 | 29 | 30 | 1st class rows (%1) 31 | 1st class rows (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | 2nd class rows: %1 36 | 37 | 38 | Seats: %1 39 | Seats: %1 40 | 41 | 42 | Plane Seat Calculator 43 | Plane Seat Calculator 44 | 45 | 46 | rows (%1) 47 | rows (%1) 48 | 49 | 50 | 1st class rows: %1 51 | 1st class rows: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | An airplane has a number of rows of passenger seats. Each row contains four seats. 56 | 57 | 58 | 2nd class rows (%1) 59 | 2nd class rows (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_fa.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | ردیف: %1 8 | 9 | 10 | seats = 11 | صندلی‌ها = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | یک هواپیما دو صندلی در کابین خلبان دارد (برای خلبان و کمک خلبان) و تهداد از صندلی‌ها مسافرین درجه یک و درجه دو. هر ردیف درجه یک شامل چهار صندلی است. هر ردیف درجه دو شامل پنج صندلی است. 16 | 17 | 18 | ? 19 | ؟ 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | یک فرمول بسازید (پایین) که تعداد کل صندلی‌های هواپیما با تغییر ردیف را حساب کند (بالا). 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | یک هواپیما دو صندلی در عرشهٔ پرواز دارد (برای خلبان و کمک خلبان) و تعدادی صندلی مسافرین. هر ردیف شامل چهار صندلی است. 28 | 29 | 30 | 1st class rows (%1) 31 | اولین کلاس ردیف‌ها (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | دومین کلاس ردیف: %1 36 | 37 | 38 | Seats: %1 39 | صندلی‌ها: %1 40 | 41 | 42 | Plane Seat Calculator 43 | محاسبه‌گر صندلی‌های هواپیما 44 | 45 | 46 | rows (%1) 47 | ردیف‌ها (%1) 48 | 49 | 50 | 1st class rows: %1 51 | اولین ردیف کلاس: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | یک هواپیما تعداد از صندلی‌های مسافرین را دارد. هر ردیف شمال چهار صندلی است. 56 | 57 | 58 | 2nd class rows (%1) 59 | دومین کلاس ردیف‌ها (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_he.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | שורות: %1 8 | 9 | 10 | seats = 11 | מושבים = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | במטוס יש שני מושבים עבור הצוות (בשביל הטייס וטייס המשנה), ומספר שורות מושבים במחלקת הנוסעים הראשונה ובמחלקת הנוסעים השנייה. כל שורה במחלקה הראשונה מכילה ארבעה מושבים. כל שורה במחלקה השנייה מכילה חמישה מושבים. 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | בנה נוסחה (למטה) אשר תחשב את סך כל המושבים במטוס בהתאם לשינוי מספר השורות (למעלה). 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | במטוס יש שני מושבים עבור הצוות (בשביל הטייס וטייס המשנה), ומספר שורות עם מושבי נוסעים. בכל שורה יש ארבעה מושבים. 28 | 29 | 30 | 1st class rows (%1) 31 | שורות במחלקה ראשונה (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | שורות במחלקה שנייה: %1 36 | 37 | 38 | Seats: %1 39 | מושבים: %1 40 | 41 | 42 | Plane Seat Calculator 43 | מחשבון מושב במטוס 44 | 45 | 46 | rows (%1) 47 | שורות (%1) 48 | 49 | 50 | 1st class rows: %1 51 | שורות במחלקה ראשונה: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | במטוס יש מספר שורות עם מושבי נוסעים. בכל שורה יש ארבעה מושבים. 56 | 57 | 58 | 2nd class rows (%1) 59 | שורות במחלקה שנייה: (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_hrx.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | Reihe: %1 8 | 9 | 10 | seats = 11 | Sitze = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | En Fluchzeich hot zwooi Sitze im Pilotstand (für den Pilot und Co-Pilot) und en Oonzohl an Reihe mit Passagiersitze der 1. und 2. Klasse. Jede 1.-Klasse-Reih enthält vier Sitze. Jede 2.-Klasse-Reih enthält fünf Sitze. 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | Erstell en Formel (unne), die die gesamte Oonzohl an Sitze im Fluchzeich berechnet, wenn die Reihe (uwe) geännert sin. 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | En Fluchzeich hot zwooi Sitze im Pilotestand (für den Pilot und Co-Pilot) und en Oonzohl an Reihe mit Passagiersitze. Jede Reih enthält vier Sitze. 28 | 29 | 30 | 1st class rows (%1) 31 | Reihe von der 1. Klasse (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | Reihe von der 2. Klasse: %1 36 | 37 | 38 | Seats: %1 39 | Sitz: %1 40 | 41 | 42 | Plane Seat Calculator 43 | Fluchzeichsitzrechner 44 | 45 | 46 | rows (%1) 47 | Reihe (%1) 48 | 49 | 50 | 1st class rows: %1 51 | Reihe von der 1. Klasse: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | En Fluchzeich hot en Oonzohl an Reihe mit Passagiersitze. Jede Reih enthält vier Sitze. 56 | 57 | 58 | 2nd class rows (%1) 59 | Reihe von der 2. Klasse (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_is.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | Raðir: %1 8 | 9 | 10 | seats = 11 | sæti = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | Flugvél er með tvö sæti í stjórnklefa (fyrir flugmanninn og aðstoðarflugmanninn) og einhvern fjölda sætaraða fyrir farþega á 1. og 2. farrými. Hver sætaröð á 1. farrými hefur fjögur sæti. Hver sætaröð á 2. farrými hefur fimm sæti. 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | Búðu til formúlu (hér fyrir neðan) sem reiknar heildarfjölda sæta í flugvélinni eftir því sem röðunum er breytt (hér fyrir ofan). 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | Flugvél er með tvö sæti í stjórnklefa (fyrir flugmanninn og aðstoðarflugmanninn) og einhvern fjölda sætaraða fyrir farþega. Hver sætaröð hefur fjögur sæti. 28 | 29 | 30 | 1st class rows (%1) 31 | raðir 1. farrými (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | Raðir 2. farrými: %1 36 | 37 | 38 | Seats: %1 39 | Sæti: %1 40 | 41 | 42 | Plane Seat Calculator 43 | Flugsætareiknir 44 | 45 | 46 | rows (%1) 47 | raðir (%1) 48 | 49 | 50 | 1st class rows: %1 51 | Raðir 1. farrými: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | Flugvél er með einhvern fjölda sætaraða fyrir farþega. Í hverri röð eru fjögur sæti. 56 | 57 | 58 | 2nd class rows (%1) 59 | raðir 2. farrými (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_ja.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | 列の数: %1 8 | 9 | 10 | seats = 11 | 座席の数 = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | 飛行機には、操縦室の 2 つの座席 (操縦士と副操縦士) と、ファーストクラスとセカンドクラスの乗客の座席の列があります。それぞれの列に、ファーストクラスでは 4 つの座席、セカンドクラスでは 5 つの座席があります。 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | 飛行機の座席の数を計算する式を、上で列の数を変更しても正しくなるように、下に入力してください。 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | 飛行機には、操縦室の 2 つの座席 (操縦士と副操縦士) と、乗客の座席の列があります。それぞれの列に 4 つの座席があります。 28 | 29 | 30 | 1st class rows (%1) 31 | ファーストクラスの列数 (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | セカンドクラスの列数: %1 36 | 37 | 38 | Seats: %1 39 | 座席の数: %1 40 | 41 | 42 | Plane Seat Calculator 43 | 飛行機座席計算機 44 | 45 | 46 | rows (%1) 47 | 列の数 (%1) 48 | 49 | 50 | 1st class rows: %1 51 | ファーストクラスの列数: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | 飛行機に乗客の座席の列があります。それぞれの列に 4 つの座席があります。 56 | 57 | 58 | 2nd class rows (%1) 59 | セカンドクラスの列数 (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_ko.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | 행 수: %1 8 | 9 | 10 | seats = 11 | 좌석수 = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | 비행기는 비행 갑판(조종사와 부조종사용)에서 좌석 두 개가 있고, 1등석과 2등석 승객 좌석의 행 수가 있습니다. 각 1등석 행에는 시트 네 개가 포함되어 있습니다. 각 2등석 행에는 시트 다섯 개가 포함되어 있습니다. 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | 행이 바뀐(위) 비행기에 좌석의 총 수를 계산하는 공식(아래)을 구축하세요. 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | 비행기는 비행 갑판(조종사와 부조종사용)에서 좌석 두 개가 있고, 승객 좌석의 행 수가 있습니다. 각 행에는 시트 네 개가 포함되어 있습니다. 28 | 29 | 30 | 1st class rows (%1) 31 | 1등석 행 수 (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | 2등석 행 수: %1 36 | 37 | 38 | Seats: %1 39 | 좌석 수: %1 40 | 41 | 42 | Plane Seat Calculator 43 | 비행기 좌석 계산기 44 | 45 | 46 | rows (%1) 47 | 행 수 (%1) 48 | 49 | 50 | 1st class rows: %1 51 | 1등석 행 수: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | 비행기는 승객 좌석의 행 수가 있습니다. 각 행에는 시트 네 개가 포함되어 있습니다. 56 | 57 | 58 | 2nd class rows (%1) 59 | 2등석 행 수 (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_nb.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | Rader: %1 8 | 9 | 10 | seats = 11 | seter = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | Et fly har to seter i cockpit (for piloten og andrepiloten), og et antall rader med passasjerseter på første og andre klasse. Hver av radene på første klasse har fire seter. Hver av radene på andre klasse har fem seter. 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | Bygg en formel (under) som beregner det totale antall seter på flyet etter hvert som radene endres (over). 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | Et fly har to seter i cockpit (for piloten og andrepiloten), og et antall rader med passasjerseter. Hver rad inneholder fire seter. 28 | 29 | 30 | 1st class rows (%1) 31 | Rader i første klasse (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | Rader i andre klasse: %1 36 | 37 | 38 | Seats: %1 39 | Seter: %1 40 | 41 | 42 | Plane Seat Calculator 43 | Flysetekalkulator 44 | 45 | 46 | rows (%1) 47 | rader (%1) 48 | 49 | 50 | 1st class rows: %1 51 | Rader i første klasse: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | Et fly har et antall rader med passasjerseter. Hver rad inneholder fire seter. 56 | 57 | 58 | 2nd class rows (%1) 59 | Rader i andre klasse (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_nl.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | Rijen: %1 8 | 9 | 10 | seats = 11 | stoelen= 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | Een vliegtuig heeft twee stoelen in de cockpit (voor de piloot en de copiloot) en een aantal rijen voor 1e klasse en 2e klasse passagiers. Iedere rij in de 1e klasse heeft vier stoelen. Iedere rij in de 2e klasse heeft vijf stoelen. 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | Maak hieronder een formule die het totale aantal stoelen in het vliegtuig berekent als het aantal rijen hierboven wordt aangepast. 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | Een vliegtuig heeft twee stoelen in de cockpit (voor de piloot en de copiloot) en een aantal rijen met stoelen voor passagiers. Iedere rij bevat vier stoelen. 28 | 29 | 30 | 1st class rows (%1) 31 | Rijen 1e klas (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | Rijen 2e klas: %1 36 | 37 | 38 | Seats: %1 39 | Zitplaatsen: %1 40 | 41 | 42 | Plane Seat Calculator 43 | Vliegtuigstoelencalculator 44 | 45 | 46 | rows (%1) 47 | rijen (%1) 48 | 49 | 50 | 1st class rows: %1 51 | Rijen 1e klas: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | Een vliegtuig heeft een aantal rijen met stoelen. Iedere rij heeft vier stoelen. 56 | 57 | 58 | 2nd class rows (%1) 59 | Rijen 2e klas (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_ru.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | Рядов: %1 8 | 9 | 10 | seats = 11 | места = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | В самолёте 2 места для пилота и его помощника, несколько рядов с пассажирскими местами первого класса, а также несколько рядов с пассажирскими местами второго класса. В каждом ряду первого класса 4 места. В каждом ряду второго класса 5 мест. 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | Постройте формулу в области ниже, которая поможет рассчитать общее количество мест в самолёте (как на рисунке выше). 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | В самолёте 2 места для пилота и его помощника, а также несколько рядов с пассажирскими местами. В каждом ряду 4 места. 28 | 29 | 30 | 1st class rows (%1) 31 | ряды 1-го класса (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | Рядов 2-го класса: %1 36 | 37 | 38 | Seats: %1 39 | Мест: %1 40 | 41 | 42 | Plane Seat Calculator 43 | Калькулятор посадочных мест в самолёте 44 | 45 | 46 | rows (%1) 47 | ряды (%1) 48 | 49 | 50 | 1st class rows: %1 51 | Рядов 1-го класса: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | В самолёте несколько рядов с пассажирскими местами. В каждом ряду 4 места. 56 | 57 | 58 | 2nd class rows (%1) 59 | ряды 2-го класса (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_sv.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | Rader: %1 8 | 9 | 10 | seats = 11 | säten = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | Ett flygplan har två säten i cockpiten (ett för piloten och ett för andrepiloten) och ett antal rader med passagerarsäten i första och andra klass. Varje rad i första klass innehåller fyra säten. Varje rad i andra klass innehåller fem säten. 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | Bygg en formel (nedan) som beräknar det totala antalet säten på flygplanet när raderna ändras (ovan). 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | Ett flygplan har två säten i cockpiten (ett för piloten och ett för andrepiloten) och ett antal rader med passagerarsäten. Varje rad innehåller fyra säten. 28 | 29 | 30 | 1st class rows (%1) 31 | Rader i första klass (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | Rader i andra klass: %1 36 | 37 | 38 | Seats: %1 39 | Säten: %1 40 | 41 | 42 | Plane Seat Calculator 43 | Plansäteskalkylator 44 | 45 | 46 | rows (%1) 47 | rader (%1) 48 | 49 | 50 | 1st class rows: %1 51 | Rader i första klass: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | Ett flygplan har ett antal rader med passagerarsäten. Varje rad innehåller fyra säten. 56 | 57 | 58 | 2nd class rows (%1) 59 | Rader i andra klass (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_th.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | %1 แถว 8 | 9 | 10 | seats = 11 | จำนวนที่นั่ง = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | ภายในเครื่องบินจะมีที่นั่งนักบินอยู่ 2 ที่ (สำหรับนักบิน และผู้ช่วยนักบิน) และจะมีแถวที่นั่งสำหรับผู้โดยสาร "ชั้นเฟิร์สคลาส" และ "ชั้นธุรกิจ" อยู่จำนวนหนึ่ง โดยในชั้นเฟิร์สคลาสจะมีแถวละ 4 ที่นั่ง ส่วนในชั้นธุรกิจจะมีแถวละ 5 ที่นั่ง 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | สร้างสูตรคำนวณ (ด้านล่าง) เพื่อคำนวณหาจำนวนที่นั่งทั้งหมดบนเครื่องบิน ตามจำนวนแถวที่เปลี่ยนไป (ด้านบน) 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | ภายในเครื่องบินจะมีที่นั่งนักบินอยู่ 2 ที่ (สำหรับนักบิน และผู้ช่วยนักบิน) และมีแถวที่นั่งผู้โดยสารอยู่จำนวนหนึ่ง ในแต่ละแถวจะมี 4 ที่นั่ง 28 | 29 | 30 | 1st class rows (%1) 31 | จำนวนแถวชั้นเฟิร์สคลาส (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | ชั้นธุรกิจ %1 แถว 36 | 37 | 38 | Seats: %1 39 | คำนวณได้ทั้งหมด %1 ที่นั่ง 40 | 41 | 42 | Plane Seat Calculator 43 | ระบบคำนวณที่นั่งบนเครื่องบิน 44 | 45 | 46 | rows (%1) 47 | จำนวนแถว (%1) 48 | 49 | 50 | 1st class rows: %1 51 | ชั้นเฟิร์สคลาส %1 แถว 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | ภายในเครื่องบินประกอบไปด้วยแถวของที่นั่งผู้โดยสาร ในแต่ละแถวจะมี 4 ที่นั่ง 56 | 57 | 58 | 2nd class rows (%1) 59 | จำนวนแถวชั้นธุรกิจ (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_tr.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | Sıralar: %1 8 | 9 | 10 | seats = 11 | koltuklar = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | Bir uçağın uçuş güvertesinde iki koltuğu (pilot ve yardımcı pilot için), ve belirli sayıda birinci sınıf ve ikinci sınıf yolcu koltuğu sırası vardır. Her birinci sınıf sıra dört koltuk içerir. Her ikinci sınıf sıra beş koltuk içerir. 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | Sıralar(üstte) değiştikçe uçaktaki toplam koltuk sayısını hesaplayan bir formül(altta) oluşturun. 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | Bir uçağın uçuş güvertesinde iki koltuğu (pilot ve yardımcı pilot için), ve belirli sayıda koltuk sırası vardır. Her sıra dört koltuk içerir. 28 | 29 | 30 | 1st class rows (%1) 31 | Birinci sınıf sıralar (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | İkinci sınıf sıralar: %1 36 | 37 | 38 | Seats: %1 39 | Koltuklar: %1 40 | 41 | 42 | Plane Seat Calculator 43 | Uçak Koltuğu Hesaplayıcı 44 | 45 | 46 | rows (%1) 47 | sıralar (%1) 48 | 49 | 50 | 1st class rows: %1 51 | Birinci sınıf sıralar: (%1) 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | Bir uçağın belirli sayıda koltuk sırası vardır. Her sıra dört koltuk içerir. 56 | 57 | 58 | 2nd class rows (%1) 59 | İkinci sınıf sıralar (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_uk.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | Рядки: %1 8 | 9 | 10 | seats = 11 | місць= 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | Літак має два місця в кабіні екіпажу (пілот і другий пілот), і кілька рядів 1-го класу 2-го класу пасажирських місць. Кожний ряд 1-го класу містить чотири місця. Кожен ряд 2-го класу містить п'ять місць. 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | Побудувати формулу (нижче), яка обчислює кількість місць на літаку при зміні рядків (див. вище). 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | Літак має два місця в кабіні екіпажу (пілот і другий пілот), і кілька рядів пасажирських сидінь. Кожен рядок містить чотири місця. 28 | 29 | 30 | 1st class rows (%1) 31 | рядів 1-го класу (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | рядів 2-го класу: %1 36 | 37 | 38 | Seats: %1 39 | Місць: %1 40 | 41 | 42 | Plane Seat Calculator 43 | Калькулятор місць у літаку 44 | 45 | 46 | rows (%1) 47 | рядки (%1) 48 | 49 | 50 | 1st class rows: %1 51 | рядів 1-го класу: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | Літак має кілька рядів пасажирських сидінь. Кожен ряд містить чотири місця. 56 | 57 | 58 | 2nd class rows (%1) 59 | рядів 2-го класу (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_vi.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | Số hàng ghế: %1 8 | 9 | 10 | seats = 11 | Tính số chỗ ngồi = 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | Một chiếc máy bay này có hai chỗ ngồi ở sàn (cho phi công trưởng và phi công phó), và một số hàng ghế hạng 1 và hạng 2. Mỗi hàng hạng 1 có bốn chỗ ngồi. Mỗi hàng hạng 2 có năm chỗ ngồi. 16 | 17 | 18 | ? 19 | ? 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | Dưới đây hãy tạo công thức tính số chỗ ngồi trên máy bay để nó thay đổi tùy theo số lượng hàng ghế (hình trên). 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | Một máy bay có hai ghế trong buồng lái (dành cho phi công trưởng và phi công phụ), và một loạt hàng ghế cho hành khách. Mỗi hàng có bốn ghế (bốn chỗ ngồi). 28 | 29 | 30 | 1st class rows (%1) 31 | số hàng hạng nhất (%1) 32 | 33 | 34 | 2nd class rows: %1 35 | Hàng hạng hai: %1 36 | 37 | 38 | Seats: %1 39 | Số chỗ ngồi: %1 40 | 41 | 42 | Plane Seat Calculator 43 | Máy bay ghế máy tính 44 | 45 | 46 | rows (%1) 47 | đếm số hàng ghế (%1) 48 | 49 | 50 | 1st class rows: %1 51 | Hàng hạng nhất: %1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | Máy bay có một số hàng ghế hành khách. Mỗi hàng có bốn chỗ ngồi. 56 | 57 | 58 | 2nd class rows (%1) 59 | số hàng hạng hai (%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_zh-hans.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | 行:%1 8 | 9 | 10 | seats = 11 | 座位= 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | 一架飞机除了有两个座位供正副驾驶员,还有一定量行数的头等及经济乘客座位。头等每行共四座,经济每行共五座。 16 | 17 | 18 | ? 19 | 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | 于下方写出一条公式以计算飞机上的座位总数。 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | 一架飞机除了有两个座位供正副驾驶员,还有一定量行数的乘客座位。每行共四座。 28 | 29 | 30 | 1st class rows (%1) 31 | 头等行(%1) 32 | 33 | 34 | 2nd class rows: %1 35 | 经济等行:%1 36 | 37 | 38 | Seats: %1 39 | 座位:%1 40 | 41 | 42 | Plane Seat Calculator 43 | 飞机座位计算器 44 | 45 | 46 | rows (%1) 47 | 行 (%1) 48 | 49 | 50 | 1st class rows: %1 51 | 头等行:%1 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | 一架飞机有一定量行数的乘客座位,每行共四座。 56 | 57 | 58 | 2nd class rows (%1) 59 | 经济等行(%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/plane/xlf/translated_msgs_zh-hant.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rows: %1 7 | 排:%1 8 | 9 | 10 | seats = 11 | 座位= 12 | 13 | 14 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats. 15 | 一架飛機除了有兩個座位供正副機師,還有一定量行數的頭等及經濟乘客座位。頭等艙每排都包含四個席位,經濟艙每排都包含五個席位。。 16 | 17 | 18 | ? 19 | 20 | 21 | 22 | Build a formula (below) that calculates the total number of seats on the airplane as the rows are changed (above). 23 | 於下方寫出一條公式以計算飛機上的座位總數。 24 | 25 | 26 | An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats. 27 | 一架飛機除了有兩個座位供正副機師,還有一定量行數的乘客座位。每排都包含四個席位。 28 | 29 | 30 | 1st class rows (%1) 31 | 頭等艙(%1) 32 | 33 | 34 | 2nd class rows: %1 35 | 經濟艙:%1 排 36 | 37 | 38 | Seats: %1 39 | 座位:%1 40 | 41 | 42 | Plane Seat Calculator 43 | 飛機座位計算器 44 | 45 | 46 | rows (%1) 47 | 排(%1) 48 | 49 | 50 | 1st class rows: %1 51 | 頭等艙:%1 排 52 | 53 | 54 | An airplane has a number of rows of passenger seats. Each row contains four seats. 55 | 一架飛機有一定量行數的乘客座位,每排都包含四個席位。 56 | 57 | 58 | 2nd class rows (%1) 59 | 經濟艙(%1) 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /blockly/demos/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} -------------------------------------------------------------------------------- /blockly/demos/realtime/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Blockly Demo: Realtime Collaboration 6 | 7 | 8 | 9 | 10 | 27 | 28 | 29 |

Blockly > 30 | Demos > Realtime Collaboration

31 | 32 |

This is a simple demo of realtime collaboration in Blockly.

33 | 34 |

→ More info on 35 | 36 | realtime collaboration in Blockly...

37 | 38 |
39 |
41 |
42 | 43 | 52 | 53 |

Test realtime collaboration by opening 54 | 55 | this link in a separate browser window or tab and they will be 56 | synchronized. You can even share the link with a friend!.

57 | 58 |
59 |
60 | 61 | 62 | 63 | 64 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /blockly/demos/resizable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/resizable/icon.png -------------------------------------------------------------------------------- /blockly/demos/resizable/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Blockly Demo: Resizable Blockly (Part 1) 6 | 30 | 31 | 32 | 33 | 34 | 44 | 45 | 46 | 49 | 50 |
35 |

Blockly > 36 | Demos > Resizable Blockly (Part 1)

37 | 38 |

The first step in creating a resizable Blockly workspace is to use 39 | CSS or tables to create an area for it. 40 | Next, inject Blockly over that area.

41 | 42 |

→ More info on injecting resizable Blockly...

43 |
47 | Blockly will be positioned here. 48 |
51 | 52 | 53 | -------------------------------------------------------------------------------- /blockly/demos/resizable/overlay.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Blockly Demo: Resizable Blockly (Part 2) 6 | 7 | 8 | 9 | 31 | 32 | 33 | 34 | 35 | 47 | 48 | 49 | 51 | 52 |
36 |

Blockly > 37 | Demos > Resizable Blockly (Part 2)

38 | 39 |

40 | Once an area is defined, Blockly can be 41 | injected and positioned over the area. 42 | A resize handler keeps it in position as the page changes. 43 |

44 | 45 |

→ More info on injecting resizable Blockly...

46 |
50 |
53 | 54 |
55 | 56 | 65 | 66 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /blockly/demos/rtl/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/rtl/icon.png -------------------------------------------------------------------------------- /blockly/demos/storage/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/storage/icon.png -------------------------------------------------------------------------------- /blockly/demos/storage/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Blockly Demo: Cloud Storage 6 | 7 | 8 | 9 | 10 | 25 | 26 | 27 |

Blockly > 28 | Demos > Cloud Storage

29 | 30 |

This is a simple demo of cloud storage using App Engine.

31 | 32 | 43 | 44 |

→ More info on Cloud Storage...

45 | 46 |

47 | 48 |

49 | 50 |
51 | 52 | 81 | 82 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /blockly/demos/toolbox/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/demos/toolbox/icon.png -------------------------------------------------------------------------------- /blockly/generators/dart/variables.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Visual Blocks Language 4 | * 5 | * Copyright 2014 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 | 21 | /** 22 | * @fileoverview Generating Dart for variable blocks. 23 | * @author fraser@google.com (Neil Fraser) 24 | */ 25 | 'use strict'; 26 | 27 | goog.provide('Blockly.Dart.variables'); 28 | 29 | goog.require('Blockly.Dart'); 30 | 31 | 32 | Blockly.Dart['variables_get'] = function(block) { 33 | // Variable getter. 34 | var code = Blockly.Dart.variableDB_.getName(block.getFieldValue('VAR'), 35 | Blockly.Variables.NAME_TYPE); 36 | return [code, Blockly.Dart.ORDER_ATOMIC]; 37 | }; 38 | 39 | Blockly.Dart['variables_set'] = function(block) { 40 | // Variable setter. 41 | var argument0 = Blockly.Dart.valueToCode(block, 'VALUE', 42 | Blockly.Dart.ORDER_ASSIGNMENT) || '0'; 43 | var varName = Blockly.Dart.variableDB_.getName(block.getFieldValue('VAR'), 44 | Blockly.Variables.NAME_TYPE); 45 | return varName + ' = ' + argument0 + ';\n'; 46 | }; 47 | -------------------------------------------------------------------------------- /blockly/generators/javascript/pirobot.js: -------------------------------------------------------------------------------- 1 | Blockly.JavaScript['robot_motor_power'] = function(block) { 2 | var value_power = Blockly.JavaScript.valueToCode(block, 'POWER', 3 | Blockly.JavaScript.ORDER_ATOMIC); 4 | var dropdown_motor = block.getFieldValue('MOTOR'); 5 | 6 | 7 | // Check the input ... 8 | if (value_power > 100) { 9 | alert("Maximum motor power for the robot is 100."); 10 | return ''; 11 | } 12 | if (value_power < -100) { 13 | alert("Minimum motor power for the robot is 100."); 14 | return ''; 15 | } 16 | 17 | // Generate the code ... 18 | var code = 'runPiRobotCommand("setRobotMotorPower", "' + dropdown_motor + '",' + value_power + ');'; 19 | return code; 20 | }; 21 | 22 | Blockly.JavaScript['control_key_down'] = function(block) { 23 | // The inputs ... 24 | var statements_statements = Blockly.JavaScript.statementToCode(block, 'STATEMENTS'); 25 | var dropdown_key = block.getFieldValue('KEY'); 26 | var dropdown_type = block.getFieldValue('TYPE'); 27 | 28 | // Determine the key code to listen for. 29 | var keyCode = 0; 30 | if (dropdown_key === 'UP') { 31 | keyCode = 38; 32 | } else if (dropdown_key === 'DOWN') { 33 | keyCode = 40; 34 | } else if (dropdown_key === 'RIGHT') { 35 | keyCode = 39; 36 | } else if (dropdown_key === 'LEFT') { 37 | keyCode = 37; 38 | } else { 39 | return ''; 40 | } 41 | 42 | // Determine the type of event to listen to. 43 | var type = "keydown"; 44 | if (dropdown_type === 'UP') { 45 | type = "keyup"; 46 | } else if (dropdown_type === 'DOWN') { 47 | type = "keydown"; 48 | } else { 49 | return ''; 50 | } 51 | 52 | // Generate the code for the callback (using only keyCode an charCode). 53 | var callbackCode = 'var code = keyCode; if (charCode && code == 0) {code = charCode;}; if (code ==='+keyCode+') {'+statements_statements+'}'; 54 | callbackCode = callbackCode.replace(/\n/g,"\\n"); 55 | callbackCode = callbackCode.replace(/["]+/g,"\\\""); 56 | 57 | // Assemble JavaScript into code variable. 58 | var code = 'window.addKeyEventListenerForBlock("'+block.id+'", "'+type+'", "'+callbackCode+'");'; 59 | return code; 60 | }; -------------------------------------------------------------------------------- /blockly/generators/javascript/variables.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Visual Blocks Language 4 | * 5 | * Copyright 2012 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 | 21 | /** 22 | * @fileoverview Generating JavaScript for variable blocks. 23 | * @author fraser@google.com (Neil Fraser) 24 | */ 25 | 'use strict'; 26 | 27 | goog.provide('Blockly.JavaScript.variables'); 28 | 29 | goog.require('Blockly.JavaScript'); 30 | 31 | 32 | Blockly.JavaScript['variables_get'] = function(block) { 33 | // Variable getter. 34 | var code = Blockly.JavaScript.variableDB_.getName(block.getFieldValue('VAR'), 35 | Blockly.Variables.NAME_TYPE); 36 | return [code, Blockly.JavaScript.ORDER_ATOMIC]; 37 | }; 38 | 39 | Blockly.JavaScript['variables_set'] = function(block) { 40 | // Variable setter. 41 | var argument0 = Blockly.JavaScript.valueToCode(block, 'VALUE', 42 | Blockly.JavaScript.ORDER_ASSIGNMENT) || '0'; 43 | var varName = Blockly.JavaScript.variableDB_.getName( 44 | block.getFieldValue('VAR'), Blockly.Variables.NAME_TYPE); 45 | return varName + ' = ' + argument0 + ';\n'; 46 | }; 47 | -------------------------------------------------------------------------------- /blockly/generators/python/colour.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Visual Blocks Language 4 | * 5 | * Copyright 2012 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 | 21 | /** 22 | * @fileoverview Generating Python for colour blocks. 23 | * @author fraser@google.com (Neil Fraser) 24 | */ 25 | 'use strict'; 26 | 27 | goog.provide('Blockly.Python.colour'); 28 | 29 | goog.require('Blockly.Python'); 30 | 31 | 32 | Blockly.Python['colour_picker'] = function(block) { 33 | // Colour picker. 34 | var code = '\'' + block.getFieldValue('COLOUR') + '\''; 35 | return [code, Blockly.Python.ORDER_ATOMIC]; 36 | }; 37 | 38 | Blockly.Python['colour_random'] = function(block) { 39 | // Generate a random colour. 40 | Blockly.Python.definitions_['import_random'] = 'import random'; 41 | var code = '\'#%06x\' % random.randint(0, 2**24 - 1)'; 42 | return [code, Blockly.Python.ORDER_FUNCTION_CALL]; 43 | }; 44 | 45 | Blockly.Python['colour_rgb'] = function(block) { 46 | // Compose a colour from RGB components expressed as percentages. 47 | var functionName = Blockly.Python.provideFunction_( 48 | 'colour_rgb', 49 | [ 'def ' + Blockly.Python.FUNCTION_NAME_PLACEHOLDER_ + '(r, g, b):', 50 | ' r = round(min(100, max(0, r)) * 2.55)', 51 | ' g = round(min(100, max(0, g)) * 2.55)', 52 | ' b = round(min(100, max(0, b)) * 2.55)', 53 | ' return \'#%02x%02x%02x\' % (r, g, b)']); 54 | var r = Blockly.Python.valueToCode(block, 'RED', 55 | Blockly.Python.ORDER_NONE) || 0; 56 | var g = Blockly.Python.valueToCode(block, 'GREEN', 57 | Blockly.Python.ORDER_NONE) || 0; 58 | var b = Blockly.Python.valueToCode(block, 'BLUE', 59 | Blockly.Python.ORDER_NONE) || 0; 60 | var code = functionName + '(' + r + ', ' + g + ', ' + b + ')'; 61 | return [code, Blockly.Python.ORDER_FUNCTION_CALL]; 62 | }; 63 | 64 | Blockly.Python['colour_blend'] = function(block) { 65 | // Blend two colours together. 66 | var functionName = Blockly.Python.provideFunction_( 67 | 'colour_blend', 68 | ['def ' + Blockly.Python.FUNCTION_NAME_PLACEHOLDER_ + 69 | '(colour1, colour2, ratio):', 70 | ' r1, r2 = int(colour1[1:3], 16), int(colour2[1:3], 16)', 71 | ' g1, g2 = int(colour1[3:5], 16), int(colour2[3:5], 16)', 72 | ' b1, b2 = int(colour1[5:7], 16), int(colour2[5:7], 16)', 73 | ' ratio = min(1, max(0, ratio))', 74 | ' r = round(r1 * (1 - ratio) + r2 * ratio)', 75 | ' g = round(g1 * (1 - ratio) + g2 * ratio)', 76 | ' b = round(b1 * (1 - ratio) + b2 * ratio)', 77 | ' return \'#%02x%02x%02x\' % (r, g, b)']); 78 | var colour1 = Blockly.Python.valueToCode(block, 'COLOUR1', 79 | Blockly.Python.ORDER_NONE) || '\'#000000\''; 80 | var colour2 = Blockly.Python.valueToCode(block, 'COLOUR2', 81 | Blockly.Python.ORDER_NONE) || '\'#000000\''; 82 | var ratio = Blockly.Python.valueToCode(block, 'RATIO', 83 | Blockly.Python.ORDER_NONE) || 0; 84 | var code = functionName + '(' + colour1 + ', ' + colour2 + ', ' + ratio + ')'; 85 | return [code, Blockly.Python.ORDER_FUNCTION_CALL]; 86 | }; 87 | -------------------------------------------------------------------------------- /blockly/generators/python/variables.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Visual Blocks Language 4 | * 5 | * Copyright 2012 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 | 21 | /** 22 | * @fileoverview Generating Python for variable blocks. 23 | * @author q.neutron@gmail.com (Quynh Neutron) 24 | */ 25 | 'use strict'; 26 | 27 | goog.provide('Blockly.Python.variables'); 28 | 29 | goog.require('Blockly.Python'); 30 | 31 | 32 | Blockly.Python['variables_get'] = function(block) { 33 | // Variable getter. 34 | var code = Blockly.Python.variableDB_.getName(block.getFieldValue('VAR'), 35 | Blockly.Variables.NAME_TYPE); 36 | return [code, Blockly.Python.ORDER_ATOMIC]; 37 | }; 38 | 39 | Blockly.Python['variables_set'] = function(block) { 40 | // Variable setter. 41 | var argument0 = Blockly.Python.valueToCode(block, 'VALUE', 42 | Blockly.Python.ORDER_NONE) || '0'; 43 | var varName = Blockly.Python.variableDB_.getName(block.getFieldValue('VAR'), 44 | Blockly.Variables.NAME_TYPE); 45 | return varName + ' = ' + argument0 + '\n'; 46 | }; 47 | -------------------------------------------------------------------------------- /blockly/i18n/dedup_json.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # Consolidates duplicate key-value pairs in a JSON file. 4 | # If the same key is used with different values, no warning is given, 5 | # and there is no guarantee about which key-value pair will be output. 6 | # There is also no guarantee as to the order of the key-value pairs 7 | # output. 8 | # 9 | # Copyright 2013 Google Inc. 10 | # https://developers.google.com/blockly/ 11 | # 12 | # Licensed under the Apache License, Version 2.0 (the "License"); 13 | # you may not use this file except in compliance with the License. 14 | # You may obtain a copy of the License at 15 | # 16 | # http://www.apache.org/licenses/LICENSE-2.0 17 | # 18 | # Unless required by applicable law or agreed to in writing, software 19 | # distributed under the License is distributed on an "AS IS" BASIS, 20 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | # See the License for the specific language governing permissions and 22 | # limitations under the License. 23 | 24 | import argparse 25 | import codecs 26 | import json 27 | from common import InputError 28 | 29 | 30 | def main(): 31 | """Parses arguments and iterates over files. 32 | 33 | Raises: 34 | IOError: An I/O error occurred with an input or output file. 35 | InputError: Input JSON could not be parsed. 36 | """ 37 | 38 | # Set up argument parser. 39 | parser = argparse.ArgumentParser( 40 | description='Removes duplicate key-value pairs from JSON files.') 41 | parser.add_argument('--suffix', default='', 42 | help='optional suffix for output files; ' 43 | 'if empty, files will be changed in place') 44 | parser.add_argument('files', nargs='+', help='input files') 45 | args = parser.parse_args() 46 | 47 | # Iterate over files. 48 | for filename in args.files: 49 | # Read in json using Python libraries. This eliminates duplicates. 50 | print('Processing ' + filename + '...') 51 | try: 52 | with codecs.open(filename, 'r', 'utf-8') as infile: 53 | j = json.load(infile) 54 | except ValueError, e: 55 | print('Error reading ' + filename) 56 | raise InputError(file, str(e)) 57 | 58 | # Built up output strings as an array to make output of delimiters easier. 59 | output = [] 60 | for key in j: 61 | if key != '@metadata': 62 | output.append('\t"' + key + '": "' + 63 | j[key].replace('\n', '\\n') + '"') 64 | 65 | # Output results. 66 | with codecs.open(filename + args.suffix, 'w', 'utf-8') as outfile: 67 | outfile.write('{\n') 68 | outfile.write(',\n'.join(output)) 69 | outfile.write('\n}\n') 70 | 71 | 72 | if __name__ == '__main__': 73 | main() 74 | -------------------------------------------------------------------------------- /blockly/i18n/tests.py: -------------------------------------------------------------------------------- 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.assert_(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() 48 | -------------------------------------------------------------------------------- /blockly/media/1x1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/media/1x1.gif -------------------------------------------------------------------------------- /blockly/media/anon.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/media/anon.jpeg -------------------------------------------------------------------------------- /blockly/media/click.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/media/click.mp3 -------------------------------------------------------------------------------- /blockly/media/click.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/media/click.ogg -------------------------------------------------------------------------------- /blockly/media/click.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/media/click.wav -------------------------------------------------------------------------------- /blockly/media/delete.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/media/delete.mp3 -------------------------------------------------------------------------------- /blockly/media/delete.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/media/delete.ogg -------------------------------------------------------------------------------- /blockly/media/delete.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/media/delete.wav -------------------------------------------------------------------------------- /blockly/media/handclosed.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/media/handclosed.cur -------------------------------------------------------------------------------- /blockly/media/handdelete.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/media/handdelete.cur -------------------------------------------------------------------------------- /blockly/media/handopen.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/media/handopen.cur -------------------------------------------------------------------------------- /blockly/media/icons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 24 | 25 | 26 | 27 | 28 | ? 29 | 30 | 31 | 32 | 39 | 40 | 41 | 42 | ! 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /blockly/media/progress.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/media/progress.gif -------------------------------------------------------------------------------- /blockly/media/quote0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/media/quote0.png -------------------------------------------------------------------------------- /blockly/media/quote1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/media/quote1.png -------------------------------------------------------------------------------- /blockly/media/sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/blockly/media/sprites.png -------------------------------------------------------------------------------- /blockly/media/sprites.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /blockly/msg/json/synonyms.json: -------------------------------------------------------------------------------- 1 | {"PROCEDURES_DEFRETURN_TITLE": "PROCEDURES_DEFNORETURN_TITLE", "LISTS_GET_SUBLIST_INPUT_IN_LIST": "LISTS_INLIST", "LISTS_SET_INDEX_INPUT_IN_LIST": "LISTS_INLIST", "PROCEDURES_DEFRETURN_PROCEDURE": "PROCEDURES_DEFNORETURN_PROCEDURE", "VARIABLES_SET_ITEM": "VARIABLES_DEFAULT_NAME", "LISTS_CREATE_WITH_ITEM_TITLE": "VARIABLES_DEFAULT_NAME", "CONTROLS_IF_ELSE_TITLE_ELSE": "CONTROLS_IF_MSG_ELSE", "VARIABLES_GET_ITEM": "VARIABLES_DEFAULT_NAME", "PROCEDURES_DEFRETURN_DO": "PROCEDURES_DEFNORETURN_DO", "LISTS_GET_INDEX_HELPURL": "LISTS_INDEX_OF_HELPURL", "TEXT_CREATE_JOIN_ITEM_TITLE_ITEM": "VARIABLES_DEFAULT_NAME", "CONTROLS_IF_MSG_THEN": "CONTROLS_REPEAT_INPUT_DO", "LISTS_INDEX_OF_INPUT_IN_LIST": "LISTS_INLIST", "PROCEDURES_CALLRETURN_CALL": "PROCEDURES_CALLNORETURN_CALL", "LISTS_GET_INDEX_INPUT_IN_LIST": "LISTS_INLIST", "CONTROLS_IF_ELSEIF_TITLE_ELSEIF": "CONTROLS_IF_MSG_ELSEIF", "CONTROLS_FOREACH_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_IF_IF_TITLE_IF": "CONTROLS_IF_MSG_IF", "CONTROLS_WHILEUNTIL_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_FOR_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "TEXT_APPEND_VARIABLE": "VARIABLES_DEFAULT_NAME", "MATH_CHANGE_TITLE_ITEM": "VARIABLES_DEFAULT_NAME"} -------------------------------------------------------------------------------- /blockly/tests/generators/unittest.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Visual Blocks Language 4 | * 5 | * Copyright 2012 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 | 21 | /** 22 | * @fileoverview Unit test blocks for Blockly. 23 | * @author fraser@google.com (Neil Fraser) 24 | */ 25 | 'use strict'; 26 | 27 | Blockly.Blocks['unittest_main'] = { 28 | // Container for unit tests. 29 | init: function() { 30 | this.setColour(65); 31 | this.appendDummyInput() 32 | .appendField('run tests'); 33 | this.appendStatementInput('DO'); 34 | this.setTooltip('Executes the enclosed unit tests,\n' + 35 | 'then prints a summary.'); 36 | }, 37 | getVars: function() { 38 | return ['unittestResults']; 39 | } 40 | }; 41 | 42 | Blockly.Blocks['unittest_assertequals'] = { 43 | // Asserts that a value equals another value. 44 | init: function() { 45 | this.setColour(65); 46 | this.setPreviousStatement(true); 47 | this.setNextStatement(true); 48 | this.appendDummyInput() 49 | .appendField(new Blockly.FieldTextInput('test name'), 'MESSAGE'); 50 | this.appendValueInput('ACTUAL', null) 51 | .appendField('actual'); 52 | this.appendValueInput('EXPECTED', null) 53 | .appendField('expected'); 54 | this.setTooltip('Tests that "actual == expected".'); 55 | }, 56 | getVars: function() { 57 | return ['unittestResults']; 58 | } 59 | }; 60 | 61 | Blockly.Blocks['unittest_assertvalue'] = { 62 | // Asserts that a value is true, false, or null. 63 | init: function() { 64 | this.setColour(65); 65 | this.setPreviousStatement(true); 66 | this.setNextStatement(true); 67 | this.appendDummyInput() 68 | .appendField(new Blockly.FieldTextInput('test name'), 'MESSAGE'); 69 | this.appendValueInput('ACTUAL', Boolean) 70 | .appendField('assert') 71 | .appendField(new Blockly.FieldDropdown( 72 | [['true', 'TRUE'], ['false', 'FALSE'], ['null', 'NULL']]), 'EXPECTED'); 73 | this.setTooltip('Tests that the value is true, false, or null.'); 74 | }, 75 | getVars: function() { 76 | return ['unittestResults']; 77 | } 78 | }; 79 | 80 | Blockly.Blocks['unittest_fail'] = { 81 | // Always assert an error. 82 | init: function() { 83 | this.setColour(65); 84 | this.setPreviousStatement(true); 85 | this.setNextStatement(true); 86 | this.appendDummyInput() 87 | .appendField(new Blockly.FieldTextInput('test name'), 'MESSAGE') 88 | .appendField('fail'); 89 | this.setTooltip('Records an error.'); 90 | }, 91 | getVars: function() { 92 | return ['unittestResults']; 93 | } 94 | }; 95 | -------------------------------------------------------------------------------- /blockly/tests/generators/variables.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | item 6 | 7 | 8 | 123 9 | 10 | 11 | 12 | 13 | variable 14 | 15 | 16 | item 17 | 18 | 19 | 20 | 21 | 123 22 | 23 | 24 | 25 | 26 | if 27 | 28 | 29 | 123 30 | 31 | 32 | 33 | 34 | reserved variable 35 | 36 | 37 | if 38 | 39 | 40 | 41 | 42 | 123 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /blockly/tests/jsunit/generator_test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Blockly Tests 4 | * 5 | * Copyright 2012 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 | 'use strict'; 21 | 22 | function test_prefix() { 23 | var generator = new Blockly.Generator('INTERCAL'); 24 | assertEquals('Prefix nothing.', '', generator.prefixLines('', '')); 25 | assertEquals('Prefix a word.', '@Hello', generator.prefixLines('Hello', '@')); 26 | assertEquals('Prefix one line.', '12Hello\n', generator.prefixLines('Hello\n', '12')); 27 | assertEquals('Prefix two lines.', '***Hello\n***World\n', generator.prefixLines('Hello\nWorld\n', '***')); 28 | } 29 | -------------------------------------------------------------------------------- /blockly/tests/jsunit/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Unit Tests for Blockly 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /blockly/tests/jsunit/names_test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Blockly Tests 4 | * 5 | * Copyright 2012 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 | 'use strict'; 21 | 22 | function test_safeName() { 23 | var varDB = new Blockly.Names('window,door'); 24 | assertEquals('SafeName empty.', 'unnamed', varDB.safeName_('')); 25 | assertEquals('SafeName ok.', 'foobar', varDB.safeName_('foobar')); 26 | assertEquals('SafeName number start.', 'my_9lives', 27 | varDB.safeName_('9lives')); 28 | assertEquals('SafeName number end.', 'lives9', varDB.safeName_('lives9')); 29 | assertEquals('SafeName special chars.', '____', varDB.safeName_('!@#$')); 30 | assertEquals('SafeName reserved.', 'door', varDB.safeName_('door')); 31 | } 32 | 33 | function test_getName() { 34 | var varDB = new Blockly.Names('window,door'); 35 | assertEquals('Name add #1.', 'Foo_bar', varDB.getName('Foo.bar', 'var')); 36 | assertEquals('Name get #1.', 'Foo_bar', varDB.getName('Foo.bar', 'var')); 37 | assertEquals('Name add #2.', 'Foo_bar2', varDB.getName('Foo bar', 'var')); 38 | assertEquals('Name get #2.', 'Foo_bar2', varDB.getName('foo BAR', 'var')); 39 | assertEquals('Name add #3.', 'door2', varDB.getName('door', 'var')); 40 | assertEquals('Name add #4.', 'Foo_bar3', varDB.getName('Foo.bar', 'proc')); 41 | assertEquals('Name get #1b.', 'Foo_bar', varDB.getName('Foo.bar', 'var')); 42 | assertEquals('Name get #4.', 'Foo_bar3', varDB.getName('Foo.bar', 'proc')); 43 | } 44 | 45 | function test_getDistinctName() { 46 | var varDB = new Blockly.Names('window,door'); 47 | assertEquals('Name distinct #1.', 'Foo_bar', 48 | varDB.getDistinctName('Foo.bar', 'var')); 49 | assertEquals('Name distinct #2.', 'Foo_bar2', 50 | varDB.getDistinctName('Foo.bar', 'var')); 51 | assertEquals('Name distinct #3.', 'Foo_bar3', 52 | varDB.getDistinctName('Foo.bar', 'proc')); 53 | varDB.reset(); 54 | assertEquals('Name distinct #4.', 'Foo_bar', 55 | varDB.getDistinctName('Foo.bar', 'var')); 56 | } 57 | 58 | function test_nameEquals() { 59 | assertTrue('Name equals #1.', Blockly.Names.equals('Foo.bar', 'Foo.bar')); 60 | assertFalse('Name equals #2.', Blockly.Names.equals('Foo.bar', 'Foo_bar')); 61 | assertTrue('Name equals #3.', Blockly.Names.equals('Foo.bar', 'FOO.BAR')); 62 | } 63 | -------------------------------------------------------------------------------- /blockly/tests/jsunit/xml_test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Blockly Tests 4 | * 5 | * Copyright 2014 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 | 'use strict'; 21 | 22 | var XML_TEXT = ['', 23 | ' ', 24 | ' ', 25 | ' ', 26 | ' 10', 27 | ' ', 28 | ' ', 29 | ' ', 30 | ' ', 31 | ' item', 32 | ' ', 33 | ' ', 34 | ' ', 35 | ' ', 36 | ' ', 37 | ' ', 38 | ' ', 39 | ' Hello', 40 | ' ', 41 | ' ', 42 | ' ', 43 | ' ', 44 | ' ', 45 | ' ', 46 | ' ', 47 | ''].join('/n'); 48 | 49 | function test_textToDom() { 50 | var dom = Blockly.Xml.textToDom(XML_TEXT); 51 | assertEquals('XML tag', 'xml', dom.nodeName); 52 | assertEquals('Block tags', 6, dom.getElementsByTagName('block').length); 53 | } 54 | 55 | function test_domToText() { 56 | var dom = Blockly.Xml.textToDom(XML_TEXT); 57 | var text = Blockly.Xml.domToText(dom); 58 | assertEquals('Round trip', XML_TEXT.replace(/\s+/g, ''), 59 | text.replace(/\s+/g, '')); 60 | } 61 | 62 | function test_domToPrettyText() { 63 | var dom = Blockly.Xml.textToDom(XML_TEXT); 64 | var text = Blockly.Xml.domToPrettyText(dom); 65 | assertEquals('Round trip', XML_TEXT.replace(/\s+/g, ''), 66 | text.replace(/\s+/g, '')); 67 | } 68 | -------------------------------------------------------------------------------- /css/mam.css~: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | } 4 | .starter-template { 5 | padding: 40px 15px; 6 | text-align: center; 7 | } 8 | -------------------------------------------------------------------------------- /css/page.css: -------------------------------------------------------------------------------- 1 | .container-fluid { 2 | padding: 0px; 3 | } 4 | 5 | h1 { 6 | margin: 16px; 7 | margin-left: 10px; 8 | margin-right: 10px; 9 | } 10 | 11 | #buttonGroup { 12 | margin: 10px; 13 | margin-left: 10px; 14 | margin-right: 10px; 15 | } 16 | 17 | #errorMsgContainer { 18 | padding-top: 5px; 19 | padding-bottom: 5px; 20 | margin: 11px; 21 | text-align: center; 22 | } -------------------------------------------------------------------------------- /css/page.css~: -------------------------------------------------------------------------------- 1 | *{ 2 | margin:0; 3 | padding:0; 4 | } 5 | body{ 6 | font:13px/18px Helvetica Neue,Helvetica,Arial,sans-serif; 7 | text-align:baseline; 8 | background:#ede9e5; 9 | } 10 | 11 | ul.buttonGroup{ 12 | display:block; 13 | list-style:none; 14 | overflow:hidden; 15 | margin-left:5px; 16 | 17 | /* for demo purpose only */ 18 | width: 200px; margin: 50px auto; 19 | } 20 | li{ 21 | display:block; 22 | float:left; 23 | } 24 | li a{ 25 | display:block; 26 | font-weight:bold; 27 | text-decoration:none; 28 | color:#888; 29 | text-shadow:0 1px #fff; 30 | border:1px solid #d5d5d5; 31 | border-bottom-color:#ddd; 32 | background:#ddd; 33 | background:-webkit-gradient(linear,left top,left bottom,color-stop(.25, #eee),color-stop(1, #ddd)); 34 | background: -webkit-linear-gradient(top,#eee 25%,#ddd 100%); 35 | background: -moz-linear-gradient(top,#eee 25%,#ddd 100%); 36 | background: -o-linear-gradient(top,#eee 25%,#ddd 100%); 37 | background: linear-gradient(top,#eee 25%,#ddd 100%); 38 | -webkit-box-shadow:inset 0 1px 2px rgba(255,255,255,0.1); 39 | -moz-box-shadow:inset 0 1px 2px rgba(255,255,255,0.1); 40 | box-shadow:inset 0 1px 2px rgba(255,255,255,0.1); 41 | } 42 | li:first-child a{ 43 | padding:4px 12px 6px 16px; 44 | border-right:0; 45 | -webkit-border-radius:18px 0 0 18px; 46 | -moz-border-radius:18px 0 0 18px; 47 | border-radius:18px 0 0 18px; 48 | } 49 | li:last-child a{ 50 | padding:4px 16px 6px 12px; 51 | -webkit-border-radius:0 18px 18px 0; 52 | -moz-border-radius:0 18px 18px 0; 53 | border-radius:0 18px 18px 0; 54 | } 55 | li a:hover{ 56 | background:#eee; 57 | background:-webkit-gradient(linear,left top,left bottom,color-stop(.25, #fff),color-stop(1, #eee)); 58 | background: -webkit-linear-gradient(top,#fff 25%,#eee 100%); 59 | background: -moz-linear-gradient(top,#fff 25%,#eee 100%); 60 | background: -o-linear-gradient(top,#fff 25%,#eee 100%); 61 | background: linear-gradient(top,#fff 25%,#eee 100%); 62 | } 63 | li a:active{ 64 | text-shadow:0 -1px #fff; 65 | background:#ccc; 66 | background:-webkit-gradient(linear,left top,left bottom,color-stop(.25, #eee),color-stop(1, #fff)); 67 | background: -webkit-linear-gradient(top,#eee 25%,#fff 100%); 68 | background: -moz-linear-gradient(top,#eee 25%,#fff 100%); 69 | background: -o-linear-gradient(top,#eee 25%,#fff 100%); 70 | background: linear-gradient(top,#eee 25%,#fff 100%); 71 | -webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1); 72 | -moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1); 73 | box-shadow:inset 0 1px 2px rgba(0,0,0,0.1); 74 | } 75 | -------------------------------------------------------------------------------- /img/demo/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karstenda/BlocklyPi/6d8ca6e633a693acbf6a1ef3d48f1fd4f9642dec/img/demo/demo.gif -------------------------------------------------------------------------------- /js/lib/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-xmlrpc", 3 | "version": "0.2.0", 4 | "main": ["jquery.xmlrpc.js", "jquery.xmlrpc.min.js"], 5 | "dependencies": { 6 | "jquery": "~1.10.2", 7 | "jquery-mockjax": "~1.5.3" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /js/lib/xmlrpc.jquery.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "xmlrpc", 3 | "version": "0.4.3", 4 | "title": "XML-RPC over AJAX", 5 | "description": "Interact with remote XML-RPC services using AJAX", 6 | "author": { 7 | "name": "Tim Heap", 8 | "email": "heap.tim@gmail.com", 9 | "url": "http://timheap.me" 10 | }, 11 | "licenses": [ 12 | {"url": "http://unlicense.org/"} 13 | ], 14 | "dependencies": { 15 | "jquery": ">1.8.0" 16 | }, 17 | "keywords": [ 18 | "xmlrpc", "xml-rpc", 19 | "ajax", 20 | "xml", 21 | "remote-service" 22 | ], 23 | "homepage": "https://github.com/timheap/jquery-xmlrpc", 24 | "docs": "http://jquery-xml-rpc.readthedocs.org/" 25 | } 26 | -------------------------------------------------------------------------------- /js_interpreter/README.md: -------------------------------------------------------------------------------- 1 | JS-Interpreter 2 | ============== 3 | 4 | A sandboxed JavaScript interpreter in JavaScript. Execute arbitrary JavaScript 5 | code line by line in isolation and safety. 6 | 7 | Live demo: 8 | https://neil.fraser.name/software/JS-Interpreter/ 9 | 10 | Documentation: 11 | https://neil.fraser.name/software/JS-Interpreter/docs.html 12 | -------------------------------------------------------------------------------- /robot/__init__.py: -------------------------------------------------------------------------------- 1 | import RPi.GPIO as GPIO 2 | 3 | # Set the mode of GPIO pins. 4 | GPIO.setmode(GPIO.BCM) -------------------------------------------------------------------------------- /robot/setMotorPower.py: -------------------------------------------------------------------------------- 1 | import RPi.GPIO as GPIO 2 | 3 | # GPIO PIN Configuration 4 | RIGHT_MOTOR_FORWARD_GPIO_PIN = 18 5 | RIGHT_MOTOR_BACKWARD_GPIO_PIN = 17 6 | LEFT_MOTOR_FORWARD_GPIO_PIN = 23 7 | LEFT_MOTOR_BACKWARD_GPIO_PIN = 22 8 | 9 | # Global variables 10 | FORWARD_POWER_RIGHT = None; 11 | BACKWARD_POWER_RIGHT = None; 12 | FORWARD_POWER_LEFT = None; 13 | BACKWARD_POWER_LEFT = None; 14 | 15 | 16 | def init(): 17 | """ Initiate and configure the variables needed for the 'setRobotMotorPower' command.""" 18 | 19 | # This function will assign the following global variables: 20 | global FORWARD_POWER_RIGHT 21 | global BACKWARD_POWER_RIGHT 22 | global FORWARD_POWER_LEFT 23 | global BACKWARD_POWER_LEFT 24 | 25 | # Motor Right 26 | GPIO.setup(17, GPIO.OUT) 27 | GPIO.setup(18, GPIO.OUT) 28 | FORWARD_POWER_RIGHT = GPIO.PWM(18, 100) 29 | BACKWARD_POWER_RIGHT = GPIO.PWM(17, 100) 30 | FORWARD_POWER_RIGHT.start(0) 31 | BACKWARD_POWER_RIGHT.start(0) 32 | 33 | # Motor Left 34 | GPIO.setup(22, GPIO.OUT) 35 | GPIO.setup(23, GPIO.OUT) 36 | FORWARD_POWER_LEFT = GPIO.PWM(23, 100) 37 | BACKWARD_POWER_LEFT = GPIO.PWM(22, 100) 38 | FORWARD_POWER_LEFT.start(0) 39 | BACKWARD_POWER_LEFT.start(0) 40 | 41 | 42 | def set(motor, power): 43 | """ Execute the 'setRobotMotorPower' command. """ 44 | 45 | # Set the power of left motor. 46 | if motor == "LEFT": 47 | if power > 0: 48 | FORWARD_POWER_LEFT.ChangeDutyCycle(power) 49 | BACKWARD_POWER_LEFT.ChangeDutyCycle(0) 50 | elif power == 0: 51 | FORWARD_POWER_LEFT.ChangeDutyCycle(0) 52 | BACKWARD_POWER_LEFT.ChangeDutyCycle(0) 53 | else: 54 | FORWARD_POWER_LEFT.ChangeDutyCycle(0) 55 | BACKWARD_POWER_LEFT.ChangeDutyCycle(-power) 56 | 57 | elif motor == "RIGHT": 58 | if power > 0: 59 | FORWARD_POWER_RIGHT.ChangeDutyCycle(power) 60 | BACKWARD_POWER_RIGHT.ChangeDutyCycle(0) 61 | elif power == 0: 62 | FORWARD_POWER_RIGHT.ChangeDutyCycle(0) 63 | BACKWARD_POWER_RIGHT.ChangeDutyCycle(0) 64 | else: 65 | FORWARD_POWER_RIGHT.ChangeDutyCycle(0) 66 | BACKWARD_POWER_RIGHT.ChangeDutyCycle(-power) 67 | 68 | return 0; -------------------------------------------------------------------------------- /server.py: -------------------------------------------------------------------------------- 1 | import SimpleHTTPServer 2 | import SimpleXMLRPCServer 3 | import robot.setMotorPower as RobotMotorPower 4 | 5 | def registerRobotXmlRpcMethods(server): 6 | 7 | # Register standard XML-RPC methods. 8 | server.register_introspection_functions() 9 | 10 | # Register the motor power command function. 11 | RobotMotorPower.init() 12 | server.register_function(RobotMotorPower.set,'setRobotMotorPower') 13 | 14 | 15 | 16 | 17 | # We define a custom server request handler, capable of both handling GET and XML-RPC requests. 18 | class RequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler, SimpleHTTPServer.SimpleHTTPRequestHandler): 19 | rpc_paths = ('/RobotControlService',) 20 | 21 | def do_GET(self): 22 | SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self) 23 | 24 | 25 | 26 | 27 | # Start running the server ... 28 | if __name__ == "__main__": 29 | 30 | # Create our XML-RPC server.using out custom request handler that is also able to serve web pages over GET. 31 | port = 8080 32 | server = SimpleXMLRPCServer.SimpleXMLRPCServer(("", port), RequestHandler) 33 | 34 | # Register the XML-RPC methods ... 35 | registerRobotXmlRpcMethods(server) 36 | 37 | # Start to server. 38 | server.serve_forever() 39 | -------------------------------------------------------------------------------- /server_test.py: -------------------------------------------------------------------------------- 1 | import SimpleHTTPServer 2 | import SimpleXMLRPCServer 3 | 4 | 5 | def registerRobotXmlRpcMethods(server): 6 | 7 | # Register standard XML-RPC methods. 8 | server.register_introspection_functions() 9 | 10 | # Register the motor power command function. 11 | server.register_function(dummyMotorPowerMethod,'setRobotMotorPower') 12 | 13 | 14 | def dummyMotorPowerMethod(motor, power): 15 | print('Motor '+motor+' was set to '+ str(power)) 16 | return 0; 17 | 18 | 19 | 20 | # We define a custom server request handler, capable of both handling GET and XML-RPC requests. 21 | class RequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler, SimpleHTTPServer.SimpleHTTPRequestHandler): 22 | rpc_paths = ('/RobotControlService',) 23 | 24 | def do_GET(self): 25 | SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self) 26 | 27 | 28 | 29 | 30 | # Start running the server ... 31 | if __name__ == "__main__": 32 | 33 | # Create our XML-RPC server.using out custom request handler that is also able to serve web pages over GET. 34 | port = 8080 35 | server = SimpleXMLRPCServer.SimpleXMLRPCServer(("", port), RequestHandler) 36 | 37 | # Register the XML-RPC methods ... 38 | registerRobotXmlRpcMethods(server) 39 | 40 | # Start to server. 41 | server.serve_forever() 42 | --------------------------------------------------------------------------------