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

Side by Side Diff: lib/filterValidation.js

Issue 29569649: Issue 4580 - Replace ext.i18n with i18n (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Update adblockplusui dependency again Created Oct. 10, 2017, 4:31 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/filterComposer.js ('k') | lib/notificationHelper.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 * 69 *
70 * @return {string} 70 * @return {string}
71 */ 71 */
72 toString() 72 toString()
73 { 73 {
74 let message; 74 let message;
75 if (this.reason) 75 if (this.reason)
76 message = Utils.getString(this.reason); 76 message = Utils.getString(this.reason);
77 else 77 else
78 { 78 {
79 message = ext.i18n.getMessage( 79 message = chrome.i18n.getMessage(
80 this.type.replace(/-/g, "_"), 80 this.type.replace(/-/g, "_"),
81 "selector" in this ? "'" + this.selector + "'" : null 81 "selector" in this ? "'" + this.selector + "'" : null
82 ); 82 );
83 } 83 }
84 84
85 if (this.lineno) 85 if (this.lineno)
86 { 86 {
87 message = ext.i18n.getMessage( 87 message = chrome.i18n.getMessage(
88 "line", this.lineno.toLocaleString() 88 "line", this.lineno.toLocaleString()
89 ) + ": " + message; 89 ) + ": " + message;
90 } 90 }
91 return message; 91 return message;
92 } 92 }
93 }; 93 };
94 94
95 function isValidCSSSelector(selector) 95 function isValidCSSSelector(selector)
96 { 96 {
97 let style = document.createElement("style"); 97 let style = document.createElement("style");
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 if (error) 185 if (error)
186 { 186 {
187 error.lineno = i + 1; 187 error.lineno = i + 1;
188 errors.push(error); 188 errors.push(error);
189 } 189 }
190 } 190 }
191 191
192 return {filters, errors}; 192 return {filters, errors};
193 }; 193 };
OLDNEW
« no previous file with comments | « lib/filterComposer.js ('k') | lib/notificationHelper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld