mail/locales/filter.py
author Philipp Kewisch <mozilla@kewis.ch>
Thu, 22 Feb 2018 21:48:52 +0100
changeset 30553 96aefde64d3b8eb4dc3843cf4c5c3747f00c02eb
parent 30192 1ea8335be979cfa88206e3c47be898c8f33354ee
child 31367 33551f4516d03c52f67cf624ee8ece12352342df
permissions -rwxr-xr-x
Bug 1440587 - Move calProviderUtils to the cal.provider namespace - manual provider changes. r=MakeMyDay MozReview-Commit-ID: 2JU8zMeWKiy

def test(mod, path, entity=None):
  import re
  # ignore anything but Thunderbird
  if mod not in ("netwerk", "dom", "toolkit", "security/manager",
                 "devtools/shared", "devtools/client",
                 "mail", "chat", "editor/ui", "extensions/spellcheck",
                 "other-licenses/branding/thunderbird",
                 "mail/branding/thunderbird"):
    return "ignore"

  # ignore MOZ_LANGPACK_CONTRIBUTORS
  if mod == "mail" and path == "defines.inc" and \
     entity == "MOZ_LANGPACK_CONTRIBUTORS":
    return "ignore"
  # ignore dictionaries
  if mod == "extensions/spellcheck":
    return "ignore"

  if path == "chrome/messenger-region/region.properties":
    return ("ignore" if (re.match(r"browser\.search\.order\.[1-9]", entity))
            else "error")

  # ignore search plugins
  if re.match(r"searchplugins\/.+\.xml", path):
    return "ignore"
  return "error"