From 9a314523f623027d829c8a81043396b5ae860ebc Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Sun, 2 Dec 2018 20:32:18 -0600 Subject: [PATCH] Modify localization to allow including parameters in HTML E.g i18n-title=key;param (single param only) --- js/localization.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/localization.js b/js/localization.js index e4a8de10..7c40da8b 100644 --- a/js/localization.js +++ b/js/localization.js @@ -7,6 +7,9 @@ tDocLoader(); function t(key, params) { + if (!params && key.includes(';')) { + [key, params] = key.split(';'); + } const cache = !params && t.cache[key]; const s = cache || chrome.i18n.getMessage(key, params); if (s === '') {