Beispiel #1
0
def write_stat_translations(data_path, translation_file_cache, **kwargs):
    tag_set = set()
    for in_file, out_file in STAT_TRANSLATION_DICT.items():
        translations = translation_file_cache[in_file].translations
        result = _get_stat_translations(tag_set, translations,
                                        get_custom_translation_file().translations)
        write_json(result, data_path, out_file)
    print("Possible format tags: {}".format(tag_set))
Beispiel #2
0
 def write(file_system, data_path, relational_reader,
           translation_file_cache, ot_file_cache):
     tag_set = set()
     for in_file, out_file in _build_stat_translation_file_map(file_system):
         translations = translation_file_cache[in_file].translations
         result = _get_stat_translations(
             tag_set, translations,
             get_custom_translation_file().translations)
         write_json(result, data_path, out_file)
     print("Possible format tags: {}".format(tag_set))
Beispiel #3
0
    def write(file_system, data_path, relational_reader,
              translation_file_cache, ot_file_cache):
        missing_stat_descriptions = find_missing_stat_descriptions(file_system)
        if missing_stat_descriptions:
            raise ValueError(
                f"The following stat descriptions are currently not accounted for: {missing_stat_descriptions},"
                + " please add to WRITTEN_FILES in constants.py")

        tag_set = set()
        for in_file, out_file in STAT_TRANSLATION_DICT.items():
            translations = translation_file_cache[in_file].translations
            result = _get_stat_translations(
                tag_set, translations,
                get_custom_translation_file().translations)
            write_json(result, data_path, out_file)
        print("Possible format tags: {}".format(tag_set))
Beispiel #4
0
def test_custom_file():
    translations.get_custom_translation_file()