Don't try to init i18n if we aren't using it (duh)
This commit is contained in:
parent
d08624dfe3
commit
3f2733720b
|
@ -28,6 +28,7 @@ module Middleman::CoreExtensions::I18n
|
||||||
class Localizer
|
class Localizer
|
||||||
def initialize(app)
|
def initialize(app)
|
||||||
@app = app
|
@app = app
|
||||||
|
@activated = false
|
||||||
@maps = {}
|
@maps = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -59,6 +60,8 @@ module Middleman::CoreExtensions::I18n
|
||||||
{}
|
{}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@activated = true
|
||||||
end
|
end
|
||||||
|
|
||||||
def langs
|
def langs
|
||||||
|
@ -77,6 +80,8 @@ module Middleman::CoreExtensions::I18n
|
||||||
# Update the main sitemap resource list
|
# Update the main sitemap resource list
|
||||||
# @return [void]
|
# @return [void]
|
||||||
def manipulate_resource_list(resources)
|
def manipulate_resource_list(resources)
|
||||||
|
return resources unless @activated
|
||||||
|
|
||||||
@_localization_data = {}
|
@_localization_data = {}
|
||||||
|
|
||||||
new_resources = []
|
new_resources = []
|
||||||
|
|
Loading…
Reference in a new issue