INNER CODE UNIT · Python

load_data

futo-org/android-keyboard · tools/make-keyboard-text-py/src/generate.py:6

def load_data():
    all_data = []
    for fname in glob.glob("locales/*.json"):
        with open(fname, "r") as f:
            all_data.append(json.loads(f.read()))

    return all_data

def transform_to_texts(locale_data):
    texts = { }

    texts["locale"] = locale_data["locale"]

    prefixes = ['morekeys_', 'keyspec_', 'label_', 'keylabel_', 'keyhintlabel_', 'additional_morekeys_', 'qwertysyms_', 'actions_']

    for prefix in prefixes:
        key = prefix.rstrip("_")
        if key not in locale_data: continue

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…