Commit b1b8a160 authored by Mike Greiling's avatar Mike Greiling

Merge branch 'ee-js-i18n-javascripts-b' into 'master'

i18n EE JS files in directories starting with b

See merge request gitlab-org/gitlab-ee!13486
parents 98463eeb 11ac4ad9
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { s__ } from '~/locale'; import { sprintf, s__, __ } from '~/locale';
export default { export default {
props: { props: {
...@@ -54,10 +54,10 @@ export default { ...@@ -54,10 +54,10 @@ export default {
resolveButtonTitle() { resolveButtonTitle() {
if (this.isDraft || this.discussionId) return this.resolvedStatusMessage; if (this.isDraft || this.discussionId) return this.resolvedStatusMessage;
let title = 'Mark as resolved'; let title = __('Mark as resolved');
if (this.resolvedBy) { if (this.resolvedBy) {
title = `Resolved by ${this.resolvedBy.name}`; title = sprintf(__('Resolved by %{name}'), { name: this.resolvedBy.name });
} }
return title; return title;
......
import { __ } from '~/locale';
export default [ export default [
{ {
id: null, id: null,
title: 'Any Milestone', title: __('Any Milestone'),
}, },
{ {
id: -2, id: -2,
title: 'Upcoming', title: __('Upcoming'),
}, },
{ {
id: -3, id: -3,
title: 'Started', title: __('Started'),
}, },
]; ];
...@@ -134,7 +134,7 @@ class BoardsStoreEE { ...@@ -134,7 +134,7 @@ class BoardsStoreEE {
this.store.addList({ this.store.addList({
id: 'promotion', id: 'promotion',
list_type: 'promotion', list_type: 'promotion',
title: 'Improve Issue boards', title: __('Improve Issue boards'),
position: 0, position: 0,
}); });
......
...@@ -6,6 +6,7 @@ import { axisBottom, axisLeft } from 'd3-axis'; ...@@ -6,6 +6,7 @@ import { axisBottom, axisLeft } from 'd3-axis';
import { line } from 'd3-shape'; import { line } from 'd3-shape';
import { transition } from 'd3-transition'; import { transition } from 'd3-transition';
import { easeLinear } from 'd3-ease'; import { easeLinear } from 'd3-ease';
import { s__ } from '~/locale';
const d3 = { const d3 = {
select, select,
...@@ -45,7 +46,7 @@ export default class BurndownChart { ...@@ -45,7 +46,7 @@ export default class BurndownChart {
this.xAxisGroup.append('line').attr('class', 'domain-line'); this.xAxisGroup.append('line').attr('class', 'domain-line');
// create y-axis label // create y-axis label
this.label = 'Remaining'; this.label = s__('BurndownChartLabel|Remaining');
const yAxisLabel = this.yAxisGroup.append('g').attr('class', 'axis-label'); const yAxisLabel = this.yAxisGroup.append('g').attr('class', 'axis-label');
this.yAxisLabelText = yAxisLabel.append('text').text(this.label); this.yAxisLabelText = yAxisLabel.append('text').text(this.label);
this.yAxisLabelBBox = this.yAxisLabelText.node().getBBox(); this.yAxisLabelBBox = this.yAxisLabelText.node().getBBox();
...@@ -58,7 +59,7 @@ export default class BurndownChart { ...@@ -58,7 +59,7 @@ export default class BurndownChart {
this.chartLegendIdealKey = this.chartLegendGroup.append('g'); this.chartLegendIdealKey = this.chartLegendGroup.append('g');
this.chartLegendIdealKey.append('line').attr('class', 'ideal line'); this.chartLegendIdealKey.append('line').attr('class', 'ideal line');
this.chartLegendIdealKey.append('text').text('Guideline'); this.chartLegendIdealKey.append('text').text(s__('BurndownChartLabel|Guideline'));
this.chartLegendIdealKeyBBox = this.chartLegendIdealKey this.chartLegendIdealKeyBBox = this.chartLegendIdealKey
.select('text') .select('text')
.node() .node()
...@@ -66,7 +67,7 @@ export default class BurndownChart { ...@@ -66,7 +67,7 @@ export default class BurndownChart {
this.chartLegendActualKey = this.chartLegendGroup.append('g'); this.chartLegendActualKey = this.chartLegendGroup.append('g');
this.chartLegendActualKey.append('line').attr('class', 'actual line'); this.chartLegendActualKey.append('line').attr('class', 'actual line');
this.chartLegendActualKey.append('text').text('Progress'); this.chartLegendActualKey.append('text').text(s__('BurndownChartLabel|Progress'));
this.chartLegendActualKeyBBox = this.chartLegendActualKey this.chartLegendActualKeyBBox = this.chartLegendActualKey
.select('text') .select('text')
.node() .node()
...@@ -143,7 +144,7 @@ export default class BurndownChart { ...@@ -143,7 +144,7 @@ export default class BurndownChart {
} }
// set data and force re-render // set data and force re-render
setData(data, { label = 'Remaining', animate } = {}) { setData(data, { label = s__('BurndownChartLabel|Remaining'), animate } = {}) {
this.data = data this.data = data
.map(datum => ({ .map(datum => ({
date: new Date(datum[0]), date: new Date(datum[0]),
......
import $ from 'jquery'; import $ from 'jquery';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import BurndownChart from './burndown_chart'; import BurndownChart from './burndown_chart';
import { s__ } from '~/locale';
export default () => { export default () => {
// handle hint dismissal // handle hint dismissal
...@@ -24,7 +25,7 @@ export default () => { ...@@ -24,7 +25,7 @@ export default () => {
const chart = new BurndownChart({ container, startDate, dueDate }); const chart = new BurndownChart({ container, startDate, dueDate });
let currentView = 'count'; let currentView = 'count';
chart.setData(openIssuesCount, { label: 'Open issues', animate: true }); chart.setData(openIssuesCount, { label: s__('BurndownChartLabel|Open issues'), animate: true });
$('.js-burndown-data-selector').on('click', 'button', function switchData() { $('.js-burndown-data-selector').on('click', 'button', function switchData() {
const $this = $(this); const $this = $(this);
...@@ -37,10 +38,16 @@ export default () => { ...@@ -37,10 +38,16 @@ export default () => {
.addClass('btn-inverted'); .addClass('btn-inverted');
switch (show) { switch (show) {
case 'count': case 'count':
chart.setData(openIssuesCount, { label: 'Open issues', animate: true }); chart.setData(openIssuesCount, {
label: s__('BurndownChartLabel|Open issues'),
animate: true,
});
break; break;
case 'weight': case 'weight':
chart.setData(openIssuesWeight, { label: 'Open issue weight', animate: true }); chart.setData(openIssuesWeight, {
label: s__('BurndownChartLabel|Open issue weight'),
animate: true,
});
break; break;
default: default:
break; break;
......
...@@ -2130,6 +2130,21 @@ msgstr "" ...@@ -2130,6 +2130,21 @@ msgstr ""
msgid "Built-in" msgid "Built-in"
msgstr "" msgstr ""
msgid "BurndownChartLabel|Guideline"
msgstr ""
msgid "BurndownChartLabel|Open issue weight"
msgstr ""
msgid "BurndownChartLabel|Open issues"
msgstr ""
msgid "BurndownChartLabel|Progress"
msgstr ""
msgid "BurndownChartLabel|Remaining"
msgstr ""
msgid "Business" msgid "Business"
msgstr "" msgstr ""
...@@ -6905,6 +6920,9 @@ msgstr "" ...@@ -6905,6 +6920,9 @@ msgstr ""
msgid "ImportProjects|Updating the imported projects failed" msgid "ImportProjects|Updating the imported projects failed"
msgstr "" msgstr ""
msgid "Improve Issue boards"
msgstr ""
msgid "Improve Issue boards with GitLab Enterprise Edition." msgid "Improve Issue boards with GitLab Enterprise Edition."
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment