added more translation strings for errors

and updated the German translation
snap7
Jens Mönig 2022-01-20 12:47:06 +01:00
rodzic 3efed8a962
commit 712a950990
2 zmienionych plików z 19 dodań i 3 usunięć

Wyświetl plik

@ -1998,6 +1998,8 @@ SnapTranslator.dict.de = {
'Pr\u00e4dikat',
'sprite':
'Objekt',
'nothing':
'nichts',
// list indices
'last':
@ -2096,12 +2098,18 @@ SnapTranslator.dict.de = {
'ausschalten, um \nnicht mehr zu erben',
// error messages
'Error':
'Fehler',
'a variable of name \'':
'eine Variable mit dem Namen \'',
'Eine Variable mit dem Namen \'',
'\'\ndoes not exist in this context':
'\'\ngibt es an dieser Stelle nicht',
'expecting a':
'Erwarte',
'but getting a':
'bekomme aber',
'expecting':
'erwarte',
'Erwarte',
'input(s), but getting':
'Input(s), bekomme aber'
};

Wyświetl plik

@ -3822,7 +3822,15 @@ Process.prototype.assertType = function (thing, typeString) {
if (typeString instanceof Array && contains(typeString, thingType)) {
return true;
}
throw new Error('expecting ' + typeString + ' but getting ' + thingType);
throw new Error(
localize('expecting a') + ' ' +
(typeString instanceof Array ?
typeString.reduce((a, b) => localize(a) + ' / ' + localize(b)) // +++
: localize(typeString)) +
' ' +
localize('but getting a') + ' ' +
localize(thingType)
);
};
Process.prototype.assertAlive = function (thing) {