diff --git a/app/controllers/softapplications_controller.rb b/app/controllers/softapplications_controller.rb index 0c7e2ade1..5b6111187 100644 --- a/app/controllers/softapplications_controller.rb +++ b/app/controllers/softapplications_controller.rb @@ -56,12 +56,12 @@ class SoftapplicationsController < ApplicationController stars_status = stars_reates.select("stars, count(*) as scount"). group("stars") - @stars_status_map = Hash.new(0.0) + @stars_status_map = Hash.new(0) stars_status.each do |star_status| percent = percent_of(star_status.scount, stars_reates_count).to_f - percent_m = format("%.2f", percent) + people = star_status.scount.to_i @stars_status_map["star#{star_status.stars.to_i}".to_sym] = - percent_m.to_s + "%" + people.to_s end @jours = @softapplication.journals_for_messages.order('created_on DESC') @image_results = [] diff --git a/app/views/softapplications/show.html.erb b/app/views/softapplications/show.html.erb index 5aa40bf90..7a2edfa1f 100644 --- a/app/views/softapplications/show.html.erb +++ b/app/views/softapplications/show.html.erb @@ -71,7 +71,7 @@
-
<%=l(:label_work_scores_proportion)%>
+
<%=l(:label_work_scores_people)%>
<% 100.step(20, -20) do |star| %>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml index cd522dd2c..2aaaba9cf 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2006,7 +2006,7 @@ zh: label_work_scores: 作品得分 label_work_rating: 评分 label_work_tishi: 您可以重新打分,打分结果以最后一次打分为主! - label_work_scores_proportion: 得分比例 + label_work_scores_people: 得分人数 label_softapplication_type: 应用分类 label_work_type: 作品分类 label_work_photo: 作品截图