fix(edit-monitor): fix minification of translations containing { }

This commit is contained in:
Bert Verhelst 2021-10-09 11:38:12 +02:00
parent c3c273f9df
commit b8093e909b
3 changed files with 11 additions and 6 deletions

View File

@ -277,17 +277,16 @@ export default {
promosmsTypeEco: "SMS ECO - cheap but slow and often overloaded. Limited only to Polish recipients.",
promosmsTypeFlash: "SMS FLASH - Message will automatically show on recipient device. Limited only to Polish recipients.",
promosmsTypeFull: "SMS FULL - Premium tier of SMS, You can use Your Sender Name (You need to register name first). Reliable for alerts.",
promosmsTypeFull: "SMS SPEED - Highest priority in system. Very quick and reliable but costly (about twice of SMS FULL price).",
promosmsTypeSpeed: "SMS SPEED - Highest priority in system. Very quick and reliable but costly (about twice of SMS FULL price).",
promosmsPhoneNumber: "Phone number (for Polish recipient You can skip area codes)",
promosmsSMSSender: "SMS Sender Name : Pre-registred name or one of defaults: InfoSMS, SMS Info, MaxSMS, INFO, SMS",
// End notification form
"Status Page": "Status Page",
Method: "Method",
Body: "Body",
Headers: "Headers",
PushUrl: "Push URL",
HeadersInvalidFormat: "Headers do not have a valid format: \"key: value <new line> key: value <new line>...\"",
BodyInvalidFormat: "The request body is not valid JSON: ",
BodyPlaceholder: "{\n\t\"id\": 124357,\n\t\"username\": \"admin\",\n\t\"password\": \"myAdminPassword\"\n}",
BodyPlaceholder: "&lbrace;\n\t\"id\": 124357,\n\t\"username\": \"admin\",\n\t\"password\": \"myAdminPassword\"\n&rbrace;",
HeadersPlaceholder: "Authorization: Bearer abc123\nContent-Type: application/json",
};

View File

@ -204,6 +204,6 @@ export default {
PushUrl: "Push URL",
HeadersInvalidFormat: "Headers hebben een incorrect formaat: \"key: waarde <new line> key: waarde <new line>...\"",
BodyInvalidFormat: "De request body is geen geldige JSON: ",
BodyPlaceholder: "{\n\t\"id\": 124357,\n\t\"gebruikersnaam\": \"admin\",\n\t\"wachtwoord\": \"mijnAdminWachtwoord\"\n}",
BodyPlaceholder: "&lbrace;\n\t\"id\": 124357,\n\t\"gebruikersnaam\": \"admin\",\n\t\"wachtwoord\": \"mijnAdminWachtwoord\"\n&rbrace;",
HeadersPlaceholder: "Authorization: Bearer abc123\nContent-Type: application/json",
};

View File

@ -328,11 +328,11 @@ export default {
},
bodyPlaceholder() {
return this.$t("BodyPlaceholder");
return this.decodeHtml(this.$t("BodyPlaceholder"));
},
headersPlaceholder() {
return this.$t("HeadersPlaceholder");
return this.decodeHtml(this.$t("HeadersPlaceholder"));
}
},
@ -490,6 +490,12 @@ export default {
addedNotification(id) {
this.monitor.notificationIDList[id] = true;
},
decodeHtml(html) {
const txt = document.createElement("textarea");
txt.innerHTML = html;
return txt.value;
}
},
};
</script>