lib/cupcakinator.rb in cupcakinator-0.0.4 vs lib/cupcakinator.rb in cupcakinator-1.0.0
- old
+ new
@@ -1,5 +1,6 @@
+require 'i18n'
require 'cupcakinator/version'
require 'cupcakinator/base'
require 'cupcakinator/config'
require 'cupcakinator/options'
require 'cupcakinator/errors'
@@ -19,11 +20,16 @@
# {"meatball"=>{"flavor"=>["chicken", "pork"]}}
# >> Foo.config.meatball
# {"flavor"=>["chicken", "pork"]}
module Cupcakinator
+ unless @_i18n_initialized_for_cupcakinator
+ locale_file = File.expand_path(File.join(File.dirname(__FILE__), '../config/locales.yml'))
+ I18n.load_path << locale_file
+ @_i18n_initialized_for_cupcakinator = true
+ end
+
def self.included(other)
other.extend Cupcakinator::Base
end
-
end