From 53770c0db6b2b4b4d60f42ab60a4a8dbe9e7a49d Mon Sep 17 00:00:00 2001 From: eight Date: Thu, 9 Nov 2017 13:09:03 +0800 Subject: [PATCH] i18n: appliesRemoveError --- _locales/en/messages.json | 4 ++++ edit/applies-to-line-widget.js | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index e7b0c537..75bd412f 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -56,6 +56,10 @@ "message": "Remove", "description": "Label for the button to remove an 'applies' entry" }, + "appliesRemoveError": { + "message": "Can not remove last 'applies to' entry", + "description": "Error displayed when the last 'applies' is going to be removed" + }, "appliesSpecify": { "message": "Specify", "description": "Label for the button to make a style apply only to specific sites" diff --git a/edit/applies-to-line-widget.js b/edit/applies-to-line-widget.js index cbb0886a..5e170755 100644 --- a/edit/applies-to-line-widget.js +++ b/edit/applies-to-line-widget.js @@ -264,8 +264,7 @@ function createAppliesToLineWidget(cm) { let to; if (applies.length < 2) { messageBox({ - title: 'Error', - contents: 'Can\'t remove last applies-to', + contents: chrome.i18n.getMessage('appliesRemoveError'), buttons: [t('confirmClose')] }); return;