Fix category list alert not being localized

This commit is contained in:
Ajay Ramachandran
2020-12-15 16:18:28 -05:00
parent fd9116c81c
commit 41e5cb25aa

View File

@@ -242,9 +242,9 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
if (!Config.config.categorySelections.some((category) => category.name === event.target.value)) {
const chosenCategory = event.target.value;
event.target.value = DEFAULT_CATEGORY;
// Alert that they have to enable this category first
alert(chrome.i18n.getMessage("enableThisCategoryFirst").replace("{0}", chosenCategory));
alert(chrome.i18n.getMessage("enableThisCategoryFirst").replace("{0}", chrome.i18n.getMessage("category_" + chosenCategory)));
// Open options page
chrome.runtime.sendMessage({"message": "openConfig"});