mail/locales/filter.py
author Mozilla Releng Treescript <release+treescript@mozilla.org>
Wed, 25 May 2022 08:36:58 +0000
changeset 46479 251785f07b11fc55070047196ab962efa30a4a01
parent 40516 d7b09702b138d05cfe35a160837223d44e502f2f
permissions -rw-r--r--
no bug - Bumping Thunderbird l10n changesets r=release a=l10n-bump DONTBUILD da -> 345f0d117ec12e01e798088f7eab03d63dbcae1c dsb -> 68d4deee6ce3d03315c3c622fc72ea96163299c7 el -> c6fd4d369e31d0376445649cc5b2cb4164d96475 es-AR -> 5008da5104ab9c3a668b1afd1a6ae7901d8b905f es-MX -> b4c690995963e1a1b3648fce4a95caf63d363024 et -> fa017ffe89319ac9a820858bf9a106776b45d9ed fi -> 6d48503c482c327c83e06e0f87fc73af2cb0e293 fr -> cd6c05b0acdd936514adfcd65a91e7dd0e5aa9fd he -> 01fe784d1862916c5f1e0fa237a0c1d47cb00fe3 hsb -> ca69b798002907452b638b9aa93fa221e55d7ac1 hu -> 5a78c180ca5393074ea2651ada8b2f3ea64fd72f is -> 6998af2ff6115c0456314dea3981768ecb67c157 it -> d510d5bd98a4ef2849b45743181e72ef2520dd24 ko -> 14bf6e2159af25720755ab4f5d0371a830fc83e8 nl -> 04991bd26e5d6f4a7f97d00a35dcce153ad5a485 pt-BR -> 398095bb5d9abc417ca501ce58b105f7ddca5f88 ru -> 3b48c63c96978f4890b5a3dd20e330da90af7ea5 sk -> 1eed146ba4c8525f28885d931e4ff7ff4d4c5708 sl -> 55f6593226b432bd0dd1cea3308b8ce296d8a5fe uk -> d64f0c2241beab5454229251d22dc9a885c0062c vi -> 83e057053e007e3ee19b2fb7a09d745ceaa9615f zh-TW -> 7b13fc49a630eef1432289172f32a4169af5d4b2

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from __future__ import absolute_import


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",
        "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)
                or re.match(r"mail\.addr_book\.mapit_url\.[1-5]", entity)
            )
            else "error"
        )

    return "error"