merge i18n extension

This commit is contained in:
Thomas Reynolds 2012-03-10 18:57:00 -08:00
parent 8d22fee8d8
commit d9a82beb8a
3 changed files with 6 additions and 1 deletions

View file

@ -88,6 +88,9 @@ module Middleman
# Catch and show exceptions at the Rack level
autoload :ShowExceptions, "middleman-core/core_extensions/show_exceptions"
# i18n
autoload :I18n, "middleman-core/core_extensions/i18n"
end
module Extensions

View file

@ -240,6 +240,9 @@ class Middleman::Base
# Parse YAML from templates
register Middleman::CoreExtensions::FrontMatter
# i18n
register Middleman::CoreExtensions::I18n
# Built-in Extensions
Middleman::Extensions.register(:directory_indexes) {
Middleman::Extensions::DirectoryIndexes }

View file

@ -19,7 +19,6 @@ module Middleman::CoreExtensions::DefaultHelpers
app.helpers Helpers
app.ready do
::I18n.load_path += Dir["#{File.join(root, 'locales','*.yml')}"]
::I18n.load_path += Dir["#{File.dirname(__FILE__)}/../vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/*.yml"]
end
end