Commit 7ae4ffa0 authored by Konstantin Ritt's avatar Konstantin Ritt
Browse files

[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: default avatarLars Knoll <lars.knoll@digia.com>
Showing with 1 addition and 1 deletion
......@@ -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
......
Supports Markdown
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