{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$comment": "https://support.crowdin.com/configuration-file/",
  "description": "Configuration for Crowdin, a crowd-translation platform.",
  "id": "https://json.schemastore.org/crowdin.json",
  "properties": {
    "project_id": {
      "title": "Project ID",
      "type": "string"
    },
    "project_id_env": {
      "title": "Project ID Environment Variable",
      "type": "string"
    },
    "api_token": {
      "title": "API Token",
      "type": "string"
    },
    "api_token_env": {
      "title": "API Token Environment Variable",
      "type": "string"
    },
    "base_path": {
      "title": "Base Path",
      "type": "string"
    },
    "base_path_env": {
      "title": "Base Path Environment Variable",
      "type": "string"
    },
    "base_url": {
      "title": "Base URL",
      "type": "string",
      "format": "uri"
    },
    "base_url_env": {
      "title": "Base URL Environment Variable",
      "type": "string"
    },
    "preserve_hierarchy": {
      "title": "Preserve Hierarchy",
      "type": "boolean"
    },
    "commit_message": {
      "title": "Commit Message",
      "type": "string"
    },
    "append_commit_message": {
      "title": "Append Commit Message",
      "description": "Replace the default commit message with the one specified in commit_message.",
      "type": "boolean"
    },
    "export_languages": {
      "title": "Export Languages",
      "description": "Specify a list of specific languages to export.",
      "type": "array",
      "items": {
        "title": "Language",
        "type": "string"
      }
    },
    "files": {
      "title": "Files",
      "type": "array",
      "items": {
        "title": "File",
        "type": "object",
        "properties": {
          "source": {
            "title": "Source",
            "type": "string"
          },
          "translation": {
            "title": "Translation",
            "type": "string"
          },
          "ignore": {
            "title": "Ignore",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "translation_replace": {
            "title": "Translation Replace",
            "additionalProperties": {
              "type": "string"
            }
          },
          "excluded_target_languages": {
            "title": "Excluded Target Languages",
            "type": "array",
            "items": {
              "title": "Excluded Target Language",
              "type": "string"
            }
          },
          "scheme": {
            "title": "Scheme",
            "type": "string"
          },
          "dest": {
            "title": "Destination",
            "type": "string"
          },
          "type": {
            "title": "Type",
            "type": "string"
          },
          "update_option": {
            "title": "Update Option",
            "enum": ["update_as_unapproved", "update_without_changes"]
          },
          "translate_content": {
            "title": "Translate Content",
            "description": "Defines whether to translate texts placed inside the tags.",
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "default": 1
          },
          "translate_attributes": {
            "title": "Translate Attributes",
            "description": "Defines whether to translate tags' attributes.",
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "default": 1
          },
          "content_segmentation": {
            "title": "Content Segmentation",
            "description": "Defines whether to split long texts into smaller text segments.",
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "default": 1
          },
          "translatable_elements": {
            "title": "Translatable Elements",
            "description": "An array of strings, where each item is the XPaths to DOM element that should be imported. ",
            "type": "array",
            "items": {
              "title": "Translatable Element",
              "type": "string"
            }
          },
          "skip_untranslated_strings": {
            "title": "Skip Untranslated Strings",
            "type": "boolean"
          },
          "skip_untranslated_files": {
            "title": "Skip Untranslated Files",
            "type": "boolean"
          },
          "export_only_approved": {
            "title": "Export Only Approved",
            "type": "boolean"
          },
          "escape_quotes": {
            "title": "Escape Quotes",
            "description": "Defines whether a single quote should be escaped by another single quote or backslash in exported translations.",
            "type": "number",
            "minimum": 0,
            "maximum": 3,
            "default": 3
          },
          "escape_special_characters": {
            "title": "Escape Special Characters",
            "description": "Defines whether any special characters (=, :, ! and #) should be escaped by backslash in exported translations.",
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "default": 1
          },
          "first_line_contains_header": {
            "title": "First Line Contains Header",
            "type": "boolean"
          },
          "languages_mapping": {
            "title": "Language Mapping",
            "properties": {
              "two_letters_code": {
                "additionalProperties": {
                  "type": "string"
                }
              },
              "android_code": {
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          },
          "labels": {
            "title": "Labels",
            "type": "array",
            "items": {
              "title": "Label",
              "type": "string"
            }
          }
        }
      }
    }
  },
  "type": "object"
}
