// This file is generated by scripts/generate_dict_crates.py.
// Do not edit manually.
use std::io;
use std::path::Path;
pub const BUNDLED_LANGUAGES: &[&str] = &[
#[cfg(feature = "bundled-data-af")]
"af",
#[cfg(feature = "bundled-data-am")]
"am",
#[cfg(feature = "bundled-data-an")]
"an",
#[cfg(feature = "bundled-data-ar")]
"ar",
#[cfg(feature = "bundled-data-as")]
"as",
#[cfg(feature = "bundled-data-az")]
"az",
#[cfg(feature = "bundled-data-ba")]
"ba",
#[cfg(feature = "bundled-data-be")]
"be",
#[cfg(feature = "bundled-data-bg")]
"bg",
#[cfg(feature = "bundled-data-bn")]
"bn",
#[cfg(feature = "bundled-data-bpy")]
"bpy",
#[cfg(feature = "bundled-data-bs")]
"bs",
#[cfg(feature = "bundled-data-ca")]
"ca",
#[cfg(feature = "bundled-data-chr")]
"chr",
#[cfg(feature = "bundled-data-cmn")]
"cmn",
#[cfg(feature = "bundled-data-cs")]
"cs",
#[cfg(feature = "bundled-data-cv")]
"cv",
#[cfg(feature = "bundled-data-cy")]
"cy",
#[cfg(feature = "bundled-data-da")]
"da",
#[cfg(feature = "bundled-data-de")]
"de",
#[cfg(feature = "bundled-data-el")]
"el",
#[cfg(feature = "bundled-data-en")]
"en",
#[cfg(feature = "bundled-data-eo")]
"eo",
#[cfg(feature = "bundled-data-es")]
"es",
#[cfg(feature = "bundled-data-et")]
"et",
#[cfg(feature = "bundled-data-eu")]
"eu",
#[cfg(feature = "bundled-data-fa")]
"fa",
#[cfg(feature = "bundled-data-fi")]
"fi",
#[cfg(feature = "bundled-data-fr")]
"fr",
#[cfg(feature = "bundled-data-ga")]
"ga",
#[cfg(feature = "bundled-data-gd")]
"gd",
#[cfg(feature = "bundled-data-gn")]
"gn",
#[cfg(feature = "bundled-data-grc")]
"grc",
#[cfg(feature = "bundled-data-gu")]
"gu",
#[cfg(feature = "bundled-data-hak")]
"hak",
#[cfg(feature = "bundled-data-haw")]
"haw",
#[cfg(feature = "bundled-data-he")]
"he",
#[cfg(feature = "bundled-data-hi")]
"hi",
#[cfg(feature = "bundled-data-hr")]
"hr",
#[cfg(feature = "bundled-data-ht")]
"ht",
#[cfg(feature = "bundled-data-hu")]
"hu",
#[cfg(feature = "bundled-data-hy")]
"hy",
#[cfg(feature = "bundled-data-ia")]
"ia",
#[cfg(feature = "bundled-data-id")]
"id",
#[cfg(feature = "bundled-data-io")]
"io",
#[cfg(feature = "bundled-data-is")]
"is",
#[cfg(feature = "bundled-data-it")]
"it",
#[cfg(feature = "bundled-data-ja")]
"ja",
#[cfg(feature = "bundled-data-jbo")]
"jbo",
#[cfg(feature = "bundled-data-ka")]
"ka",
#[cfg(feature = "bundled-data-kk")]
"kk",
#[cfg(feature = "bundled-data-kl")]
"kl",
#[cfg(feature = "bundled-data-kn")]
"kn",
#[cfg(feature = "bundled-data-ko")]
"ko",
#[cfg(feature = "bundled-data-kok")]
"kok",
#[cfg(feature = "bundled-data-ku")]
"ku",
#[cfg(feature = "bundled-data-ky")]
"ky",
#[cfg(feature = "bundled-data-la")]
"la",
#[cfg(feature = "bundled-data-lb")]
"lb",
#[cfg(feature = "bundled-data-lfn")]
"lfn",
#[cfg(feature = "bundled-data-lt")]
"lt",
#[cfg(feature = "bundled-data-lv")]
"lv",
#[cfg(feature = "bundled-data-mi")]
"mi",
#[cfg(feature = "bundled-data-mk")]
"mk",
#[cfg(feature = "bundled-data-ml")]
"ml",
#[cfg(feature = "bundled-data-mr")]
"mr",
#[cfg(feature = "bundled-data-ms")]
"ms",
#[cfg(feature = "bundled-data-mt")]
"mt",
#[cfg(feature = "bundled-data-mto")]
"mto",
#[cfg(feature = "bundled-data-my")]
"my",
#[cfg(feature = "bundled-data-nci")]
"nci",
#[cfg(feature = "bundled-data-ne")]
"ne",
#[cfg(feature = "bundled-data-nl")]
"nl",
#[cfg(feature = "bundled-data-no")]
"no",
#[cfg(feature = "bundled-data-nog")]
"nog",
#[cfg(feature = "bundled-data-om")]
"om",
#[cfg(feature = "bundled-data-or")]
"or",
#[cfg(feature = "bundled-data-pa")]
"pa",
#[cfg(feature = "bundled-data-pap")]
"pap",
#[cfg(feature = "bundled-data-piqd")]
"piqd",
#[cfg(feature = "bundled-data-pl")]
"pl",
#[cfg(feature = "bundled-data-pt")]
"pt",
#[cfg(feature = "bundled-data-py")]
"py",
#[cfg(feature = "bundled-data-qdb")]
"qdb",
#[cfg(feature = "bundled-data-qu")]
"qu",
#[cfg(feature = "bundled-data-quc")]
"quc",
#[cfg(feature = "bundled-data-qya")]
"qya",
#[cfg(feature = "bundled-data-ro")]
"ro",
#[cfg(feature = "bundled-data-ru")]
"ru",
#[cfg(feature = "bundled-data-sd")]
"sd",
#[cfg(feature = "bundled-data-shn")]
"shn",
#[cfg(feature = "bundled-data-si")]
"si",
#[cfg(feature = "bundled-data-sjn")]
"sjn",
#[cfg(feature = "bundled-data-sk")]
"sk",
#[cfg(feature = "bundled-data-sl")]
"sl",
#[cfg(feature = "bundled-data-smj")]
"smj",
#[cfg(feature = "bundled-data-sq")]
"sq",
#[cfg(feature = "bundled-data-sr")]
"sr",
#[cfg(feature = "bundled-data-sv")]
"sv",
#[cfg(feature = "bundled-data-sw")]
"sw",
#[cfg(feature = "bundled-data-ta")]
"ta",
#[cfg(feature = "bundled-data-te")]
"te",
#[cfg(feature = "bundled-data-th")]
"th",
#[cfg(feature = "bundled-data-ti")]
"ti",
#[cfg(feature = "bundled-data-tk")]
"tk",
#[cfg(feature = "bundled-data-tn")]
"tn",
#[cfg(feature = "bundled-data-tr")]
"tr",
#[cfg(feature = "bundled-data-tt")]
"tt",
#[cfg(feature = "bundled-data-ug")]
"ug",
#[cfg(feature = "bundled-data-uk")]
"uk",
#[cfg(feature = "bundled-data-ur")]
"ur",
#[cfg(feature = "bundled-data-uz")]
"uz",
#[cfg(feature = "bundled-data-vi")]
"vi",
#[cfg(feature = "bundled-data-yue")]
"yue",
];
pub fn bundled_languages() -> &'static [&'static str] {
BUNDLED_LANGUAGES
}
pub fn has_bundled_language(lang: &str) -> bool {
BUNDLED_LANGUAGES.contains(&lang)
}
fn unsupported_language_error(lang: &str) -> io::Error {
let available = if BUNDLED_LANGUAGES.is_empty() {
"none".to_string()
} else {
BUNDLED_LANGUAGES.join(", ")
};
io::Error::new(
io::ErrorKind::InvalidInput,
format!("language {lang:?} is not bundled in this build; enabled bundled languages: {available}"),
)
}
#[allow(dead_code)]
#[cfg(any(feature = "bundled-data-af", feature = "bundled-data-am", feature = "bundled-data-an", feature = "bundled-data-ar", feature = "bundled-data-as", feature = "bundled-data-az", feature = "bundled-data-ba", feature = "bundled-data-be", feature = "bundled-data-bg", feature = "bundled-data-bn", feature = "bundled-data-bpy", feature = "bundled-data-bs", feature = "bundled-data-ca", feature = "bundled-data-chr", feature = "bundled-data-cmn", feature = "bundled-data-cs", feature = "bundled-data-cv", feature = "bundled-data-cy", feature = "bundled-data-da", feature = "bundled-data-de", feature = "bundled-data-el", feature = "bundled-data-en", feature = "bundled-data-eo", feature = "bundled-data-es", feature = "bundled-data-et", feature = "bundled-data-eu", feature = "bundled-data-fa", feature = "bundled-data-fi", feature = "bundled-data-fr", feature = "bundled-data-ga", feature = "bundled-data-gd", feature = "bundled-data-gn", feature = "bundled-data-grc", feature = "bundled-data-gu", feature = "bundled-data-hak", feature = "bundled-data-haw", feature = "bundled-data-he", feature = "bundled-data-hi", feature = "bundled-data-hr", feature = "bundled-data-ht", feature = "bundled-data-hu", feature = "bundled-data-hy", feature = "bundled-data-ia", feature = "bundled-data-id", feature = "bundled-data-io", feature = "bundled-data-is", feature = "bundled-data-it", feature = "bundled-data-ja", feature = "bundled-data-jbo", feature = "bundled-data-ka", feature = "bundled-data-kk", feature = "bundled-data-kl", feature = "bundled-data-kn", feature = "bundled-data-ko", feature = "bundled-data-kok", feature = "bundled-data-ku", feature = "bundled-data-ky", feature = "bundled-data-la", feature = "bundled-data-lb", feature = "bundled-data-lfn", feature = "bundled-data-lt", feature = "bundled-data-lv", feature = "bundled-data-mi", feature = "bundled-data-mk", feature = "bundled-data-ml", feature = "bundled-data-mr", feature = "bundled-data-ms", feature = "bundled-data-mt", feature = "bundled-data-mto", feature = "bundled-data-my", feature = "bundled-data-nci", feature = "bundled-data-ne", feature = "bundled-data-nl", feature = "bundled-data-no", feature = "bundled-data-nog", feature = "bundled-data-om", feature = "bundled-data-or", feature = "bundled-data-pa", feature = "bundled-data-pap", feature = "bundled-data-piqd", feature = "bundled-data-pl", feature = "bundled-data-pt", feature = "bundled-data-py", feature = "bundled-data-qdb", feature = "bundled-data-qu", feature = "bundled-data-quc", feature = "bundled-data-qya", feature = "bundled-data-ro", feature = "bundled-data-ru", feature = "bundled-data-sd", feature = "bundled-data-shn", feature = "bundled-data-si", feature = "bundled-data-sjn", feature = "bundled-data-sk", feature = "bundled-data-sl", feature = "bundled-data-smj", feature = "bundled-data-sq", feature = "bundled-data-sr", feature = "bundled-data-sv", feature = "bundled-data-sw", feature = "bundled-data-ta", feature = "bundled-data-te", feature = "bundled-data-th", feature = "bundled-data-ti", feature = "bundled-data-tk", feature = "bundled-data-tn", feature = "bundled-data-tr", feature = "bundled-data-tt", feature = "bundled-data-ug", feature = "bundled-data-uk", feature = "bundled-data-ur", feature = "bundled-data-uz", feature = "bundled-data-vi", feature = "bundled-data-yue"))]
fn install_selected_dictionary(dest_dir: &Path, lang: &str) -> io::Result<()> {
match lang {
#[cfg(feature = "bundled-data-af")]
"af" => espeak_ng_data_dict_af::install(dest_dir),
#[cfg(feature = "bundled-data-am")]
"am" => espeak_ng_data_dict_am::install(dest_dir),
#[cfg(feature = "bundled-data-an")]
"an" => espeak_ng_data_dict_an::install(dest_dir),
#[cfg(feature = "bundled-data-ar")]
"ar" => espeak_ng_data_dict_ar::install(dest_dir),
#[cfg(feature = "bundled-data-as")]
"as" => espeak_ng_data_dict_as::install(dest_dir),
#[cfg(feature = "bundled-data-az")]
"az" => espeak_ng_data_dict_az::install(dest_dir),
#[cfg(feature = "bundled-data-ba")]
"ba" => espeak_ng_data_dict_ba::install(dest_dir),
#[cfg(feature = "bundled-data-be")]
"be" => espeak_ng_data_dict_be::install(dest_dir),
#[cfg(feature = "bundled-data-bg")]
"bg" => espeak_ng_data_dict_bg::install(dest_dir),
#[cfg(feature = "bundled-data-bn")]
"bn" => espeak_ng_data_dict_bn::install(dest_dir),
#[cfg(feature = "bundled-data-bpy")]
"bpy" => espeak_ng_data_dict_bpy::install(dest_dir),
#[cfg(feature = "bundled-data-bs")]
"bs" => espeak_ng_data_dict_bs::install(dest_dir),
#[cfg(feature = "bundled-data-ca")]
"ca" => espeak_ng_data_dict_ca::install(dest_dir),
#[cfg(feature = "bundled-data-chr")]
"chr" => espeak_ng_data_dict_chr::install(dest_dir),
#[cfg(feature = "bundled-data-cmn")]
"cmn" => espeak_ng_data_dict_cmn::install(dest_dir),
#[cfg(feature = "bundled-data-cs")]
"cs" => espeak_ng_data_dict_cs::install(dest_dir),
#[cfg(feature = "bundled-data-cv")]
"cv" => espeak_ng_data_dict_cv::install(dest_dir),
#[cfg(feature = "bundled-data-cy")]
"cy" => espeak_ng_data_dict_cy::install(dest_dir),
#[cfg(feature = "bundled-data-da")]
"da" => espeak_ng_data_dict_da::install(dest_dir),
#[cfg(feature = "bundled-data-de")]
"de" => espeak_ng_data_dict_de::install(dest_dir),
#[cfg(feature = "bundled-data-el")]
"el" => espeak_ng_data_dict_el::install(dest_dir),
#[cfg(feature = "bundled-data-en")]
"en" => espeak_ng_data_dict_en::install(dest_dir),
#[cfg(feature = "bundled-data-eo")]
"eo" => espeak_ng_data_dict_eo::install(dest_dir),
#[cfg(feature = "bundled-data-es")]
"es" => espeak_ng_data_dict_es::install(dest_dir),
#[cfg(feature = "bundled-data-et")]
"et" => espeak_ng_data_dict_et::install(dest_dir),
#[cfg(feature = "bundled-data-eu")]
"eu" => espeak_ng_data_dict_eu::install(dest_dir),
#[cfg(feature = "bundled-data-fa")]
"fa" => espeak_ng_data_dict_fa::install(dest_dir),
#[cfg(feature = "bundled-data-fi")]
"fi" => espeak_ng_data_dict_fi::install(dest_dir),
#[cfg(feature = "bundled-data-fr")]
"fr" => espeak_ng_data_dict_fr::install(dest_dir),
#[cfg(feature = "bundled-data-ga")]
"ga" => espeak_ng_data_dict_ga::install(dest_dir),
#[cfg(feature = "bundled-data-gd")]
"gd" => espeak_ng_data_dict_gd::install(dest_dir),
#[cfg(feature = "bundled-data-gn")]
"gn" => espeak_ng_data_dict_gn::install(dest_dir),
#[cfg(feature = "bundled-data-grc")]
"grc" => espeak_ng_data_dict_grc::install(dest_dir),
#[cfg(feature = "bundled-data-gu")]
"gu" => espeak_ng_data_dict_gu::install(dest_dir),
#[cfg(feature = "bundled-data-hak")]
"hak" => espeak_ng_data_dict_hak::install(dest_dir),
#[cfg(feature = "bundled-data-haw")]
"haw" => espeak_ng_data_dict_haw::install(dest_dir),
#[cfg(feature = "bundled-data-he")]
"he" => espeak_ng_data_dict_he::install(dest_dir),
#[cfg(feature = "bundled-data-hi")]
"hi" => espeak_ng_data_dict_hi::install(dest_dir),
#[cfg(feature = "bundled-data-hr")]
"hr" => espeak_ng_data_dict_hr::install(dest_dir),
#[cfg(feature = "bundled-data-ht")]
"ht" => espeak_ng_data_dict_ht::install(dest_dir),
#[cfg(feature = "bundled-data-hu")]
"hu" => espeak_ng_data_dict_hu::install(dest_dir),
#[cfg(feature = "bundled-data-hy")]
"hy" => espeak_ng_data_dict_hy::install(dest_dir),
#[cfg(feature = "bundled-data-ia")]
"ia" => espeak_ng_data_dict_ia::install(dest_dir),
#[cfg(feature = "bundled-data-id")]
"id" => espeak_ng_data_dict_id::install(dest_dir),
#[cfg(feature = "bundled-data-io")]
"io" => espeak_ng_data_dict_io::install(dest_dir),
#[cfg(feature = "bundled-data-is")]
"is" => espeak_ng_data_dict_is::install(dest_dir),
#[cfg(feature = "bundled-data-it")]
"it" => espeak_ng_data_dict_it::install(dest_dir),
#[cfg(feature = "bundled-data-ja")]
"ja" => espeak_ng_data_dict_ja::install(dest_dir),
#[cfg(feature = "bundled-data-jbo")]
"jbo" => espeak_ng_data_dict_jbo::install(dest_dir),
#[cfg(feature = "bundled-data-ka")]
"ka" => espeak_ng_data_dict_ka::install(dest_dir),
#[cfg(feature = "bundled-data-kk")]
"kk" => espeak_ng_data_dict_kk::install(dest_dir),
#[cfg(feature = "bundled-data-kl")]
"kl" => espeak_ng_data_dict_kl::install(dest_dir),
#[cfg(feature = "bundled-data-kn")]
"kn" => espeak_ng_data_dict_kn::install(dest_dir),
#[cfg(feature = "bundled-data-ko")]
"ko" => espeak_ng_data_dict_ko::install(dest_dir),
#[cfg(feature = "bundled-data-kok")]
"kok" => espeak_ng_data_dict_kok::install(dest_dir),
#[cfg(feature = "bundled-data-ku")]
"ku" => espeak_ng_data_dict_ku::install(dest_dir),
#[cfg(feature = "bundled-data-ky")]
"ky" => espeak_ng_data_dict_ky::install(dest_dir),
#[cfg(feature = "bundled-data-la")]
"la" => espeak_ng_data_dict_la::install(dest_dir),
#[cfg(feature = "bundled-data-lb")]
"lb" => espeak_ng_data_dict_lb::install(dest_dir),
#[cfg(feature = "bundled-data-lfn")]
"lfn" => espeak_ng_data_dict_lfn::install(dest_dir),
#[cfg(feature = "bundled-data-lt")]
"lt" => espeak_ng_data_dict_lt::install(dest_dir),
#[cfg(feature = "bundled-data-lv")]
"lv" => espeak_ng_data_dict_lv::install(dest_dir),
#[cfg(feature = "bundled-data-mi")]
"mi" => espeak_ng_data_dict_mi::install(dest_dir),
#[cfg(feature = "bundled-data-mk")]
"mk" => espeak_ng_data_dict_mk::install(dest_dir),
#[cfg(feature = "bundled-data-ml")]
"ml" => espeak_ng_data_dict_ml::install(dest_dir),
#[cfg(feature = "bundled-data-mr")]
"mr" => espeak_ng_data_dict_mr::install(dest_dir),
#[cfg(feature = "bundled-data-ms")]
"ms" => espeak_ng_data_dict_ms::install(dest_dir),
#[cfg(feature = "bundled-data-mt")]
"mt" => espeak_ng_data_dict_mt::install(dest_dir),
#[cfg(feature = "bundled-data-mto")]
"mto" => espeak_ng_data_dict_mto::install(dest_dir),
#[cfg(feature = "bundled-data-my")]
"my" => espeak_ng_data_dict_my::install(dest_dir),
#[cfg(feature = "bundled-data-nci")]
"nci" => espeak_ng_data_dict_nci::install(dest_dir),
#[cfg(feature = "bundled-data-ne")]
"ne" => espeak_ng_data_dict_ne::install(dest_dir),
#[cfg(feature = "bundled-data-nl")]
"nl" => espeak_ng_data_dict_nl::install(dest_dir),
#[cfg(feature = "bundled-data-no")]
"no" => espeak_ng_data_dict_no::install(dest_dir),
#[cfg(feature = "bundled-data-nog")]
"nog" => espeak_ng_data_dict_nog::install(dest_dir),
#[cfg(feature = "bundled-data-om")]
"om" => espeak_ng_data_dict_om::install(dest_dir),
#[cfg(feature = "bundled-data-or")]
"or" => espeak_ng_data_dict_or::install(dest_dir),
#[cfg(feature = "bundled-data-pa")]
"pa" => espeak_ng_data_dict_pa::install(dest_dir),
#[cfg(feature = "bundled-data-pap")]
"pap" => espeak_ng_data_dict_pap::install(dest_dir),
#[cfg(feature = "bundled-data-piqd")]
"piqd" => espeak_ng_data_dict_piqd::install(dest_dir),
#[cfg(feature = "bundled-data-pl")]
"pl" => espeak_ng_data_dict_pl::install(dest_dir),
#[cfg(feature = "bundled-data-pt")]
"pt" => espeak_ng_data_dict_pt::install(dest_dir),
#[cfg(feature = "bundled-data-py")]
"py" => espeak_ng_data_dict_py::install(dest_dir),
#[cfg(feature = "bundled-data-qdb")]
"qdb" => espeak_ng_data_dict_qdb::install(dest_dir),
#[cfg(feature = "bundled-data-qu")]
"qu" => espeak_ng_data_dict_qu::install(dest_dir),
#[cfg(feature = "bundled-data-quc")]
"quc" => espeak_ng_data_dict_quc::install(dest_dir),
#[cfg(feature = "bundled-data-qya")]
"qya" => espeak_ng_data_dict_qya::install(dest_dir),
#[cfg(feature = "bundled-data-ro")]
"ro" => espeak_ng_data_dict_ro::install(dest_dir),
#[cfg(feature = "bundled-data-ru")]
"ru" => espeak_ng_data_dict_ru::install(dest_dir),
#[cfg(feature = "bundled-data-sd")]
"sd" => espeak_ng_data_dict_sd::install(dest_dir),
#[cfg(feature = "bundled-data-shn")]
"shn" => espeak_ng_data_dict_shn::install(dest_dir),
#[cfg(feature = "bundled-data-si")]
"si" => espeak_ng_data_dict_si::install(dest_dir),
#[cfg(feature = "bundled-data-sjn")]
"sjn" => espeak_ng_data_dict_sjn::install(dest_dir),
#[cfg(feature = "bundled-data-sk")]
"sk" => espeak_ng_data_dict_sk::install(dest_dir),
#[cfg(feature = "bundled-data-sl")]
"sl" => espeak_ng_data_dict_sl::install(dest_dir),
#[cfg(feature = "bundled-data-smj")]
"smj" => espeak_ng_data_dict_smj::install(dest_dir),
#[cfg(feature = "bundled-data-sq")]
"sq" => espeak_ng_data_dict_sq::install(dest_dir),
#[cfg(feature = "bundled-data-sr")]
"sr" => espeak_ng_data_dict_sr::install(dest_dir),
#[cfg(feature = "bundled-data-sv")]
"sv" => espeak_ng_data_dict_sv::install(dest_dir),
#[cfg(feature = "bundled-data-sw")]
"sw" => espeak_ng_data_dict_sw::install(dest_dir),
#[cfg(feature = "bundled-data-ta")]
"ta" => espeak_ng_data_dict_ta::install(dest_dir),
#[cfg(feature = "bundled-data-te")]
"te" => espeak_ng_data_dict_te::install(dest_dir),
#[cfg(feature = "bundled-data-th")]
"th" => espeak_ng_data_dict_th::install(dest_dir),
#[cfg(feature = "bundled-data-ti")]
"ti" => espeak_ng_data_dict_ti::install(dest_dir),
#[cfg(feature = "bundled-data-tk")]
"tk" => espeak_ng_data_dict_tk::install(dest_dir),
#[cfg(feature = "bundled-data-tn")]
"tn" => espeak_ng_data_dict_tn::install(dest_dir),
#[cfg(feature = "bundled-data-tr")]
"tr" => espeak_ng_data_dict_tr::install(dest_dir),
#[cfg(feature = "bundled-data-tt")]
"tt" => espeak_ng_data_dict_tt::install(dest_dir),
#[cfg(feature = "bundled-data-ug")]
"ug" => espeak_ng_data_dict_ug::install(dest_dir),
#[cfg(feature = "bundled-data-uk")]
"uk" => espeak_ng_data_dict_uk::install(dest_dir),
#[cfg(feature = "bundled-data-ur")]
"ur" => espeak_ng_data_dict_ur::install(dest_dir),
#[cfg(feature = "bundled-data-uz")]
"uz" => espeak_ng_data_dict_uz::install(dest_dir),
#[cfg(feature = "bundled-data-vi")]
"vi" => espeak_ng_data_dict_vi::install(dest_dir),
#[cfg(feature = "bundled-data-yue")]
"yue" => espeak_ng_data_dict_yue::install(dest_dir),
_ => Err(unsupported_language_error(lang)),
}
}
#[allow(dead_code)]
#[cfg(not(any(feature = "bundled-data-af", feature = "bundled-data-am", feature = "bundled-data-an", feature = "bundled-data-ar", feature = "bundled-data-as", feature = "bundled-data-az", feature = "bundled-data-ba", feature = "bundled-data-be", feature = "bundled-data-bg", feature = "bundled-data-bn", feature = "bundled-data-bpy", feature = "bundled-data-bs", feature = "bundled-data-ca", feature = "bundled-data-chr", feature = "bundled-data-cmn", feature = "bundled-data-cs", feature = "bundled-data-cv", feature = "bundled-data-cy", feature = "bundled-data-da", feature = "bundled-data-de", feature = "bundled-data-el", feature = "bundled-data-en", feature = "bundled-data-eo", feature = "bundled-data-es", feature = "bundled-data-et", feature = "bundled-data-eu", feature = "bundled-data-fa", feature = "bundled-data-fi", feature = "bundled-data-fr", feature = "bundled-data-ga", feature = "bundled-data-gd", feature = "bundled-data-gn", feature = "bundled-data-grc", feature = "bundled-data-gu", feature = "bundled-data-hak", feature = "bundled-data-haw", feature = "bundled-data-he", feature = "bundled-data-hi", feature = "bundled-data-hr", feature = "bundled-data-ht", feature = "bundled-data-hu", feature = "bundled-data-hy", feature = "bundled-data-ia", feature = "bundled-data-id", feature = "bundled-data-io", feature = "bundled-data-is", feature = "bundled-data-it", feature = "bundled-data-ja", feature = "bundled-data-jbo", feature = "bundled-data-ka", feature = "bundled-data-kk", feature = "bundled-data-kl", feature = "bundled-data-kn", feature = "bundled-data-ko", feature = "bundled-data-kok", feature = "bundled-data-ku", feature = "bundled-data-ky", feature = "bundled-data-la", feature = "bundled-data-lb", feature = "bundled-data-lfn", feature = "bundled-data-lt", feature = "bundled-data-lv", feature = "bundled-data-mi", feature = "bundled-data-mk", feature = "bundled-data-ml", feature = "bundled-data-mr", feature = "bundled-data-ms", feature = "bundled-data-mt", feature = "bundled-data-mto", feature = "bundled-data-my", feature = "bundled-data-nci", feature = "bundled-data-ne", feature = "bundled-data-nl", feature = "bundled-data-no", feature = "bundled-data-nog", feature = "bundled-data-om", feature = "bundled-data-or", feature = "bundled-data-pa", feature = "bundled-data-pap", feature = "bundled-data-piqd", feature = "bundled-data-pl", feature = "bundled-data-pt", feature = "bundled-data-py", feature = "bundled-data-qdb", feature = "bundled-data-qu", feature = "bundled-data-quc", feature = "bundled-data-qya", feature = "bundled-data-ro", feature = "bundled-data-ru", feature = "bundled-data-sd", feature = "bundled-data-shn", feature = "bundled-data-si", feature = "bundled-data-sjn", feature = "bundled-data-sk", feature = "bundled-data-sl", feature = "bundled-data-smj", feature = "bundled-data-sq", feature = "bundled-data-sr", feature = "bundled-data-sv", feature = "bundled-data-sw", feature = "bundled-data-ta", feature = "bundled-data-te", feature = "bundled-data-th", feature = "bundled-data-ti", feature = "bundled-data-tk", feature = "bundled-data-tn", feature = "bundled-data-tr", feature = "bundled-data-tt", feature = "bundled-data-ug", feature = "bundled-data-uk", feature = "bundled-data-ur", feature = "bundled-data-uz", feature = "bundled-data-vi", feature = "bundled-data-yue")))]
fn install_selected_dictionary(_dest_dir: &Path, lang: &str) -> io::Result<()> {
Err(unsupported_language_error(lang))
}
#[cfg(any(feature = "bundled-data-af", feature = "bundled-data-am", feature = "bundled-data-an", feature = "bundled-data-ar", feature = "bundled-data-as", feature = "bundled-data-az", feature = "bundled-data-ba", feature = "bundled-data-be", feature = "bundled-data-bg", feature = "bundled-data-bn", feature = "bundled-data-bpy", feature = "bundled-data-bs", feature = "bundled-data-ca", feature = "bundled-data-chr", feature = "bundled-data-cmn", feature = "bundled-data-cs", feature = "bundled-data-cv", feature = "bundled-data-cy", feature = "bundled-data-da", feature = "bundled-data-de", feature = "bundled-data-el", feature = "bundled-data-en", feature = "bundled-data-eo", feature = "bundled-data-es", feature = "bundled-data-et", feature = "bundled-data-eu", feature = "bundled-data-fa", feature = "bundled-data-fi", feature = "bundled-data-fr", feature = "bundled-data-ga", feature = "bundled-data-gd", feature = "bundled-data-gn", feature = "bundled-data-grc", feature = "bundled-data-gu", feature = "bundled-data-hak", feature = "bundled-data-haw", feature = "bundled-data-he", feature = "bundled-data-hi", feature = "bundled-data-hr", feature = "bundled-data-ht", feature = "bundled-data-hu", feature = "bundled-data-hy", feature = "bundled-data-ia", feature = "bundled-data-id", feature = "bundled-data-io", feature = "bundled-data-is", feature = "bundled-data-it", feature = "bundled-data-ja", feature = "bundled-data-jbo", feature = "bundled-data-ka", feature = "bundled-data-kk", feature = "bundled-data-kl", feature = "bundled-data-kn", feature = "bundled-data-ko", feature = "bundled-data-kok", feature = "bundled-data-ku", feature = "bundled-data-ky", feature = "bundled-data-la", feature = "bundled-data-lb", feature = "bundled-data-lfn", feature = "bundled-data-lt", feature = "bundled-data-lv", feature = "bundled-data-mi", feature = "bundled-data-mk", feature = "bundled-data-ml", feature = "bundled-data-mr", feature = "bundled-data-ms", feature = "bundled-data-mt", feature = "bundled-data-mto", feature = "bundled-data-my", feature = "bundled-data-nci", feature = "bundled-data-ne", feature = "bundled-data-nl", feature = "bundled-data-no", feature = "bundled-data-nog", feature = "bundled-data-om", feature = "bundled-data-or", feature = "bundled-data-pa", feature = "bundled-data-pap", feature = "bundled-data-piqd", feature = "bundled-data-pl", feature = "bundled-data-pt", feature = "bundled-data-py", feature = "bundled-data-qdb", feature = "bundled-data-qu", feature = "bundled-data-quc", feature = "bundled-data-qya", feature = "bundled-data-ro", feature = "bundled-data-ru", feature = "bundled-data-sd", feature = "bundled-data-shn", feature = "bundled-data-si", feature = "bundled-data-sjn", feature = "bundled-data-sk", feature = "bundled-data-sl", feature = "bundled-data-smj", feature = "bundled-data-sq", feature = "bundled-data-sr", feature = "bundled-data-sv", feature = "bundled-data-sw", feature = "bundled-data-ta", feature = "bundled-data-te", feature = "bundled-data-th", feature = "bundled-data-ti", feature = "bundled-data-tk", feature = "bundled-data-tn", feature = "bundled-data-tr", feature = "bundled-data-tt", feature = "bundled-data-ug", feature = "bundled-data-uk", feature = "bundled-data-ur", feature = "bundled-data-uz", feature = "bundled-data-vi", feature = "bundled-data-yue"))]
pub fn install_bundled_language(dest_dir: &Path, lang: &str) -> io::Result<()> {
espeak_ng_data_phonemes::install(dest_dir)?;
install_selected_dictionary(dest_dir, lang)
}
#[cfg(not(any(feature = "bundled-data-af", feature = "bundled-data-am", feature = "bundled-data-an", feature = "bundled-data-ar", feature = "bundled-data-as", feature = "bundled-data-az", feature = "bundled-data-ba", feature = "bundled-data-be", feature = "bundled-data-bg", feature = "bundled-data-bn", feature = "bundled-data-bpy", feature = "bundled-data-bs", feature = "bundled-data-ca", feature = "bundled-data-chr", feature = "bundled-data-cmn", feature = "bundled-data-cs", feature = "bundled-data-cv", feature = "bundled-data-cy", feature = "bundled-data-da", feature = "bundled-data-de", feature = "bundled-data-el", feature = "bundled-data-en", feature = "bundled-data-eo", feature = "bundled-data-es", feature = "bundled-data-et", feature = "bundled-data-eu", feature = "bundled-data-fa", feature = "bundled-data-fi", feature = "bundled-data-fr", feature = "bundled-data-ga", feature = "bundled-data-gd", feature = "bundled-data-gn", feature = "bundled-data-grc", feature = "bundled-data-gu", feature = "bundled-data-hak", feature = "bundled-data-haw", feature = "bundled-data-he", feature = "bundled-data-hi", feature = "bundled-data-hr", feature = "bundled-data-ht", feature = "bundled-data-hu", feature = "bundled-data-hy", feature = "bundled-data-ia", feature = "bundled-data-id", feature = "bundled-data-io", feature = "bundled-data-is", feature = "bundled-data-it", feature = "bundled-data-ja", feature = "bundled-data-jbo", feature = "bundled-data-ka", feature = "bundled-data-kk", feature = "bundled-data-kl", feature = "bundled-data-kn", feature = "bundled-data-ko", feature = "bundled-data-kok", feature = "bundled-data-ku", feature = "bundled-data-ky", feature = "bundled-data-la", feature = "bundled-data-lb", feature = "bundled-data-lfn", feature = "bundled-data-lt", feature = "bundled-data-lv", feature = "bundled-data-mi", feature = "bundled-data-mk", feature = "bundled-data-ml", feature = "bundled-data-mr", feature = "bundled-data-ms", feature = "bundled-data-mt", feature = "bundled-data-mto", feature = "bundled-data-my", feature = "bundled-data-nci", feature = "bundled-data-ne", feature = "bundled-data-nl", feature = "bundled-data-no", feature = "bundled-data-nog", feature = "bundled-data-om", feature = "bundled-data-or", feature = "bundled-data-pa", feature = "bundled-data-pap", feature = "bundled-data-piqd", feature = "bundled-data-pl", feature = "bundled-data-pt", feature = "bundled-data-py", feature = "bundled-data-qdb", feature = "bundled-data-qu", feature = "bundled-data-quc", feature = "bundled-data-qya", feature = "bundled-data-ro", feature = "bundled-data-ru", feature = "bundled-data-sd", feature = "bundled-data-shn", feature = "bundled-data-si", feature = "bundled-data-sjn", feature = "bundled-data-sk", feature = "bundled-data-sl", feature = "bundled-data-smj", feature = "bundled-data-sq", feature = "bundled-data-sr", feature = "bundled-data-sv", feature = "bundled-data-sw", feature = "bundled-data-ta", feature = "bundled-data-te", feature = "bundled-data-th", feature = "bundled-data-ti", feature = "bundled-data-tk", feature = "bundled-data-tn", feature = "bundled-data-tr", feature = "bundled-data-tt", feature = "bundled-data-ug", feature = "bundled-data-uk", feature = "bundled-data-ur", feature = "bundled-data-uz", feature = "bundled-data-vi", feature = "bundled-data-yue")))]
pub fn install_bundled_language(_dest_dir: &Path, lang: &str) -> io::Result<()> {
Err(unsupported_language_error(lang))
}
#[cfg(any(feature = "bundled-data-af", feature = "bundled-data-am", feature = "bundled-data-an", feature = "bundled-data-ar", feature = "bundled-data-as", feature = "bundled-data-az", feature = "bundled-data-ba", feature = "bundled-data-be", feature = "bundled-data-bg", feature = "bundled-data-bn", feature = "bundled-data-bpy", feature = "bundled-data-bs", feature = "bundled-data-ca", feature = "bundled-data-chr", feature = "bundled-data-cmn", feature = "bundled-data-cs", feature = "bundled-data-cv", feature = "bundled-data-cy", feature = "bundled-data-da", feature = "bundled-data-de", feature = "bundled-data-el", feature = "bundled-data-en", feature = "bundled-data-eo", feature = "bundled-data-es", feature = "bundled-data-et", feature = "bundled-data-eu", feature = "bundled-data-fa", feature = "bundled-data-fi", feature = "bundled-data-fr", feature = "bundled-data-ga", feature = "bundled-data-gd", feature = "bundled-data-gn", feature = "bundled-data-grc", feature = "bundled-data-gu", feature = "bundled-data-hak", feature = "bundled-data-haw", feature = "bundled-data-he", feature = "bundled-data-hi", feature = "bundled-data-hr", feature = "bundled-data-ht", feature = "bundled-data-hu", feature = "bundled-data-hy", feature = "bundled-data-ia", feature = "bundled-data-id", feature = "bundled-data-io", feature = "bundled-data-is", feature = "bundled-data-it", feature = "bundled-data-ja", feature = "bundled-data-jbo", feature = "bundled-data-ka", feature = "bundled-data-kk", feature = "bundled-data-kl", feature = "bundled-data-kn", feature = "bundled-data-ko", feature = "bundled-data-kok", feature = "bundled-data-ku", feature = "bundled-data-ky", feature = "bundled-data-la", feature = "bundled-data-lb", feature = "bundled-data-lfn", feature = "bundled-data-lt", feature = "bundled-data-lv", feature = "bundled-data-mi", feature = "bundled-data-mk", feature = "bundled-data-ml", feature = "bundled-data-mr", feature = "bundled-data-ms", feature = "bundled-data-mt", feature = "bundled-data-mto", feature = "bundled-data-my", feature = "bundled-data-nci", feature = "bundled-data-ne", feature = "bundled-data-nl", feature = "bundled-data-no", feature = "bundled-data-nog", feature = "bundled-data-om", feature = "bundled-data-or", feature = "bundled-data-pa", feature = "bundled-data-pap", feature = "bundled-data-piqd", feature = "bundled-data-pl", feature = "bundled-data-pt", feature = "bundled-data-py", feature = "bundled-data-qdb", feature = "bundled-data-qu", feature = "bundled-data-quc", feature = "bundled-data-qya", feature = "bundled-data-ro", feature = "bundled-data-ru", feature = "bundled-data-sd", feature = "bundled-data-shn", feature = "bundled-data-si", feature = "bundled-data-sjn", feature = "bundled-data-sk", feature = "bundled-data-sl", feature = "bundled-data-smj", feature = "bundled-data-sq", feature = "bundled-data-sr", feature = "bundled-data-sv", feature = "bundled-data-sw", feature = "bundled-data-ta", feature = "bundled-data-te", feature = "bundled-data-th", feature = "bundled-data-ti", feature = "bundled-data-tk", feature = "bundled-data-tn", feature = "bundled-data-tr", feature = "bundled-data-tt", feature = "bundled-data-ug", feature = "bundled-data-uk", feature = "bundled-data-ur", feature = "bundled-data-uz", feature = "bundled-data-vi", feature = "bundled-data-yue"))]
pub fn install_bundled_languages(dest_dir: &Path, languages: &[&str]) -> io::Result<()> {
espeak_ng_data_phonemes::install(dest_dir)?;
for &lang in languages {
install_selected_dictionary(dest_dir, lang)?;
}
Ok(())
}
#[cfg(not(any(feature = "bundled-data-af", feature = "bundled-data-am", feature = "bundled-data-an", feature = "bundled-data-ar", feature = "bundled-data-as", feature = "bundled-data-az", feature = "bundled-data-ba", feature = "bundled-data-be", feature = "bundled-data-bg", feature = "bundled-data-bn", feature = "bundled-data-bpy", feature = "bundled-data-bs", feature = "bundled-data-ca", feature = "bundled-data-chr", feature = "bundled-data-cmn", feature = "bundled-data-cs", feature = "bundled-data-cv", feature = "bundled-data-cy", feature = "bundled-data-da", feature = "bundled-data-de", feature = "bundled-data-el", feature = "bundled-data-en", feature = "bundled-data-eo", feature = "bundled-data-es", feature = "bundled-data-et", feature = "bundled-data-eu", feature = "bundled-data-fa", feature = "bundled-data-fi", feature = "bundled-data-fr", feature = "bundled-data-ga", feature = "bundled-data-gd", feature = "bundled-data-gn", feature = "bundled-data-grc", feature = "bundled-data-gu", feature = "bundled-data-hak", feature = "bundled-data-haw", feature = "bundled-data-he", feature = "bundled-data-hi", feature = "bundled-data-hr", feature = "bundled-data-ht", feature = "bundled-data-hu", feature = "bundled-data-hy", feature = "bundled-data-ia", feature = "bundled-data-id", feature = "bundled-data-io", feature = "bundled-data-is", feature = "bundled-data-it", feature = "bundled-data-ja", feature = "bundled-data-jbo", feature = "bundled-data-ka", feature = "bundled-data-kk", feature = "bundled-data-kl", feature = "bundled-data-kn", feature = "bundled-data-ko", feature = "bundled-data-kok", feature = "bundled-data-ku", feature = "bundled-data-ky", feature = "bundled-data-la", feature = "bundled-data-lb", feature = "bundled-data-lfn", feature = "bundled-data-lt", feature = "bundled-data-lv", feature = "bundled-data-mi", feature = "bundled-data-mk", feature = "bundled-data-ml", feature = "bundled-data-mr", feature = "bundled-data-ms", feature = "bundled-data-mt", feature = "bundled-data-mto", feature = "bundled-data-my", feature = "bundled-data-nci", feature = "bundled-data-ne", feature = "bundled-data-nl", feature = "bundled-data-no", feature = "bundled-data-nog", feature = "bundled-data-om", feature = "bundled-data-or", feature = "bundled-data-pa", feature = "bundled-data-pap", feature = "bundled-data-piqd", feature = "bundled-data-pl", feature = "bundled-data-pt", feature = "bundled-data-py", feature = "bundled-data-qdb", feature = "bundled-data-qu", feature = "bundled-data-quc", feature = "bundled-data-qya", feature = "bundled-data-ro", feature = "bundled-data-ru", feature = "bundled-data-sd", feature = "bundled-data-shn", feature = "bundled-data-si", feature = "bundled-data-sjn", feature = "bundled-data-sk", feature = "bundled-data-sl", feature = "bundled-data-smj", feature = "bundled-data-sq", feature = "bundled-data-sr", feature = "bundled-data-sv", feature = "bundled-data-sw", feature = "bundled-data-ta", feature = "bundled-data-te", feature = "bundled-data-th", feature = "bundled-data-ti", feature = "bundled-data-tk", feature = "bundled-data-tn", feature = "bundled-data-tr", feature = "bundled-data-tt", feature = "bundled-data-ug", feature = "bundled-data-uk", feature = "bundled-data-ur", feature = "bundled-data-uz", feature = "bundled-data-vi", feature = "bundled-data-yue")))]
pub fn install_bundled_languages(_dest_dir: &Path, languages: &[&str]) -> io::Result<()> {
if let Some(lang) = languages.first() {
Err(unsupported_language_error(lang))
} else {
Ok(())
}
}