GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still and

Commit a8fd3774 authored by Kainalu Hagiwara's avatar Kainalu Hagiwara
Browse files

For #13066 - Translate locale codes to Android specific variants before filtering

parent d5b10509
......@@ -11,11 +11,21 @@ import re
OPEN_LOCALES = "locales = ["
# Android uses non-standard locale codes, these are the mappings back and forth
# See Legacy language codes in
'he': 'iw',
'id': 'in',
'yi': 'ji'
def trim_to_locale(str):
match ='\s*"([a-z]+-?[A-Z]*)",\s*', str)
if not match:
raise Exception("Failed parsing locale found in l10n.toml: " + str)
locale =
return ANDROID_LEGACY_MAP.get(locale, locale)
# This file is a dumb parser that converts values from '/l10n-release.toml' to be easily
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment