use std::path::PathBuf;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum Error {
#[error("file '{0}' does not exist")]
NoFile(PathBuf),
#[error("path '{0}' is not a file")]
NotFile(PathBuf),
#[error("path '{0}' is not a directory")]
NotDirectory(PathBuf),
#[error("no parent for path '{0}'")]
NoParentPath(PathBuf),
#[error("arb-dir is not defined in '{0}'")]
ArbDirNotDefined(PathBuf),
#[error("template-arb-file is not defined in '{0}'")]
TemplateArbFileNotDefined(PathBuf),
#[error("no YAML documents in index file '{0}'")]
NoYamlDocuments(PathBuf),
#[error("expecting '{0}' translations but got '{1}'")]
TranslationLength(usize, usize),
#[error("key '{0}' is already prefixed with an @ symbol")]
AlreadyPrefixed(String),
#[error("placeholder '{0}' is declared but does not exist in source '{1}'")]
PlaceholderNotDefined(String, String),
#[error(transparent)]
Io(#[from] std::io::Error),
#[error(transparent)]
Yaml(#[from] yaml_rust2::ScanError),
#[error(transparent)]
Json(#[from] serde_json::Error),
#[error(transparent)]
Deepl(#[from] deepl::Error),
}