summaryrefslogtreecommitdiffstats
path: root/python/mozrelease/mozrelease/l10n.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/mozrelease/mozrelease/l10n.py')
-rw-r--r--python/mozrelease/mozrelease/l10n.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/python/mozrelease/mozrelease/l10n.py b/python/mozrelease/mozrelease/l10n.py
new file mode 100644
index 0000000000..1e2a15878d
--- /dev/null
+++ b/python/mozrelease/mozrelease/l10n.py
@@ -0,0 +1,17 @@
+# 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/.
+
+
+def getPlatformLocales(shipped_locales, platform):
+ platform_locales = []
+ for line in shipped_locales.splitlines():
+ locale = line.strip().split()[0]
+ # ja-JP-mac locale is a MacOS only locale
+ if locale == "ja-JP-mac" and not platform.startswith("mac"):
+ continue
+ # Skip the "ja" locale on MacOS
+ if locale == "ja" and platform.startswith("mac"):
+ continue
+ platform_locales.append(locale)
+ return platform_locales