From 3966c7bdae579d9cbd3563d800782dc23da97f06 Mon Sep 17 00:00:00 2001 From: Andrea Frigido Date: Mon, 1 Aug 2011 16:21:15 +0200 Subject: [PATCH 1/2] Italian localization update. --- config/locales/admin_ui.it.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/locales/admin_ui.it.yml b/config/locales/admin_ui.it.yml index acac3d4a..1be8e0a5 100644 --- a/config/locales/admin_ui.it.yml +++ b/config/locales/admin_ui.it.yml @@ -16,6 +16,7 @@ it: welcome: Benvenuto, %{name} see: Vedi il sito web switch: Passa ad un altro sito + help: Aiuto logout: Esci menu: contents: Contenuti From 37c50d27ffa92e2db8463f25699544c837bff329 Mon Sep 17 00:00:00 2001 From: Andrea Frigido Date: Wed, 3 Aug 2011 08:58:47 +0200 Subject: [PATCH 2/2] Bugfix: import site with empty editable file. --- lib/locomotive/import/pages.rb | 8 +++++--- spec/fixtures/themes/default.zip | Bin 513283 -> 513491 bytes spec/lib/locomotive/import_spec.rb | 7 ++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/locomotive/import/pages.rb b/lib/locomotive/import/pages.rb index f24d098d..5280d11d 100644 --- a/lib/locomotive/import/pages.rb +++ b/lib/locomotive/import/pages.rb @@ -105,10 +105,12 @@ module Locomotive next if element.nil? 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) - element.source = File.open(asset_path) + if File.exists?(asset_path) + element.source = File.open(asset_path) + end end else element.content = attributes['content'] diff --git a/spec/fixtures/themes/default.zip b/spec/fixtures/themes/default.zip index 39e424fdae7aaf94db762b5c709faaf72f84083e..0ccca2bf9e10e8ce8eddce7e8b01ace771201c1a 100644 GIT binary patch delta 6713 zcmcIoc|276`=2v29Q&>q`!4%l@)eUvAxlaWku4=#ByH2Eds}GX;E=LcvP6WdWEa`j zn}lrfO-XXQ70LIUGi0XR@9X>f<2PPYuX*;*`*}Xk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6kH7b9b2+WlYvXkD>ge}Eznl+NYcI5D-@TfArYg3n zTBv9IjS1u08xynCD$midQ6JH-lpn{coqhtWM_PLy9Lu2)2>fEK9?2TN@R8}fnxc|t zfd6*y9lF>UffZqPA?7HC(4vnx7b#Pg!%H)}AmZ2NIcP@>pT4_y;dgiO|GG@uO_k}4 z#29v=R-|kE>5CTX3iLZY*qMJS^$;*>SwBaNLJbZ9!^|qMV5aJIzh%X>+ExR@DXoXA!Rk5xvK)Az5lBHw4N#ua ztXBgzkWqGcq6sL%+!~-mMgw!|J`jf=Yk(C7;eXcDg5@}$eLYY-#RLMdp%$o3@q(LR zHSQpmfLUSMbrV?PDCXBJwDBgerDMo6${M;)E3_@a-w8myTflM3mDF26n)HeWqw0Y) zvWAx%KE4G+*r?3R`Q4a6LrW6=m}f;%p?n=MH^i(=dpSMc&zwzEI0WAcux$Y|9Y61& zP;W0M7jAsNVbcn0LDPz+CJfZDK8GS-5vWiH=0Sm zj0IhGdOjc!bU8G2&0%Tkz0F!W#L^-(cLvX}MZP4aQwdIfw zeGkb0w&>vX33Hh`VbP#UfNT4RQhe+af%=VCLcw`69L$R1hr&%j1|Dbvg4j;N%8f4R zlp3r>sZ*QrQxm#@9^u3}@OU#2MuydSr_Td)ZAS6!k(dyU%i*dDno(6PeXy??$WE%# zC5l45`#@!C)B4{B(&Sh{;>qW8;4vX0{|u#fFzBfs4o%!gwsDw*on6-h*R}#hNvs7; zm!cWHKDHHIXlf4>VggoVF;2Aa!@I3$vFKv~P^b;?|9gURYk?$r!a@Stw*l3udXG1$ zzuSNS(F+6S!DjT9z|II>*h!zCVRlufva*_qRsu^X$V9p0nLrrlKFdVcahL(ym|*@? z#AMph6 'Contact').first page.find_editable_element('content', 'office').source_filename.should == 'office.jpg' 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 page = @site.pages.where(:templatized => true).first @@ -126,4 +131,4 @@ describe Locomotive::Import::Job do end -end \ No newline at end of file +end