symbols are localized
For respect to implications of different emojis in different cultures
This commit is contained in:
parent
e5c21434b2
commit
026e6d2771
3 changed files with 23 additions and 38 deletions
|
@ -373,5 +373,27 @@
|
|||
|
||||
"delimiter_error": {
|
||||
"message": ": "
|
||||
},
|
||||
|
||||
"symbol_extensionIcon_error": {
|
||||
"message": "⚠"
|
||||
},
|
||||
"symbol_extensionIcon_product_bad": {
|
||||
"message": "👎"
|
||||
},
|
||||
"symbol_extensionIcon_product_ok": {
|
||||
"message": "🆗"
|
||||
},
|
||||
"symbol_extensionIcon_product_good": {
|
||||
"message": "👍"
|
||||
},
|
||||
"symbol_extensionIcon_product_trusted": {
|
||||
"message": "★"
|
||||
},
|
||||
"symbol_extensionIcon_website_unsupported": {
|
||||
"message": "✕"
|
||||
},
|
||||
"symbol_extensionIcon_website_loading": {
|
||||
"message": "…"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"extensionIcon_error": {
|
||||
"symbol": "⚠"
|
||||
},
|
||||
"extensionIcon_product_bad": {
|
||||
"symbol": "👎"
|
||||
},
|
||||
"extensionIcon_product_ok": {
|
||||
"symbol": "🆗"
|
||||
},
|
||||
"extensionIcon_product_good": {
|
||||
"symbol": "👍"
|
||||
},
|
||||
"extensionIcon_product_trusted": {
|
||||
"symbol": "★"
|
||||
},
|
||||
"extensionIcon_website_unsupported": {
|
||||
"symbol": "✕"
|
||||
},
|
||||
"extensionIcon_website_loading": {
|
||||
"symbol": "…"
|
||||
}
|
||||
}
|
|
@ -43,21 +43,7 @@ export default class texts {
|
|||
@param {object} params the parameters
|
||||
*/
|
||||
static symbol(message_name, autofill = false, params = []) {
|
||||
const CONFIG = chrome.runtime.getURL("media/config.symbols.json");
|
||||
return (fetch(CONFIG)
|
||||
.then((response) => response.json())
|
||||
.then((jsonData) => {
|
||||
let SYMBOL = (autofill) ? message_name : null;
|
||||
|
||||
(jsonData[message_name])
|
||||
? SYMBOL = jsonData[message_name][`symbol`]
|
||||
: false;
|
||||
|
||||
return (SYMBOL);
|
||||
})
|
||||
.catch((error) => {
|
||||
logging.error(error.name, null, null, false);
|
||||
}));
|
||||
return(texts.localized(`symbol_`.concat(message_name), autofill))
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue