Skip to content

Commit

Permalink
Merge branch 'main' into pages
Browse files Browse the repository at this point in the history
  • Loading branch information
boryanagoncharenko authored Feb 23, 2025
2 parents d3eb771 + 07b04f8 commit 7d925c1
Show file tree
Hide file tree
Showing 16 changed files with 2,272 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ repos:
hooks:
- id: autopep8
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
rev: 7.1.2
hooks:
- id: flake8
5 changes: 3 additions & 2 deletions content/adventures/cs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ adventures:
Na této úrovni můžete použít více řádků ve vašich `{if}` příkazech, tímto způsobem můžete vylepšit svůj šťastný nebo smutný konec!
### Cvičení 1
Ukázkový kód zobrazuje dva různé konce; jeden, kde postavy skočí do stroje času, a druhý, kde to neudělají. Doplňte mezery alespoň jednou větou na každý konec.
Ukázkový kód zobrazuje dva různé konce; jeden, kde postavy skočí do stroje času, a druhý, kde to neudělají.
Doplňte mezery alespoň jednou větou na každý konec.
**Extra** Udělejte příběh delší. Co se v příběhu stane? Můžete také přidat druhý `{ask}` s různými možnostmi.
### Cvičení 2
Expand Down Expand Up @@ -260,7 +261,7 @@ adventures:
12:
story_text: Hedy doteď neumožňovala používat čísla s desetinami jako je 1.5, ale odteď už ano. Pozor, Hedy používá desetinnou tečku `.` namísto desetinné čárky.

example_code: "```\nburger = 5\nnápoj = 2\ncelkem = hamburger + nápoj\nprint 'Objednali jste si hamburger a nápoj'\nprint 'To stojí ' celkem ' dolarů, prosím'\n```\n"
example_code: "```\nburger = 5\nnápoj = 2\ncelkem = burger + nápoj\n{print} 'Objednali jste si hamburger a nápoj'\n{print} 'To stojí ' celkem ' dolarů, prosím'\n```\n"
13:
story_text: Teď se naučíme `and` (česky a) a `or` (nebo)! Když chceš ověřit dvě podmínky, nemusíš k tomu použít dva `if`y, ale stačí ti k tomu `and` a `or`. Pokud použiješ `and`, musí být obě podmínky, napravo i nalevo, pravdivé. S `or` stačí, aby byla pravdivá alespoň jedna z nich.
example_code: "```\nuživatelské_jméno = {ask} 'Jaké je vaše uživatelské jméno?'\nheslo = {ask} 'Jaké je vaše heslo?'\n{if} uživatelské_jméno {is} 'Hedy'\n {if} heslo {is} 'secret'\n {print} 'Vítejte Hedy!'\n {else}\n {print} 'Přístup odepřen'\n{else}\n {print} 'Přístup zamítnut!'\n```\n"
Expand Down
1 change: 1 addition & 0 deletions content/adventures/lt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 1 addition & 1 deletion content/adventures/pt_BR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ adventures:
```
story_text_2: |
## {remove} {from}
Se você pode adicionar itens a uma lista, é claro que você também pode tirar. Isso é feito usando o comando `{remove} {from}`.
Se você pode adicionar itens a uma lista, é claro que você também pode retirá-los. Isso é feito usando o comando `{remove} {from}`.
example_code_2: |
```
animais {is} cachorro, gato, canguru
Expand Down
1 change: 1 addition & 0 deletions content/client-messages/lt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
67 changes: 67 additions & 0 deletions content/keywords/lt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
add: pridėti
ask: paklausti
and: ir
at: adresu
brown: rudas
call: iškviesti
clear: išvalyti
color: spalva
comma: ','
d1: '1'
d2: '2'
d3: '3'
d4: '4'
d6: '6'
def: apibrėžti
define: apibrėžti
echo: aidas
elif: kitaip jei
else: kitaip
in: viduje
input: įvestis
left: kairė
length: ilgis
or: arba
orange: oranžinė
play: paleisti
pressed: paspaustas
purple: violetinė
quote: "'"
random: atsitiktinis
range: intervalas
red: raudona
remove: pašalinti
repeat: pakartoti
return: grąžinti
sleep: miegoti
step: žingsnis
times: dauginti
to: į
to_list: į sąraša
'true': tiesa
'True': Tiesa
turn: sukti
while: kol
white: balta
d7: '7'
is: yra
green: žalia
black: juodas
blue: mėlynas
gray: pilka
d0: '0'
'false': melas
d5: '5'
d8: '8'
d9: '9'
'False': Melas
not_in: ne viduje
from:
yellow: geltona
for: kartoti
forward: toliau
if: jei
with: su
pink: rožinė
print: spausdinti
right: dešinė
1 change: 1 addition & 0 deletions content/pages/lt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions content/slides/lt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions content/workbooks/lt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
54 changes: 54 additions & 0 deletions grammars/keywords-lt.lark
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
_DEFINE: ("apibrėžti" | "define") _SPACE?
_CALL: ("iškviesti" | "call") _SPACE?
_WITH: ("su" | "with") _SPACE?
_DEF: ("apibrėžti" | "def") _SPACE?
_RETURN: ("grąžinti" | "return") _SPACE?
_PRINT: ("spausdinti" | "print") _SPACE?
_PLAY: ("paleisti" | "play") _SPACE
_ASK: ("paklausti" | "ask")
_ECHO: ("aidas" | "echo") _SPACE?
_FORWARD: ("toliau" | "forward") _SPACE?
_TURN: ("sukti" | "turn") _SPACE?
left: ("kairė" | "left") _SPACE?
right: ("dešinė" | "right") _SPACE?
black: ("juodas" | "black") _SPACE?
blue: ("mėlynas" | "blue") _SPACE?
brown: ("rudas" | "brown") _SPACE?
gray: ("pilka" | "gray") _SPACE?
green: ("žalia" | "green") _SPACE?
orange: ("oranžinė" | "orange") _SPACE?
pink: ("rožinė" | "pink") _SPACE?
purple: ("violetinė" | "purple") _SPACE?
red: ("raudona" | "red") _SPACE?
white: ("balta" | "white") _SPACE?
yellow: ("geltona" | "yellow") _SPACE?
_IS: _SPACE ("yra" | "is") _SPACE
_STANDALONE_IS: ("yra" | "is")
_SLEEP: ("miegoti" | "sleep") _SPACE?
_ADD_LIST: ("pridėti" | "add") _SPACE
_TO_LIST: _SPACE? ("į sąraša" | "to")
_REMOVE: ("pašalinti" | "remove") _SPACE
_FROM: _SPACE? ("" | "from")
_AT: _SPACE ("adresu" | "at") _SPACE
random: ("atsitiktinis" | "random") _SPACE?
_IN: _SPACE ("viduje" | "in") _SPACE
_NOT_IN: _SPACE ("ne viduje" | "not in") _SPACE
_IF: ("jei" | "if") _SPACE
_ELSE: "kitaip" | "else"
_AND: _SPACE? ("ir" | "and") _SPACE
_REPEAT: ("pakartoti" | "repeat") _SPACE
_TIMES: _SPACE ("dauginti" | "times")
_FOR: ("kartoti" | "for") _SPACE
_RANGE: ("intervalas" | "range") _SPACE?
_TO: _SPACE ("į" | "to") _SPACE
_STEP: "žingsnis" | "step"
_ELIF: _SPACE? ("kitaip jei" | "elif") _SPACE
_INPUT: ("įvestis" | "input")
_OR: _SPACE? ("arba" | "or") _SPACE
_WHILE: ("kol" | "while") _SPACE
_LENGTH: "ilgis" | "length"
_COLOR : ("spalva" | "color") _SPACE?
_PRESSED: ("paspaustas" | "pressed") _SPACE?
clear: ("išvalyti" | "clear") _SPACE?
TRUE: ("tiesa" | "Tiesa" | "true" | "True") _SPACE?
FALSE: ("melas" | "Melas" | "false" | "False") _SPACE?
59 changes: 59 additions & 0 deletions highlighting/highlighting-trad.json
Original file line number Diff line number Diff line change
Expand Up @@ -2064,6 +2064,65 @@
"yellow": "yellow",
"DIGIT": "0123456789"
},
"lt": {
"False": "Melas|False",
"True": "Tiesa|True",
"add": "pridėti|add",
"and": "ir|and",
"ask": "paklausti|ask",
"at": "adresu|at",
"black": "juodas|black",
"blue": "mėlynas|blue",
"brown": "rudas|brown",
"call": "iškviesti|call",
"clear": "išvalyti|clear",
"color": "spalva|color",
"comma": ",",
"def": "apibrėžti|def",
"define": "apibrėžti|define",
"echo": "aidas|echo",
"elif": "kitaip jei|elif",
"else": "kitaip|else",
"false": "melas|false",
"for": "kartoti|for",
"forward": "toliau|forward",
"from": "iš|from",
"gray": "pilka|gray",
"green": "žalia|green",
"if": "jei|if",
"in": "viduje|in",
"input": "įvestis|input",
"is": "yra|is",
"left": "kairė|left",
"length": "ilgis|length",
"not_in": "ne viduje|not in",
"or": "arba|or",
"orange": "oranžinė|orange",
"pink": "rožinė|pink",
"play": "paleisti|play",
"pressed": "paspaustas|pressed",
"print": "spausdinti|print",
"purple": "violetinė|purple",
"random": "atsitiktinis|random",
"range": "intervalas|range",
"red": "raudona|red",
"remove": "pašalinti|remove",
"repeat": "pakartoti|repeat",
"return": "grąžinti|return",
"right": "dešinė|right",
"sleep": "miegoti|sleep",
"step": "žingsnis|step",
"times": "dauginti|times",
"to": "į|to",
"to_list": "į sąraša|to",
"true": "tiesa|true",
"turn": "sukti|turn",
"while": "kol|while",
"white": "balta|white",
"with": "su|with",
"yellow": "geltona|yellow",
"DIGIT": "0123456789"
},
"mi": {
"False": "False",
"True": "True",
Expand Down
99 changes: 99 additions & 0 deletions static/js/appbundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -61744,6 +61744,46 @@ ${o3}` : i3;
"turtle": "\u{1F422}",
"unsaved_class_changes": "There are unsaved changes, are you sure you want to leave this page?"
},
"lt": {
"CheckInternet": "Check whether your Internet connection is working.",
"Connection_error": "We couldn't reach the server.",
"Empty_output": "This code works but does not print anything. Add a print command to your code or use the turtle to get output.",
"Errors_found": "You made a mistake! Don't worry, we still ran the program",
"Execute_error": "Something went wrong.",
"Other_error": "Oops! Maybe we made a little mistake.",
"Program_repair": "This could be the correct code, can you fix it?",
"Program_too_long": "Your program takes too long to run.",
"ServerError": "You can help us out by sending an email with the level and your program to [email protected]. In the meantime, try something a little different. Thanks!",
"Transpile_error": "We can't run your program.",
"Transpile_success": "Good job!\nAmazing!\nWell done!\nExcellent!\nYou did great!",
"Transpile_warning": "Warning!",
"Unsaved_Changes": "You have an unsaved program. Do you want to leave without saving it?",
"adventures_completed": "Adventures completed: {number_of_adventures}",
"adventures_restored": "The default adventures have been restored.",
"adventures_tried": "Adventures tried",
"copy_link_to_share": "Copy link to share",
"customization_deleted": "Customizations successfully deleted.",
"dice": "\u{1F3B2}",
"directly_available": "Directly open",
"disabled": "Disabled",
"errors": "Errors",
"fortune": "\u{1F52E}, \u2728",
"graph_title": "Errors per adventure completed on level {level}",
"haunted": "\u{1F987}, \u{1F47B}, \u{1F383}",
"level_title": "Level",
"multiple_keywords_warning": "You are trying to use the keyword {orig_keyword}, but this keyword might have several meanings. Please choose the one you're trying to use from this list and copy paste it in your code, curly braces included: {keyword_list}",
"number_of_errors": "Number of errors: {number_of_errors}",
"one_level_error": "You need to select at least one level.",
"restaurant": "\u{1F363}, \u{1F355}, \u{1F354}",
"rock": "\u2702\uFE0F, \u{1F4DC}, \u{1F5FB}",
"select_all": "Select all",
"selected": "Selected",
"songs": "\u{1F3B5},\u{1F3B6}",
"successful_runs": "Successful runs: {successful_runs}",
"teacher_welcome": "Welcome to Hedy! Your are now the proud owner of a teachers account which allows you to create classes and invite students.",
"turtle": "\u{1F422}",
"unsaved_class_changes": "There are unsaved changes, are you sure you want to leave this page?"
},
"mi": {
"CheckInternet": "Check whether your Internet connection is working.",
"Connection_error": "We couldn't reach the server.",
Expand Down Expand Up @@ -103420,6 +103460,65 @@ def note_with_error(value, err):
yellow: "yellow",
DIGIT: "0123456789"
},
lt: {
False: "Melas|False",
True: "Tiesa|True",
add: "prid\u0117ti|add",
and: "ir|and",
ask: "paklausti|ask",
at: "adresu|at",
black: "juodas|black",
blue: "m\u0117lynas|blue",
brown: "rudas|brown",
call: "i\u0161kviesti|call",
clear: "i\u0161valyti|clear",
color: "spalva|color",
comma: ",",
def: "apibr\u0117\u017Eti|def",
define: "apibr\u0117\u017Eti|define",
echo: "aidas|echo",
elif: "kitaip jei|elif",
else: "kitaip|else",
false: "melas|false",
for: "kartoti|for",
forward: "toliau|forward",
from: "i\u0161|from",
gray: "pilka|gray",
green: "\u017Ealia|green",
if: "jei|if",
in: "viduje|in",
input: "\u012Fvestis|input",
is: "yra|is",
left: "kair\u0117|left",
length: "ilgis|length",
not_in: "ne viduje|not in",
or: "arba|or",
orange: "oran\u017Ein\u0117|orange",
pink: "ro\u017Ein\u0117|pink",
play: "paleisti|play",
pressed: "paspaustas|pressed",
print: "spausdinti|print",
purple: "violetin\u0117|purple",
random: "atsitiktinis|random",
range: "intervalas|range",
red: "raudona|red",
remove: "pa\u0161alinti|remove",
repeat: "pakartoti|repeat",
return: "gr\u0105\u017Einti|return",
right: "de\u0161in\u0117|right",
sleep: "miegoti|sleep",
step: "\u017Eingsnis|step",
times: "dauginti|times",
to: "\u012F|to",
to_list: "\u012F s\u0105ra\u0161a|to",
true: "tiesa|true",
turn: "sukti|turn",
while: "kol|while",
white: "balta|white",
with: "su|with",
yellow: "geltona|yellow",
DIGIT: "0123456789"
},
mi: {
False: "False",
True: "True",
Expand Down
4 changes: 2 additions & 2 deletions static/js/appbundle.js.map

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions static/js/message-translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1403,6 +1403,46 @@ export const TRANSLATIONS: Record<string, Record<MessageKey, string>> = {
"turtle": "🐢",
"unsaved_class_changes": "There are unsaved changes, are you sure you want to leave this page?"
},
"lt": {
"CheckInternet": "Check whether your Internet connection is working.",
"Connection_error": "We couldn't reach the server.",
"Empty_output": "This code works but does not print anything. Add a print command to your code or use the turtle to get output.",
"Errors_found": "You made a mistake! Don't worry, we still ran the program",
"Execute_error": "Something went wrong.",
"Other_error": "Oops! Maybe we made a little mistake.",
"Program_repair": "This could be the correct code, can you fix it?",
"Program_too_long": "Your program takes too long to run.",
"ServerError": "You can help us out by sending an email with the level and your program to [email protected]. In the meantime, try something a little different. Thanks!",
"Transpile_error": "We can't run your program.",
"Transpile_success": "Good job!\nAmazing!\nWell done!\nExcellent!\nYou did great!",
"Transpile_warning": "Warning!",
"Unsaved_Changes": "You have an unsaved program. Do you want to leave without saving it?",
"adventures_completed": "Adventures completed: {number_of_adventures}",
"adventures_restored": "The default adventures have been restored.",
"adventures_tried": "Adventures tried",
"copy_link_to_share": "Copy link to share",
"customization_deleted": "Customizations successfully deleted.",
"dice": "🎲",
"directly_available": "Directly open",
"disabled": "Disabled",
"errors": "Errors",
"fortune": "🔮, ✨",
"graph_title": "Errors per adventure completed on level {level}",
"haunted": "🦇, 👻, 🎃",
"level_title": "Level",
"multiple_keywords_warning": "You are trying to use the keyword {orig_keyword}, but this keyword might have several meanings. Please choose the one you're trying to use from this list and copy paste it in your code, curly braces included: {keyword_list}",
"number_of_errors": "Number of errors: {number_of_errors}",
"one_level_error": "You need to select at least one level.",
"restaurant": "🍣, 🍕, 🍔",
"rock": "✂️, 📜, 🗻",
"select_all": "Select all",
"selected": "Selected",
"songs": "🎵,🎶",
"successful_runs": "Successful runs: {successful_runs}",
"teacher_welcome": "Welcome to Hedy! Your are now the proud owner of a teachers account which allows you to create classes and invite students.",
"turtle": "🐢",
"unsaved_class_changes": "There are unsaved changes, are you sure you want to leave this page?"
},
"mi": {
"CheckInternet": "Check whether your Internet connection is working.",
"Connection_error": "We couldn't reach the server.",
Expand Down
Loading

0 comments on commit 7d925c1

Please sign in to comment.