diff --git a/scripts/check-error-hints.mjs b/scripts/check-error-hints.mjs index 4d93d59..9a4771c 100644 --- a/scripts/check-error-hints.mjs +++ b/scripts/check-error-hints.mjs @@ -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 `+`."], diff --git a/src/i18n.ts b/src/i18n.ts index ba847d1..c35db77 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -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': @@ -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':