Modify localization to allow including parameters in HTML
E.g i18n-title=key;param (single param only)
This commit is contained in:
parent
d379e5f34a
commit
9a314523f6
|
@ -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 === '') {
|
||||
|
|
Loading…
Reference in New Issue
Block a user