[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 <lars.knoll@digia.com>
bb10
Konstantin Ritt 2015-03-20 20:17:30 +04:00
parent 31cd326bec
commit 7ae4ffa0e0
1 changed files with 1 additions and 1 deletions

View File

@ -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