Skip to content

Commit

Permalink
Translations from Hosted Weblate (#5753)
Browse files Browse the repository at this point in the history
This PR merges pending commits from the Weblate repository that are conflicting with changes on `main`, while resolving conflicts in favor of the Weblate side.
  • Loading branch information
hedybot committed Sep 7, 2024
1 parent e1f989b commit 3930728
Show file tree
Hide file tree
Showing 73 changed files with 8,198 additions and 262 deletions.
1,094 changes: 1,094 additions & 0 deletions content/adventures/zun.yaml

Large diffs are not rendered by default.

207 changes: 207 additions & 0 deletions content/cheatsheets/zun.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
1:
- demo_code: '{print} Hello welcome to Hedy!'
name: '{print}'
explanation: Print something with `{print}`.
- name: '{ask}'
demo_code: '{ask} What is your favorite color?'
explanation: Ask something with `{ask}`.
- demo_code: "{ask} What is your favorite color?\n{echo} so your favorite color is"
name: '{echo}'
explanation: Repeat something using `{echo}`.
- name: '{print} emojis'
demo_code: '{print} 🙋 🌍 ❗'
explanation: Print an emoji with `{print}`.
- demo_code: '{forward} 100'
explanation: Draw a line with `{forward}`.
name: '{forward}'
- demo_code: "{forward} 25\n{turn} {left}\n{forward} 25\n{turn} {right}"
explanation: Turn the drawing turtle with `{turn}`.
name: '{turn}'
2:
- name: '{is}'
demo_code: "name {is} Hedy\n{print} welcome name"
explanation: Give a word a name to use in the program using `{is}`. You can choose the name yourself.
- demo_code: "color {is} {ask} What is your favorite color?\n{print} color is your favorite!"
name: '{ask}'
explanation: Ask something with `{ask}`. Beware! You need to give the answer a name with `{is}`.
- demo_code: "{print} Let me think for one second...\n{sleep}\n{print} Hmm.. I need 3 more seconds...\n{sleep} 3\n{print} Eureka! Ive got it!"
explanation: With `{sleep}`, you can let Hedy pause for a (couple of) second(s).
name: '{sleep}'
- demo_code: "angle {is} 90\n{turn} angle\n{forward} 100"
explanation: Give a number a name using `{is}`. You can choose the name yourself.
name: '{is} with turtle'
3:
- name: Choose random
explanation: Choose a random word from a group with `{at}` and `{random}`.
demo_code: "animals {is} dog, cat, kangaroo\n{print} animals {at} {random}"
- demo_code: "animals {is} cow, cat\n{add} dog {to_list} animals"
explanation: '`{add}` an item `{to_list}` a list.'
name: '{add}'
- explanation: '`{remove}` an item `{from}` a list.'
demo_code: "animals {is} cat, dog, cow\n{remove} dog {from} animals"
name: '{remove}'
12:
- explanation: Decimal numbers.
demo_code: "{print} 'Calculate away!'\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5"
name: float directly
- name: assign text
demo_code: "name = 'Hedy the Robot'\n{print} 'Hello ' name"
explanation: Text with quotation marks after `=`
- explanation: Text with quotation marks after `{if}`.
name: quotes after `{if}` comparison
demo_code: "name = {ask} 'Who are you?'\n{if} name = 'Hedy'\n {print} 'Hi there!'"
- demo_code: "superheroes = 'Iron Man', 'Batman', 'Superman'\n{print} superheroes {at} {random}"
explanation: A list with quotation marks.
name: quotes in list
13:
- explanation: Two parts both need to be correct.
demo_code: "answer1 = {ask} 'What is 3+2?'\nanswer2 = {ask} 'What is 2+2?'\n{if} answer1 {is} 5 {and} answer2 {is} 4\n {print} 'Both answers are correct!'\n{else}\n {print} 'At least one answer is wrong!'"
name: '{and}'
- demo_code: "answer1 = {ask} 'What is 3+2?'\nanswer2 = {ask} 'What is 2+2?'\n{if} answer1 {is} 5 {or} answer2 {is} 4\n {print} 'At least one answer is correct!'\n{else}\n {print} 'Both answers are wrong!'"
name: '{or}'
explanation: At least 1 of the two parts need to be correct. If both are correct, it is also fine.
14:
- explanation: We use the `<` to check if the first number is smaller than the second number.
demo_code: "age = {ask} 'How old are you?'\n{if} age < 13\n {print} 'You are younger than me!'"
name: Smaller
- demo_code: "age = {ask} 'How old are you?'\n{if} age > 13\n {print} 'You are older than me!'"
name: Bigger
explanation: We use the `>` to check if the first number is bigger than the second number.
- demo_code: "answer = {ask} 'What is 5 * 5?'\n{if} answer == 25\n {print} 'That is correct!'"
name: Equal
explanation: We use the `==` to check if two things are the same.
- explanation: We use the `!=` to check if two things are not the same.
name: Not equal
demo_code: "answer = {ask} 'What is 5 * 5?'\n{if} answer != 25\n {print} 'That is not correct!'"
- name: Smaller or equal
demo_code: "age = {ask} 'How old are you?'\n{if} age <= 12\n {print} 'You are younger than me!'"
explanation: We use the `<=` to check if the first number is smaller than or equal to the second number.
- demo_code: "age = {ask} 'How old are you?'\n{if} age >= 14\n {print} 'You are older than me!'"
explanation: We use the `>=` to check if the first number is bigger than or equal to the second number.
name: Bigger or equal
15:
- name: '{while}'
demo_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
explanation: We can use the `{while}` loop with not equal.
- name: Smaller {while}
demo_code: "count = 1\n{while} count < 3\n {print} 'We do this ' 3 - count ' more times'\n count = count + 1\n{print} 'We are done'"
explanation: We can also use the `{while}` loop with `<` and `>`.
16:
- name: square brackets
explanation: Lists with square brackets.
demo_code: "fruit = ['apple', 'banana', 'cherry']\n{print} fruit"
- name: Get an item from a list
explanation: To get an item from a list we use [number] so fruit[1] means, get the first fruit from the list!
demo_code: "fruit = ['banana', 'apple', 'cherry']\nfirstfruit = fruit[1]\n{print} firstfruit"
- name: Get a random item from a list
explanation: To get a random item from a list we use [{random}] so fruit[{random}] means, get a random fruit from the list!
demo_code: "fruit = ['banana', 'apple', 'cherry']\nrandom_fruit = fruit[{random}]\n{print} random_fruit"
17:
- explanation: '`{elif}`'
demo_code: "a = 2\n{if} a == 1:\n {print} 'a is 1'\n{elif} a == 2:\n {print} 'a is 2'\n{else}:\n {print} 'a is not 1 or 2'"
name: '{elif}'
- name: '{print}'
demo_code: "{for} i {in} {range} 1 {to} 12:\n {print} i\n{print} 'Ready or not, here I come!'"
explanation: When we use a `{for}`, we need to put a `:` behind the `{for}` statement!
- name: '{if}'
explanation: We need to do the same with all of our `{if}` statements.
demo_code: "color = {ask} 'What is your favorite color?'\n{if} color == 'green':\n {print} 'Your favorite color is green'\n{else}:\n {print} 'Your favorite color is not green'"
18:
- explanation: After `{print}` you need to use parentheses.
demo_code: "{print}('hi!')"
name: '{print}'
- name: '{range}'
explanation: After `{range}` you need to use parentheses.
demo_code: "{for} i {in} {range} (1,10):\n {print}('Hello, times ', i)"
- demo_code: "name = 'Hedy'\n{print}('my name is ', name)"
explanation: With `{print}` you need to use parentheses and commas if you print more items.
name: '{print} with var'
- explanation: Use `{input}` instead of `{ask}` to ask something.
name: ask something with {input}
demo_code: "name = {input}('What is your name?')\n{print}('So your name is ', name)"
4:
- explanation: Print exactly using quotation marks.
name: '{print}'
demo_code: "{print} 'Hello welcome to Hedy.'"
- demo_code: "name {is} Hedy\n{print} 'my name is ' name"
name: '{is}'
explanation: Give a name to some text and `{print}` without quotation marks.
- explanation: Ask something with `{ask}`.
demo_code: "color {is} {ask} 'What is your favorite color?'\n{print} color ' is your favorite!'"
name: '{ask}'
5:
- explanation: Print exactly using quotation marks.
name: '{print}'
demo_code: "{print} 'Hello welcome to Hedy.'"
- name: '{ask}'
demo_code: "color {is} {ask} 'What is your favorite color?'\n{print} color ' is your favorite!'"
explanation: Ask something with `{ask}`.
- demo_code: "color {is} {ask} 'What is your favorite color?'\n{if} color {is} green {print} 'pretty!' {else} {print} 'meh'"
explanation: Make a choice with `{if}`.
name: '{if}'
- name: '{if} with turtle'
explanation: Make a choice with `{if}`.
demo_code: "answer {is} {ask} 'How far should I walk?'\n{if} answer {is} far {forward} 100 {else} {forward} 5"
- demo_code: "pretty_colors {is} green, yellow\ncolor {is} {ask} 'What is your favorite color?'\n{if} color {in} pretty_colors {print} 'pretty!' {else} {print} 'meh'"
explanation: Check elements with `{in}`.
name: '{in}'
- demo_code: "{if} a {is} {pressed} {print} 'You pressed A!' {else} {print} 'You pressed another key!'"
explanation: Check whether a given key on the keyboard is `{pressed}`.
name: '{pressed}'
9:
- name: '{if} with multiple lines'
demo_code: "answer = {ask} 'What is 10 plus 10?'\n{if} answer {is} 20\n {print} 'Well done!!'\n {print} 'The answer is indeed' answer\n{else}\n {print} 'Wrong'\n {print} 'The answer is 20'"
explanation: The answer of a sum of questions with `{ask}` and see if it is correct. Now we print out two lines.
- explanation: Repeat multiple lines.
name: '{repeat} with turtle'
demo_code: "{repeat} 4 {times}\n {turn} 90\n {forward} 50"
8:
- name: '{print}'
explanation: Print something. Remember to use a quotation mark for literal printing.
demo_code: "{print} '5 times 5 is ' 5 * 5"
- name: '{ask}'
demo_code: "answer = {ask} 'What is 5 plus 5?'\n{if} answer {is} 10\n {print} 'Well done!'\n {print} 'Indeed, the answer was ' answer\n{else}\n {print} 'Oops!'\n {print} 'The answer is 10'"
explanation: Ask for the answer to a sum and check if it is correct. We can now print 2 lines.
- explanation: Repeat multiple lines.
name: '{repeat} with turtle'
demo_code: "{repeat} 4 {times}\n {turn} 90\n {forward} 50"
- name: '{pressed}'
explanation: Check whether a given key on the keyboard is `{pressed}`.
demo_code: "{if} a {is} {pressed}\n {print} 'You pressed A!'\n{else}\n {print} 'You pressed another key!'"
6:
- demo_code: "{print} '5 times 5 is ' 5 * 5"
explanation: Print exactly using quotation marks.
name: '{print}'
- name: '{ask}'
demo_code: "answer = {ask} 'What is 10 plus 10?'\n{if} answer {is} 20 {print} 'Yes!' {else} {print} 'Oops'"
explanation: Ask for a calculation and check whether it is correct.
- name: '`{ask}` and `{if}` with turtle'
explanation: Ask the user how many angles they want.
demo_code: "angles = {ask} 'How many angles?'\nangle = 360 / angles\n{forward} 50"
7:
- explanation: Print exactly using quotation marks.
name: '{print}'
demo_code: "{print} 'Hello welcome to Hedy.'"
- name: '{ask}'
explanation: Ask something with `{ask}`.
demo_code: "color = {ask} 'What is your favorite color?'\n{print} color ' is your favorite!'"
- explanation: Make a choice with `{if}`.
name: '{if}'
demo_code: "color = {ask} 'What is your favorite color?'\n{if} color {is} green {print} 'pretty!' {else} {print} 'meh'"
- demo_code: '{repeat} 3 {times} {forward} 10'
explanation: Repeat a line of code with `{repeat}`.
name: '{repeat} with turtle'
10:
- name: '{print}'
demo_code: "{print} '5 times 5 is ' 5 * 5"
explanation: Print something. Remember to use a quotation mark for literal printing.
- explanation: Print all things in a list.
name: '{for} with a list'
demo_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal"
11:
- demo_code: "{for} counter {in} {range} 1 {to} 5\n {print} counter"
explanation: We can use `{for}` with a `{range}`.
name: '{for} loop'
- name: '{ask}'
demo_code: "answer = {ask} 'What is 5 plus 5?'\n{if} answer {is} 10\n {print} 'Well done!'\n {print} 'Indeed, the answer was ' answer\n{else}\n {print} 'Oops!'\n {print} 'The answer is 10'"
explanation: Ask for the answer to a sum and check if it is correct. We can now print 2 lines.
25 changes: 25 additions & 0 deletions content/client-messages/zun.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
haunted: 🦇, 👻, 🎃
Program_too_long: Your program takes too long to run.
Errors_found: You made a mistake! Don't worry, we still ran the program
turtle: 🐢
restaurant: 🍣, 🍕, 🍔
ServerError: You wrote a program we weren't expecting. If you want to help, send us an email with the level and your program at [email protected]. In the meantime, try something a little different and take another look at the examples. Thanks!
Execute_error: Something went wrong while running the program.
CheckInternet: Check whether your Internet connection is working.
Transpile_success:
- Good job!
- Amazing!
- Well done!
- Excellent!
- You did great!
Program_repair: This could be the correct code, can you fix it?
Other_error: Oops! Maybe we made a little mistake.
Connection_error: We couldn't reach the server.
Transpile_warning: Warning!
Transpile_error: We can't run your program.
songs: 🎵,🎶
Unsaved_Changes: You have an unsaved program. Do you want to leave without saving it?
rock: ✂️, 📜, 🗻
dice: 🎲
Empty_output: This code works but does not print anything. Add a print command to your code or use the turtle to get output.
fortune: 🔮, ✨
67 changes: 67 additions & 0 deletions content/keywords/zun.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
'True': 'True'
define: define
turn: turn
if: if
d2: '2'
brown: brown
from: from
and: and
remove: remove
d7: '7'
'false': 'false'
d5: '5'
for: for
clear: clear
gray: gray
pink: pink
'False': 'False'
ask: ask
right: right
while: while
white: white
is: is
or: or
range: range
in: in
with: with
repeat: repeat
input: input
to: to
'true': 'true'
not_in: not in
d6: '6'
return: return
quote: "'"
at: at
times: times
forward: forward
orange: orange
d4: '4'
green: green
yellow: yellow
left: left
d1: '1'
elif: elif
red: red
random: random
black: black
print: print
call: call
d8: '8'
def: def
d9: '9'
pressed: pressed
play: play
to_list: to
d3: '3'
comma: ','
add: add
echo: echo
length: length
else: else
d0: '0'
color: color
purple: purple
blue: blue
step: step
sleep: sleep
Loading

0 comments on commit 3930728

Please sign in to comment.