diff --git a/_locales/en/messages.json b/_locales/en/messages.json index e7b8758f..e180fc9a 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -104,11 +104,46 @@ "description": "" }, + "customPrompts_form_label_enabled": { + "message": "Enabled", + "description": "" + }, + "customPrompts_form_required_fields": { "message": "Required fields", "description": "" }, + "customPrompts_btnEdit": { + "message": "Edit", + "description": "" + }, + + "customPrompts_btnCancel": { + "message": "Cancel", + "description": "" + }, + + "customPrompts_btnOK": { + "message": "OK", + "description": "" + }, + + "customPrompts_btnDelete": { + "message": "Delete", + "description": "" + }, + + "customPrompts_btnDelete_confirmText": { + "message": "Are you sure you want to delete this item?", + "description": "" + }, + + "customPrompts_unsaved_changes": { + "message": "There are unsaved changes!", + "description": "" + }, + "customPrompts_btnSaveAll": { "message": "Save All", "description": "" diff --git a/customprompts/mzta-custom-prompts.js b/customprompts/mzta-custom-prompts.js index f7ccac10..adc5a892 100644 --- a/customprompts/mzta-custom-prompts.js +++ b/customprompts/mzta-custom-prompts.js @@ -76,23 +76,23 @@ document.addEventListener('DOMContentLoaded', async () => { ` + `
- Need Select + __MSG_customPrompts_form_label_need_selected__
- Need Signature + __MSG_customPrompts_form_label_need_signature__
- Need Custom Text + __MSG_customPrompts_form_label_need_custom_text__
- Enabled + __MSG_customPrompts_form_label_enabled__ - - + +

- - + + `; //console.log('>>>>>>>> values.name: ' + JSON.stringify(values.name)); @@ -203,7 +203,7 @@ document.addEventListener('DOMContentLoaded', async () => { // Confirm and log deletion action function handleDeleteClick(e) { e.preventDefault(); - const checkConfirm = window.confirm("Are you sure you want to delete this item?"); + const checkConfirm = window.confirm(browser.i18n.getMessage("customPrompts_btnDelete_confirmText")); if (!checkConfirm) { return; } @@ -424,7 +424,7 @@ function setSomethingChanged(){ somethingChanged = true; document.getElementById('btnSaveAll').disabled = false; let msgDisplay = document.getElementById('msgDisplay'); - msgDisplay.innerHTML = 'There are unsaved changes!' + msgDisplay.innerHTML = browser.i18n.getMessage('customPrompts_unsaved_changes'); msgDisplay.style.display = 'inline'; msgDisplay.style.color = 'red'; }