Sha256: f82f042048c25e129410414e37a690719164cc8bc33650da3300af6bf596e6ca

Contents?: true

Size: 353 Bytes

Versions: 26

Compression:

Stored size: 353 Bytes

Contents

class Translate::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

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
refinerycms-i18n-0.9.8.12 lib/translate/storage.rb
refinerycms-i18n-0.9.8.11 lib/translate/storage.rb
refinerycms-0.9.7.15 vendor/plugins/translate/lib/translate/storage.rb
refinerycms-0.9.7.14 vendor/plugins/translate/lib/translate/storage.rb
refinerycms-i18n-0.9.8.8 lib/translate/storage.rb
refinerycms-i18n-0.9.8.7 lib/translate/storage.rb
refinerycms-i18n-0.9.8.6 lib/translate/storage.rb
refinerycms-i18n-0.9.8.5 lib/translate/storage.rb
refinerycms-i18n-0.9.8.4 lib/translate/storage.rb
refinerycms-i18n-0.9.8.3 lib/translate/storage.rb
refinerycms-i18n-0.9.8.2 lib/translate/storage.rb
refinerycms-i18n-0.9.8.1 lib/translate/storage.rb
refinerycms-i18n-0.9.8 lib/translate/storage.rb
refinerycms-0.9.7.13 vendor/plugins/translate/lib/translate/storage.rb
refinerycms-0.9.7.11 vendor/plugins/translate/lib/translate/storage.rb
refinerycms-0.9.7.10 vendor/plugins/translate/lib/translate/storage.rb
refinerycms-0.9.7.9 vendor/plugins/translate/lib/translate/storage.rb
refinerycms-0.9.7.8 vendor/plugins/translate/lib/translate/storage.rb
refinerycms-0.9.7.7 vendor/plugins/translate/lib/translate/storage.rb
refinerycms-0.9.7.6 vendor/plugins/translate/lib/translate/storage.rb