From 7ae4ffa0e0f7bdec7b400f1df605cd6102749482 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Fri, 20 Mar 2015 20:17:30 +0400 Subject: [locale database utility] Fix inheritance chain Locales with an explicit parent locale should not inherit the language-default locale. For example, a correct chain for zh_Hant_MO is: zh_Hant_MO -> zh_Hant_HK -> zh_Hant -> root (two fixups: zh_Hant_HK and root, so that do not inherit zh) Fortunately, this didn't do any difference in a generated data. Change-Id: I92e09a95bd86f8723d8fe993f57d99af6f50db5e Reviewed-by: Lars Knoll --- util/local_database/xpathlite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/local_database') diff --git a/util/local_database/xpathlite.py b/util/local_database/xpathlite.py index 20034a5b5e..112dc14ce8 100644 --- a/util/local_database/xpathlite.py +++ b/util/local_database/xpathlite.py @@ -217,7 +217,7 @@ def _fixedLookupChain(dirname, name): if parent_locale == u"root": items = items[:i+1] else: - items = items[:i+1] + parent_locale.split() + items[i+1:] + items = items[:i+1] + _fixedLookupChain(dirname, parent_locale) return items return items -- cgit v1.2.3