Framework for embedding localizations into Rust types
use icu_locale::Locale;
use l10n_embed::{Context, Localize};

pub fn compare_message<L: Localize, S: AsRef<str>>(message: L, expected: S, locale: Locale) {
    let context = Context::new(locale, true);
    let mut buffer = String::new();

    message.localize(&context, &mut buffer);
    pretty_assertions::assert_eq!(expected.as_ref(), buffer);
}