Index: lib/filterValidation.js |
=================================================================== |
--- a/lib/filterValidation.js |
+++ b/lib/filterValidation.js |
@@ -18,6 +18,7 @@ |
/** @module filterValidation */ |
let {Filter, InvalidFilter, ElemHideBase} = require("filterClasses"); |
+let {Utils} = require("utils"); |
/** |
* An error returned by |
@@ -64,10 +65,14 @@ |
*/ |
toString: function() |
{ |
- let message = this.reason || ext.i18n.getMessage( |
- this.type.replace(/-/g, "_"), |
- "selector" in this ? "'" + this.selector + "'" : null |
- ); |
+ let message; |
+ if (this.reason) |
+ message = Utils.getString(this.reason); |
+ else |
+ message = ext.i18n.getMessage( |
+ this.type.replace(/-/g, "_"), |
+ "selector" in this ? "'" + this.selector + "'" : null |
+ ); |
if (this.lineno) |
message = ext.i18n.getMessage("line", this.lineno.toLocaleString()) + ": " + message; |