calendar/locales/filter.py
author Siddharth Agarwal <sid.bugzilla@gmail.com>
Mon, 27 Feb 2012 18:52:44 +0530
changeset 10952 f2fb318dd98befa2009d3b3f181ecaa907b052cc
parent 10453 120cf812400a344b3f5bedfd78f432d1d00bb4d8
child 15798 8e475124e59f2d281ac2dad916315fcb2e4c9436
permissions -rw-r--r--
Bug 721447 - Remove support for pre-Windows 7 SDKs (comm-central version). r=Standard8


def test(mod, path, entity = None):
  import re

  # ignore anyhting but calendar stuff
  if mod not in ("netwerk", "dom", "toolkit", "security/manager",
                 "calendar", "other-licenses/branding/sunbird"):
    return False

  # Timezone properties don't have to be translated
  if path == "chrome/calendar/timezones.properties":
    return "report"

  # Noun class entries do not have to be translated
  if path == "chrome/calendar/calendar-event-dialog.properties":
    return not re.match(r".*Nounclass[1-9]", entity)

  # Sunbird specific strings don't need translation
  if path.startswith("chrome/sunbird/"):
    return False

  # Everything else should be taken into account
  return True