Sha256: 2023c729d33eb9633d9fe1d500dabd2f26bc711effe64c02a372639f2aff434f
Contents?: true
Size: 548 Bytes
Versions: 10
Compression:
Stored size: 548 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 def self.file_paths(locale) Dir.glob(File.join(root_dir, "config", "locales", "**","#{locale}.yml")) end def self.root_dir Rails.root end private def keys {locale => I18n.backend.send(:translations)[locale]} end def file_path File.join(Translate::Storage.root_dir, "config", "locales", "#{locale}.yml") end end
Version data entries
10 entries across 10 versions & 2 rubygems