Translating:Blockly

From translatewiki.net
Revision as of 14:56, 23 March 2018 by Nike (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Blockly.png

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:

Blockly-in-text-number.png 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).

Blockly-in-text-number-hu.png

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.

Blockly-canvas-toolbox-closed.png

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.

Blockly-canvas-toolbox-open.png

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. These are discussed more 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.
  • dropdown menu, one of multiple choices on a drop-down menu. Please read Translating:Blockly#Drop-Down_Menus.

Blockly-color-with.png

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).

Blockly-context-menu.png

Selecting Inline Inputs transforms the block to the following form:

Blockly-inline.png

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

Blockly-color-with.png

infrequent message types

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

  • grammar, which is currently only used for handling ordinal numbers.
  • dropdown 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.
  • 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.

Blockly-variable-item.png Blockly-variable-rename.png

Reconfiguring blocks

if blocks

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:

Blockly-if-configuration.png

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:

Blockly-function-mutator.png

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.

Default-variables.png

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.

Blockly-maze.png

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 a drop-down menu 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 menus; common left or right substrings delimited with spaces are automatically recognized and extracted.

Blockly-turn-left-right.png

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 dropdown menu would be created, which would look wrong to a Vietnamese speaker:

Blockly-vi-turn-wrong.png

Instead, the translator should put the non-breaking space character (\u00A0) between words to prevent either 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 dropdown menu:

Blockly-vi-turn-correct.png

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 menus.

Turtle Graphics

Blockly-turtle.png

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.

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.

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 604 255 57% 0% 1%
ace: Achinese 604 563 6% 0% 0%
ar: Arabic 604 0 100% 97% 0%
as: Assamese 604 582 3% 0% 0%
ast: Asturian 604 484 19% 0% 0%
atj: Atikamekw 604 579 4% 0% 0%
awa: Awadhi 604 581 3% 0% 0%
az: Azerbaijani 604 138 77% 0% 0%
azb: South Azerbaijani 604 487 19% 0% 1%
ba: Bashkir 604 308 49% 91% 1%
bcc: Southern Balochi 604 266 55% 0% 1%
bcl: Central Bikol 604 585 3% 0% 0%
be: Belarusian 604 68 88% 0% 3%
be-tarask: Belarusian (Taraškievica orthography) 604 1 99% 6% 0%
bg: Bulgarian 604 0 100% 85% 0%
bgn: Western Balochi 604 583 3% 0% 0%
bn: Bangla 604 213 64% 4% 3%
br: Breton 604 1 99% 0% 0%
bs: Bosnian 604 590 2% 92% 0%
btm: Mandailing 604 525 13% 75% 0%
ca: Catalan 604 179 70% 2% 1%
ce: Chechen 604 554 8% 0% 1%
ckb: Central Kurdish 604 534 11% 10% 1%
co: Corsican 604 590 2% 0% 0%
cs: Czech 604 87 85% 29% 3%
csb: Kashubian 604 541 10% 1% 1%
da: Danish 604 2 99% 45% 0%
de: German 604 1 99% 93% 0%
diq: Zazaki 604 245 59% 1% 0%
dty: Doteli 604 506 16% 0% 0%
ee: Ewe 604 384 36% 0% 0%
el: Greek 604 4 99% 22% 0%
en-gb: British English 604 382 36% 6% 1%
eo: Esperanto 604 1 99% 2% 0%
es: Spanish 604 1 99% 50% 0%
et: Estonian 604 175 71% 11% 0%
eu: Basque 604 150 75% 31% 0%
fa: Persian 604 88 85% 33% 0%
fi: Finnish 604 9 98% 89% 1%
fr: French 604 0 100% 72% 0%
fur: Friulian 604 557 7% 0% 1%
fy: Western Frisian 604 506 16% 0% 1%
ga: Irish 604 532 11% 0% 0%
gl: Galician 604 310 48% 43% 0%
glk: Gilaki 604 590 2% 0% 0%
gn: Guarani 604 519 14% 0% 0%
gom-deva: Goan Konkani (Devanagari script) 604 581 3% 0% 0%
gom-latn: Goan Konkani (Latin script) 604 581 3% 0% 0%
gor: Gorontalo 604 505 16% 0% 1%
ha: Hausa 604 2 99% 0% 0%
hak: Hakka Chinese 604 565 6% 0% 1%
he: Hebrew 604 115 80% 53% 0%
hi: Hindi 604 118 80% 72% 1%
hif-latn: Fiji Hindi (Latin script) 604 537 11% 0% 0%
hr: Croatian 604 547 9% 100% 0%
hrx: Hunsrik 604 241 60% 0% 1%
hsb: Upper Sorbian 604 588 2% 0% 1%
hu: Hungarian 604 54 91% 77% 2%
hy: Armenian 604 13 97% 53% 0%
hyw: Western Armenian 604 540 10% 0% 0%
ia: Interlingua 604 11 98% 7% 0%
id: Indonesian 604 95 84% 46% 3%
ig: Igbo 604 2 99% 0% 0%
inh: Ingush 604 480 20% 97% 1%
is: Icelandic 604 57 90% 10% 1%
it: Italian 604 17 97% 4% 0%
ja: Japanese 604 56 90% 51% 2%
kab: Kabyle 604 0 100% 2% 0%
kbd-cyrl: Kabardian (Cyrillic script) 604 430 28% 0% 1%
kjh: Khakas 604 580 3% 0% 0%
kjp: Eastern Pwo 604 578 4% 0% 0%
km: Khmer 604 574 4% 0% 1%
kn: Kannada 604 434 28% 0% 1%
ko: Korean 604 42 93% 19% 2%
krl: Karelian 604 505 16% 44% 0%
ksh: Colognian 604 558 7% 2% 1%
ku-latn: Kurdish (Latin script) 604 542 10% 46% 0%
kum: Kumyk 604 501 17% 0% 0%
ky: Kyrgyz 604 539 10% 0% 1%
lag: Langi 604 580 3% 0% 0%
lb: Luxembourgish 604 380 37% 25% 0%
lez: Lezghian 604 579 4% 0% 0%
lfn: Lingua Franca Nova 604 584 3% 0% 0%
lki: Laki 604 176 70% 0% 1%
lo: Lao 604 518 14% 0% 0%
lrc: Northern Luri 604 408 32% 0% 1%
lt: Lithuanian 604 85 85% 24% 1%
lv: Latvian 604 93 84% 87% 2%
mg: Malagasy 604 512 15% 0% 0%
mk: Macedonian 604 356 41% 10% 1%
ml: Malayalam 604 562 6% 11% 1%
mnw: Mon 604 467 22% 0% 0%
mr: Marathi 604 572 5% 0% 1%
ms: Malay 604 114 81% 0% 3%
my: Burmese 604 331 45% 84% 0%
nah: Nāhuatl 604 582 3% 0% 0%
nan: Min Nan Chinese 604 571 5% 0% 0%
nb: Norwegian Bokmål 604 17 97% 6% 2%
ne: Nepali 604 532 11% 0% 1%
nl: Dutch 604 0 100% 22% 0%
nqo: N’Ko 604 586 2% 0% 0%
oc: Occitan 604 253 58% 2% 1%
olo: Livvi-Karelian 604 504 16% 14% 0%
pa: Punjabi 604 502 16% 0% 1%
pl: Polish 604 44 92% 41% 0%
pms: Piedmontese 604 1 99% 0% 0%
pnb: Western Punjabi 604 588 2% 0% 0%
ps: Pashto 604 520 13% 0% 0%
pt: Portuguese 604 0 100% 13% 0%
pt-br: Brazilian Portuguese 604 0 100% 90% 0%
qqq: Message documentation 604 1 99% 0% 0%
ro: Romanian 604 1 99% 5% 0%
ru: Russian 604 0 100% 97% 0%
sat: Santali 604 548 9% 0% 0%
sc: Sardinian 604 114 81% 7% 3%
sco: Scots 604 518 14% 0% 1%
sd: Sindhi 604 306 49% 17% 0%
sdh: Southern Kurdish 604 581 3% 0% 0%
shn: Shan 604 503 16% 0% 0%
si: Sinhala 604 564 6% 7% 0%
sk: Slovak 604 62 89% 93% 3%
skr-arab: Saraiki (Arabic script) 604 433 28% 0% 0%
sl: Slovenian 604 41 93% 25% 1%
sq: Albanian 604 28 95% 0% 3%
sr-ec: Serbian (Cyrillic script) 604 11 98% 52% 0%
sr-el: Serbian (Latin script) 604 63 89% 0% 3%
sv: Swedish 604 0 100% 64% 0%
sw: Swahili 604 562 6% 0% 1%
ta: Tamil 604 207 65% 1% 1%
tcy: Tulu 604 204 66% 46% 0%
te: Telugu 604 473 21% 3% 1%
th: Thai 604 3 99% 47% 0%
ti: Tigrinya 604 298 50% 0% 0%
tl: Tagalog 604 484 19% 0% 1%
tr: Turkish 604 1 99% 29% 1%
tt-cyrl: Tatar (Cyrillic script) 604 548 9% 0% 0%
ug-arab: Uyghur (Arabic script) 604 471 22% 0% 1%
uk: Ukrainian 604 0 100% 57% 0%
ur: Urdu 604 237 60% 72% 1%
vi: Vietnamese 604 1 99% 2% 0%
xmf: Mingrelian 604 491 18% 0% 0%
yo: Yoruba 604 2 99% 0% 0%
zgh: Standard Moroccan Tamazight 604 546 9% 0% 0%
zh-hans: Simplified Chinese 604 0 100% 52% 0%
zh-hant: Traditional Chinese 604 0 100% 40% 0%
All 145 languages together 87,580 44,563 49% 29% 1%

Activity

Map of translators

Loading map...

Add yourself to map

Open support requests

  1. Support/About Blockly:CONTROLS IF MSG IF/ja
  2. Support/About Blockly:LISTS SORT HELPURL/en
  3. Support/About Blockly:LISTS SORT HELPURL/en (2)
  4. Support/About Blockly:Movie.width/ru
  5. Support/Managing translations for Blockly Games
  6. Support/Translation not showing up in Blockly Games