From 780386d7f1e58225b4fa8aaff8227b645cd0f4aa Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Thu, 26 Jul 2012 06:02:22 +0800 Subject: [PATCH] Remove i18n_variable for parser --- lib/parsers/parser_common.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index 30862023..c0297699 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -28,7 +28,7 @@ module ParserCommon res << " active" if (current_page.id.eql?(page.id) || current_page.descendant_of?(page)) res << "'>" root = "/" - res << "#{page.i18n_variable[I18n.locale]}" + res << "#{page.title}" if page.visible_children.size > 0 && current < menu.levels res << "" res << menu_level(page, current_page, current + 1, menu, edit) @@ -68,7 +68,7 @@ module ParserCommon printable_ad_images.shuffle! printable_ad_images.each do |ad_image| #TODO Need Reflact res << " 0 res << "
" - res << "

#{menu_page.i18n_variable[I18n.locale]}

" + res << "

#{menu_page.title}

" res << "" @@ -138,7 +138,7 @@ module ParserCommon page_footer = body.css('.page_footer').first if page_footer res = "
" - res << @site.footer[I18n.locale] rescue nil + res << @site.footer rescue nil res << "
" fragment = Nokogiri::HTML::DocumentFragment.new(body ,res) page_footer.swap(fragment) rescue nil @@ -152,7 +152,7 @@ module ParserCommon page_sub_menu = body.css('.page_sub_menu').first if page_sub_menu res = "
" - res << @site.sub_menu[I18n.locale] rescue nil + res << @site.sub_menu rescue nil res << "
" fragment = Nokogiri::HTML::DocumentFragment.new(body ,res) page_sub_menu.swap(fragment) rescue nil @@ -175,7 +175,7 @@ module ParserCommon ret << "'>
" else part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil - part_title = part.title[I18n.locale] rescue nil + part_title = part.title rescue nil if edit ret << "
" if part ret << "