Add to localized content. For #850
This commit is contained in:
parent
7eedf6b28f
commit
68adbfeb2a
|
@ -27,6 +27,8 @@ class Middleman::CoreExtensions::Internationalization < ::Middleman::Extension
|
||||||
|
|
||||||
app.config.define_setting :locales_dir, 'locales', 'The directory holding your locale configurations'
|
app.config.define_setting :locales_dir, 'locales', 'The directory holding your locale configurations'
|
||||||
|
|
||||||
|
::Middleman::Sitemap::Resource.send :attr_accessor, :locale_root_path
|
||||||
|
|
||||||
app.send :include, LocaleHelpers
|
app.send :include, LocaleHelpers
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -206,6 +208,11 @@ class Middleman::CoreExtensions::Internationalization < ::Middleman::Extension
|
||||||
def to_resource(app)
|
def to_resource(app)
|
||||||
p = ::Middleman::Sitemap::Resource.new(app.sitemap, path)
|
p = ::Middleman::Sitemap::Resource.new(app.sitemap, path)
|
||||||
p.proxy_to(source_path)
|
p.proxy_to(source_path)
|
||||||
|
|
||||||
|
templates_dir = app.extensions[:i18n].options[:templates_dir]
|
||||||
|
|
||||||
|
p.locale_root_path = source_path.gsub(templates_dir, '')
|
||||||
|
|
||||||
p
|
p
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue