pub mod context;
pub mod coverage;
pub mod diff;
pub mod extractor;
pub mod file_validator;
pub mod formatter;
pub mod glossary;
pub mod locale;
pub mod merger;
pub mod parser;
pub mod plural_extractor;
pub mod validator;
pub mod xliff;
use crate::model::xcstrings::{StringEntry, TranslationState};
pub(crate) fn is_translated_for(entry: &StringEntry, locale: &str) -> bool {
let Some(locs) = &entry.localizations else {
return false;
};
let Some(loc) = locs.get(locale) else {
return false;
};
if loc.variations.is_some() {
return true;
}
if let Some(su) = &loc.string_unit {
return su.state == TranslationState::Translated;
}
false
}