def localization_merge_back(updated_localizable_file, old_translated_file, new_translated_file, merged_translated_file):
    """ Generates a file merging the old translations and the new ones.

    Args:
        updated_localizable_file (str): The path to the updated localization strings file, meaning the strings that
            require translation.
        old_translated_file (str): The path to the strings file containing the previously translated strings.
        new_translated_file (str): The path to the strings file containing the newly translated strings.
        merged_translated_file (str): The path to the output file with the merged translations.

    """
    output_file_elements = []
    old_translated_file_dict = generate_localization_key_to_entry_dictionary_from_file(old_translated_file)
    new_translated_file_dict = generate_localization_key_to_entry_dictionary_from_file(new_translated_file)

    f = open_strings_file(updated_localizable_file, "r")

    for header_comment, comments, key, value in extract_header_comment_key_value_tuples_from_file(f):
        translation_value = None
        if len(header_comment) > 0:
            output_file_elements.append(Comment(header_comment))

        if value in new_translated_file_dict:
            translation_value = new_translated_file_dict[value].value
        elif key in old_translated_file_dict:
            translation_value = old_translated_file_dict[key].value

        if translation_value is not None:
            output_file_elements.append(LocalizationEntry(comments, key, translation_value))

    f.close()

    write_file_elements_to_strings_file(merged_translated_file, output_file_elements)


# The main method for simple command line run.
dataset/ETHPy150Open joytunes/JTLocalize/localization_flow/jtlocalize/core/localization_merge_back.py/localization_merge_back/original