From c2582930a75aa7564290d7ba6e1a7e5f93e73ffb Mon Sep 17 00:00:00 2001 From: Gubolin Date: Sat, 6 Sep 2014 14:34:29 +0200 Subject: prepare for packaging for android using cordova --- config.xml | 15 +++++++++++++++ mobile.sh | 9 +++++++++ 2 files changed, 24 insertions(+) create mode 100644 config.xml create mode 100644 mobile.sh diff --git a/config.xml b/config.xml new file mode 100644 index 0000000..d78e26d --- /dev/null +++ b/config.xml @@ -0,0 +1,15 @@ + + + Snap! + + Snap! Build Your Own Blocks + A visual, blocks based programming language inspired by Scratch + + + Jens Mönig and Brian Harvey + + + + + + diff --git a/mobile.sh b/mobile.sh new file mode 100644 index 0000000..b794b52 --- /dev/null +++ b/mobile.sh @@ -0,0 +1,9 @@ +#!/bin/bash +cordova create Snap-Mobile edu.berkeley.snap "Snap\!" +cd Snap-Mobile +rm -rf www config.xml +git clone https://github.com/Gubolin/snap.git www +cd www +git checkout mobileapp +cordova platform add android +cordova build android -- cgit v1.3.1 From e010c3ba9a58219ff0fdc92349d70d0feea715f2 Mon Sep 17 00:00:00 2001 From: Gubolin Date: Sat, 6 Sep 2014 15:14:42 +0200 Subject: add notes to dependencies and binaries --- mobile.sh | 7 +++++++ 1 file changed, 7 insertions(+) mode change 100644 => 100755 mobile.sh diff --git a/mobile.sh b/mobile.sh old mode 100644 new mode 100755 index b794b52..0f660d1 --- a/mobile.sh +++ b/mobile.sh @@ -1,4 +1,11 @@ #!/bin/bash + +# Requirements: +# git, nodejs, android SDK / other platform(s) +# cordova (https://cordova.apache.org/) + +# binaries are in platform/android/ant-build/Snap-debug.apk + cordova create Snap-Mobile edu.berkeley.snap "Snap\!" cd Snap-Mobile rm -rf www config.xml -- cgit v1.3.1 From 23664e86b4e92c74d7ed64152b66709e5b2e5253 Mon Sep 17 00:00:00 2001 From: Gubolin Date: Sat, 6 Sep 2014 15:15:11 +0200 Subject: prepare for packaging for desktop using node-webkit --- desktop.sh | 12 ++++++++++++ package.json | 8 ++++++++ 2 files changed, 20 insertions(+) create mode 100755 desktop.sh create mode 100644 package.json diff --git a/desktop.sh b/desktop.sh new file mode 100755 index 0000000..46a7594 --- /dev/null +++ b/desktop.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Requirements: +# git, zip, nodejs +# node-webkit (https://github.com/rogerwang/node-webkit), node-webkit-builder (https://github.com/mllrsohn/node-webkit-builder) + +# binaries are in snap/build/Snap! + +git clone https://github.com/Gubolin/snap.git +cd "snap" +git checkout mobileapp +nwbuild -p win,osx,linux32,linux64 . diff --git a/package.json b/package.json new file mode 100644 index 0000000..678a69c --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "name": "Snap!", + "version": "4.0", + "main": "snap.html", + "window": { + "toolbar": false + } +} -- cgit v1.3.1 From 5bd357806fb0f3d0a9556dfb718f53bfb6af4fbb Mon Sep 17 00:00:00 2001 From: Gubolin Date: Sat, 6 Sep 2014 15:52:50 +0200 Subject: add vibrate block --- mobile.sh | 1 + objects.js | 7 +++++++ threads.js | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/mobile.sh b/mobile.sh index 0f660d1..b1fb9de 100755 --- a/mobile.sh +++ b/mobile.sh @@ -13,4 +13,5 @@ git clone https://github.com/Gubolin/snap.git www cd www git checkout mobileapp cordova platform add android +cordova plugin add org.apache.cordova.vibration cordova build android diff --git a/objects.js b/objects.js index fbb9e84..9dadfb3 100644 --- a/objects.js +++ b/objects.js @@ -878,6 +878,11 @@ SpriteMorph.prototype.initBlocks = function () { category: 'sensing', spec: 'current %dates' }, + doVibrate: { + type: 'command', + category: 'sensing', + spec: 'vibrate %n seconds' + }, // Operators reifyScript: { @@ -4991,6 +4996,8 @@ StageMorph.prototype.blockTemplates = function (category) { blocks.push(block('doSetFastTracking')); blocks.push('-'); blocks.push(block('reportDate')); + blocks.push('-'); + blocks.push(block('doVibrate')); // for debugging: /////////////// diff --git a/threads.js b/threads.js index 335b5d0..c796642 100644 --- a/threads.js +++ b/threads.js @@ -2601,6 +2601,12 @@ Process.prototype.reportDate = function (datefn) { return result; }; +Process.prototype.doVibrate = function (seconds) { + if ("vibrate" in navigator) { + window.navigator.vibrate(seconds * 1000); + } +}; + // Process code mapping /* -- cgit v1.3.1 From d5363e2cf35d69215904b1c899e4cafd0f1c632f Mon Sep 17 00:00:00 2001 From: Gubolin Date: Sun, 7 Sep 2014 09:12:00 +0200 Subject: show virtual keyboard in Android (offline app only) (fix #81) --- mobile.sh | 1 + morphic.js | 5 +++++ snap.html | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/mobile.sh b/mobile.sh index b1fb9de..212f711 100755 --- a/mobile.sh +++ b/mobile.sh @@ -13,5 +13,6 @@ git clone https://github.com/Gubolin/snap.git www cd www git checkout mobileapp cordova platform add android +cordova plugin add org.apache.cordova.plugin.softkeyboard cordova plugin add org.apache.cordova.vibration cordova build android diff --git a/morphic.js b/morphic.js index 2a242f2..efdf139 100644 --- a/morphic.js +++ b/morphic.js @@ -10778,6 +10778,11 @@ WorldMorph.prototype.edit = function (aStringOrTextMorph) { this.virtualKeyboard.style.top = this.cursor.top() + pos.y + "px"; this.virtualKeyboard.style.left = this.cursor.left() + pos.x + "px"; this.virtualKeyboard.focus(); + if (cordova) { + if (cordova.plugins.SoftKeyboard) { // Android only + cordova.plugins.SoftKeyboard.show(); // Issue #81 + } + } } if (MorphicPreferences.useSliderForInput) { diff --git a/snap.html b/snap.html index 904aba8..8e8e919 100755 --- a/snap.html +++ b/snap.html @@ -18,6 +18,10 @@ + + + + ' snap.html + +cordova platform add "$1" cordova plugin add org.apache.cordova.plugin.softkeyboard cordova plugin add org.apache.cordova.vibration cordova plugin add org.apache.cordova.device-motion cordova plugin add org.apache.cordova.device-orientation cordova plugin add org.apache.cordova.geolocation -cordova build android +cordova build "$1" diff --git a/snap.html b/snap.html index 8e8e919..d197b08 100755 --- a/snap.html +++ b/snap.html @@ -19,15 +19,13 @@ - - - ' snap.html + + echo "var code =" > code.js + echo "'$content'" >> code.js + echo ";" >> code.js + sed -i "/ide\.openIn/a\ - ide.droppedText(\'$content\'); " snap.html + ide.droppedText(code); " snap.html fi +# compress all js files find . -name '*.js' | xargs -I {} uglifyjs {} -o {} -c -find . \( \! -name '*.js' \! -name 'snap.html' \! -name 'mobile.sh' \! -name 'desktop.sh' \! -name 'snap_logo_sm.png' \! -name 'config.xml' \! -name 'package.json' -type f \) -print0 | xargs -0 rm +# delete everything that is not html/js/logo/config +find . \( \! -name '*.js' \! -name 'snap.html' \! -name 'snap_logo_sm.png' \! -name 'config.xml' \! -name 'package.json' -type f \) -print0 | xargs -0 rm find . -type d -empty -print0 | xargs -0 rm -r -cd .. +# return to the directory where the script was called from +cd "$scriptdir" + +# run helper scripts for building if [[ $1 == "-m" ]] then - ./mobile.sh "$2" "snap" + ./mobile.sh "$2" "$buildsource" else - ./desktop.sh "$2" "snap" + ./desktop.sh "$2" "$buildsource" fi diff --git a/desktop.sh b/desktop.sh index a572b4f..8b0e21c 100755 --- a/desktop.sh +++ b/desktop.sh @@ -6,20 +6,27 @@ then exit 0 fi +scriptdir=$(readlink -e ".") + # Requirements: # git, zip, nodejs # node-webkit (https://github.com/rogerwang/node-webkit), node-webkit-builder (https://github.com/mllrsohn/node-webkit-builder) -# binaries are in snap/build/Snap! +builddir=$(mktemp -d) if [[ $2 == "" ]] then - git clone https://github.com/Gubolin/snap.git www - cd www/ + git clone https://github.com/Gubolin/snap.git $builddir + cd $builddir/ git checkout mobileapp else - cp -R "$2" www - cd www/ + mv "$2" $builddir + cd $builddir/ fi +# remove mobile config +rm config.xml + nwbuild -p "$1" . + +mv build/* $scriptdir/ diff --git a/mobile.sh b/mobile.sh index 789925a..15b1c9c 100755 --- a/mobile.sh +++ b/mobile.sh @@ -6,19 +6,21 @@ then exit 0 fi +scriptdir=$(readlink -e ".") + # Requirements: # git, nodejs, android SDK / other platform(s) # cordova (https://cordova.apache.org/) -# binaries are in platform/android/ant-build/Snap-debug.apk - if [[ $2 != "" ]] then - copyfrom=$(readlink -e "$2") + buildsource=$(readlink -e "$2") fi -cordova create Snap-Mobile edu.berkeley.snap "Snap\!" -cd Snap-Mobile +builddir=$(mktemp -d) + +cordova create $builddir edu.berkeley.snap "Snap\!" +cd $builddir rm -rf www config.xml if [[ $2 == "" ]] @@ -27,14 +29,18 @@ then cd www/ git checkout mobileapp else - cp -R "$copyfrom/" . - mv "$copyfrom" www + mv "$buildsource" www cd www fi +# remove configs for desktop, it is not needed +rm package.json + +# add mobile-specific library; it's made available at runtime sed -i '/link rel="shortcut icon"/a\ ' snap.html +# add everything needed and build for $device cordova platform add "$1" cordova plugin add org.apache.cordova.plugin.softkeyboard cordova plugin add org.apache.cordova.vibration @@ -42,3 +48,7 @@ cordova plugin add org.apache.cordova.device-motion cordova plugin add org.apache.cordova.device-orientation cordova plugin add org.apache.cordova.geolocation cordova build "$1" + +cd $builddir +# TODO other platforms +find -name '*.apk' | xargs -I {} mv {} $scriptdir -- cgit v1.3.1 From 8433b79d9363dea79e139cbdc3a9811495694753 Mon Sep 17 00:00:00 2001 From: Gubolin Date: Mon, 8 Sep 2014 11:44:59 +0200 Subject: use the Snap-icon instead of the default one --- binary.sh | 2 ++ mobile.sh | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/binary.sh b/binary.sh index 489e6ed..6f267d0 100755 --- a/binary.sh +++ b/binary.sh @@ -67,6 +67,8 @@ then sed -i "/ide\.openIn/a\ ide.droppedText(code); " snap.html +else + rm binary.js fi # compress all js files diff --git a/mobile.sh b/mobile.sh index 15b1c9c..81fa6f3 100755 --- a/mobile.sh +++ b/mobile.sh @@ -47,6 +47,14 @@ cordova plugin add org.apache.cordova.vibration cordova plugin add org.apache.cordova.device-motion cordova plugin add org.apache.cordova.device-orientation cordova plugin add org.apache.cordova.geolocation + +if [[ $1 == "android" ]] +then + # Remove default icons + cd "$builddir/platforms/android" + find -name '*.png' | xargs rm +fi + cordova build "$1" cd $builddir -- cgit v1.3.1 From a7b3c537edf83b8415716f930fd3fe518638c4db Mon Sep 17 00:00:00 2001 From: Gubolin Date: Mon, 8 Sep 2014 12:27:01 +0200 Subject: add notification blocks --- mobile.sh | 1 + objects.js | 9 +++++++++ threads.js | 14 ++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/mobile.sh b/mobile.sh index 81fa6f3..909f7e5 100755 --- a/mobile.sh +++ b/mobile.sh @@ -47,6 +47,7 @@ cordova plugin add org.apache.cordova.vibration cordova plugin add org.apache.cordova.device-motion cordova plugin add org.apache.cordova.device-orientation cordova plugin add org.apache.cordova.geolocation +cordova plugin add de.appplant.cordova.plugin.local-notification if [[ $1 == "android" ]] then diff --git a/objects.js b/objects.js index 49fafb5..100bd67 100644 --- a/objects.js +++ b/objects.js @@ -415,6 +415,11 @@ SpriteMorph.prototype.initBlocks = function () { spec: 'go back %n layers', defaults: [1] }, + doNotify: { + type: 'command', + category: 'looks', + spec: 'notification with title %s and content %s' + }, doScreenshot: { type: 'command', category: 'looks', @@ -1762,6 +1767,8 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push('-'); blocks.push(block('comeToFront')); blocks.push(block('goBack')); + blocks.push('-'); + blocks.push(block('doNotify')); // for debugging: /////////////// @@ -4905,6 +4912,8 @@ StageMorph.prototype.blockTemplates = function (category) { blocks.push('-'); blocks.push(block('show')); blocks.push(block('hide')); + blocks.push('-'); + blocks.push(block('doNotify')); // for debugging: /////////////// diff --git a/threads.js b/threads.js index 3e50686..7616b88 100644 --- a/threads.js +++ b/threads.js @@ -2189,6 +2189,20 @@ Process.prototype.reportTextSplit = function (string, delimiter) { return new List(str.split(del)); }; +// Process notification operations + +Process.prototype.doNotify = function (title, content) { + // TODO webkitNotification + if (window.plugin) { + if (window.plugin.notification) { + window.plugin.notification.local.add({ + message: content, + title: title + }); + } + } +}; + // Process debugging Process.prototype.alert = function (data) { -- cgit v1.3.1 From 478f3d4c387d67cb54a02ba373bfb4655d7a19f7 Mon Sep 17 00:00:00 2001 From: Gubolin Date: Tue, 9 Sep 2014 11:51:31 +0200 Subject: add file blocks --- blocks.js | 12 ++++ mobile.sh | 1 + objects.js | 44 +++++++++++++++ threads.js | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 240 insertions(+) diff --git a/blocks.js b/blocks.js index 735d36b..9aec7f4 100644 --- a/blocks.js +++ b/blocks.js @@ -844,6 +844,18 @@ SyntaxElementMorph.prototype.labelPart = function (spec) { ); part.setContents(['date']); break; + case '%fileOrDir': + part = new InputSlotMorph( + null, // text + false, // non-numeric + { + 'file': ['file'], + 'directory': ['directory'] + }, + true // read-only + ); + part.setContents(['file']); + break; case '%locations': part = new InputSlotMorph( null, // text diff --git a/mobile.sh b/mobile.sh index 909f7e5..b0bcc5d 100755 --- a/mobile.sh +++ b/mobile.sh @@ -48,6 +48,7 @@ cordova plugin add org.apache.cordova.device-motion cordova plugin add org.apache.cordova.device-orientation cordova plugin add org.apache.cordova.geolocation cordova plugin add de.appplant.cordova.plugin.local-notification +cordova plugin add org.apache.cordova.file if [[ $1 == "android" ]] then diff --git a/objects.js b/objects.js index 100bd67..d432dcb 100644 --- a/objects.js +++ b/objects.js @@ -883,6 +883,36 @@ SpriteMorph.prototype.initBlocks = function () { category: 'sensing', spec: 'current %dates' }, + reportFileOrDirectoryContent: { + type: 'reporter', + category: 'sensing', + spec: 'content of the %fileOrDir %s' + }, + doSetFileContent: { + type: 'command', + category: 'sensing', + spec: 'write %s to the file %s' + }, + doCreateFileOrDirectory: { + type: 'command', + category: 'sensing', + spec: 'create %fileOrDir %s' + }, + reportFileOrDirectoryExists: { + type: 'predicate', + category: 'sensing', + spec: '%fileOrDir %s exists' + }, + doDeleteFileOrDirectory: { + type: 'command', + category: 'sensing', + spec: 'delete the %fileOrDir %s' + }, + reportHomeDirectory: { + type: 'reporter', + category: 'sensing', + spec: 'home directory' + }, doVibrate: { type: 'command', category: 'sensing', @@ -1927,6 +1957,13 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push('-'); blocks.push(block('reportDate')); blocks.push('-'); + blocks.push(block('reportFileOrDirectoryContent')); + blocks.push(block('doSetFileContent')); + blocks.push(block('doCreateFileOrDirectory')); + blocks.push(block('reportFileOrDirectoryExists')); + blocks.push(block('doDeleteFileOrDirectory')); + blocks.push(block('reportHomeDirectory')); + blocks.push('-'); blocks.push(block('reportLanguage')); blocks.push(block('reportLocation')); blocks.push('-'); @@ -5049,6 +5086,13 @@ StageMorph.prototype.blockTemplates = function (category) { blocks.push('-'); blocks.push(block('reportDate')); blocks.push('-'); + blocks.push(block('reportFileOrDirectoryContent')); + blocks.push(block('doSetFileContent')); + blocks.push(block('doCreateFileOrDirectory')); + blocks.push(block('reportFileOrDirectoryExists')); + blocks.push(block('doDeleteFileOrDirectory')); + blocks.push(block('reportHomeDirectory')); + blocks.push('-'); blocks.push(block('reportLanguage')); blocks.push(block('reportLocation')); blocks.push('-'); diff --git a/threads.js b/threads.js index 7616b88..37db5cd 100644 --- a/threads.js +++ b/threads.js @@ -2687,6 +2687,189 @@ Process.prototype.reportDate = function (datefn) { return result; }; +// Process File access +Process.prototype.reportFileOrDirectoryContent = function (typeInput, filepath) { + var myself = this; + var type = myself.inputOption(typeInput); + + if (myself.context.result == null) { + myself.context.result = 'wait'; + + if (window.resolveLocalFileSystemURL) { + window.resolveLocalFileSystemURL(filepath, + function (entry) { + if (type === 'file') { + entry.file( + function (file) { + var reader = new FileReader(); + + reader.onloadend = function (e) { + myself.context.result = this.result; + }; + + reader.readAsText(file); + }, + function (error) { + myself.context.result = error.toString(); + } + ); + } else { + var dirReader = entry.createReader(); + dirReader.readEntries( + function (results) { + var items = []; + results.forEach( + function (item) { + items.push(item.name); + } + ); + myself.context.result = new List(items); + }, + function (error) { + myself.context.result = error.toString(); + } + ); + } + }, + function (error) { + myself.context.result = error.toString(); + } + ); + } + } else { + if (myself.context.result !== 'wait') { + return myself.context.result; + } + } + + this.pushContext('doYield'); + this.pushContext(); +}; + +Process.prototype.doSetFileContent = function (content, filepath) { + var dirpath = filepath.substring(0, + filepath.lastIndexOf('/')); + var filename = filepath.substring( + filepath.lastIndexOf('/') + 1); + + if (window.resolveLocalFileSystemURL) { + window.resolveLocalFileSystemURL(dirpath, + function (dirEntry) { + dirEntry.getFile(filename, + {create: true, exclusive: false}, + function (fileEntry) { + fileEntry.createWriter( + function (fileWriter) { + var blob; + + try { + blob = new Blob([content], + {type: 'text/plain'}); + // No `new Blob` for Android + } catch (e) { + window.BlobBuilder = + window.BlobBuilder || + window.WebKitBlobBuilder || + window.MozBlobBuilder || + window.MSBlobBuilder; + + if (e.name == 'TypeError' + && window.BlobBuilder) { + var bb = new BlobBuilder(); + bb.append(content); + blob = bb.getBlob('text/plain'); + } + } + + fileWriter.write(blob); + } + ); + } + ); + } + ); + } +}; + +Process.prototype.createFileOrDirectory = function (typeInput, filepath) { + var myself = this; + var type = myself.inputOption(typeInput); + + function createDir(rootDirEntry, folders) { + rootDirEntry.getDirectory(folders[0], {create: true}, + function (dirEntry) { + if (folders.length === 1) { + if (type === 'file') { + dirEntry.getFile(folders.slice(1), + {create: true, exclusive: false}); + return; + } + } + + if (folders.length) { + createDir(dirEntry, folders.slice(1)); + } + } + ); + }; + + window.requestFileSystem(window.PERSISTENT, 0, + function (fileSystem) { + createDir(fileSystem.root, path.split('/')); + } + ); +}; + +Process.prototype.reportFileOrDirectoryExists = function (typeInput, filepath) { + var myself = this; + var type = myself.inputOption(typeInput); + + if (myself.context.result == null) { + myself.context.result = 'wait'; + + if (window.resolveLocalFileSystemURL) { + window.resolveLocalFileSystemURL(filepath, + function (entry) { + if (type === 'file') { + myself.context.result = !entry.isDirectory; + } else { + myself.context.result = entry.isDirectory; + } + }, + function (error) { + myself.context.result = false; + } + ); + } + } else { + if (myself.context.result !== 'wait') { + return myself.context.result; + } + } + + this.pushContext('doYield'); + this.pushContext(); +}; + +Process.prototype.doDeleteFileOrDirectory = function (typeInput, filepath) { + if (window.resolveLocalFileSystemURL) { + window.resolveLocalFileSystemURL(filepath, + function (entry) { + entry.remove(); + } + ); + } +}; + +Process.prototype.reportHomeDirectory = function () { + if (cordova) { + if (cordova.file) { + return cordova.file.dataDirectory; + } + } + return ''; +}; + Process.prototype.getCompassHeading = function (dest) { var stage = this.homeContext.receiver.parentThatIsA(StageMorph); -- cgit v1.3.1 From 228178f968a1f99f58a36fa2b6480fa0ec8228fc Mon Sep 17 00:00:00 2001 From: Gubolin Date: Tue, 9 Sep 2014 20:05:41 +0200 Subject: improve file block error handling --- threads.js | 84 +++++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 26 deletions(-) diff --git a/threads.js b/threads.js index 37db5cd..0019005 100644 --- a/threads.js +++ b/threads.js @@ -2688,12 +2688,40 @@ Process.prototype.reportDate = function (datefn) { }; // Process File access +// http://www.html5rocks.com/en/tutorials/file/filesystem/ +Process.prototype.fileErrorHandler = function (e) { + var msg = ''; + + switch (e.code) { + case FileError.QUOTA_EXCEEDED_ERR: + msg = localize('no space left'); + break; + case FileError.NOT_FOUND_ERR: + msg = localize('not found'); + break; + case FileError.SECURITY_ERR: + msg = localize('access denied'); + break; + case FileError.INVALID_MODIFICATION_ERR: + msg = 'INVALID_MODIFICATION_ERR'; + break; + case FileError.INVALID_STATE_ERR: + msg = 'INVALID_STATE_ERR'; + break; + default: + msg = localize('unknown error'); + break; + } + + this.handleError(msg); +}; + Process.prototype.reportFileOrDirectoryContent = function (typeInput, filepath) { var myself = this; var type = myself.inputOption(typeInput); - if (myself.context.result == null) { - myself.context.result = 'wait'; + if (myself.context.result === null) { + myself.context.result = false; if (window.resolveLocalFileSystemURL) { window.resolveLocalFileSystemURL(filepath, @@ -2709,9 +2737,7 @@ Process.prototype.reportFileOrDirectoryContent = function (typeInput, filepath) reader.readAsText(file); }, - function (error) { - myself.context.result = error.toString(); - } + myself.fileErrorHandler ); } else { var dirReader = entry.createReader(); @@ -2725,19 +2751,15 @@ Process.prototype.reportFileOrDirectoryContent = function (typeInput, filepath) ); myself.context.result = new List(items); }, - function (error) { - myself.context.result = error.toString(); - } + myself.fileErrorHandler ); } }, - function (error) { - myself.context.result = error.toString(); - } + myself.fileErrorHandler ); } } else { - if (myself.context.result !== 'wait') { + if (myself.context.result !== false) { return myself.context.result; } } @@ -2782,11 +2804,14 @@ Process.prototype.doSetFileContent = function (content, filepath) { } fileWriter.write(blob); - } + }, + myself.fileErrorHandler ); - } + }, + myself.fileErrorHandler ); - } + }, + myself.fileErrorHandler ); } }; @@ -2801,7 +2826,13 @@ Process.prototype.createFileOrDirectory = function (typeInput, filepath) { if (folders.length === 1) { if (type === 'file') { dirEntry.getFile(folders.slice(1), - {create: true, exclusive: false}); + {create: true, exclusive: false}, + function (fileEntry) { + return; + }, + myself.fileErrorHandler + ); + return; } } @@ -2809,14 +2840,16 @@ Process.prototype.createFileOrDirectory = function (typeInput, filepath) { if (folders.length) { createDir(dirEntry, folders.slice(1)); } - } + }, + myself.fileErrorHandler ); - }; + } window.requestFileSystem(window.PERSISTENT, 0, function (fileSystem) { createDir(fileSystem.root, path.split('/')); - } + }, + myself.fileErrorHandler ); }; @@ -2824,7 +2857,7 @@ Process.prototype.reportFileOrDirectoryExists = function (typeInput, filepath) { var myself = this; var type = myself.inputOption(typeInput); - if (myself.context.result == null) { + if (myself.context.result === null) { myself.context.result = 'wait'; if (window.resolveLocalFileSystemURL) { @@ -2836,9 +2869,7 @@ Process.prototype.reportFileOrDirectoryExists = function (typeInput, filepath) { myself.context.result = entry.isDirectory; } }, - function (error) { - myself.context.result = false; - } + myself.fileErrorHandler ); } } else { @@ -2856,7 +2887,8 @@ Process.prototype.doDeleteFileOrDirectory = function (typeInput, filepath) { window.resolveLocalFileSystemURL(filepath, function (entry) { entry.remove(); - } + }, + myself.fileErrorHandler ); } }; @@ -2870,7 +2902,7 @@ Process.prototype.reportHomeDirectory = function () { return ''; }; -Process.prototype.getCompassHeading = function (dest) { +Process.prototype.getCompassHeading = function () { var stage = this.homeContext.receiver.parentThatIsA(StageMorph); stage.compassHeading = null; @@ -2907,7 +2939,7 @@ Process.prototype.reportCompassHeading = function () { this.pushContext(); }; -Process.prototype.getAcceleration = function (dest) { +Process.prototype.getAcceleration = function () { var stage = this.homeContext.receiver.parentThatIsA(StageMorph); stage.acceleration = null; -- cgit v1.3.1 From 45033e2101a5d5d0929dd28205f3177059ad865d Mon Sep 17 00:00:00 2001 From: Gubolin Date: Sat, 3 Jan 2015 10:59:47 +0100 Subject: allow setting the Snap! source in a variable --- binary.sh | 7 ++++++- desktop.sh | 7 ++++++- mobile.sh | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/binary.sh b/binary.sh index 6f267d0..c1a481e 100755 --- a/binary.sh +++ b/binary.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [[ "$snapsource" == "" ]] +then + export snapsource="https://github.com/Gubolin/snap.git" +fi + if [[ $# < 2 ]] then echo "Usage: binary.sh OPTION PLATFORM [FILE]" @@ -42,7 +47,7 @@ then fi buildsource=$(mktemp -d) -git clone "https://github.com/Gubolin/snap.git" $buildsource +git clone $snapsource $buildsource cd "$buildsource" git checkout mobileapp diff --git a/desktop.sh b/desktop.sh index 8b0e21c..53ec24b 100755 --- a/desktop.sh +++ b/desktop.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [[ "$snapsource" == "" ]] +then + export snapsource="https://github.com/Gubolin/snap.git" +fi + if [[ $1 = "" ]] then echo "Usage: desktop.sh PLATFORM [BUILDSOURCE]" @@ -16,7 +21,7 @@ builddir=$(mktemp -d) if [[ $2 == "" ]] then - git clone https://github.com/Gubolin/snap.git $builddir + git clone "$snapsource" $builddir cd $builddir/ git checkout mobileapp else diff --git a/mobile.sh b/mobile.sh index b0bcc5d..59e5da8 100755 --- a/mobile.sh +++ b/mobile.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [[ "$snapsource" == "" ]] +then + export snapsource="https://github.com/Gubolin/snap.git" +fi + if [[ $1 = "" ]] then echo "Usage: mobile.sh PLATFORM [BUILDSOURCE]" @@ -25,7 +30,7 @@ rm -rf www config.xml if [[ $2 == "" ]] then - git clone https://github.com/Gubolin/snap.git www + git clone "$snapsource" www cd www/ git checkout mobileapp else -- cgit v1.3.1 From 618e034eb86b3ad7e7f4955b900862a27a0ce44c Mon Sep 17 00:00:00 2001 From: Gubolin Date: Sat, 3 Jan 2015 11:23:07 +0100 Subject: remove file blocks --- blocks.js | 12 ---- mobile.sh | 1 - objects.js | 44 ------------- threads.js | 215 ------------------------------------------------------------- 4 files changed, 272 deletions(-) diff --git a/blocks.js b/blocks.js index 9aec7f4..735d36b 100644 --- a/blocks.js +++ b/blocks.js @@ -844,18 +844,6 @@ SyntaxElementMorph.prototype.labelPart = function (spec) { ); part.setContents(['date']); break; - case '%fileOrDir': - part = new InputSlotMorph( - null, // text - false, // non-numeric - { - 'file': ['file'], - 'directory': ['directory'] - }, - true // read-only - ); - part.setContents(['file']); - break; case '%locations': part = new InputSlotMorph( null, // text diff --git a/mobile.sh b/mobile.sh index 59e5da8..4b5dc48 100755 --- a/mobile.sh +++ b/mobile.sh @@ -53,7 +53,6 @@ cordova plugin add org.apache.cordova.device-motion cordova plugin add org.apache.cordova.device-orientation cordova plugin add org.apache.cordova.geolocation cordova plugin add de.appplant.cordova.plugin.local-notification -cordova plugin add org.apache.cordova.file if [[ $1 == "android" ]] then diff --git a/objects.js b/objects.js index cf7a191..d1a07ab 100644 --- a/objects.js +++ b/objects.js @@ -910,36 +910,6 @@ SpriteMorph.prototype.initBlocks = function () { category: 'sensing', spec: 'current %dates' }, - reportFileOrDirectoryContent: { - type: 'reporter', - category: 'sensing', - spec: 'content of the %fileOrDir %s' - }, - doSetFileContent: { - type: 'command', - category: 'sensing', - spec: 'write %s to the file %s' - }, - doCreateFileOrDirectory: { - type: 'command', - category: 'sensing', - spec: 'create %fileOrDir %s' - }, - reportFileOrDirectoryExists: { - type: 'predicate', - category: 'sensing', - spec: '%fileOrDir %s exists' - }, - doDeleteFileOrDirectory: { - type: 'command', - category: 'sensing', - spec: 'delete the %fileOrDir %s' - }, - reportHomeDirectory: { - type: 'reporter', - category: 'sensing', - spec: 'home directory' - }, doVibrate: { type: 'command', category: 'sensing', @@ -1988,13 +1958,6 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push('-'); blocks.push(block('reportDate')); blocks.push('-'); - blocks.push(block('reportFileOrDirectoryContent')); - blocks.push(block('doSetFileContent')); - blocks.push(block('doCreateFileOrDirectory')); - blocks.push(block('reportFileOrDirectoryExists')); - blocks.push(block('doDeleteFileOrDirectory')); - blocks.push(block('reportHomeDirectory')); - blocks.push('-'); blocks.push(block('reportLanguage')); blocks.push(block('reportLocation')); blocks.push('-'); @@ -5125,13 +5088,6 @@ StageMorph.prototype.blockTemplates = function (category) { blocks.push('-'); blocks.push(block('reportDate')); blocks.push('-'); - blocks.push(block('reportFileOrDirectoryContent')); - blocks.push(block('doSetFileContent')); - blocks.push(block('doCreateFileOrDirectory')); - blocks.push(block('reportFileOrDirectoryExists')); - blocks.push(block('doDeleteFileOrDirectory')); - blocks.push(block('reportHomeDirectory')); - blocks.push('-'); blocks.push(block('reportLanguage')); blocks.push(block('reportLocation')); blocks.push('-'); diff --git a/threads.js b/threads.js index 8fbd587..5d6020e 100644 --- a/threads.js +++ b/threads.js @@ -2716,221 +2716,6 @@ Process.prototype.reportDate = function (datefn) { return result; }; -// Process File access -// http://www.html5rocks.com/en/tutorials/file/filesystem/ -Process.prototype.fileErrorHandler = function (e) { - var msg = ''; - - switch (e.code) { - case FileError.QUOTA_EXCEEDED_ERR: - msg = localize('no space left'); - break; - case FileError.NOT_FOUND_ERR: - msg = localize('not found'); - break; - case FileError.SECURITY_ERR: - msg = localize('access denied'); - break; - case FileError.INVALID_MODIFICATION_ERR: - msg = 'INVALID_MODIFICATION_ERR'; - break; - case FileError.INVALID_STATE_ERR: - msg = 'INVALID_STATE_ERR'; - break; - default: - msg = localize('unknown error'); - break; - } - - this.handleError(msg); -}; - -Process.prototype.reportFileOrDirectoryContent = function (typeInput, filepath) { - var myself = this; - var type = myself.inputOption(typeInput); - - if (myself.context.result === null) { - myself.context.result = false; - - if (window.resolveLocalFileSystemURL) { - window.resolveLocalFileSystemURL(filepath, - function (entry) { - if (type === 'file') { - entry.file( - function (file) { - var reader = new FileReader(); - - reader.onloadend = function (e) { - myself.context.result = this.result; - }; - - reader.readAsText(file); - }, - myself.fileErrorHandler - ); - } else { - var dirReader = entry.createReader(); - dirReader.readEntries( - function (results) { - var items = []; - results.forEach( - function (item) { - items.push(item.name); - } - ); - myself.context.result = new List(items); - }, - myself.fileErrorHandler - ); - } - }, - myself.fileErrorHandler - ); - } - } else { - if (myself.context.result !== false) { - return myself.context.result; - } - } - - this.pushContext('doYield'); - this.pushContext(); -}; - -Process.prototype.doSetFileContent = function (content, filepath) { - var dirpath = filepath.substring(0, - filepath.lastIndexOf('/')); - var filename = filepath.substring( - filepath.lastIndexOf('/') + 1); - - if (window.resolveLocalFileSystemURL) { - window.resolveLocalFileSystemURL(dirpath, - function (dirEntry) { - dirEntry.getFile(filename, - {create: true, exclusive: false}, - function (fileEntry) { - fileEntry.createWriter( - function (fileWriter) { - var blob; - - try { - blob = new Blob([content], - {type: 'text/plain'}); - // No `new Blob` for Android - } catch (e) { - window.BlobBuilder = - window.BlobBuilder || - window.WebKitBlobBuilder || - window.MozBlobBuilder || - window.MSBlobBuilder; - - if (e.name == 'TypeError' - && window.BlobBuilder) { - var bb = new BlobBuilder(); - bb.append(content); - blob = bb.getBlob('text/plain'); - } - } - - fileWriter.write(blob); - }, - myself.fileErrorHandler - ); - }, - myself.fileErrorHandler - ); - }, - myself.fileErrorHandler - ); - } -}; - -Process.prototype.createFileOrDirectory = function (typeInput, filepath) { - var myself = this; - var type = myself.inputOption(typeInput); - - function createDir(rootDirEntry, folders) { - rootDirEntry.getDirectory(folders[0], {create: true}, - function (dirEntry) { - if (folders.length === 1) { - if (type === 'file') { - dirEntry.getFile(folders.slice(1), - {create: true, exclusive: false}, - function (fileEntry) { - return; - }, - myself.fileErrorHandler - ); - - return; - } - } - - if (folders.length) { - createDir(dirEntry, folders.slice(1)); - } - }, - myself.fileErrorHandler - ); - } - - window.requestFileSystem(window.PERSISTENT, 0, - function (fileSystem) { - createDir(fileSystem.root, path.split('/')); - }, - myself.fileErrorHandler - ); -}; - -Process.prototype.reportFileOrDirectoryExists = function (typeInput, filepath) { - var myself = this; - var type = myself.inputOption(typeInput); - - if (myself.context.result === null) { - myself.context.result = 'wait'; - - if (window.resolveLocalFileSystemURL) { - window.resolveLocalFileSystemURL(filepath, - function (entry) { - if (type === 'file') { - myself.context.result = !entry.isDirectory; - } else { - myself.context.result = entry.isDirectory; - } - }, - myself.fileErrorHandler - ); - } - } else { - if (myself.context.result !== 'wait') { - return myself.context.result; - } - } - - this.pushContext('doYield'); - this.pushContext(); -}; - -Process.prototype.doDeleteFileOrDirectory = function (typeInput, filepath) { - if (window.resolveLocalFileSystemURL) { - window.resolveLocalFileSystemURL(filepath, - function (entry) { - entry.remove(); - }, - myself.fileErrorHandler - ); - } -}; - -Process.prototype.reportHomeDirectory = function () { - if (cordova) { - if (cordova.file) { - return cordova.file.dataDirectory; - } - } - return ''; -}; - Process.prototype.getCompassHeading = function () { var stage = this.homeContext.receiver.parentThatIsA(StageMorph); -- cgit v1.3.1 From 2631b384cab44d8416b865d7ed666e844930092f Mon Sep 17 00:00:00 2001 From: Gubolin Date: Thu, 8 Jan 2015 19:25:57 +0100 Subject: merge --- lang-sv.js | 1359 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1359 insertions(+) create mode 100644 lang-sv.js diff --git a/lang-sv.js b/lang-sv.js new file mode 100644 index 0000000..382f2bd --- /dev/null +++ b/lang-sv.js @@ -0,0 +1,1359 @@ +/* + + lang-sv.js + + Swedish translation for SNAP! + + written by Erik A Olsson + + Copyright (C) 2014 by Jens Mönig + + This file is part of Snap!. + + Snap! is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + + + + Note to Translators: + -------------------- + At this stage of development, Snap! can be translated to any LTR language + maintaining the current order of inputs (formal parameters in blocks). + + Translating Snap! is easy: + + + 1. Download + + Download the sources and extract them into a local folder on your + computer: + + + + Use the German translation file (named 'lang-de.js') as template for your + own translations. Start with editing the original file, because that way + you will be able to immediately check the results in your browsers while + you're working on your translation (keep the local copy of snap.html open + in your web browser, and refresh it as you progress with your + translation). + + + 2. Edit + + Edit the translation file with a regular text editor, or with your + favorite JavaScript editor. + + In the first non-commented line (the one right below this + note) replace "de" with the two-letter ISO 639-1 code for your language, + e.g. + + fr - French => SnapTranslator.dict.fr = { + it - Italian => SnapTranslator.dict.it = { + pl - Polish => SnapTranslator.dict.pl = { + pt - Portuguese => SnapTranslator.dict.pt = { + es - Spanish => SnapTranslator.dict.es = { + el - Greek => => SnapTranslator.dict.el = { + + etc. (see ) + + + 3. Translate + + Then work through the dictionary, replacing the German strings against + your translations. The dictionary is a straight-forward JavaScript ad-hoc + object, for review purposes it should be formatted as follows: + + { + 'English string': + 'Translation string', + 'last key': + } 'last value' + + and you only edit the indented value strings. Note that each key-value + pair needs to be delimited by a comma, but that there shouldn't be a comma + after the last pair (again, just overwrite the template file and you'll be + fine). + + If something doesn't work, or if you're unsure about the formalities you + should check your file with + + + + This will inform you about any missed commas etc. + + + 4. Accented characters + + Depending on which text editor and which file encoding you use you can + directly enter special characters (e.g. Umlaut, accented characters) on + your keyboard. However, I've noticed that some browsers may not display + special characters correctly, even if other browsers do. So it's best to + check your results in several browsers. If you want to be on the safe + side, it's even better to escape these characters using Unicode. + + see: + + + 5. Block specs: + + At this time your translation of block specs will only work + correctly, if the order of formal parameters and their types + are unchanged. Placeholders for inputs (formal parameters) are + indicated by a preceding % prefix and followed by a type + abbreviation. + + For example: + + 'say %s for %n secs' + + can currently not be changed into + + 'say %n secs long %s' + + and still work as intended. + + Similarly + + 'point towards %dst' + + cannot be changed into + + 'point towards %cst' + + without breaking its functionality. + + + 6. Submit + + When you're done, rename the edited file by replacing the "de" part of the + filename with the two-letter ISO 639-1 code for your language, e.g. + + fr - French => lang-fr.js + it - Italian => lang-it.js + pl - Polish => lang-pl.js + pt - Portuguese => lang-pt.js + es - Spanish => lang-es.js + el - Greek => => lang-el.js + + and send it to me for inclusion in the official Snap! distribution. + Once your translation has been included, Your name will the shown in the + "Translators" tab in the "About Snap!" dialog box, and you will be able to + directly launch a translated version of Snap! in your browser by appending + + lang:xx + + to the URL, xx representing your translations two-letter code. + + + 7. Known issues + + In some browsers accents or ornaments located in typographic ascenders + above the cap height are currently (partially) cut-off. + + Enjoy! + -Jens +*/ + +/*global SnapTranslator*/ + +SnapTranslator.dict.sv = { + +/* + Special characters: (see ) + + å , \u00E5 + ä , \u00E4 + ö , \u00F6 + Å , \u00C5 + Ä ; \u00C4 + Ö , \u00D6 +*/ + + // translations meta information + 'language_name': + 'svenska', // the name as it should appear in the language menu + 'language_translator': + 'Erik A Olsson', // your name for the Translators tab + 'translator_e-mail': + 'eolsson@gmail.com', // optional + 'last_changed': + '2014-11-01', // this, too, will appear in the Translators tab + + // GUI + // control bar: + 'untitled': + 'namnl\u00F6s', + 'development mode': + 'utvecklarel\u00E4ge', + + // categories: + 'Motion': + 'R\u00F6relse', + 'Looks': + 'Utseende', + 'Sound': + 'Ljud', + 'Pen': + 'Penna', + 'Control': + 'Kontroll', + 'Sensing': + 'K\u00E4nna av', + 'Operators': + 'Operatorer', + 'Variables': + 'Variabler', + 'Lists': + 'Listor', + 'Other': + 'Annat', + + // editor: + 'draggable': + 'flyttbar', + + // tabs: + 'Scripts': + 'Skript', + 'Costumes': + 'Kostymer', + 'Sounds': + 'Ljud', + + // names: + 'Sprite': + 'Sprite', + 'Stage': + 'Scen', + + // rotation styles: + 'don\'t rotate': + 'rotera inte', + 'can rotate': + 'rotera', + 'only face left/right': + 'peka bara h\u00F6ger/v\u00E4nster', + + // new sprite button: + 'add a new Sprite': + 'l\u00E4gg till ny Sprite', + + // tab help + 'costumes tab help': + 'importera en bild fr\u00E5n en annan webbsida eller fr\u00E5n\nen fil på din dator genom att dra den hit', + + 'import a sound from your computer\nby dragging it into here': + 'importera en ljudfil fr\u00E5n din dator\ngenom att dra den hit', + +// primitive blocks: + + /* + Attention Translators: + ---------------------- + At this time your translation of block specs will only work + correctly, if the order of formal parameters and their types + are unchanged. Placeholders for inputs (formal parameters) are + indicated by a preceding % prefix and followed by a type + abbreviation. + + For example: + + 'say %s for %n secs' + + can currently not be changed into + + 'say %n secs long %s' + + and still work as intended. + + Similarly + + 'point towards %dst' + + cannot be changed into + + 'point towards %cst' + + without breaking its functionality. + */ + + // motion: + 'Stage selected:\nno motion primitives': + 'Scen vald:\ninga standard r\u00F6relser' + + 'finns', + 'move %n steps': + 'g\u00E5 %n steg', + 'turn %clockwise %n degrees': + 'v\u00E4nd %clockwise %n grader', + 'turn %counterclockwise %n degrees': + 'v\u00E4nd %counterclockwise %n grader', + 'point in direction %dir': + 'peka mot riktning %dir', + 'point towards %dst': + 'peka mot %dst', + 'go to x: %n y: %n': + 'g\u00E5 till x: %n y: %n', + 'go to %dst': + 'g\u00E5 till %dst', + 'glide %n secs to x: %n y: %n': + 'glid %n sek till x: %n y: %n', + 'change x by %n': + '\u00E4ndra x med %n', + 'set x to %n': + 's\u00E4tt x till %n', + 'change y by %n': + '\u00E4ndra y med %n', + 'set y to %n': + 's\u00E4tt y till %n', + 'if on edge, bounce': + 'studsa om vid kanten', + 'x position': + 'x-position', + 'y position': + 'y-position', + 'direction': + 'riktning', + + // looks: + 'switch to costume %cst': + 'byt till kostym %cst', + 'next costume': + 'n\u00E4sta kostym', + 'costume #': + 'kostym nr.', + 'say %s for %n secs': + 's\u00E4g %s i %n sek', + 'say %s': + 's\u00E4g %s', + 'think %s for %n secs': + 't\u00E4nk %s i %n sek', + 'think %s': + 't\u00E4nk %s', + 'Hello!': + 'Hej!', + 'Hmm...': + 'Hmm...', + 'change %eff effect by %n': + '\u00E4ndra %eff -effekt med %n', + 'set %eff effect to %n': + 's\u00E4tt %eff -effekt til %n', + 'clear graphic effects': + 'nollst\u00E4ll grafiska effekter', + 'change size by %n': + '\u00E4ndra storlek med %n', + 'set size to %n %': + 's\u00E4tt storlek till %n %', + 'size': + 'storlek', + 'show': + 'visa', + 'hide': + 'g\u00F6m', + 'go to front': + 'l\u00E4gg \u00F6verst', + 'go back %n layers': + 'flytta %n lager bak\u00E5t', + + 'development mode \ndebugging primitives:': + 'utvecklarl\u00E4ge \nDebugging av block', + 'console log %mult%s': + 'skriv till konsoll: %mult%s', + 'alert %mult%s': + 'Pop-up: %mult%s', + + // sound: + 'play sound %snd': + 'spela ljud %snd', + 'play sound %snd until done': + 'spela ljud %snd tills f\u00E4rdig', + 'stop all sounds': + 'stoppa alla ljud', + 'rest for %n beats': + 'pausa %n slag', + 'play note %n for %n beats': + 'spela ton %n i %n slag', + 'change tempo by %n': + '\u00E4ndra tempo med %n', + 'set tempo to %n bpm': + 's\u00E4tt tempo till %n bpm', + 'tempo': + 'tempo', + + // pen: + 'clear': + 'rensa', + 'pen down': + 'penna ned', + 'pen up': + 'penna upp', + 'set pen color to %clr': + 's\u00E4tt pennf\u00E4rg till %clr', + 'change pen color by %n': + '\u00E4ndra pennf\u00E4rg till %n', + 'set pen color to %n': + 's\u00E4tt penf\u00E4rg till %n', + 'change pen shade by %n': + '\u00E4ndra pennstyrka med %n', + 'set pen shade to %n': + 's\u00E4tt pennstyrka till %n', + 'change pen size by %n': + '\u00E4ndra penntjocklek med %n', + 'set pen size to %n': + 's\u00E4tt penntjocklek til %n', + 'stamp': + 'st\u00E4mpla', + + // control: + 'when %greenflag clicked': + 'n\u00E4r %greenflag klickas p\u00E5', + 'when %key key pressed': + 'n\u00E4r tangent %key trycks ned', + 'when I am clicked': + 'n\u00E4r jag klickas p\u00E5', + 'when I receive %msg': + 'n\u00E4r jag tar emot meddelande %msg', + 'broadcast %msg': + 'skicka meddelande %msg', + 'broadcast %msg and wait': + 'skicka meddelande %msg och v\u00E4nta', + 'Message name': + 'Meddelandets namn', + 'wait %n secs': + 'v\u00E4nta %n sek', + 'wait until %b': + 'v\u00E4nta tills %b', + 'forever %c': + 'f\u00F6r alltid %c', + 'repeat %n %c': + 'upprepa %n g\u00E5nger %c', + 'repeat until %b %c': + 'upprepa tills %b %c', + 'if %b %c': + 'om %b %c', + 'if %b %c else %c': + 'om %b %c d\u00E5 %c', + 'report %s': + 'returnera %s', + 'stop block': + 'stoppa block', + 'stop script': + 'stoppa skript', + 'stop all %stop': + 'stoppa alla %stop', + 'pause all %pause': + 'pausa alla %pause', + + 'run %cmdRing %inputs': + 'k\u00F6r %cmdRing med %inputs', + 'launch %cmdRing %inputs': + 'starta %cmdRing med %inputs', + 'call %repRing %inputs': + 'anropa %repRing med %inputs', + 'run %cmdRing w/continuation': + 'k\u00F6r %cmdRing och forts\u00E4tt', + 'call %cmdRing w/continuation': + 'anropa %cmdRing och forts\u00E4tt', + 'when I start as a clone': + 'n\u00E4r jag startar som klon', + 'create a clone of %cln': + 'skapa klon av %cln', + 'myself': + 'mig sj\u00E4lv', + 'delete this clone': + 'radera klon', + + + 'warp %c': + 'warp %c', + + // sensing: + 'touching %col ?': + 'r\u00F6r %col ?', + 'touching %clr ?': + 'r\u00F6r %clr ?', + 'color %clr is touching %clr ?': + 'f\u00E4rgen %clr r\u00F6r %clr ?', + 'ask %s and wait': + 'fr\u00E5ga %s och v\u00E4nta', + 'what\'s your name?': + 'vad heter du?', + 'answer': + 'svar', + 'mouse x': + 'mus x-pos', + 'mouse y': + 'mus y-pos', + 'mouse down?': + 'musknapp nedtryckt?', + 'key %key pressed?': + 'tangent %key nedtryckt?', + 'distance to %dst': + 'avst\u00E5nd till %dst', + 'reset timer': + 'nollst\u00E4ll stoppur', + 'timer': + 'stoppur', + 'http:// %s': + 'http:// %s', + + 'turbo mode?': + 'turbol\u00E4ge?', + 'set turbo mode to %b': + 's\u00E4tt turbol\u00E4ge till %b', + + + 'filtered for %clr': + 'filtrera p\u00E5 %clr', + 'stack size': + 'stack-storlek', + 'frames': + 'ramar', + + // operators: + '%n mod %n': + '%n mod %n', + 'round %n': + 'avrunda %n', + '%fun av %n': + '%fun von %n', + 'pick random %n to %n': + 'slumptal fr\u00E5n %n till %n', + '%b and %b': + '%b och %b', + '%b or %b': + '%b eller %b', + 'not %b': + 'inte %b', + 'true': + 'sant', + 'false': + 'falskt', + 'join %words': + 'sl\u00E5 ihop %words', + 'hello': + 'hej', + 'world': + 'v\u00E4rlden', + 'letter %n of %s': + 'bokstav %n av %s', + 'length of %s': + 'l\u00E4ngden av %s', + 'unicode of %s': + 'unicode av %s', + 'unicode %n as letter': + 'unicode %n som bokstav', + 'is %s a %typ ?': + '%s \u00E4r %typ ?', + 'is %s identical to %s ?': + '%s identisk med %s ?', + + 'type of %s': + 'type %s', + + // variables: + 'Make a variable': + 'Ny variabel', + 'Variable name': + 'Variabelnamn', + 'Delete a variable': + 'Radera variabel', + + 'set %var to %s': + 's\u00E4tt %var till %s', + 'change %var by %n': + '\u00E4ndra %var med %n', + 'show variable %var': + 'visa variabel %var', + 'hide variable %var': + 'g\u00F6m variabel %var', + 'script variables %scriptVars': + 'skriptvariabel %scriptVars', + + // lists: + 'list %exp': + 'lista %exp', + '%s in front of %l': + '%s fr\u00E4mst i %l', + 'item %idx of %l': + 'element %idx i %l', + 'all but first of %l': + 'allt utom f\u00F6rsta i %l', + 'length of %l': + 'l\u00E4ngd av %l', + '%l contains %s': + '%l inneh\u00E5ller %s', + 'thing': + 'sak', + 'add %s to %l': + 'l\u00E4gg %s till %l', + 'delete %ida of %l': + 'radera %ida fr\u00E5n %l', + 'insert %s at %idx of %l': + 'l\u00E4gg in %s p\u00E5 plats %idx i lista %l', + 'replace item %idx of %l with %s': + 'ers\u00E4tt element %idx i %l med %s', + + // other + 'Make a block': + 'Skapa nytt block', + + // menus + // snap menu + 'About...': + 'Om Snap!...', + 'Snap! website': + 'Snap! webbsida', + 'Download source': + 'Ladda ner k\u00E4llkoden', + 'Switch back to user mode': + 'Tillbaka till anv\u00E4ndarl\u00E4ge', + 'disable deep-Morphic\ncontext menus\nand show user-friendly ones': + 'st\u00E4ng av Morphic\nmenyeroch visa \nanv\u00E4ndarv\u00E4nliga ist\u00E4llet', + 'Switch to dev mode': + 'Byt till utvecklarl\u00E4ge', + 'enable Morphic\ncontext menus\nand inspectors,\nnot user-friendly!': + 'aktivera Morphic menyer\noch inspektorer,\ninte anv\u00E4ndarv\u00E4nligt!', + + // project menu + 'Project notes...': + 'Annoteringar...', + 'New': + 'Ny', + 'Open...': + '\u00D6ppna...', + 'Save': + 'Spara', + 'Save As...': + 'Spara som...', + 'Import...': + 'Importera...', + 'file menu import hint': + 'l\u00E4ser in ett exporterat projekt,\nett bibliotek med block,\nen kostym, eller ett ljud', + 'Export project as plain text ...': + 'Exportera projektet som vanlig text...', + 'Export project...': + 'Exportera projekt...', + 'show project data as XML\nin a new browser window': + 'visa projektdata som XML\ni ett ny f\u00F6nster', + 'Export blocks...': + 'Exportera block...', + 'show global custom block definitions as XML\nin a new browser window': + 'visa globala anpassade blockdefinitioner som XML\ni ett nytt f\u00F6nster', + 'Import tools...': + 'Importverktyg...', + 'load the official library of\npowerful blocks': + 'ladda ner det officiella\nsuperblock biblioteket ', + 'Libraries...': + 'Bibliotek...', + 'Import library': + 'Importera bibliotek', + + // cloud menu + 'Login...': + 'Logga in...', + 'Registrer deg...': + 'Registrera dig...', + + // settings menu + 'Language...': + 'Spr\u00E5k...', + 'Zoom blocks...': + 'F\u00F6rstora blocken...', + 'Blurred shadows': + 'Suddade skuggor', + 'uncheck to use solid drop\nshadows and highlights': + 'avmarkera f\u00F6r att anv\u00E4nda\nifyllda skuggor och belysningar', + 'check to use blurred drop\nshadows and highlights': + 'kryssa f\u00F6r att anv\u00E4nda\nsuddiga skuggor och belysningar', + 'Zebra coloring': + 'Zebraf\u00E4rg', + 'check to enable alternating\ncolors for nested blocks': + 'kryssa f\u00F6r att v\u00E4xla blockf\u00E4rger\ni nestlade block', + 'uncheck to disable alternating\ncolors for nested block': + 'avmarkera f\u00F6r att inaktivera v\u00E4xlade\nf\u00E4rger i nestlade block', + 'Dynamic input labels': + 'Dynamiska namn f\u00F6r indata', + 'uncheck to disable dynamic\nlabels for variadic inputs': + 'avmarkera f\u00F6r att inaktivera \ndynamiska namn f\u00F6r indata \nmed flera variabelf\u00E4lt', + 'check to enable dynamic\nlabels for variadic inputs': + 'kryssa f\u00F6r att aktivera \ndynamiska namn f\u00F6r indata \nmed flera variabelf\u00E4lt', + 'Prefer empty slot drops': + 'F\u00F6redra sl\u00E4pp p\u00E5 tomma utrymmen', + 'settings menu prefer empty slots hint': + 'Inst\u00E4llningar\nf\u00F6redra sl\u00E4pp p\u00E5 tomma utrymmen', + 'uncheck to allow dropped\nreporters to kick out others': + 'avmarkera f\u00F6r att till\u00E5ta placerade\n rappporterare att flytta ut andra', + 'Long form input dialog': + 'Komplett inmatningsf\u00F6nster', + 'check to always show slot\ntypes in the input dialog': + 'kryssa f\u00F6r att alltid visa\n alla typer i inmatningsf\u00F6nstret', + 'uncheck to use the input\ndialog in short form': + 'avmarkera f\u00F6r att visa lilla inmatningsf\u00F6nstret', + 'Virtual keyboard': + 'Virtuellt tangentbord', + 'uncheck to disable\nvirtual keyboard support\nfor mobile devices': + 'avmarkera f\u00F6r att inaktivera\nst\u00F6d f\u00F6r virtuellt \ntangentbord p\u00E5 mobila enheter', + 'check to enable\nvirtual keyboard support\nfor mobile devices': + 'kryssa f\u00F6r att aktivera\nst\u00F6d f\u00F6r virtuellt \ntangentbord p\u00E5 mobila enheter', + 'Input sliders': + 'Volymkontroller', + 'uncheck to disable\ninput sliders for\nentry fields': + 'avmarkera f\u00F6r att inaktivera \nvolymkontroller f\u00F6r inmatningsf\u00E4lt', + 'check to enable\ninput sliders for\nentry fields': + 'kryssa f\u00F6r att aktivera \nvolymkontroller f\u00F6r inmatningsf\u00E4lt', + 'Clicking sound': + 'Klickljud', + 'uncheck to turn\nblock clicking\nsound off': + 'avmarkera f\u00F6r att\n inaktivera klickljud', + 'check to turn\nblock clicking\nsound on': + 'kryssa f\u00F6r att aktivera klickljud', + 'Animations': + 'Animationer', + 'uncheck to disable\nIDE animations': + 'avmarkera f\u00F6r att st\u00E4nga\n av IDE-animationer', + 'Turbo mode': + 'Turbol\u00E4ge', + 'check to enable\nIDE animations': + 'kryssa f\u00F6r att aktivera\n IDE-animationer', + 'Thread safe scripts': + 'Tr\u00E5ds\u00E4kra skript', + 'uncheck to allow\nscript reentrancy': + 'avmarkera f\u00F6r att till\u00E5ta \nskript att \u00E5terintr\u00E4da', + 'check to disallow\nscript reentrancy': + 'kryssa f\u00F6r att f\u00F6rbjuda \nskript att \u00E5terintr\u00E4da', + 'Prefer smooth animations': + 'J\u00E4mna animeringar', + 'uncheck for greater speed\nat variable frame rates': + 'avmarkera f\u00F6r h\u00F6gre fart \nvid variabel frame rate', + 'check for smooth, predictable\nanimations across computers': + 'kryssa f\u00F6r j\u00E4mna animeringar\n p\u00E5 alla plattformar', +// inputs + 'with inputs': + 'med indata', + 'input names:': + 'indatanamn:', + 'Input Names:': + 'Indatanamn:', + 'input list:': + 'indata lista:', + + // context menus: + 'help': + 'hj\u00E4lp', + + // blocks: + 'hjelp...': + 'hj\u00E4lp...', + 'relabel...': + 'd\u00F6p om...', + 'duplicate': + 'duplicera', + 'make a copy\nand pick it up': + 'g\u00F6r en kopia\noch plocka upp den', + 'only duplicate this block': + 'duplicera endast detta block', + 'delete': + 'radera', + 'script pic...': + 'skript bild...', + 'open a new window\nwith a picture of this script': + '\u00F6ppna ett nytt f\u00F6nster\nmed en bild av detta skript', + 'ringify': + 'ring runt', + 'unringify': + 'radera ringen runt', + + // custom blocks: + 'delete block definition...': + 'radera blockdefinition...', + 'edit...': + 'redigera...', + + // sprites: + 'edit': + 'redigera', + 'export...': + 'exportera...', + + // stage: + 'show all': + 'visa allt', + + // scripting area + 'clean up': + 'st\u00E4da', + 'arrange scripts\nvertically': + 'organisera skript\nvertikalt', + 'add comment': + 'l\u00E4gg till kommentar', + 'make a block...': + 'skapa nytt block...', + + // costumes + 'rename': + 'd\u00F6p om', + 'export': + 'exportera', + 'rename costume': + 'd\u00F6p om kostymen', + + // sounds + 'Play sound': + 'Spela ljud', + 'Stop sound': + 'Stoppa ljud', + 'Stop': + 'Stoppa', + 'Play': + 'Starta', + 'rename sound': + 'd\u00F6p om ljud', + + // dialogs + // buttons + 'OK': + 'OK', + 'Ok': + 'OK', + 'Cancel': + 'Avbryt', + 'Yes': + 'Ja', + 'No': + 'Nej', + + // help + 'Help': + 'Hj\u00E4lp', + + // Project Manager + 'Untitled': + 'Namnl\u00F6s', + 'Open Project': + '\u00D6ppna projekt', + '(empty)': + '(tomt)', + 'Saved!': + 'Sparat!', + 'Delete Project': + 'Radera projekt', + 'Are you sure you want to delete': + '\u00C4r du s\u00E4ker p\u00E5 att du vill radera', + 'rename...': + 'd\u00F6p om...', + + // costume editor + 'Costume Editor': + 'Kostymredigerare', + 'click or drag crosshairs to move the rotation center': + 'Klicka eller dra krysset f\u00F6r att markera mitten', + + // project notes + 'Project Notes': + 'Annoteringar', + + // new project + 'New Project': + 'Nytt projekt', + 'Replace the current project with a new one?': + 'Ers\u00E4tt aktuella projektet med ett nytt?', + + // save project + 'Save Project As...': + 'Spara projekt som...', + + // export blocks + 'Export blocks': + 'Exportera block', + 'Import blocks': + 'Importera block', + 'this project doesn\'t have any\ncustom global blocks yet': + 'Detta projekt saknar\negna globala block', + 'select': + 'v\u00E4lj', + 'all': + 'allt', + 'none': + 'ingenting', + + // variable dialog + 'for all sprites': + 'f\u00F6r alla sprites', + 'for this sprite only': + 'bara f\u00F6r denna sprite', + + // block dialog + 'Change block': + '\u00C4ndra block', + 'Command': + 'Kommando', + 'Reporter': + 'Funktion', + 'Predicate': + 'Predikat', + + // block editor + 'Block Editor': + 'Blockredigerare', + 'Apply': + 'Verkst\u00E4ll', + + // block deletion dialog + 'Delete Custom Block': + 'Radera custom blokk', + 'block deletion dialog text': + 'Skal denne blokken med alle dens instanser\n' + + 'bli slettet?', + + // input dialog + 'Create input name': + 'Skapa indata-namn', + 'Edit input name': + 'Redigera indata-namn', + 'Edit label fragment': + 'Redigera etikettdel', + 'Title text': + 'Titel', + 'Input name': + 'Indata-namn', + 'Delete': + 'Radera', + 'Object': + 'Objekt', + 'Number': + 'Nummer', + 'Text': + 'Text', + 'List': + 'Lista', + 'Any type': + 'Valfri typ', + 'Boolean (T/F)': + 'Boolean (S/F)', + 'Command\n(inline)': + 'Kommando\n(inline)', + 'Command\n(C-shape)': + 'Kommando\n(C-Form)', + 'Any\n(unevaluated)': + 'Vilken som helst\n(oevaluerad)', + 'Boolean\n(unevaluated)': + 'Boolean\n(oevaluerad)', + 'Single input.': + 'Enkel indata.', + 'Default Value:': + 'Standardv\u00E4rde:', + 'Multiple inputs (value is list of inputs)': + 'Flera indata (v\u00E4rdet \u00E4r en lista av indata)', + 'Upvar - make internal variable visible to caller': + 'Upvar - g\u00F6r internal variabel synlig f\u00F6r anroparen', + + // About Snap + 'About Snap': + 'Om Snap', + 'Back...': + 'Tillbaka...', + 'License...': + 'Licens...', + 'Modules...': + 'Moduler...', + 'Credits...': + 'Tack till...', + 'Translators...': + '\u00D6vers\u00E4ttare', + 'License': + 'Licens', + 'current module versions:': + 'Modulversioner', + 'Contributors': + 'Bidragsgivare', + 'Translations': + '\u00D6vers\u00E4ttningar', + + // variable watchers + 'normal': + 'normal', + 'large': + 'stor', + 'slider': + 'volymkontroll', + 'slider min...': + 'volymkontroll min...', + 'slider max...': + 'volymkontroll max...', + 'import...': + 'importera...', + 'Slider minimum value': + 'Volymkontroll - minsta v\u00E4rde', + 'Slider maximum value': + 'volymkontroll - h\u00F6gsta v\u00E4rde', + + // list watchers + 'length: ': + 'l\u00E4ngd: ', + + // coments + 'add comment here...': + 'l\u00E4gg till kommentar h\u00E4r...', + + // drow downs + // directions + '(90) right': + '(90) h\u00F6ger', + '(-90) left': + '(-90) v\u00E4nster', + '(0) up': + '(0) upp', + '(180) down': + '(180) ned', + + // collision detection + 'mouse-pointer': + 'muspekare', + 'edge': + 'kant', + 'pen trails': + 'pennsp\u00E5r', + + // costumes + 'Turtle': + 'Sk\u00F6ldpadda', + + // graphical effects + 'ghost': + 'sp\u00F6k', + + // keys + 'space': + 'mellanslag', + 'up arrow': + 'pil upp', + 'down arrow': + 'pil ned', + 'right arrow': + 'pil h\u00F6ger', + 'left arrow': + 'pil v\u00E4nster', + 'a': + 'a', + 'b': + 'b', + 'c': + 'c', + 'd': + 'd', + 'e': + 'e', + 'f': + 'f', + 'g': + 'g', + 'h': + 'h', + 'i': + 'i', + 'j': + 'j', + 'k': + 'k', + 'l': + 'l', + 'm': + 'm', + 'n': + 'n', + 'o': + 'o', + 'p': + 'p', + 'q': + 'q', + 'r': + 'r', + 's': + 's', + 't': + 't', + 'u': + 'u', + 'v': + 'v', + 'w': + 'w', + 'x': + 'x', + 'y': + 'y', + 'z': + 'z', + '0': + '0', + '1': + '1', + '2': + '2', + '3': + '3', + '4': + '4', + '5': + '5', + '6': + '6', + '7': + '7', + '8': + '8', + '9': + '9', + + // messages + 'new...': + 'ny...', + + // math functions + 'abs': + 'abs', + 'sqrt': + 'kvadratrot', + 'sin': + 'sin', + 'cos': + 'cos', + 'tan': + 'tan', + 'asin': + 'arc-1', + 'acos': + 'cos-1', + 'atan': + 'tan-1', + 'ln': + 'ln', + 'e^': + 'e^', + + // data types + 'number': + 'nummer', + 'text': + 'text', + 'Boolean': + 'boolean', + 'list': + 'lista', + 'command': + 'kommando', + 'reporter': + 'funktionsblock', + 'predicate': + 'predikat', + + // list indices + 'last': + 'sista', + 'any': + 'vilken som helst', + + // missing labels from initial translation added below + 'add a new sprite': + 'ny sprite', + 'when %keyHat key pressed': + 'n\u00E4r tangent %keyHat trycks ned', + 'when I receive %msgHat': + 'n\u00E4r jag tar emot %msgHat', + 'message': + 'meddelande', + 'any message': + 'n\u00E5got meddelande', + 'stop %stopChoices': + 'stoppa %stopChoices', + 'this script': + 'detta skript', + 'this block': + 'detta block', + 'stop %stopOthersChoices': + 'stoppa %stopOthersChoices', + 'all but this script': + 'alla f\u00F6rutom detta skript', + 'other scripts in sprite': + 'andra skript i denna sprite', + '%att of %spr': + '%att av %spr', + '%fun of %n': + '%fun av %n', + 'split %s by %delim': + 'dela %s med tecken %delim', + 'Script variable name': + 'Skriptvariabelnamn', + 'Reference manual': + 'Referensbok', + 'Export project as plain text...': + 'Exportera projektet som vanlig text...', + 'Import tools': + 'Importverktyg', + 'Signup...': + 'Registrera...', + 'Stage size...': + 'Scenstorlek...', + 'Stage size': + 'Scenstorlek', + 'Stage width': + 'Scenbredd', + 'Stage height': + 'Scenh\u00F6jd', + 'Default': + 'Standard', + 'Plain prototype labels': + 'Vanliga prototypetiketter', + 'uncheck to always show (+) symbols\nin block prototype labels': + 'avmarkera f\u00F6r att visa (+) symboler \n i blockprototypetiketter', + 'check to hide (+) symbols\nin block prototype labels': + 'kryssa f\u00F6r att visa (+) symboler \n i blockprototypetiketter', + 'check to prioritize\nscript execution': + 'kryssa f\u00F6r att prioritera \nskriptexekvering', + 'uncheck to run scripts\nat normal speed': + 'avmarkera f\u00F6r att k\u00F6ra \nskript vid normal hastighet', + 'uncheck to allow\nscript reentrance': + 'avmarkera f\u00F6r att till\u00E5ta \nskript att \u00E5tertilltr\u00E4da', + 'check to disallow\nscript reentrance': + 'kryssa f\u00F6r att f\u00F6rbjuda \nskript att \u00E5tertilltr\u00E4da', + 'Flat line ends': + 'Platta streckslut', + 'check for flat ends of lines': + 'kryssa f\u00F6r platta streckslut', + 'uncheck for round ends of lines': + 'avmarkera f\u00F6r avrundade streckslut', + 'hide primitives': + 'g\u00F6m primitiva', + 'show primitives': + 'visa primitiva', + 'help...': + 'hj\u00E4lp...', + 'move': + 'flytta', + 'detach from': + 'koppla bort', + 'detach all parts': + 'koppla bort alla delar', + 'pic...': + 'bild...', + 'open a new window\nwith a picture of the stage': + '\u00F6ppna ett nytt f\u00F6nster\nmed en bild av scenen', + 'undrop': + '\u00E5ngra sl\u00E4pp', + 'undo the last\nblock drop\nin this pane': + '\u00E5ngra sista \nblocksl\u00E4ppet i\ndetta omr\u00E5de', + 'scripts pic...': + 'skriptbild...', + 'open a new window\nwith a picture of all scripts': + '\u00F6ppna ett nytt f\u00F6nster\nmed en bild p\u00E5 alla skript', + 'Zoom blocks': + 'F\u00F6rstora blocken', + 'build': + 'bygg', + 'your own': + 'dina egna', + 'blocks': + 'block', + 'normal (1x)': + 'normal (1x)', + 'demo (1.2x)': + 'demo (1.2x)', + 'presentation (1.4x)': + 'presentation (1.4x)', + 'big (2x)': + 'stor (2x)', + 'huge (4x)': + 'j\u00E4ttestor (4x)', + 'giant (8x)': + 'enorm (8x)', + 'monstrous (10x)': + 'gigantisk (10x)', + 'Empty': + 'Tom', + 'brightness': + 'ljusstyrke', + 'negative': + 'negativ', + 'comic': + 'komisk', + 'confetti': + 'konfetti', + 'floor': + 'golv', + 'letter': + 'bokstav', + 'whitespace': + 'mellanslag', + 'line': + 'rad', + 'tab': + 'tab', + 'cr': + 'retur', + 'warp %c': + 'snabbspola %c', + 'Reset Password...': + 'Nollst\u00E4ll l\u00F6senord...', + 'Codification support': + 'St\u00F6d f\u00F6r textprogrammering', + 'Flat design': + 'Platt utseende', + 'check for block\nto text mapping features': + 'kryssa f\u00F6r att aktivera\nblock-till-text funktioner', + 'uncheck to disable\nblock to text mapping features': + 'avmarkera f\u00F6r att inaktivera\nblock-till-text funktioner', + 'check for alternative\nGUI design': + 'kryssa f\u00F6r att aktivera ett\nalternativt utseende', + 'uncheck for default\nGUI design': + 'avmarkera f\u00F6r att byta\ntill standardutseendet', + 'Select categories of additional blocks to add to this project.': + 'v\u00E4lj grupper av extrablock att l\u00E4gga till i projektet', + 'Select a costume from the media library': + 'v\u00E4lj en kostym fr\u00E5n mediabiblioteket', + 'Select a sound from the media library': + 'v\u00E4lj ett ljud fr\u00E5n mediabiblioteket', + 'Iteration, composition': + 'Upprepning, komposition', + 'List utilities': + 'Listverktyg', + 'Streams (lazy lists)': + 'Str\u00F6mmar (lata listor)', + 'Variadic reporters': + 'Variabla rapporterare', + 'Words, sentences': + 'Ord, meningar', + 'Paint a new costume': + 'Rita en ny kostym', + 'add a new Turtle sprite': + 'l\u00E4gg till en ny Sk\u00F6ldpadda-sprite', + 'paint a new sprite': + 'rita en ny sprite', + 'Paint Editor': + 'Rita', + 'undo': + '\u00E5ngra', + 'grow': + 'st\u00F6rre', + 'shrink': + 'mindre', + 'flip ↔': + 'v\u00E4nd ↔', + 'flip ↕': + 'v\u00E4nd ↕', + 'Brush size': + 'Pennstorlek', + 'Constrain proportions of shapes?\n(you can also hold shift)': + 'Beh\u00E5ll figurernas proportioner?\n(du kan ocks\u00E5 h\u00E5lla skift nedtryckt)' + +}; -- cgit v1.3.1 From d7def3bb24465d028dbeb91539f0c98d756da492 Mon Sep 17 00:00:00 2001 From: Gubolin Date: Sat, 10 Jan 2015 11:26:05 +0100 Subject: don't delete files from binary.sh --- binary.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/binary.sh b/binary.sh index c1a481e..212e7cb 100755 --- a/binary.sh +++ b/binary.sh @@ -79,10 +79,6 @@ fi # compress all js files find . -name '*.js' | xargs -I {} uglifyjs {} -o {} -c -# delete everything that is not html/js/logo/config -find . \( \! -name '*.js' \! -name 'snap.html' \! -name 'snap_logo_sm.png' \! -name 'config.xml' \! -name 'package.json' -type f \) -print0 | xargs -0 rm -find . -type d -empty -print0 | xargs -0 rm -r - # return to the directory where the script was called from cd "$scriptdir" -- cgit v1.3.1 From 3c03814833a272b305cbac5ad7f70190ec2a8926 Mon Sep 17 00:00:00 2001 From: Gubolin Date: Sat, 10 Jan 2015 11:28:48 +0100 Subject: don't delete files from helpers --- desktop.sh | 3 --- mobile.sh | 3 --- 2 files changed, 6 deletions(-) diff --git a/desktop.sh b/desktop.sh index 53ec24b..72b0786 100755 --- a/desktop.sh +++ b/desktop.sh @@ -29,9 +29,6 @@ else cd $builddir/ fi -# remove mobile config -rm config.xml - nwbuild -p "$1" . mv build/* $scriptdir/ diff --git a/mobile.sh b/mobile.sh index 4b5dc48..6ec8a0e 100755 --- a/mobile.sh +++ b/mobile.sh @@ -38,9 +38,6 @@ else cd www fi -# remove configs for desktop, it is not needed -rm package.json - # add mobile-specific library; it's made available at runtime sed -i '/link rel="shortcut icon"/a\ ' snap.html -- cgit v1.3.1