CLOSED TREE: TraceMonkey merge head. (a=blockers)
[mozilla-central.git] / browser / locales / filter.py
blobbe4fe3bd28cfb441206e6fa365933116c3ed3f47
1 def test(mod, path, entity = None):
2 import re
3 # ignore anyhting but Firefox
4 if mod not in ("netwerk", "dom", "toolkit", "security/manager",
5 "browser", "extensions/reporter", "extensions/spellcheck",
6 "other-licenses/branding/firefox",
7 "services/sync"):
8 return False
9 if mod != "browser" and mod != "extensions/spellcheck":
10 # we only have exceptions for browser and extensions/spellcheck
11 return True
12 if not entity:
13 if mod == "extensions/spellcheck":
14 return False
15 # browser
16 return not (re.match(r"searchplugins\/.+\.xml", path) or
17 re.match(r"chrome\/help\/images\/[A-Za-z-_]+\.png", path))
18 if mod == "extensions/spellcheck":
19 # l10n ships en-US dictionary or something, do compare
20 return True
21 if path == "defines.inc":
22 return entity != "MOZ_LANGPACK_CONTRIBUTORS"
24 if path != "chrome/browser-region/region.properties":
25 # only region.properties exceptions remain, compare all others
26 return True
28 return not (re.match(r"browser\.search\.order\.[1-9]", entity) or
29 re.match(r"browser\.contentHandlers\.types\.[0-5]", entity) or
30 re.match(r"gecko\.handlerService\.schemes\.", entity) or
31 re.match(r"gecko\.handlerService\.defaultHandlersVersion", entity))