Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ffbeb382 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Regenerate LocaleDataTables.cpp" am: 6658c31b am: ccc64a5a

Change-Id: Ie1c1ae3210049bac2d005ed82b05b838ff25d183
parents 66d7bd23 ccc64a5a
Loading
Loading
Loading
Loading
+1381 −1336

File changed.

Preview size limit exceeded, changes collapsed.

+5 −2
Original line number Diff line number Diff line
@@ -176,6 +176,9 @@ def read_and_dump_likely_data(icu_data_dir):
    dump_representative_locales(representative_locales)
    return likely_script_dict

def escape_script_variable_name(script):
    """Escape characters, e.g. '~', in a C++ variable name"""
    return script.replace("~", "_")

def read_parent_data(icu_data_dir):
    """Read locale parent data from ICU data files."""
@@ -221,7 +224,7 @@ def dump_parent_data(script_organized_dict):
    for script in sorted_scripts:
        parent_dict = script_organized_dict[script]
        print ('const std::unordered_map<uint32_t, uint32_t> %s_PARENTS({'
            % script.upper())
            % escape_script_variable_name(script.upper()))
        for locale in sorted(parent_dict.keys()):
            parent = parent_dict[locale]
            print '    {0x%08Xu, 0x%08Xu}, // %s -> %s' % (
@@ -239,7 +242,7 @@ def dump_parent_data(script_organized_dict):
    for script in sorted_scripts:
        print "    {{'%c', '%c', '%c', '%c'}, &%s_PARENTS}," % (
            script[0], script[1], script[2], script[3],
            script.upper())
            escape_script_variable_name(script.upper()))
    print '};'