From 04637cce8a2cc190bc2ea29d56c28494e269e046 Mon Sep 17 00:00:00 2001 From: Rtune11 <76692511+Rtune11@users.noreply.github.com> Date: Tue, 21 May 2024 15:15:54 +0200 Subject: [PATCH 1/4] Draft Errors FKEFFIEENFIENFFI --- translations/en/LC_MESSAGES/messages.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/en/LC_MESSAGES/messages.po b/translations/en/LC_MESSAGES/messages.po index f345973f35d..d42381e1e1d 100644 --- a/translations/en/LC_MESSAGES/messages.po +++ b/translations/en/LC_MESSAGES/messages.po @@ -34,7 +34,7 @@ msgid "Has Blanks" msgstr "Your code is incomplete. It contains blanks that you have to replace with code." msgid "Incomplete" -msgstr "Oops! You forgot a bit of code! On line {line_number}, you need to enter text behind `{incomplete_command}`." +msgstr "You forgot a bit of code! On line {line_number}, you need to enter text behind `{incomplete_command}`." msgid "Incomplete Repeat" msgstr "It looks like you forgot to use a `{command}` with the `{repeat}` command you used on line {line_number}." From 33ba95541b0be3b74abd94a537b9d31bf211ead1 Mon Sep 17 00:00:00 2001 From: Rtune11 <76692511+Rtune11@users.noreply.github.com> Date: Tue, 28 May 2024 06:36:39 +0200 Subject: [PATCH 2/4] Shortened the error messsages I tried to shorten them by using the requirements of Clarity and brevity requirements which are (aesthetic and minimalist design, recognition rather than recall). Meaning the errors should be shortened because students tend to not read the whole error so it should give out the critical info at the first part, that way a student can understand what it is going to say by not fully reading the whole sentence. --- translations/en/LC_MESSAGES/messages.po | 74 ++++++++++++------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/translations/en/LC_MESSAGES/messages.po b/translations/en/LC_MESSAGES/messages.po index d42381e1e1d..0226ba4781f 100644 --- a/translations/en/LC_MESSAGES/messages.po +++ b/translations/en/LC_MESSAGES/messages.po @@ -19,130 +19,130 @@ msgstr "" "Generated-By: Babel 2.14.0\n" msgid "Access Before Assign" -msgstr "You tried to use the variable {name} on line {access_line_number}, but you set it on line {definition_line_number}. Set a variable before using it." +msgstr "Variable {name} used on line {access_line_number} before being set. Try setting the variable before use." msgid "Cyclic Var Definition" -msgstr "The name `{variable}` needs to be set before you can use it on the right-hand side of the `{is}` command." +msgstr "Set `{variable}` before using it on the right-hand side of the `{is}` command." msgid "Else Without If Error" -msgstr "On line {line_number} you used an `{else}` but there is no `{if}` on the line before it." +msgstr "Set an `{if}` before using an `{else}` on line {line_number}." msgid "Function Undefined" -msgstr "You tried to use the function {name}, but you didn't define it." +msgstr "Function {name} used without being defined." msgid "Has Blanks" -msgstr "Your code is incomplete. It contains blanks that you have to replace with code." +msgstr "Code is incomplete, fill in blanks with code." msgid "Incomplete" -msgstr "You forgot a bit of code! On line {line_number}, you need to enter text behind `{incomplete_command}`." +msgstr "On line {line_number}, you need to enter text behind `{incomplete_command}`." msgid "Incomplete Repeat" -msgstr "It looks like you forgot to use a `{command}` with the `{repeat}` command you used on line {line_number}." +msgstr "Missing `{command}` with `{repeat}` on line {line_number}." msgid "Invalid" msgstr "`{invalid_command}` is not a Hedy level {level} command. Did you mean `{guessed_command}`?" msgid "Invalid Argument" -msgstr "You cannot use the command `{command}` with `{invalid_argument}`. Try changing `{invalid_argument}` to {allowed_types}." +msgstr "You can't use command `{command}` with `{invalid_argument}`. Change `{invalid_argument}` to {allowed_types}." msgid "Invalid Argument Type" -msgstr "You cannot use `{command}` with `{invalid_argument}` because it is {invalid_type}. Try changing `{invalid_argument}` to {allowed_types}." +msgstr "`{command}` doesn't work with `{invalid_argument}` because it is {invalid_type}. Change `{invalid_argument}` to {allowed_types}." msgid "Invalid At Command" -msgstr "The `{command}` command may not be used from level 16 onward. You can use square brackets to use an element from a list, for example `friends[i]`, `lucky_numbers[{random}]`." +msgstr "The `{command}` command may not be used from level 16 onward. Use square brackets for lists" msgid "Invalid Space" -msgstr "Oops! You started a line with a space on line {line_number}. Spaces confuse computers, can you remove it?" +msgstr "Line {line_number} started with a space. Try removing the space" msgid "Invalid Type Combination" -msgstr "You cannot use `{invalid_argument}` and `{invalid_argument_2}` with `{command}` because one is {invalid_type} and the other is {invalid_type_2}. Try changing `{invalid_argument}` to {invalid_type_2} or `{invalid_argument_2}` to {invalid_type}." +msgstr "`{invalid_argument}` and `{invalid_argument_2}` cannot be used with `{command}` because one is {invalid_type} and the other is {invalid_type_2}. Try changing `{invalid_argument}` to {invalid_type_2} or `{invalid_argument_2}` to {invalid_type}." msgid "Lonely Echo" -msgstr "You used an `{echo}` before an `{ask}`, or an `{echo}` without an `{ask}`. Place an `{ask}` before the `{echo}`." +msgstr "Place an `{ask}` before the `{echo}` or check if there is an `{echo}` without an `{ask}`." msgid "Lonely Text" msgstr "It looks like you forgot to use a command with the text you used in line {line_number}" msgid "Missing Additional Command" -msgstr "It looks like you forgot to complete writing `{command}` on line {line_number}. Try adding `{missing_command}` to your code." +msgstr "Complete writing the `{command}` on line {line_number}. Try adding `{missing_command}` to your code." msgid "Missing Command" -msgstr "It looks like you forgot to use a command on line {line_number}." +msgstr "You missed a command on line {line_number}." msgid "Missing Inner Command" -msgstr "It looks like you forgot to use a command with the `{command}` statement you used on line {line_number}." +msgstr "It seems you missed a command for the `{command}` statement on line {line_number}." msgid "Missing Square Brackets" msgstr "It looks like you forgot to use square brackets `[]` around the list you were creating on line {line_number}." msgid "Missing Variable" -msgstr "It looks like your `{command}` is missing a variable at the start of the line." +msgstr "`{command}` is missing a variable at the start of the line." msgid "Misspelled At Command" -msgstr "It looks like you might have misspelled the `{command}` command, instead you wrote `{invalid_argument}` in line {line_number}." +msgstr "Check `{command}` spelling on line {line_number}, you wrote `{invalid_argument}` instead." msgid "No Indentation" -msgstr "You used too few spaces in line {line_number}. You used {leading_spaces} spaces, which is not enough. Start every new block with {indent_size} spaces more than the line before." +msgstr "On line {line_number}, insufficent {leading_spaces} spaces used. Increase by {indent_size} for each new block." msgid "Non Decimal Variable" -msgstr "At line {line_number}, you might have tried using a number which Hedy does not like very much! Try changing it to a decimal number like 2." +msgstr "At line {line_number}, you used a number Hedy does not support! Try a decimal number, like 2." msgid "Parse" -msgstr "The code you entered is not valid Hedy code. There is a mistake on line {location[0]}, at position {location[1]}. You typed `{character_found}`, but that is not allowed." +msgstr "The code is not valid Hedy code. There is a mistake on line {location[0]}. You typed `{character_found}`, which is not allowed." msgid "Pressit Missing Else" -msgstr "You forgot to add what happens when you press a different key, add an `{else}` to your code" +msgstr "Add an `{else}` to your code to handle other key presses" msgid "Runtime Index Error" -msgstr "You tried to access the list {name} but it is either empty or the index is not there." +msgstr "List {name} is empty or index is missing." msgid "Runtime Value Error" -msgstr "While running your program the command `{command}` received the value `{value}` which is not allowed. {tip}." +msgstr "`{command}` received disallowed value `{value}`. {tip}." msgid "Runtime Values Error" -msgstr "While running your program the command `{command}` received the values `{value}` and `{value}` which are not allowed. {tip}." +msgstr "`{command}` received disallowed values `{value}` and `{value}`. {tip}." msgid "Save Microbit code " msgstr "Save Microbit code" msgid "Too Big" -msgstr "Wow! Your program has an impressive {lines_of_code} lines of code! But we can only process {max_lines} lines in this level. Make your program smaller and try again." +msgstr "Your program has {lines_of_code} lines, but we can only process {max_lines} lines. Please shorten your program and try again." msgid "Too Few Indents" -msgstr "You used too few leading spaces in line {line_number}. You used {leading_spaces} spaces, which is too few." +msgstr "Line {line_number} has too few ({leading_spaces}) spaces." msgid "Too Many Indents" -msgstr "You used too many leading spaces in line {line_number}. You used {leading_spaces} spaces, which is too many." +msgstr "Line {line_number} has too many ({leading_spaces}) spaces." msgid "Unexpected Indentation" -msgstr "You used too many spaces in line {line_number}. You used {leading_spaces} spaces, which is too much. Start every new block with {indent_size} spaces more than the line before." +msgstr "Line {line_number} has too many ({leading_spaces}) spaces. Use {indent_size} more spaces per new block." msgid "Unquoted Assignment" -msgstr "From this level, you need to place texts to the right of the `{is}` between quotes. You forgot that for the text {text}." +msgstr "From this level, place texts to the right of the `{is}` in quotes. Try doing that for the text {text}." msgid "Unquoted Equality Check" -msgstr "If you want to check if a variable is equal to multiple words, the words should be surrounded by quotation marks!" +msgstr ""To check if a variable equals multiple words, use quotation marks for those words!"" msgid "Unquoted Text" -msgstr "Be careful. If you `{ask}` or `{print}` something, the text should start and finish with a quotation mark. You forgot that for the text {unquotedtext}." +msgstr "Text for `{ask}` or `{print}` must be in a quotation mark. Missing quotes for {unquotedtext}." msgid "Unsupported Float" -msgstr "Non-integer numbers are not supported yet but they will be in a few levels. For now change `{value}` to an integer." +msgstr "Non-integer numbers are not supported yet. Change `{value}` to an integer." msgid "Unsupported String Value" msgstr "Text values cannot contain `{invalid_value}`." msgid "Unused Variable" -msgstr "You defined the variable {variable_name} on line {line_number}, but you did not use it." +msgstr "{variable_name} defined on line {line_number}, but not used." msgid "Var Undefined" -msgstr "You tried to use the variable `{name}`, but you didn't set it. It is also possible that you were trying to use the word `{name}` but forgot quotation marks." +msgstr "Variable `{name}` used without setting it. Also consider using quotation marks for `{name}`." msgid "Wrong Level" -msgstr "That was correct Hedy code, but not at the right level. You wrote `{offending_keyword}` for level {working_level}. Tip: {tip}" +msgstr "Correct Hedy code, but not on the wrong level. `{offending_keyword}` is used on level {working_level}. Tip: {tip}" msgid "Wrong Number of Arguments" -msgstr "Your function used the wrong number of arguments. You provided {used_number} but the function {name} needs {defined_number}" +msgstr "Wrong number of arguments for function {name}. Provided {used_number}, needs {defined_number}" msgid "account_overview" msgstr "Account overview" From 22e010454798cdb3631892f458af543f6637f78d Mon Sep 17 00:00:00 2001 From: ArtV11 Date: Tue, 28 May 2024 04:38:51 +0000 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=A4=96=20Automatically=20update=20gen?= =?UTF-8?q?erated=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- translations/en/LC_MESSAGES/messages.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/en/LC_MESSAGES/messages.po b/translations/en/LC_MESSAGES/messages.po index 0226ba4781f..ef1bea006c0 100644 --- a/translations/en/LC_MESSAGES/messages.po +++ b/translations/en/LC_MESSAGES/messages.po @@ -121,7 +121,7 @@ msgid "Unquoted Assignment" msgstr "From this level, place texts to the right of the `{is}` in quotes. Try doing that for the text {text}." msgid "Unquoted Equality Check" -msgstr ""To check if a variable equals multiple words, use quotation marks for those words!"" +msgstr "\"To check if a variable equals multiple words, use quotation marks for those words!\"" msgid "Unquoted Text" msgstr "Text for `{ask}` or `{print}` must be in a quotation mark. Missing quotes for {unquotedtext}." From 7637fcb46ab5bd6455719347bb0bca5cd520d95c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Pelay?= Date: Tue, 11 Jun 2024 12:24:20 -0400 Subject: [PATCH 4/4] fix cypress tests --- tests/cypress/e2e/hedy_page/invalid_program.cy.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/cypress/e2e/hedy_page/invalid_program.cy.js b/tests/cypress/e2e/hedy_page/invalid_program.cy.js index 2d212cdfbda..66fd52d8f83 100644 --- a/tests/cypress/e2e/hedy_page/invalid_program.cy.js +++ b/tests/cypress/e2e/hedy_page/invalid_program.cy.js @@ -33,7 +33,7 @@ describe('Error code gives correct error', () => { it('Missing Command', () => { const error_code = "hello world" - const error_message = `It looks like you forgot to use a command on line 1.`; + const error_message = `You missed a command on line 1`; goToHedyPage(); cy.get('#editor > .cm-editor > .cm-scroller > .cm-content').click(); @@ -47,7 +47,7 @@ describe('Error code gives correct error', () => { it('Invalid Argument Type', () => { const error_code = "forward lalala" - const error_message = `You cannot use forward with lalala because it is text. Try changing lalala to a number or input from ask`; + const error_message = `forward doesn't work with lalala because it is text. Change lalala to a number or input from ask.`; goToHedyPage(); cy.get('#editor > .cm-editor > .cm-scroller > .cm-content').click(); @@ -61,7 +61,7 @@ describe('Error code gives correct error', () => { it('Invalid Argument', () => { const error_code = "turn test" - const error_message = `You cannot use the command turn`; + const error_message = `You can't use command turn with test. Change test to right or left.`; goToHedyPage(); cy.get('#editor > .cm-editor > .cm-scroller > .cm-content').click(); @@ -70,6 +70,6 @@ describe('Error code gives correct error', () => { cy.intercept('/parse').as('parse') cy.get('#runit').click(); cy.wait('@parse') - cy.get('#errorbox').should('be.visible').should('contain', error_message); + cy.get('#errorbox').should('be.visible').and('contain', error_message); }) }) \ No newline at end of file