build_tools/i18n/crowdin.py
def _format_json_files():
    """
    re-print all json files to ensure consistent diffs with ordered keys
    """
    locale_paths = []
    for lang_object in utils.supported_languages(include_in_context=True):
        locale_paths.append(utils.local_locale_path(lang_object))
        locale_paths.append(utils.local_perseus_locale_path(lang_object))
    for locale_path in locale_paths:
        for file_name in os.listdir(locale_path):
            if not file_name.endswith(".json"):
                continue
            file_path = os.path.join(locale_path, file_name)
            with io.open(file_path, mode="r", encoding="utf-8") as f:
                data = json.load(f)
            utils.json_dump_formatted(data, file_path)

    re-print all json files to ensure consistent diffs with ordered keys
    
re-print all json files to ensure consistent diffs with ordered keys
re - print all json files to ensure consistent diffs with ordered keys
def _format_json_files():
    locale_paths = []
    for lang_object in utils.supported_languages(include_in_context=True):
        locale_paths.append(utils.local_locale_path(lang_object))
        locale_paths.append(utils.local_perseus_locale_path(lang_object))
    for locale_path in locale_paths:
        for file_name in os.listdir(locale_path):
            if not file_name.endswith(".json"):
                continue
            file_path = os.path.join(locale_path, file_name)
            with io.open(file_path, mode="r", encoding="utf-8") as f:
                data = json.load(f)
            utils.json_dump_formatted(data, file_path)
def _format_json_files ( ) : locale_paths = [ ] for lang_object in utils . supported_languages ( include_in_context = True ) : locale_paths . append ( utils . local_locale_path ( lang_object ) ) locale_paths . append ( utils . local_perseus_locale_path ( lang_object ) ) for locale_path in locale_paths : for file_name in os . listdir ( locale_path ) : if not file_name . endswith ( ".json" ) : continue file_path = os . path . join ( locale_path , file_name ) with io . open ( file_path , mode = "r" , encoding = "utf-8" ) as f : data = json . load ( f ) utils . json_dump_formatted ( data , file_path )
re-print all json files to ensure consistent diffs with ordered keys
re - print all json files to ensure consistent diffs with ordered keys
"""
    re-print all json files to ensure consistent diffs with ordered keys
    """