Comments (10)
+1
from pencilcode.
+1
from pencilcode.
A question.
When teaching in an environment like Scratch, you translate all the text inside the blocks to the native readable language.
When teaching in Java, you wouldn't translate Java's library functions like Array, String, .length, etc. These would be left in English (right?)
What is the right approach to code when in Pencil Code, where we want to put literal code inside the blocks?
from pencilcode.
Ok. Maybe I misunderstood the goal: What differs Pencil Code from Scratch?
e.g. I would translate the following
pen green, 3
rt 360, 10
lt 45, 30
to German
stift grün, 3
ld 360, 10 // links drehen
rd 45, 30 // rechts drehen
Edit: Oh sorry now I get you. You are right some things wouldn't be translated like library functions or keywords like do
or for
.
from pencilcode.
Right. Here is a question for teachers of non-english-speaking students. We can break things down into different strings that might or might not be internationalized. Which ones does it make sense to translate?
(1) Help text such as "sets the pen color" hover text or other tutorial text.
(2) Labels on buttons or other UI elements such as the "Save" button.
(3) Turtle library function names such as "rt" for 'right-turn' or "pen" or "button" or "label"
(4) Color names that come from standards such as "saddlebrown" or "red" from the standards http://www.w3.org/TR/css3-color/#svg-color
(5) Event names (and corresponding event-listening functions) that come from standards such as "click" or "keyup" or "keydown".
(6) Other less-seen names that come from standards such as "font-family", "color", "background-color" css attributes. "" (HTML created by the label function), "", "" (HTML created by the button function), "" (HTML created by the table function), and CSS selectors for "label img table button". etc.
(7) Library function names from base libraries such as jQuery "hide" "show" "finish" "remove" "animate".
(8) Javascript standard library names such as "length", "Array", "push", "pop", etc.
(9) Coffeescript and Javascript keywords such as "for", "switch", "if", "break", "return".
Certainly #1 and #2 should be translated. Almost certainly #8 and #9 should not be translated. The others are a matter of judgement. The disadvantage of translating computer symbols like function names and color constants is that programs then become incompatible between locales.
One goal of Pencil Code is to propel and equip students to use mainstream programming languages, which is why many "professional" idioms such as jQuery, CSS, HTML5, javascript are exposed. Which ones above would a non-english-speaking teacher want to have translated for students?
from pencilcode.
I would say as much as possible, 1) and 2) being essential, 3) being quite important, the rational being that if someone really wants to expose himself to "real world programming" then he can always switch to the english version.
My experience teaching computer science to university students in China is that the fact that programmng languages/documentation are in english is a HUGE struggle for them, something that even as a French I didn't notice before because for latin-language-speaker "click" is "clic" , animate is "animer" , so we didn't need to learn all these domain specific words.
For "incompatible between" locale I think blockly for example solved this by getting an intermediate representation which is locale-less
from pencilcode.
The dilemma (and promise) of Pencil Code is that there is no intermediate representation.
When you toggle from blocks to text mode, your program is exactly the same. So if we have a Chinese block for "right turn" shown as 向右, then when toggling to Javascript or Coffeescript, it should read, in the Coffeescript program text as
向右 90
In other words, with the current design, in order to have a Chinese-readable right-turn block, there would be a function called 向右
in the underlying library.
So I guess I see two ways to solve internationalization:
(1) Translate the turtle library. We'd have a version for each language, and programs written for one language would not be able to run in a different language.
(2) Change the block editor so that text shown in the blocks is not necessarily the same as text when you switch to text-code mode.
Maybe what you are imagining is (2)?
from pencilcode.
The dilemma (and promise) of Pencil Code is that there is no intermediate representation.
That's what I especially like about Pencil Code. Teach first programming steps in Pencil Code and directly transfering the knowledge to "classical" programming.
So what about starting with translating help texts and basic resources? And see in which contexts this works.
Then we could have the larger discussion about how to properly teach programming to non-english speaking children.
from pencilcode.
@luebken +1 , translating that should not be blocked by "what other things will be translated"
@davidbau yes i was imagining something like that for 2) sorry if i didn't expressed myself clearly. as for 1), for my selfish point of view of teaching an homogenous class or one student at a time, i don't think there's a need for software to be compatible interlanguage. after of course if we want to permit people to share code in some kind of "global village" then it is indeed not wanted.
from pencilcode.
Instead of translating the whole library, how about adding a layer in between the editor and the interpreter to map those non-English code to their English version?
For example, for the Chinese version, in the editor it appears:
向右 90
But when you hit Run
, it actually gets processed to
rt 90
before it gets executed.
Then for each language we just need to have a mapping table. There will be some work to do with error handling though.
from pencilcode.
Related Issues (20)
- Not working properly in mobile HOT 1
- Email button not working HOT 3
- p5.js not working? HOT 1
- Don't return placeholder HTML for non-existing .js files
- Feature Request: API for "create new file with starter code"
- UX: Blocks mode activates keyboard too often on mobile device
- Pencil Code Embed: setCode also resets palette.
- File icon is not saved if it's a new file
- Custom Block Palette: inconsistent behavior about multi-line snippets HOT 1
- trying to install pencil code at my server and getting ERROR when run GRUNT HOT 3
- how to integrate g+ into pencilcode
- error [email protected] install: `node-gyp configure build HOT 1
- I can't install pencilcode. please help!
- How to insert new block?
- Thumbnail popover is a bit misaligned when a new thumbnail is created
- Something worng when run grunt HOT 1
- Blocks for adding elements to array
- Custom palette using guide requires user be logged in, making link sharing difficult
- Unable to type properly on mobile devices
- Error while running grunt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pencilcode.