Commit 11ac4ad9 authored by Brandon Labuschagne's avatar Brandon Labuschagne Committed by Mike Greiling

I18N EE JS files in b directories

This is one of many MRs opened in order to improve the overall
internationalisation of the GitLab codebase.

This commit only targets Vanilla JS files.

i18n documentation
https://docs.gitlab.com/ee/development/i18n/externalization.html
parent 98463eeb
import { mapGetters } from 'vuex';
import { s__ } from '~/locale';
import { sprintf, s__, __ } from '~/locale';
export default {
props: {
......@@ -54,10 +54,10 @@ export default {
resolveButtonTitle() {
if (this.isDraft || this.discussionId) return this.resolvedStatusMessage;
let title = 'Mark as resolved';
let title = __('Mark as resolved');
if (this.resolvedBy) {
title = `Resolved by ${this.resolvedBy.name}`;
title = sprintf(__('Resolved by %{name}'), { name: this.resolvedBy.name });
}
return title;
......
import { __ } from '~/locale';
export default [
{
id: null,
title: 'Any Milestone',
title: __('Any Milestone'),
},
{
id: -2,
title: 'Upcoming',
title: __('Upcoming'),
},
{
id: -3,
title: 'Started',
title: __('Started'),
},
];
......@@ -134,7 +134,7 @@ class BoardsStoreEE {
this.store.addList({
id: 'promotion',
list_type: 'promotion',
title: 'Improve Issue boards',
title: __('Improve Issue boards'),
position: 0,
});
......
......@@ -6,6 +6,7 @@ import { axisBottom, axisLeft } from 'd3-axis';
import { line } from 'd3-shape';
import { transition } from 'd3-transition';
import { easeLinear } from 'd3-ease';
import { s__ } from '~/locale';
const d3 = {
select,
......@@ -45,7 +46,7 @@ export default class BurndownChart {
this.xAxisGroup.append('line').attr('class', 'domain-line');
// create y-axis label
this.label = 'Remaining';
this.label = s__('BurndownChartLabel|Remaining');
const yAxisLabel = this.yAxisGroup.append('g').attr('class', 'axis-label');
this.yAxisLabelText = yAxisLabel.append('text').text(this.label);
this.yAxisLabelBBox = this.yAxisLabelText.node().getBBox();
......@@ -58,7 +59,7 @@ export default class BurndownChart {
this.chartLegendIdealKey = this.chartLegendGroup.append('g');
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
.select('text')
.node()
......@@ -66,7 +67,7 @@ export default class BurndownChart {
this.chartLegendActualKey = this.chartLegendGroup.append('g');
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
.select('text')
.node()
......@@ -143,7 +144,7 @@ export default class BurndownChart {
}
// set data and force re-render
setData(data, { label = 'Remaining', animate } = {}) {
setData(data, { label = s__('BurndownChartLabel|Remaining'), animate } = {}) {
this.data = data
.map(datum => ({
date: new Date(datum[0]),
......
import $ from 'jquery';
import Cookies from 'js-cookie';
import BurndownChart from './burndown_chart';
import { s__ } from '~/locale';
export default () => {
// handle hint dismissal
......@@ -24,7 +25,7 @@ export default () => {
const chart = new BurndownChart({ container, startDate, dueDate });
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() {
const $this = $(this);
......@@ -37,10 +38,16 @@ export default () => {
.addClass('btn-inverted');
switch (show) {
case 'count':
chart.setData(openIssuesCount, { label: 'Open issues', animate: true });
chart.setData(openIssuesCount, {
label: s__('BurndownChartLabel|Open issues'),
animate: true,
});
break;
case 'weight':
chart.setData(openIssuesWeight, { label: 'Open issue weight', animate: true });
chart.setData(openIssuesWeight, {
label: s__('BurndownChartLabel|Open issue weight'),
animate: true,
});
break;
default:
break;
......
......@@ -2130,6 +2130,21 @@ msgstr ""
msgid "Built-in"
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"
msgstr ""
......@@ -6905,6 +6920,9 @@ msgstr ""
msgid "ImportProjects|Updating the imported projects failed"
msgstr ""
msgid "Improve Issue boards"
msgstr ""
msgid "Improve Issue boards with GitLab Enterprise Edition."
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