def sync_language(d, data):

    for key in data:
        # if this string is not in the allready translated data, add it
        if key not in d:
            d[key] = data[key]
        # see if there is a translated string in the original list, but not in the new list
        elif (
            ((d[key] != '') or (d[key] != key)) and
            ((data[key] == '') or (data[key] == key))
        ):
            d[key] = d[key]
        # any other case (wether there is or there isn't a translated string)
        else:
            d[key] = data[key]

    return d
A match query that uses the whitespace analyzer.
dataset/ETHPy150Open uwdata/termite-data-server/web2py/scripts/sync_languages.py/sync_language--crossover with--dataset/ETHPy150Open mozilla/kitsune/kitsune/search/es_utils.py/AnalyzerMixin.process_query_match_whitespace