/// Creates a translation file for exporting. This is broken out for concurrency.
Creates a translation file for exporting. This is broken out for concurrency.
Creates a translation file for exporting . This is broken out for concurrency .
async fn create_translation_file(
    locale: &str,
    immutable_store: &ImmutableStore,
    translations_manager: &impl TranslationsManager,
) -> Result<(), ServerError> {
    // Get the translations string for that
    let translations_str = translations_manager
        .get_translations_str_for_locale(locale.to_string())
        .await?;
    // Write it to an asset so that it can be served directly
    immutable_store
        .write(
            &format!("exported/.perseus/translations/{}", locale),
            &translations_str,
        )
        .await?;
    Ok(())
}
async fn create_translation_file ( locale : & str , immutable_store : & ImmutableStore , translations_manager : & impl TranslationsManager , ) -> Result < ( ) , ServerError > { // Get the translations string for that let translations_str = translations_manager . get_translations_str_for_locale ( locale . to_string ( ) ) . await ? ; // Write it to an asset so that it can be served directly immutable_store . write ( & format ! ( " " locale ) , & translations_str , ) . await ? ; Ok ( ( ) ) }
Creates a translation file for exporting.
Creates a translation file for exporting .
locale
&str
immutable_store
&ImmutableStore
translations_manager
&impl TranslationsManager