Make contributors page translatable
This commit is contained in:
parent
8e263c9865
commit
dad38b27e8
|
@ -4,6 +4,7 @@ import _ from 'underscore';
|
||||||
import d3 from 'd3';
|
import d3 from 'd3';
|
||||||
import { ContributorsGraph, ContributorsAuthorGraph, ContributorsMasterGraph } from './stat_graph_contributors_graph';
|
import { ContributorsGraph, ContributorsAuthorGraph, ContributorsMasterGraph } from './stat_graph_contributors_graph';
|
||||||
import ContributorsStatGraphUtil from './stat_graph_contributors_util';
|
import ContributorsStatGraphUtil from './stat_graph_contributors_util';
|
||||||
|
import { n__ } from '../locale';
|
||||||
|
|
||||||
export default (function() {
|
export default (function() {
|
||||||
function ContributorsStatGraph() {}
|
function ContributorsStatGraph() {}
|
||||||
|
@ -44,7 +45,7 @@ export default (function() {
|
||||||
commits = $('<span/>', {
|
commits = $('<span/>', {
|
||||||
"class": 'graph-author-commits-count'
|
"class": 'graph-author-commits-count'
|
||||||
});
|
});
|
||||||
commits.text(author.commits + " commits");
|
commits.text(n__('%d commit', '%d commits', author.commits));
|
||||||
return $('<span/>').append(commits);
|
return $('<span/>').append(commits);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
- @no_container = true
|
- @no_container = true
|
||||||
- page_title "Contributors"
|
- page_title _('Contributors')
|
||||||
- content_for :page_specific_javascripts do
|
- content_for :page_specific_javascripts do
|
||||||
= webpack_bundle_tag('common_d3')
|
= webpack_bundle_tag('common_d3')
|
||||||
= webpack_bundle_tag('graphs')
|
= webpack_bundle_tag('graphs')
|
||||||
|
@ -7,23 +7,23 @@
|
||||||
|
|
||||||
.js-graphs-show{ class: container_class, 'data-project-graph-path': project_graph_path(@project, current_ref, format: :json) }
|
.js-graphs-show{ class: container_class, 'data-project-graph-path': project_graph_path(@project, current_ref, format: :json) }
|
||||||
.sub-header-block
|
.sub-header-block
|
||||||
.tree-ref-holder
|
.tree-ref-holder.inline.vertical-align-middle
|
||||||
= render 'shared/ref_switcher', destination: 'graphs'
|
= render 'shared/ref_switcher', destination: 'graphs'
|
||||||
%ul.breadcrumb.repo-breadcrumb
|
= link_to s_('Commits|History'), project_commits_path(@project, current_ref), class: 'btn'
|
||||||
= commits_breadcrumbs
|
|
||||||
|
|
||||||
.loading-graph
|
.loading-graph
|
||||||
.center
|
.center
|
||||||
%h3.page-title
|
%h3.page-title
|
||||||
%i.fa.fa-spinner.fa-spin
|
%i.fa.fa-spinner.fa-spin
|
||||||
Building repository graph.
|
= s_('ContributorsPage|Building repository graph.')
|
||||||
%p.slead Please wait a moment, this page will automatically refresh when ready.
|
%p.slead
|
||||||
|
= s_('ContributorsPage|Please wait a moment, this page will automatically refresh when ready.')
|
||||||
|
|
||||||
.stat-graph.hide
|
.stat-graph.hide
|
||||||
.header.clearfix
|
.header.clearfix
|
||||||
%h3#date_header.page-title
|
%h3#date_header.page-title
|
||||||
%p.light
|
%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" }
|
%input#brush_change{ :type => "hidden" }
|
||||||
.graphs.row
|
.graphs.row
|
||||||
#contributors-master
|
#contributors-master
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Make contributors page translatable
|
||||||
|
merge_request: 14915
|
||||||
|
author:
|
||||||
|
type: other
|
Loading…
Reference in New Issue