merge i18n extension
This commit is contained in:
parent
8d22fee8d8
commit
d9a82beb8a
3 changed files with 6 additions and 1 deletions
|
@ -88,6 +88,9 @@ module Middleman
|
||||||
|
|
||||||
# Catch and show exceptions at the Rack level
|
# Catch and show exceptions at the Rack level
|
||||||
autoload :ShowExceptions, "middleman-core/core_extensions/show_exceptions"
|
autoload :ShowExceptions, "middleman-core/core_extensions/show_exceptions"
|
||||||
|
|
||||||
|
# i18n
|
||||||
|
autoload :I18n, "middleman-core/core_extensions/i18n"
|
||||||
end
|
end
|
||||||
|
|
||||||
module Extensions
|
module Extensions
|
||||||
|
|
|
@ -240,6 +240,9 @@ class Middleman::Base
|
||||||
# Parse YAML from templates
|
# Parse YAML from templates
|
||||||
register Middleman::CoreExtensions::FrontMatter
|
register Middleman::CoreExtensions::FrontMatter
|
||||||
|
|
||||||
|
# i18n
|
||||||
|
register Middleman::CoreExtensions::I18n
|
||||||
|
|
||||||
# Built-in Extensions
|
# Built-in Extensions
|
||||||
Middleman::Extensions.register(:directory_indexes) {
|
Middleman::Extensions.register(:directory_indexes) {
|
||||||
Middleman::Extensions::DirectoryIndexes }
|
Middleman::Extensions::DirectoryIndexes }
|
||||||
|
|
|
@ -19,7 +19,6 @@ module Middleman::CoreExtensions::DefaultHelpers
|
||||||
app.helpers Helpers
|
app.helpers Helpers
|
||||||
|
|
||||||
app.ready do
|
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"]
|
::I18n.load_path += Dir["#{File.dirname(__FILE__)}/../vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/*.yml"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue