This commit is contained in:
2020-12-10 18:03:00 +00:00
parent a3756f93ac
commit acae28ffc4
7 changed files with 20 additions and 32 deletions

View File

@@ -6,7 +6,7 @@ let lastMessageTimeStamp = new Date();
//
// translate, Log and optionally display errors
// return translated message in case caller needs it
function dealWithError(msg, vm) {
async function dealWithError(msg, vm) {
//Check if this is the same message again as last time within a short time span to avoid endless looping errors of same message
//but still allow for user to repeat operation that causes error so they can view it
let newHash = window.$gz.util.quickHash(msg);
@@ -19,7 +19,7 @@ function dealWithError(msg, vm) {
lastMessageTimeStamp = new Date();
//translate as necessary
msg = window.$gz.translation.translateString(msg);
msg = await window.$gz.translation.translateStringWithMultipleKeys(msg);
//In some cases the error may not be translatable, if this is not a debug run then it should show without the ?? that translating puts in keys not found
//so it's not as weird looking to the user