Beispiel #1
0
def validate_field_4(source_data, translation_data, translation_file):
    # index
    i = 4
    # name
    validator_util.match_property(i, "name", source_data, translation_data,
                                  translation_file)
    # type
    validator_util.match_property(i, "type", source_data, translation_data,
                                  translation_file)
def validate_fields(i, source_data, translation_data, translation_file):
    # version
    validator_util.match_property(i, "version", source_data, translation_data,
                                  translation_file)
    for mi in range(0, len(source_data[i]["messages"])):
        # [i]["messages"][mi]["image"]
        validator_util.match_particular_property(
            i, source_data[i]["messages"][mi]["image"],
            translation_data[i]["messages"][mi]["image"], translation_file)
        for pi in range(0, len(source_data[i]["messages"][mi]["platforms"])):
            # [i]["messages"][mi]["platforms"][pi]
            validator_util.match_particular_property(
                i, source_data[i]["messages"][mi]["platforms"][pi],
                translation_data[i]["messages"][mi]["platforms"][pi],
                translation_file)
Beispiel #3
0
def validate_field_1(source_data, translation_data, translation_file):
    # index
    i = 1
    # name
    validator_util.match_property(i, "name", source_data, translation_data,
                                  translation_file)
    # type
    validator_util.match_property(i, "type", source_data, translation_data,
                                  translation_file)
    # ["options"]["range_min"]
    validator_util.match_particular_property(
        i, source_data[i]["options"]["range_min"],
        translation_data[i]["options"]["range_min"], translation_file)
    # ["options"]["range_max"]
    validator_util.match_particular_property(
        i, source_data[i]["options"]["range_max"],
        translation_data[i]["options"]["range_max"], translation_file)
    # ["options"]["allows_none"]
    validator_util.match_particular_property(
        i, source_data[i]["options"]["allows_none"],
        translation_data[i]["options"]["allows_none"], translation_file)
def validate_translation_data(source_data, translation_data, translation_file):
    for i in range(0, len(source_data)):
        validator_util.match_property(i, "image_name", source_data,
                                      translation_data, translation_file)
        validator_util.match_property(i, "filter", source_data,
                                      translation_data, translation_file)
        validator_util.match_property(i, "type", source_data, translation_data,
                                      translation_file)
Beispiel #5
0
def validate_field_3(source_data, translation_data, translation_file):
    # index
    i = 3
    # name
    validator_util.match_property(i, "name", source_data, translation_data,
                                  translation_file)
    # type
    validator_util.match_property(i, "type", source_data, translation_data,
                                  translation_file)
    # data_type
    validator_util.match_property(i, "data_type", source_data,
                                  translation_data, translation_file)
    # ["options"]["reference"]
    validator_util.match_particular_property(
        i, source_data[i]["options"]["reference"],
        translation_data[i]["options"]["reference"], translation_file)
    # ["options"]["allows_none"]
    validator_util.match_particular_property(
        i, source_data[i]["options"]["allows_none"],
        translation_data[i]["options"]["allows_none"], translation_file)
Beispiel #6
0
def validate_field_0(source_data, translation_data, translation_file):
    # index
    i = 0
    # name
    validator_util.match_property(i, "name", source_data, translation_data,
                                  translation_file)
    # type
    validator_util.match_property(i, "type", source_data, translation_data,
                                  translation_file)
    # data_type
    validator_util.match_property(i, "data_type", source_data,
                                  translation_data, translation_file)
    # ["options"]["values"][0]["value"]
    validator_util.match_particular_property(
        i, source_data[i]["options"]["values"][0]["value"],
        translation_data[i]["options"]["values"][0]["value"], translation_file)
    # ["options"]["values"][1]["value"]
    validator_util.match_particular_property(
        i, source_data[i]["options"]["values"][1]["value"],
        translation_data[i]["options"]["values"][1]["value"], translation_file)
def validate_translation_data(source_data, translation_data, translation_file):
    for i in range(0, len(source_data)):
        validator_util.match_property(i, "value", source_data,
                                      translation_data, translation_file)