INNER CODE UNIT · Python

main

TheXTech/TheXTech · .github/ci-helper/translate_patcher.py:19

def main(in_args):
    in_file = in_args[0]
    patch_file = in_args[1]
    out_file = in_args[2]

    with open(in_file, encoding='utf-8') as first_file:
        json_out = json.load(first_file)

    with open(patch_file, encoding='utf-8') as second_file:
        json_in = json.load(second_file)

    print("-- Patching translation file: %s\n"
          "-- By the patch file: %s\n"
          "-- Writing result into the %s" % (in_file, patch_file, out_file))

    merge_jsons(json_in, json_out)

    with open(out_file, 'w', encoding='utf-8') as f:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…