class ViewComponent::Translatable::I18nBackend
def initialize(i18n_scope:, load_paths:)
def initialize(i18n_scope:, load_paths:) @i18n_scope = i18n_scope.split(".").map(&:to_sym) @load_paths = load_paths end
def load_translations
def load_translations super(@load_paths) end
def scope_data(data)
def scope_data(data) @i18n_scope.reverse_each do |part| data = {part => data} end data end
def store_translations(locale, data, options = EMPTY_HASH)
def store_translations(locale, data, options = EMPTY_HASH) super(locale, scope_data(data), options) end