/// Gets a translator and builds templates for a single locale.
Gets a translator and builds templates for a single locale.
Gets a translator and builds templates for a single locale .
async fn build_templates_and_translator_for_locale(
    templates: &TemplateMap<SsrNode>,
    locale: String,
    (immutable_store, mutable_store): (&ImmutableStore, &impl MutableStore),
    translations_manager: &impl TranslationsManager,
    exporting: bool,
) -> Result<(), ServerError> {
    let translator = translations_manager
        .get_translator_for_locale(locale)
        .await?;
    build_templates_for_locale(
        templates,
        &translator,
        (immutable_store, mutable_store),
        exporting,
    )
    .await?;
    Ok(())
}
async fn build_templates_and_translator_for_locale ( templates : & TemplateMap < SsrNode > , locale : String , ( immutable_store , mutable_store ) : ( & ImmutableStore , & impl MutableStore ) , translations_manager : & impl TranslationsManager , exporting : bool , ) -> Result < ( ) , ServerError > { let translator = translations_manager . get_translator_for_locale ( locale ) . await ? ; build_templates_for_locale ( templates , & translator , ( immutable_store , mutable_store ) , exporting , ) . await ? ; Ok ( ( ) ) }
Gets a translator and builds templates for a single locale.
Gets a translator and builds templates for a single locale .
templates
&TemplateMap<SsrNode>
locale
(&ImmutableStore, &impl MutableStore)
translations_manager
&impl TranslationsManager
exporting
bool