Merge pull request #152 from frisoft/master
Bugfix: import and italian localization update.
This commit is contained in:
commit
7a4253a7e4
@ -16,6 +16,7 @@ it:
|
|||||||
welcome: Benvenuto, %{name}
|
welcome: Benvenuto, %{name}
|
||||||
see: Vedi il sito web
|
see: Vedi il sito web
|
||||||
switch: Passa ad un altro sito
|
switch: Passa ad un altro sito
|
||||||
|
help: Aiuto
|
||||||
logout: Esci
|
logout: Esci
|
||||||
menu:
|
menu:
|
||||||
contents: Contenuti
|
contents: Contenuti
|
||||||
|
@ -105,10 +105,12 @@ module Locomotive
|
|||||||
next if element.nil?
|
next if element.nil?
|
||||||
|
|
||||||
if element.respond_to?(:source)
|
if element.respond_to?(:source)
|
||||||
asset_path = File.join(theme_path, 'public', attributes['content'])
|
unless attributes['content'].blank?
|
||||||
|
asset_path = File.join(theme_path, 'public', attributes['content'])
|
||||||
|
|
||||||
if File.exists?(asset_path)
|
if File.exists?(asset_path)
|
||||||
element.source = File.open(asset_path)
|
element.source = File.open(asset_path)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
element.content = attributes['content']
|
element.content = attributes['content']
|
||||||
|
BIN
spec/fixtures/themes/default.zip
vendored
BIN
spec/fixtures/themes/default.zip
vendored
Binary file not shown.
@ -74,6 +74,11 @@ describe Locomotive::Import::Job do
|
|||||||
page.find_editable_element('content', 'office').source_filename.should == 'office.jpg'
|
page.find_editable_element('content', 'office').source_filename.should == 'office.jpg'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'sets the empty editable file for a page from the site config file' do
|
||||||
|
page = @site.pages.where(:title => 'Contact').first
|
||||||
|
page.find_editable_element('content', 'office2').source_filename.should be_nil
|
||||||
|
end
|
||||||
|
|
||||||
it 'inserts templatized page' do
|
it 'inserts templatized page' do
|
||||||
page = @site.pages.where(:templatized => true).first
|
page = @site.pages.where(:templatized => true).first
|
||||||
page.should_not be_nil
|
page.should_not be_nil
|
||||||
|
Loading…
Reference in New Issue
Block a user