diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2017-10-17 16:16:08 +0200 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2017-11-01 19:35:58 +0100 |
commit | b59b98ee7714aded1df8c2bef148c1ad7eddfbdb (patch) | |
tree | 56c7c7ce5c4d5e9d2614b5e2e67d263e7d6121a9 | |
parent | bb8d6257c32b153cc67e6b7db76ace25eeb5a837 (diff) | |
download | gitlab-ce-winh-i18n-contributors-page.tar.gz |
Make contributors page translatablewinh-i18n-contributors-page
-rw-r--r-- | app/assets/javascripts/graphs/stat_graph_contributors.js | 3 | ||||
-rw-r--r-- | app/views/projects/graphs/show.html.haml | 9 | ||||
-rw-r--r-- | changelogs/unreleased/winh-i18n-contributors-page.yml | 5 |
3 files changed, 12 insertions, 5 deletions
diff --git a/app/assets/javascripts/graphs/stat_graph_contributors.js b/app/assets/javascripts/graphs/stat_graph_contributors.js index cdc4fcf6573..e7232ca3712 100644 --- a/app/assets/javascripts/graphs/stat_graph_contributors.js +++ b/app/assets/javascripts/graphs/stat_graph_contributors.js @@ -4,6 +4,7 @@ import _ from 'underscore'; import d3 from 'd3'; import { ContributorsGraph, ContributorsAuthorGraph, ContributorsMasterGraph } from './stat_graph_contributors_graph'; import ContributorsStatGraphUtil from './stat_graph_contributors_util'; +import { n__ } from '../locale'; export default (function() { function ContributorsStatGraph() {} @@ -44,7 +45,7 @@ export default (function() { commits = $('<span/>', { "class": 'graph-author-commits-count' }); - commits.text(author.commits + " commits"); + commits.text(n__('%d commit', '%d commits', author.commits)); return $('<span/>').append(commits); }; diff --git a/app/views/projects/graphs/show.html.haml b/app/views/projects/graphs/show.html.haml index b49028acd52..cce16bc58b3 100644 --- a/app/views/projects/graphs/show.html.haml +++ b/app/views/projects/graphs/show.html.haml @@ -1,5 +1,5 @@ - @no_container = true -- page_title "Contributors" +- page_title _('Contributors') - content_for :page_specific_javascripts do = webpack_bundle_tag('common_d3') = webpack_bundle_tag('graphs') @@ -15,14 +15,15 @@ .center %h3.page-title %i.fa.fa-spinner.fa-spin - Building repository graph. - %p.slead Please wait a moment, this page will automatically refresh when ready. + = s_('ContributorsPage|Building repository graph.') + %p.slead + = s_('ContributorsPage|Please wait a moment, this page will automatically refresh when ready.') .stat-graph.hide .header.clearfix %h3#date_header.page-title %p.light - Commits to #{@ref}, excluding merge commits. Limited to 6,000 commits. + = s_('ContributorsPage|Commits to %{branch_name}, excluding merge commits. Limited to 6,000 commits.') % { branch_name: @ref } %input#brush_change{ :type => "hidden" } .graphs.row #contributors-master diff --git a/changelogs/unreleased/winh-i18n-contributors-page.yml b/changelogs/unreleased/winh-i18n-contributors-page.yml new file mode 100644 index 00000000000..9b2611fc4fa --- /dev/null +++ b/changelogs/unreleased/winh-i18n-contributors-page.yml @@ -0,0 +1,5 @@ +--- +title: Make contributors page translatable +merge_request: 14915 +author: +type: other |