diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-12 09:09:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-12 09:09:53 +0300 |
commit | 90156f527b43a15e794c3351ecfc59aff42c440a (patch) | |
tree | a59318246adf4297b3911f442b6a789fd38d35a6 /app/helpers | |
parent | 737684a392db1178770ad5b1d20b64386aadcac5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/graph_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/timeboxes_helper.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/graph_helper.rb b/app/helpers/graph_helper.rb index 49b15cde009..24072d1ab46 100644 --- a/app/helpers/graph_helper.rb +++ b/app/helpers/graph_helper.rb @@ -17,7 +17,7 @@ module GraphHelper end def success_ratio(counts) - return 100 if counts[:failed].zero? + return 100 if counts[:failed] == 0 ratio = (counts[:success].to_f / (counts[:success] + counts[:failed])) * 100 ratio.to_i diff --git a/app/helpers/timeboxes_helper.rb b/app/helpers/timeboxes_helper.rb index 8c437b283a0..34919f994ee 100644 --- a/app/helpers/timeboxes_helper.rb +++ b/app/helpers/timeboxes_helper.rb @@ -155,7 +155,7 @@ module TimeboxesHelper opened = milestone.opened_issues_count closed = milestone.closed_issues_count - return _("Issues") if total.zero? + return _("Issues") if total == 0 content = [] @@ -187,7 +187,7 @@ module TimeboxesHelper def milestone_releases_tooltip_text(milestone) count = milestone.releases.count - return _("Releases") if count.zero? + return _("Releases") if count == 0 n_("%{releases} release", "%{releases} releases", count) % { releases: count } end |