1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 """This routine controls which localizable files and entries are
6 reported and l10n-merged.
7 This needs to stay in sync with the copy in mobile/android/locales.
10 def test(mod
, path
, entity
= None):
12 # ignore anything but mobile, which is our local repo checkout name
13 if mod
not in ("netwerk", "dom", "toolkit", "security/manager",
14 "services/sync", "mobile",
15 "mobile/android/base", "mobile/android"):
18 if mod
not in ("mobile", "mobile/android"):
19 # we only have exceptions for mobile*
21 if mod
== "mobile/android":
23 if (re
.match(r
"mobile-l10n.js", path
) or
24 re
.match(r
"defines.inc", path
)):
26 if path
== "defines.inc":
27 if entity
== "MOZ_LANGPACK_CONTRIBUTORS":
31 # we're in mod == "mobile"
32 if re
.match(r
"searchplugins\/.+\.xml", path
):
34 if path
== "chrome/region.properties":
35 # only region.properties exceptions remain
36 if (re
.match(r
"browser\.search\.order\.[1-9]", entity
) or
37 re
.match(r
"browser\.contentHandlers\.types\.[0-5]", entity
) or
38 re
.match(r
"gecko\.handlerService\.schemes\.", entity
) or
39 re
.match(r
"gecko\.handlerService\.defaultHandlersVersion", entity
)):