From 6896b819a5422ba837f3fedd83d83583a96d7982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20M=C3=B6nig?= Date: Thu, 20 Jan 2022 16:05:30 +0100 Subject: [PATCH] more error message translations --- locale/lang-de.js | 30 +++++++++++++++++++++++++++++- src/threads.js | 20 +++++++++++++++----- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/locale/lang-de.js b/locale/lang-de.js index 6779d435..d6bda1bf 100644 --- a/locale/lang-de.js +++ b/locale/lang-de.js @@ -2121,5 +2121,33 @@ SnapTranslator.dict.de = { 'continuations cannot be forked': 'Continuations können nicht separat gestartet werden', 'unable to convert to': - 'Kann die Liste nicht umwandeln in' + 'Kann die Liste nicht umwandeln in', + 'Request blocked': + 'Die Anfrage wurde blockiert', + 'cannot operate on a deleted sprite': + 'kann nicht mit einem gelöschten Objekt arbeiten', + 'cannot send media,\nsprites or procedures\nto another scene': + 'Kann keine Medien, Objekte oder Programme\nan eine andere Szene senden', + 'unsupported attribute': + 'Attribut wird nicht unterstützt', + 'unable to nest\n(disabled or circular?)': + 'Kann nicht verschachteln\n(ausgeschaltet oder zirkulär?)', + 'unable to inherit\n(disabled or circular?)': + 'Kann nicht erben\n(ausgeschaltet oder zirkulär?)', + 'is read-only': + 'kann nur gelesen werden', + 'is not a valid option': + 'ist keine erlaubte Auswahl', + 'unsupported data type': + 'Nicht unterstützter Datentyp', + 'expecting a finite number\nbut getting Infinity or NaN': + 'Erwarte eine endliche Zahl\nbekomme aber Unendlich oder eine Nicht-Zahl', + 'the predicate takes\ntoo long for a\ncustom hat block': + 'Das Prädikat dauert zu lang für einen\nbenutzerdefinierten Ereignisblock', + 'missing / unspecified extension': + 'Fehlende / undefinierte Erweiterung', + 'reporter didn\'t report': + 'Der Rückgabewert fehlt bei einer Funktion', + 'a custom block definition is missing': + 'Ein Block ist undefiniert' }; diff --git a/src/threads.js b/src/threads.js index 7a1b1741..24b0a241 100644 --- a/src/threads.js +++ b/src/threads.js @@ -861,7 +861,7 @@ Process.prototype.doApplyExtension = function (prim, args) { Process.prototype.reportApplyExtension = function (prim, args) { var ext = SnapExtensions.primitives.get(prim); if (isNil(ext)) { - throw new Error('missing / unspecified extension: ' + prim); + throw new Error(localize('missing / unspecified extension') + ': ' + prim); } return ext.apply( this.blockReceiver(), @@ -4421,10 +4421,20 @@ Process.prototype.reportBasicTextSplit = function (string, delimiter) { str, del; if (!contains(types, strType)) { - throw new Error('expecting text instead of a ' + strType); + throw new Error( + localize('expecting a') + ' ' + + localize('text') + ' ' + + localize('but getting a') + ' ' + + localize(strType) + ); } if (!contains(types, delType)) { - throw new Error('expecting a text delimiter instead of a ' + delType); + throw new Error( + localize('expecting a') + ' ' + + localize('text') + ' ' + + localize('but getting a') + ' ' + + localize(delType) + ); } str = isNil(string) ? '' : string.toString(); switch (this.inputOption(delimiter)) { @@ -6113,7 +6123,7 @@ Process.prototype.doMapCodeOrHeader = function (aContext, anOption, aString) { return this.doMapHeader(aContext, aString); } throw new Error( - ' \'' + anOption + '\'\nis not a valid option' + ' \'' + anOption + '\'\n' + localize('is not a valid option') ); }; @@ -6150,7 +6160,7 @@ Process.prototype.doMapValueCode = function (type, aString) { break; default: throw new Error( - localize('unsupported data type') + ' ' + tp + localize('unsupported data type') + ': "' + tp + '"' ); }