Fix bug.
This commit is contained in:
parent
dccbc0492b
commit
0b5e97583c
|
@ -12,7 +12,7 @@
|
||||||
<% @all_feed_annc.each do |feed_annc| %>
|
<% @all_feed_annc.each do |feed_annc| %>
|
||||||
<% feed_name = available_locales.collect{|v| feed_annc[:feed_name][v]}.join(' / ') %>
|
<% feed_name = available_locales.collect{|v| feed_annc[:feed_name][v]}.join(' / ') %>
|
||||||
<% if @source.blank? || (@source.include?(feed_annc.channel_title) rescue false) || @source.include?(feed_annc.remote_site_url.to_s.gsub(/http:\/\/|https:\/\//,'').gsub(/\./,'-')) %>
|
<% if @source.blank? || (@source.include?(feed_annc.channel_title) rescue false) || @source.include?(feed_annc.remote_site_url.to_s.gsub(/http:\/\/|https:\/\//,'').gsub(/\./,'-')) %>
|
||||||
<% Array(feed_annc[:all_contents_for_feed]).each do |annc| %>
|
<% Array(feed_annc[:all_contents_for_feed][I18n.locale.to_s]).each do |annc| %>
|
||||||
<% annc_title = available_locales.collect{|v| annc['title_translations'][v]}.join('/') %>
|
<% annc_title = available_locales.collect{|v| annc['title_translations'][v]}.join('/') %>
|
||||||
<% annc_tags = annc['tags'].collect{|tmp| available_locales.collect{|v| tmp['name_translations'][v]}.join(' / ')} %>
|
<% annc_tags = annc['tags'].collect{|tmp| available_locales.collect{|v| tmp['name_translations'][v]}.join(' / ')} %>
|
||||||
<% if @keywords.blank? || search_all_words(Nokogiri.HTML(annc_title).text()+' '+feed_name+' '+annc_tags.join(' '),@keywords) %>
|
<% if @keywords.blank? || search_all_words(Nokogiri.HTML(annc_title).text()+' '+feed_name+' '+annc_tags.join(' '),@keywords) %>
|
||||||
|
|
|
@ -9,6 +9,7 @@ module Feeds
|
||||||
locales = Site.first.in_use_locales rescue I18n.available_locales
|
locales = Site.first.in_use_locales rescue I18n.available_locales
|
||||||
trans = {}
|
trans = {}
|
||||||
locales.each do |locale|
|
locales.each do |locale|
|
||||||
|
locale = locale.to_s
|
||||||
trans[locale] = {}
|
trans[locale] = {}
|
||||||
I18n.with_locale(locale) do
|
I18n.with_locale(locale) do
|
||||||
trans[locale]['top'] = I18n.t(:top)
|
trans[locale]['top'] = I18n.t(:top)
|
||||||
|
|
Loading…
Reference in New Issue