Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/filterValidation.js

Issue 29338107: Issue 3771 - Update adblockpluscore dependency and adapt filter validation (Closed)
Patch Set: Updated adblockplus dependecy and import new strings Created March 11, 2016, 3:29 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dependencies ('k') | metadata.common » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « dependencies ('k') | metadata.common » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld