Sha256: 1cc0deaa3ac1b6915d7e5a304797e7c139a5cd5fb2d2ffe758a3e1b8093cfddf

Contents?: true

Size: 394 Bytes

Versions: 28

Compression:

Stored size: 394 Bytes

Contents

module Translate
  class Storage
    attr_accessor :locale

    def initialize(locale)
      self.locale = locale.to_sym
    end

    def write_to_file
      Translate::File.new(file_path).write(keys)
    end

    private
    def keys
      {locale => I18n.backend.send(:translations)[locale]}
    end

    def file_path
      File.join(Translate.locales_dir, "#{locale}.yml")
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
refinerycms-i18n-0.9.9.7 lib/translate/storage.rb
refinerycms-i18n-0.9.9.6 lib/translate/storage.rb
refinerycms-i18n-0.9.9.5 lib/translate/storage.rb
refinerycms-i18n-0.9.9.4 lib/translate/storage.rb
refinerycms-i18n-0.9.9.3 lib/translate/storage.rb
refinerycms-i18n-0.9.9.2 lib/translate/storage.rb
refinerycms-i18n-0.9.9.1 lib/translate/storage.rb
refinerycms-i18n-0.9.9 lib/translate/storage.rb