Translating:Blockly

From translatewiki.net
Visual example of a program in Blocky.
Visual example of a program in Blocky.

Blockly (repository) is an open source project to help people, especially children, learn to program computers. Blockly programs consist of connected "blocks" of code. It consists of:

  • an extensible visual programming environment
  • a set of educational games for children (or others)

Internationalization, being gender-neutral, and being accessible in a variety of cultures are key priorities.

Contacts: Sean Lip, NeilFraser.

General translation notes

Tense

Our target audience is individual or small groups of children. Please use gender-neutral forms if possible in your language.

Style

The tone is informal and conversational, and we prefer short phrases to long ones, such as "if path ahead" instead of "if there is a path ahead". Translations need not be exact.

Rigor

It is more important that language be clear to beginners than that it matches what experienced programmers use. For example, we use the term "text" instead of "string", and we use "list" instead of "array". A more technical example is that we use 1-based indexing instead of the more common 0-based indexing.

Consistency

Consistency is important. In English, for example, we have gone back and forth on whether to use the term "function" or "procedure". What is more important than which term is chosen is that the same term is used throughout. See Blockly Terms for how key Blockly terms appearing in multiple messages have been translated (if at all) into your language. If agreement among translators cannot be reached, please ask for help.

Symbols

If any mathematical (or other) symbols are inappropriate in your language but are not offered for customization, please let us know.

Special terms

Blockly
Our recommendation is that the name of the project be left as is in languages using the Latin alphabet and that it be transliterated in other languages, possibly in parentheses, such as "Blockly (Блoкли)" in Russian.
block
Blocks in Blockly programs should be translated as children's building blocks. If that doesn't work in your language, "puzzle piece" is also acceptable.

Plural

Plural formatting is not supported.

Ordinal numbers

Some blocks refer to the nth item in a list or piece of text, where n is an arbitrary number or expression. In English, such a number is preceded by "#", which is included in the messages that precede the space in which the number would go:

try out block

Hungarian requires that such numbers or expressions be followed by a dot ("."). A special message ORDINAL_NUMBER_SUFFIX has the value "." for Hungarian and is automatically placed after each ordinal number (but not after the words for "first" or "last", which are already ordinal).

The Hungarian block above also includes a "tail" (final piece of text after the last block). Most languages do not require support for ordinal numbers or for tails, in which case those messages should be the empty string.

The Blockly language

All of the tutorials and applications use a subset or all of the Blockly language, which consists of blocks representing aspects of programming languages, such as control structure, creation of variables and procedures, and library routines. You can play with the blocks at https://blockly-demo.appspot.com/static/demos/code/index.html

The toolbox, workspace, and categories

The below picture shows:

  • the toolbox (in grey), which is where the user gets blocks.
  • the workspace (in white), which is where the user places blocks to build the program.

In the above picture, the toolbox is closed, and only category names (such as "Control" and "Logic") can be seen. One block is in the workspace. In the below picture, the user has clicked on "Control", causing the category to be expanded and the blocks shown. This screen also has tabs to show the JavaScript, Python, and XML associated with the program in the workspace. Currently, the "Blocks" tab is selected.

Messages associated with blocks

There are many different types of messages associated with blocks, illustrated in the pictures below:

  • Block text, such as "colour with" in the below blocks.
  • Block input text, such as "red", "green", and "blue", where other blocks can be attached.
  • Tooltip, displayed when the user hovers the mouse over a block, shown in a yellow background, as in the picture below. The translator should not insert newline characters ('\n' or <br/>), which are added automatically. Tooltips should be full sentences.
  • Context menu, displayed when the user right-clicks on a block, shown in a white background. Please read Context menus below.
  • URL, which is opened in another tab when the user clicks on the "Help" context menu item. If the link is to Wikipedia, the easiest way to translate it is by seeing if there is a corresponding Wikipedia change in the target language. If none can be found easily, it is fine to leave the URL untranslated.
  • Drop-down menu, one of multiple choices on a drop-down menu. Please read Drop-down menus below.

Context menus

Note that the block below is highlighted (surrounded by a thin orange outline), indicating that the user has selected it. Clicking on any of the context menu items affects the highlighted block. Some items, such as "Duplicate", "Disable", and "Delete" also affect any contained blocks (such as the number 20 in this example).

Selecting Inline Inputs transforms the block to the following form:

Restoring the default display is done through the context menu item External Inputs (not shown).

Infrequent message types

There are additional types of messages associated with a few blocks:

  • grammar, which is currently only used for handling ordinal numbers.
  • drop-down choice,, such as "Rename variable..." and "New variable..." in the below left picture, which allow the user to change the name of the variable named "item" or create a new variable, using an a drop-down menu showing possible variable names and options to input a new name or rename an existing one in a prompt dialog.
  • prompt, as in the text 'Rename all %1 variables..." in the below right picture.
  • default name, for the default variable name "item", which can be changed to something more specific by the user.

Reconfiguring blocks

Conditional blocks (if / else if... / else)

A few blocks can be reconfigured. For example, an "if" block can be reconfigured to have any number of "else if" sections. The user makes such modifications by clicking on the star (formerly a "+" sign) in the upper left corner of the block, which opens a configuration tool, shown below:

Any number of "else if" blocks, and up to one "else" block, may be added to the "if" block.

Function definitions

Similarly, any number of inputs (also known as "parameters") can be added to function definitions:

This is an advanced feature, and it is not necessary to understand it in order to do translations.

Blockly games

Each game has its own messages. There are also messages of the following types that are used by multiple applications:

  • alert, pop-up error messages, such as if the user tries to retrieve a program that cannot be found.
  • category, the names of categories (such as "Math" and Text") into which blocks are organized.
  • variable name, such as the second occurrences of "text" and "list" in the below picture. These are the default names for variables containing text and lists, respectively.

Puzzle

The introductory puzzle teaches people how to use the blocks. It is the easiest to translate, as it contains no technical terms.

Maze

The maze game has the user guide a character to a goal. It is the most popular Blockly game.

Maze-specific terms

level
Tutorials are divided into numbered levels, like the levels in a video game. The first level of each tutorial is 1. Harder levels have higher numbers.
player
Term for the character moved by the user's commands. This was originally "Pegman", but we added skins to change the character's appearance. We chose the English-language term "player" over "character" or "avatar", because "player" is simpler and shorter.

Messages associated with blocks

  • warning: message conveying important information to user (namely how many blocks they have left).
  • alert: message in popup window either congratulating the user for completing a level or notifying them of an error.
  • instructions: one or more short sentences introducing the current level. In the screenshot at the beginning of this section, the instructions are: "A program is a sequence of blocks. Stack a couple of 'move forward' blocks together to help me reach the goal". The word 'program' refers to a computer program, and the words for 'stack' and 'blocks' should be the same as for stacking children's blocks. Use the imperative verb form appropriate for speaking to a child, gender unspecified. If no gender-neutral singular/familiar form exists but a gender-neutral plural/formal form exists, use that instead.
  • dropdown: described below.

Drop-down menus

Related instructions (such as "turn left" and "turn right") are represented by a single block that contains an input field opening a drop-down selection menu when clicked, as shown in the image below. The translator does not need to do anything special for words (such as "turn") to be pulled out of drop-down selection menus; common left or right substrings delimited with spaces are automatically recognized and extracted.

In some languages, such as Vietnamese, it would not be appropriate to extract common substrings. If the translator set Maze.turnLeft to "quay qua trái" and Maze.turnRight to "quay qua phải", this drop-down field would be created, which would look wrong to a Vietnamese speaker:

Instead, the translator should replace spaces that delimit words by a non-breaking space character (\u00A0), to prevent either word from being extracted separately. In our example, the translator would set Maze.turnLeft to "quay qua\u00A0trái" and "Maze.turnRight" to "quay qua\u00A0phải", which gives the correct drop-down menu:

In languages without spaces between words, such as Chinese, the translator should insert a space where a break should occur. For more detail, see the Blockly documentation on drop-down selection menus.

Turtle graphics

The Turtle game enables users to draw pictures through the use of "turtle graphics", which originated with the Logo programming language. With turtle graphics, the user directs an imaginary turtle (represented as a green circle) to move, turn, change its pen width, etc., in order to draw a picture. As with all of our applications, translators are encouraged to try it out.

See discussion above about dropdown menus.

Sub-projects (message groups)

Exports

Languages with translation completion less than 25% are not committed to version control. If the project consists of multiple message groups, the limit is applied to each group separately.

Translation updates are exported to version control every Monday and Thursday.

Activity


Translation statistics

The numbers shown below are cached and may not show the latest status. See this stats page for always up-to-date statistics.

Language Messages Untranslated Completion Reviewed Outdated
ab: Abkhazian 588 257 56% 0% 1%
ace: Achinese 575 535 6% 0% 0%
acm: Iraqi Arabic 575 552 4% 0% 0%
af: Afrikaans 575 541 5% 0% 1%
am: Amharic 575 295 48% 19% 0%
ar: Arabic 595 0 100% 96% 0%
as: Assamese 575 553 3% 0% 0%
ast: Asturian 575 447 22% 0% 0%
atj: Atikamekw 577 558 3% 0% 0%
awa: Awadhi 575 552 4% 0% 0%
az: Azerbaijani 584 138 76% 0% 0%
azb: South Azerbaijani 575 462 19% 0% 1%
ba: Bashkir 588 293 50% 89% 1%
ban: Balinese 575 552 4% 91% 0%
bcc: Southern Balochi 591 261 55% 0% 3%
bcl: Central Bikol 575 556 3% 0% 0%
be: Belarusian 593 74 87% 0% 3%
be-tarask: Belarusian (Taraškievica orthography) 584 6 98% 10% 2%
bg: Bulgarian 590 0 100% 98% 0%
bgn: Western Balochi 575 555 3% 0% 0%
blk: Pa'O 578 549 5% 0% 0%
bn: Bangla 580 201 65% 5% 3%
br: Breton 581 1 99% 0% 0%
bs: Bosnian 582 381 34% 10% 0%
btm: Batak Mandailing 575 498 13% 75% 0%
ca: Catalan 594 10 98% 1% 1%
ce: Chechen 576 159 72% 0% 1%
ckb: Central Kurdish 577 505 12% 9% 1%
co: Corsican 575 519 9% 0% 0%
crh-latn: Crimean Tatar (Latin script) 575 553 3% 0% 0%
cs: Czech 592 61 89% 46% 1%
csb: Kashubian 575 525 8% 2% 1%
da: Danish 591 0 100% 45% 0%
de: German 607 0 100% 91% 0%
diq: Zazaki 580 167 71% 5% 0%
dtp: Central Dusun 575 371 35% 16% 0%
dty: Doteli 576 488 15% 0% 0%
ee: Ewe 581 378 34% 0% 0%
el: Greek 587 7 98% 56% 2%
en: English 647 0 100% 0% 0%
en-gb: British English 576 383 33% 7% 0%
eo: Esperanto 592 8 98% 2% 0%
es: Spanish 593 0 100% 98% 0%
et: Estonian 582 107 81% 10% 0%
eu: Basque 587 154 73% 99% 1%
fa: Persian 593 106 82% 95% 2%
fi: Finnish 591 1 99% 86% 0%
fo: Faroese 575 280 51% 98% 0%
fr: French 607 0 100% 66% 0%
fur: Friulian 576 528 8% 0% 0%
fy: Western Frisian 577 486 15% 0% 1%
ga: Irish 575 507 11% 0% 0%
gl: Galician 583 0 100% 33% 0%
glk: Gilaki 575 561 2% 0% 0%
gn: Guarani 576 500 13% 0% 0%
gom-deva: Goan Konkani (Devanagari script) 575 557 3% 0% 0%
gom-latn: Goan Konkani (Latin script) 575 557 3% 0% 0%
gor: Gorontalo 576 486 15% 0% 1%
gu: Gujarati 575 503 12% 0% 0%
ha: Hausa 575 13 97% 0% 1%
hak: Hakka Chinese 575 537 6% 0% 1%
he: Hebrew 590 0 100% 39% 0%
hi: Hindi 575 112 80% 71% 1%
hif-latn: Fiji Hindi (Latin script) 575 536 6% 0% 0%
hr: Croatian 582 8 98% 99% 0%
hrx: Hunsrik 591 231 60% 0% 1%
hsb: Upper Sorbian 575 455 20% 0% 0%
hu: Hungarian 599 49 91% 75% 2%
hy: Armenian 584 1 99% 54% 0%
hyw: Western Armenian 575 520 9% 0% 0%
ia: Interlingua 585 0 100% 10% 0%
id: Indonesian 576 0 100% 42% 0%
ig: Igbo 575 5 99% 0% 1%
inh: Ingush 580 447 22% 84% 1%
io: Ido 575 520 9% 0% 0%
is: Icelandic 581 13 97% 6% 0%
it: Italian 594 25 95% 3% 0%
ja: Japanese 595 0 100% 45% 0%
ka: Georgian 575 562 2% 15% 1%
kab: Kabyle 577 9 98% 54% 0%
kbd-cyrl: Kabardian (Cyrillic script) 590 423 28% 0% 1%
kjh: Khakas 575 542 5% 0% 0%
kjp: Eastern Pwo 575 555 3% 0% 0%
km: Khmer 575 546 5% 0% 1%
kn: Kannada 575 1 99% 92% 0%
ko: Korean 603 10 98% 17% 2%
krl: Karelian 577 481 16% 45% 0%
ksh: Colognian 575 530 7% 2% 1%
ku-latn: Kurdish (Latin script) 575 518 9% 47% 0%
kum: Kumyk 575 484 15% 0% 1%
ky: Kyrgyz 576 503 12% 2% 1%
lag: Langi 575 553 3% 0% 0%
lb: Luxembourgish 576 316 45% 22% 0%
lez: Lezghian 576 552 4% 0% 0%
lfn: Lingua Franca Nova 575 557 3% 0% 0%
lki: Laki 578 167 71% 0% 1%
lo: Lao 578 493 14% 0% 0%
lrc: Northern Luri 575 397 30% 0% 1%
lt: Lithuanian 579 18 96% 21% 0%
lv: Latvian 579 63 89% 82% 0%
mg: Malagasy 575 484 15% 0% 0%
mk: Macedonian 586 317 45% 8% 1%
ml: Malayalam 575 539 6% 13% 1%
mnw: Mon 576 456 20% 0% 1%
mr: Marathi 575 474 17% 0% 1%
ms: Malay 587 86 85% 0% 3%
my: Burmese 579 307 46% 87% 1%
nah: Nāhuatl 575 554 3% 0% 0%
nan: Minnan 575 542 5% 0% 0%
nb: Norwegian Bokmål 579 0 100% 6% 0%
ne: Nepali 575 307 46% 7% 0%
nl: Dutch 594 0 100% 23% 0%
nog: Nogai 575 535 6% 0% 0%
nqo: N’Ko 575 557 3% 0% 0%
oc: Occitan 581 231 60% 2% 1%
ojb: Northwestern Ojibwa 575 543 5% 0% 0%
olo: Livvi-Karelian 575 478 16% 14% 1%
os: Ossetic 575 554 3% 0% 0%
pa: Punjabi 577 475 17% 39% 1%
pl: Polish 588 0 100% 39% 0%
pms: Piedmontese 575 0 100% 0% 0%
pnb: Western Punjabi 575 559 2% 0% 0%
ps: Pashto 576 493 14% 0% 1%
pt: Portuguese 595 0 100% 12% 0%
pt-br: Brazilian Portuguese 595 0 100% 98% 0%
qqq: Message documentation 647 0 100% 0% 0%
ro: Romanian 582 6 98% 5% 1%
ru: Russian 596 0 100% 94% 0%
sat: Santali 575 525 8% 0% 0%
sc: Sardinian 575 105 81% 7% 3%
scn: Sicilian 579 488 15% 0% 0%
sco: Scots 575 490 14% 0% 1%
sd: Sindhi 580 291 49% 32% 1%
sdc: Sassarese Sardinian 581 516 11% 0% 0%
sdh: Southern Kurdish 575 531 7% 0% 0%
se: Northern Sami 575 551 4% 0% 0%
shn: Shan 581 480 17% 0% 0%
si: Sinhala 575 537 6% 7% 0%
sk: Slovak 580 5 99% 84% 0%
skr-arab: Saraiki (Arabic script) 576 387 32% 0% 0%
sl: Slovenian 601 0 100% 43% 0%
smn: Inari Sami 576 320 44% 0% 0%
sms: Skolt Sami 575 511 11% 0% 0%
sq: Albanian 593 1 99% 0% 0%
sr-ec: Serbian (Cyrillic script) 591 2 99% 50% 0%
sr-el: Serbian (Latin script) 587 65 88% 0% 3%
sro: Campidanese Sardinian 575 543 5% 0% 0%
sv: Swedish 592 1 99% 97% 1%
sw: Swahili 575 533 7% 0% 1%
ta: Tamil 581 191 67% 1% 2%
tcy: Tulu 589 209 64% 45% 1%
tdd: Tai Nuea 581 480 17% 0% 0%
te: Telugu 578 447 22% 2% 1%
th: Thai 586 8 98% 51% 0%
ti: Tigrinya 575 276 52% 0% 0%
tl: Tagalog 575 453 21% 0% 0%
tly: Talysh 575 540 6% 0% 0%
tn: Tswana 575 537 6% 2% 1%
tr: Turkish 600 0 100% 96% 0%
tt-cyrl: Tatar (Cyrillic script) 580 531 8% 0% 0%
ug-arab: Uyghur (Arabic script) 586 462 21% 0% 0%
uk: Ukrainian 595 7 98% 63% 0%
ur: Urdu 575 218 62% 78% 1%
uz: Uzbek 575 443 22% 0% 0%
vi: Vietnamese 585 5 99% 99% 1%
xmf: Mingrelian 579 465 19% 0% 1%
yi: Yiddish 575 557 3% 0% 0%
yo: Yoruba 578 13 97% 0% 1%
zgh: Standard Moroccan Tamazight 575 476 17% 35% 0%
zh-hans: Simplified Chinese 597 0 100% 43% 0%
zh-hant: Traditional Chinese 597 0 100% 84% 0%
zh-hk: Chinese (Hong Kong) 576 548 4% 0% 0%
All 172 languages together 100,042 52,281 47% 36% 1%

Map of translators

Loading map...

Add yourself to map See also: Category:Blockly translators — all users that registered their participation in their user page (including those not indicating their location).