added more stories translation to the widget

This commit is contained in:
Harry Bomrah 2015-08-27 13:55:49 +08:00
parent 5f17089115
commit a88f4571f8
1 changed files with 2 additions and 0 deletions

View File

@ -106,6 +106,7 @@ class NewsController < ApplicationController
end end
def widget def widget
more_stories = {"en" => "More Stories+", "zh_tw" => "更多新聞+"}
params = OrbitHelper.params params = OrbitHelper.params
!params[:sort].blank? ? sort = {params[:sort].to_sym=>params[:order]} : sort = {:is_top=>"desc",:postdate=>"desc"} !params[:sort].blank? ? sort = {params[:sort].to_sym=>params[:order]} : sort = {:is_top=>"desc",:postdate=>"desc"}
news = NewsBulletin.where(:title.ne => "",:is_preview.in=>[false,nil],:is_hot => true).can_display.is_approved.order_by(sort).filter_by_widget_categories if news.nil? news = NewsBulletin.where(:title.ne => "",:is_preview.in=>[false,nil],:is_hot => true).can_display.is_approved.order_by(sort).filter_by_widget_categories if news.nil?
@ -170,6 +171,7 @@ class NewsController < ApplicationController
"categories" => categories, "categories" => categories,
"categories_for_url" => categories_for_url, "categories_for_url" => categories_for_url,
"extras" => { "extras" => {
"more_stories" => more_stories[I18n.locale.to_s],
"more_url"=>OrbitHelper.widget_more_url, "more_url"=>OrbitHelper.widget_more_url,
"title-head" => t('news.table.title'), "title-head" => t('news.table.title'),
"date-head" => t('news.table.date'), "date-head" => t('news.table.date'),