Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#3659 closed change (fixed)

Remove locale dependency from filter classes

Reported by: trev Assignee: trev
Priority: P3 Milestone:
Module: Core Keywords:
Cc: sebastian, fhd Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29336430/

Description (last modified by trev)

Background

Filter classes currently use localized strings for various parsing errors, this makes for ugly dependencies.

What to change

Make InvalidFilter store an error ID, not the actual error text, similarly to how synchronizer does it. Converting the error ID into a localized string should be done by the UI.

Integration notes

With this change InvalidFilter.reason will be an error (string) ID, not localized text any more. Two new translatable strings have to be added, we didn't localize these reasons before: filter_unknown_option ("Unknown filter option") and filter_invalid_regexp ("Invalid regular expression").

Change History (4)

comment:1 Changed 4 years ago by trev

  • Description modified (diff)
  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 4 years ago by trev

  • Cc sebastian fhd added

comment:3 Changed 4 years ago by trev

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:4 Changed 4 years ago by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Filter errors still work as expected.

ABP 2.7.2.4166
Firefox 38 / 44 / 45 / Windows 8
Firefox 38 / 44 / OSX 10.11
Firefox 44 / Ubuntu 14.04

Note: See TracTickets for help on using tickets.