Merge branch 'next-minor' into develop

This commit is contained in:
Benjamin Neff 2017-01-15 23:45:56 +01:00
commit 7b7fbeffdc
7 changed files with 26 additions and 12 deletions

3
.gitignore vendored
View file

@ -86,3 +86,6 @@ diaspora.iml
# Dolphin's directory's preferences files # Dolphin's directory's preferences files
*.directory *.directory
# WebTranslateIt
.wti

View file

@ -12,6 +12,7 @@
## Refactor ## Refactor
## Bug fixes ## Bug fixes
* Fix path to `bundle` in `script/server` [#7281](https://github.com/diaspora/diaspora/pull/7281)
## Features ## Features

View file

@ -13,7 +13,7 @@ module ReportHelper
post_path(item.post.id, anchor: item.guid) post_path(item.post.id, anchor: item.guid)
)) ))
else else
raw t("report.not_found") t("report.not_found")
end end
end end

View file

@ -20,7 +20,7 @@
= submit_tag t('.go'), class: 'btn btn-primary' = submit_tag t('.go'), class: 'btn btn-primary'
%h3 %h3
!= t('.display_results', :segment => @segment) != t("admins.stats.display_results", segment: content_tag(:strong, @segment))
.row .row
- [:posts, :comments, :aspect_memberships, :users].each do |name| - [:posts, :comments, :aspect_memberships, :users].each do |name|
@ -45,7 +45,9 @@
.row .row
.col-md-12 .col-md-12
%p.alert.alert-info.text-center{role: "alert"} %p.alert.alert-info.text-center{role: "alert"}
!= t('.current_segment', :post_yest => @posts[:yesterday]/@user_count.to_f, :post_day => @posts[:day_before]/@user_count.to_f) != t("admins.stats.current_segment",
post_yest: content_tag(:strong, @posts[:yesterday] / @user_count.to_f),
post_day: content_tag(:strong, @posts[:day_before] / @user_count.to_f))
.row .row
.col-md-12 .col-md-12
@ -53,4 +55,6 @@
%ul %ul
- @popular_tags.each do |name,count| - @popular_tags.each do |name,count|
%li %li
!= t('.tag_name', :name_tag => name, :count_tag => count) != t("admins.stats.tag_name",
name_tag: content_tag(:strong, name),
count_tag: content_tag(:strong, count))

View file

@ -138,7 +138,7 @@ en:
daily: "Daily" daily: "Daily"
usage_statistic: "Usage statistics" usage_statistic: "Usage statistics"
go: "Go" go: "Go"
display_results: "Displaying results from the <b>%{segment}</b> segment" display_results: "Displaying results from the %{segment} segment"
posts: posts:
zero: "%{count} posts" zero: "%{count} posts"
one: "%{count} post" one: "%{count} post"
@ -155,9 +155,9 @@ en:
zero: "%{count} users" zero: "%{count} users"
one: "%{count} user" one: "%{count} user"
other: "%{count} users" other: "%{count} users"
current_segment: "The current segment is averaging <b>%{post_yest}</b> posts per user, from <b>%{post_day}</b>" current_segment: "The current segment is averaging %{post_yest} posts per user, from %{post_day}"
50_most: "50 most popular tags" 50_most: "50 most popular tags"
tag_name: "Tag name: <b>%{name_tag}</b> Count: <b>%{count_tag}</b>" tag_name: "Tag name: %{name_tag} Count: %{count_tag}"
pods: pods:
pod_network: "Pod network" pod_network: "Pod network"
aspects: aspects:
@ -951,7 +951,7 @@ en:
delete_link: "Delete item" delete_link: "Delete item"
reported_user_details: "Details on reported user" reported_user_details: "Details on reported user"
confirm_deletion: "Are you sure to delete the item?" confirm_deletion: "Are you sure to delete the item?"
not_found: "<u>The post/comment was not found. It seems that it was deleted by the user!</u>" not_found: "The post/comment was not found. It seems that it was deleted by the user!"
status: status:
destroyed: "The post was destroyed" destroyed: "The post was destroyed"
failed: "Something went wrong" failed: "Something went wrong"

View file

@ -87,7 +87,7 @@ if [ $? -eq 0 ]; then
fi fi
# Check if bundle is complete # Check if bundle is complete
if ! bundle check > /dev/null if ! bin/bundle check > /dev/null
then then
fatal "Your bundle is not up to date, run the command \"bundle install\"" fatal "Your bundle is not up to date, run the command \"bundle install\""
fi fi

View file

@ -140,7 +140,9 @@ describe AdminsController, :type => :controller do
expect(response).to be_success expect(response).to be_success
expect(response).to render_template(:stats) expect(response).to render_template(:stats)
expect(response.body).to include( expect(response.body).to include(
I18n.translate("admins.stats.display_results", segment: I18n.translate("admins.stats.daily")) I18n.translate(
"admins.stats.display_results", segment: "<strong>#{I18n.translate('admins.stats.daily')}</strong>"
)
) )
end end
@ -150,10 +152,14 @@ describe AdminsController, :type => :controller do
expect(response).to be_success expect(response).to be_success
expect(response).to render_template(:stats) expect(response).to render_template(:stats)
expect(response.body).not_to include( expect(response.body).not_to include(
I18n.translate("admins.stats.display_results", segment: I18n.translate("admins.stats.daily")) I18n.translate(
"admins.stats.display_results", segment: "<strong>#{I18n.translate('admins.stats.daily')}</strong>"
)
) )
expect(response.body).to include( expect(response.body).to include(
I18n.translate("admins.stats.display_results", segment: I18n.translate("admins.stats.#{range}")) I18n.translate(
"admins.stats.display_results", segment: "<strong>#{I18n.translate("admins.stats.#{range}")}</strong>"
)
) )
end end
end end