diff --git a/extension/_locales/en/messages.json b/extension/_locales/en/messages.json index ddf3e7b..40d5248 100644 --- a/extension/_locales/en/messages.json +++ b/extension/_locales/en/messages.json @@ -172,6 +172,9 @@ "uaPlaceholder": { "message": "Your preferred user-agent string" }, + "noMatch": { + "message": "No matching user-agent string for this query" + }, "ztoa": { "message": "Z to A" }, @@ -181,6 +184,9 @@ "filterAmong": { "message": "Filter among $1" }, + "filterAgents": { + "message": "Filter Agents" + }, "msgDefaultUA": { "message": "Default UA, press the reset button instead" }, @@ -192,5 +198,11 @@ }, "msgDisabled": { "message": "Disabled. Uses the default user-agent string." + }, + "optionsSaved": { + "message": "Options saved." + }, + "dbReset": { + "message": "Double-click to reset!" } } diff --git a/extension/data/options/index.js b/extension/data/options/index.js index 15950b7..990d3ce 100644 --- a/extension/data/options/index.js +++ b/extension/data/options/index.js @@ -89,7 +89,8 @@ function save() { protected: document.getElementById('protected').value.split(/\s*,\s*/).filter(s => s.length > 4) }, () => { restore(); - notify('Options saved.'); + notify(chrome.i18n.getMessage('optionsSaved')); + chrome.contextMenus.update(document.querySelector('[name="mode"]:checked').value, { checked: true }); @@ -174,7 +175,7 @@ document.getElementById('donate').addEventListener('click', () => { document.getElementById('reset').addEventListener('click', e => { if (e.detail === 1) { - notify('Double-click to reset!'); + notify(chrome.i18n.getMessage('dbReset')); } else { localStorage.clear(); diff --git a/extension/data/popup/index.css b/extension/data/popup/index.css index fb08204..d052d70 100644 --- a/extension/data/popup/index.css +++ b/extension/data/popup/index.css @@ -130,7 +130,7 @@ select { background-color: #f5f5f5; } #list[data-loading=false] tbody:empty::before { - content: 'No matching user-agent string for this query'; + content: attr(data-content); position: absolute; left: 0; top: 0; diff --git a/extension/data/popup/index.html b/extension/data/popup/index.html index 2786af5..d65aeaf 100644 --- a/extension/data/popup/index.html +++ b/extension/data/popup/index.html @@ -38,7 +38,7 @@