Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/check-error-hints.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const cases = [
'`f` erwartet keine Argumente, erhalten hat es 1.',
'`f` expects no arguments but got 1.'],
[{ kind: 'none-operand' },
'Ein Wert ist `None`. Gibt eine Funktion ihr Ergebnis mit `print` aus statt mit `return`?',
'A value is `None`. Does a function output its result with `print` instead of `return`?'],
'Ein Wert ist `None`. Fehlt in einer Funktion das `return` – oder gibt sie ihr Ergebnis mit `print` aus?',
'A value is `None`. Is a function missing its `return` – or does it output its result with `print`?'],
[{ kind: 'text-plus-number' },
'Text und Zahl lassen sich nicht mit `+` verbinden.',
"Text and a number can't be joined with `+`."],
Expand Down
4 changes: 2 additions & 2 deletions src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function germanErrorHint(hint: ErrorHint, context: ErrorHintContext): string | n
case 'too-many-arguments':
return `\`${hint.function}\` erwartet ${hint.expected === 0 ? 'keine Argumente' : hint.expected === 1 ? '1 Argument' : `${hint.expected} Argumente`}, erhalten hat es ${hint.given}.`
case 'none-operand':
return 'Ein Wert ist `None`. Gibt eine Funktion ihr Ergebnis mit `print` aus statt mit `return`?'
return 'Ein Wert ist `None`. Fehlt in einer Funktion das `return` – oder gibt sie ihr Ergebnis mit `print` aus?'
case 'text-plus-number':
return 'Text und Zahl lassen sich nicht mit `+` verbinden.'
case 'zero-division':
Expand All @@ -206,7 +206,7 @@ function englishErrorHint(hint: ErrorHint, context: ErrorHintContext): string |
case 'too-many-arguments':
return `\`${hint.function}\` expects ${hint.expected === 0 ? 'no arguments' : hint.expected === 1 ? '1 argument' : `${hint.expected} arguments`} but got ${hint.given}.`
case 'none-operand':
return 'A value is `None`. Does a function output its result with `print` instead of `return`?'
return 'A value is `None`. Is a function missing its `return` – or does it output its result with `print`?'
case 'text-plus-number':
return "Text and a number can't be joined with `+`."
case 'zero-division':
Expand Down
Loading