From a88f4571f8ff4e8d1c0dc48c800acb1861c85663 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Thu, 27 Aug 2015 13:55:49 +0800 Subject: [PATCH] added more stories translation to the widget --- app/controllers/news_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 841d1e4..3353bcd 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -106,6 +106,7 @@ class NewsController < ApplicationController end def widget + more_stories = {"en" => "More Stories+", "zh_tw" => "更多新聞+"} params = OrbitHelper.params !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? @@ -170,6 +171,7 @@ class NewsController < ApplicationController "categories" => categories, "categories_for_url" => categories_for_url, "extras" => { + "more_stories" => more_stories[I18n.locale.to_s], "more_url"=>OrbitHelper.widget_more_url, "title-head" => t('news.table.title'), "date-head" => t('news.table.date'),