diff --git a/_locales/en/messages.json b/_locales/en/messages.json index d8b8cb9f..721559ca 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -773,6 +773,15 @@ } } }, + "styleMetaErrorPreprocessor": { + "message": "Unsupported @preprocessor: $preprocessor$", + "description": "Error displayed when the value of @preprocessor is not supported", + "placeholders": { + "preprocessor": { + "content": "$1" + } + } + }, "styleMetaErrorSelectValueMismatch": { "message": "Invalid @select: value doesn't exist in the list", "description": "Error displayed when the value of @select is invalid" diff --git a/js/usercss.js b/js/usercss.js index 1f4d88ce..e6e359bd 100644 --- a/js/usercss.js +++ b/js/usercss.js @@ -403,7 +403,7 @@ var usercss = (() => { let builder; if (preprocessor) { if (!BUILDER[preprocessor]) { - return Promise.reject(new Error(`Unsupported preprocessor: ${preprocessor}`)); + return Promise.reject(chrome.i18n.getMessage('styleMetaErrorPreprocessor', preprocessor)); } builder = BUILDER[preprocessor]; } else {