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.
11 def test(mod
, path
, entity
=None):
14 # ignore anything but mobile, which is our local repo checkout name
15 if mod
not in ("dom", "toolkit", "mobile", "mobile/android"):
19 # keep this file list in sync with jar.mn
21 "chrome/global/commonDialogs.properties",
22 "chrome/global/intl.properties",
23 "chrome/global/intl.css",
26 if re
.match(r
"crashreporter/[^/]*.ftl", path
):
27 # error on crashreporter/*.ftl
30 if re
.match(r
"toolkit/about/[^/]*About.ftl", path
):
31 # error on toolkit/about/*About.ftl
33 if re
.match(r
"toolkit/about/[^/]*Mozilla.ftl", path
):
34 # error on toolkit/about/*Mozilla.ftl
36 if re
.match(r
"toolkit/about/[^/]*Rights.ftl", path
):
37 # error on toolkit/about/*Rights.ftl
39 if re
.match(r
"toolkit/about/[^/]*Compat.ftl", path
):
40 # error on toolkit/about/*Compat.ftl
42 if re
.match(r
"toolkit/about/[^/]*Support.ftl", path
):
43 # error on toolkit/about/*Support.ftl
45 if re
.match(r
"toolkit/about/[^/]*Webrtc.ftl", path
):
46 # error on toolkit/about/*Webrtc.ftl
51 # keep this file list in sync with jar.mn
53 "chrome/accessibility/AccessFu.properties",
54 "chrome/dom/dom.properties",
59 if mod
not in ("mobile", "mobile/android"):
60 # we only have exceptions for mobile*
62 if mod
== "mobile/android":
64 if re
.match(r
"mobile-l10n.js", path
):