{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://formhaus.dev/schema/form-translation.json",
  "title": "Formhaus translation overlay",
  "description": "Translated texts of one form in one language, keyed by step id, section key, field key and option value. Option descriptions are under optionDescriptions.<value>. locale is the language tag. In a multi-step form, top-level fields.<key> also applies and steps.<id>.fields.<key> wins over it. Every text is a string, and a message or label may also be an object of plural forms; empty strings fall back to the source text.",
  "type": "object",
  "properties": {
    "locale": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "submit": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "cancel": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "messages": {
      "type": "object",
      "properties": {
        "required": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "minLength": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "maxLength": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "minItems": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "maxItems": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "min": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "max": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "pattern": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "matchField": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "datetime": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "time": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "option": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "options": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "exclusive": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "boolean": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "string": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "file": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "hidden": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "labels": {
      "type": "object",
      "properties": {
        "continue": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "back": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "stepOf": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "errorSummary": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "addItem": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "removeItem": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "itemLabel": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "itemAdded": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "itemRemoved": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "removeItemNamed": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "removeItemPrompt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "removeItemBody": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "cancel": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "enlargeImage": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "close": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "clear": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "done": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "chooseFile": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "required": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "skip": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "submit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "stepTitle": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "stepErrors": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "fileCount": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "moveUp": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "moveDown": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "itemMoved": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "readOnly": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "or": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        },
        "select": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/definitions/plural"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "sections": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "fields": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/field"
      }
    },
    "steps": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/step"
      }
    }
  },
  "additionalProperties": false,
  "definitions": {
    "field": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string"
        },
        "placeholder": {
          "type": "string"
        },
        "helperText": {
          "type": "string"
        },
        "itemLabel": {
          "type": "string"
        },
        "addLabel": {
          "type": "string"
        },
        "removeLabel": {
          "type": "string"
        },
        "options": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "optionDescriptions": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "validation": {
          "type": "object",
          "properties": {
            "required": {
              "type": "string"
            },
            "minLength": {
              "type": "string"
            },
            "maxLength": {
              "type": "string"
            },
            "min": {
              "type": "string"
            },
            "max": {
              "type": "string"
            },
            "pattern": {
              "type": "string"
            },
            "matchField": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "fields": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/field"
          }
        }
      },
      "additionalProperties": false
    },
    "step": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "next": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "back": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "skip": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "sections": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "fields": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/field"
          }
        }
      },
      "additionalProperties": false
    },
    "plural": {
      "type": "object",
      "properties": {
        "zero": {
          "type": "string"
        },
        "one": {
          "type": "string"
        },
        "two": {
          "type": "string"
        },
        "few": {
          "type": "string"
        },
        "many": {
          "type": "string"
        },
        "other": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "other"
      ]
    }
  }
}
