summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShah El-Rahman <selrahman@gitlab.com>2018-01-24 15:24:03 -0600
committerShah El-Rahman <selrahman@gitlab.com>2018-02-07 11:27:21 -0600
commit831c33f0c7ccb760ae9b8c9333a3763fd8dc8532 (patch)
tree3af08f381f59df07c662eae06946a463f89325af
parent9a9ee0d760cc7740e1dfebdf7c0fe882c01bce4c (diff)
downloadgitlab-ce-831c33f0c7ccb760ae9b8c9333a3763fd8dc8532.tar.gz
Annotate charts page for internationalization
-rw-r--r--app/views/projects/graphs/charts.html.haml31
1 files changed, 18 insertions, 13 deletions
diff --git a/app/views/projects/graphs/charts.html.haml b/app/views/projects/graphs/charts.html.haml
index ffb9238a65a..300a39fe257 100644
--- a/app/views/projects/graphs/charts.html.haml
+++ b/app/views/projects/graphs/charts.html.haml
@@ -7,7 +7,7 @@
.repo-charts{ class: container_class }
%h4.sub-header
- Programming languages used in this repository
+ = _("Programming languages used in this repository")
.row
.col-md-4
@@ -30,9 +30,11 @@
.row.tree-ref-header
.col-md-6
%h4
- Commit statistics for
- %strong= @ref
- #{@commits_graph.start_date.strftime('%b %d')} - #{@commits_graph.end_date.strftime('%b %d')}
+ - start_time = capture do
+ #{@commits_graph.start_date.strftime('%b %d')}
+ - end_time = capture do
+ #{@commits_graph.end_date.strftime('%b %d')}
+ = (_("Commit statistics for %{ref} %{start_time} - %{end_time}") % { ref: "<strong>#{@ref}</strong>", start_time: start_time, end_time: end_time }).html_safe
.col-md-6
.tree-ref-container
@@ -45,32 +47,35 @@
.col-md-6
%ul.commit-stats
%li
- Total:
- %strong #{@commits_graph.commits.size} commits
+ - total = capture do
+ #{@commits_graph.commits.size}
+ = (_("Total: %{total}") % { total: "<strong>#{total} commits</strong>" }).html_safe
%li
- Average per day:
- %strong #{@commits_graph.commit_per_day} commits
+ - average = capture do
+ #{@commits_graph.commit_per_day}
+ = (_("Average per day: %{average}") % { average: "<strong>#{average} commits</strong>" }).html_safe
%li
- Authors:
- %strong= @commits_graph.authors
+ - authors = capture do
+ #{@commits_graph.authors}
+ = (_("Authors: %{authors}") % { authors: "<strong>#{authors}</strong>" }).html_safe
.col-md-6
%div
%p.slead
- Commits per day of month
+ = _("Commits per day of month")
%canvas#month-chart
.row
.col-md-6
.col-md-6
%div
%p.slead
- Commits per weekday
+ = _("Commits per weekday")
%canvas#weekday-chart
.row
.col-md-6
.col-md-6
%div
%p.slead
- Commits per day hour (UTC)
+ = _("Commits per day hour (UTC)")
%canvas#hour-chart
%script#projectChartData{ type: "application/json" }