module ViewComponent::Translatable
def build_i18n_backend
def build_i18n_backend return if CompileCache.compiled? self self.i18n_backend = if (translation_files = _sidecar_files(%w[yml yaml])).any? # Returning nil cleans up if translations file has been removed since the last compilation I18nBackend.new( i18n_scope: i18n_scope, load_paths: translation_files ) end end