pub fn locales_lit_and_translations_manager(mut self, locales: Locales) -> Self {
        #[cfg(engine)]
        let using_i18n = locales.using_i18n;

        self.locales = locales;
        // We only handle the translations manager on the server-side (it doesn't exist
        // on the client-side)
        #[cfg(engine)]
        {
            // If we're using i18n, do caching stuff
            // If not, use a dummy translations manager
            if using_i18n {
                // By default, all translations are cached
                let all_locales: Vec<String> = self
                    .locales
                    .get_all()
                    .iter()
                    // We have a `&&String` at this point, hence the double clone
                    .cloned()
                    .cloned()
                    .collect();
                let tm_fut = FsTranslationsManager::new(
                    crate::i18n::DFLT_TRANSLATIONS_DIR.to_string(),
                    all_locales,
                    crate::i18n::TRANSLATOR_FILE_EXT.to_string(),
                );
                self.translations_manager = Tm::Full(Box::pin(tm_fut));
            } else {
                self.translations_manager = Tm::Dummy(FsTranslationsManager::new_dummy());
            }
        }

        self
    }
The same as `.locales_and_translations_manager()`, but this accepts a
literal [`Locales`] `struct`, which means this can be used when you're
using [`FsTranslationsManager`] but when you don't know if your app is
using i18n or not (almost always middleware).
packages/perseus/src/init.rs