Commit e5d2e7e6 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'js-i18n-m' into 'master'

i18n JS files starting with m

See merge request gitlab-org/gitlab-ce!28068
parents 3ed27553 d3e86b44
...@@ -31,6 +31,7 @@ import initPerformanceBar from './performance_bar'; ...@@ -31,6 +31,7 @@ import initPerformanceBar from './performance_bar';
import initSearchAutocomplete from './search_autocomplete'; import initSearchAutocomplete from './search_autocomplete';
import GlFieldErrors from './gl_field_errors'; import GlFieldErrors from './gl_field_errors';
import initUserPopovers from './user_popovers'; import initUserPopovers from './user_popovers';
import { __ } from './locale';
// expose jQuery as global (TODO: remove these) // expose jQuery as global (TODO: remove these)
window.jQuery = jQuery; window.jQuery = jQuery;
...@@ -219,9 +220,9 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -219,9 +220,9 @@ document.addEventListener('DOMContentLoaded', () => {
const ref = xhrObj.status; const ref = xhrObj.status;
if (ref === 401) { if (ref === 401) {
Flash('You need to be logged in.'); Flash(__('You need to be logged in.'));
} else if (ref === 404 || ref === 500) { } else if (ref === 404 || ref === 500) {
Flash('Something went wrong on our end.'); Flash(__('Something went wrong on our end.'));
} }
}); });
......
...@@ -21,6 +21,7 @@ import { localTimeAgo } from './lib/utils/datetime_utility'; ...@@ -21,6 +21,7 @@ import { localTimeAgo } from './lib/utils/datetime_utility';
import syntaxHighlight from './syntax_highlight'; import syntaxHighlight from './syntax_highlight';
import Notes from './notes'; import Notes from './notes';
import { polyfillSticky } from './lib/utils/sticky'; import { polyfillSticky } from './lib/utils/sticky';
import { __ } from './locale';
// MergeRequestTabs // MergeRequestTabs
// //
...@@ -326,7 +327,7 @@ export default class MergeRequestTabs { ...@@ -326,7 +327,7 @@ export default class MergeRequestTabs {
}) })
.catch(() => { .catch(() => {
this.toggleLoading(false); this.toggleLoading(false);
flash('An error occurred while fetching this tab.'); flash(__('An error occurred while fetching this tab.'));
}); });
} }
...@@ -416,7 +417,7 @@ export default class MergeRequestTabs { ...@@ -416,7 +417,7 @@ export default class MergeRequestTabs {
}) })
.catch(() => { .catch(() => {
this.toggleLoading(false); this.toggleLoading(false);
flash('An error occurred while fetching this tab.'); flash(__('An error occurred while fetching this tab.'));
}); });
} }
......
...@@ -2,6 +2,7 @@ import $ from 'jquery'; ...@@ -2,6 +2,7 @@ import $ from 'jquery';
import axios from './lib/utils/axios_utils'; import axios from './lib/utils/axios_utils';
import flash from './flash'; import flash from './flash';
import { mouseenter, debouncedMouseleave, togglePopover } from './shared/popover'; import { mouseenter, debouncedMouseleave, togglePopover } from './shared/popover';
import { __ } from './locale';
export default class Milestone { export default class Milestone {
constructor() { constructor() {
...@@ -42,7 +43,7 @@ export default class Milestone { ...@@ -42,7 +43,7 @@ export default class Milestone {
$(tabElId).html(data.html); $(tabElId).html(data.html);
$target.addClass('is-loaded'); $target.addClass('is-loaded');
}) })
.catch(() => flash('Error loading milestone tab')); .catch(() => flash(__('Error loading milestone tab')));
} }
} }
......
...@@ -56,14 +56,15 @@ export default class MilestoneSelect { ...@@ -56,14 +56,15 @@ export default class MilestoneSelect {
const $value = $block.find('.value'); const $value = $block.find('.value');
const $loading = $block.find('.block-loading').fadeOut(); const $loading = $block.find('.block-loading').fadeOut();
selectedMilestoneDefault = showAny ? '' : null; selectedMilestoneDefault = showAny ? '' : null;
selectedMilestoneDefault = showNo && defaultNo ? 'No Milestone' : selectedMilestoneDefault; selectedMilestoneDefault =
showNo && defaultNo ? __('No Milestone') : selectedMilestoneDefault;
selectedMilestone = $dropdown.data('selected') || selectedMilestoneDefault; selectedMilestone = $dropdown.data('selected') || selectedMilestoneDefault;
if (issueUpdateURL) { if (issueUpdateURL) {
milestoneLinkTemplate = _.template( milestoneLinkTemplate = _.template(
'<a href="<%- web_url %>" class="bold has-tooltip" data-container="body" title="<%- remaining %>"><%- title %></a>', '<a href="<%- web_url %>" class="bold has-tooltip" data-container="body" title="<%- remaining %>"><%- title %></a>',
); );
milestoneLinkNoneTemplate = '<span class="no-value">None</span>'; milestoneLinkNoneTemplate = `<span class="no-value">${__('None')}</span>`;
} }
return $dropdown.glDropdown({ return $dropdown.glDropdown({
showMenuAbove: showMenuAbove, showMenuAbove: showMenuAbove,
...@@ -74,28 +75,28 @@ export default class MilestoneSelect { ...@@ -74,28 +75,28 @@ export default class MilestoneSelect {
extraOptions.push({ extraOptions.push({
id: null, id: null,
name: null, name: null,
title: 'Any Milestone', title: __('Any Milestone'),
}); });
} }
if (showNo) { if (showNo) {
extraOptions.push({ extraOptions.push({
id: -1, id: -1,
name: 'No Milestone', name: __('No Milestone'),
title: 'No Milestone', title: __('No Milestone'),
}); });
} }
if (showUpcoming) { if (showUpcoming) {
extraOptions.push({ extraOptions.push({
id: -2, id: -2,
name: '#upcoming', name: '#upcoming',
title: 'Upcoming', title: __('Upcoming'),
}); });
} }
if (showStarted) { if (showStarted) {
extraOptions.push({ extraOptions.push({
id: -3, id: -3,
name: '#started', name: '#started',
title: 'Started', title: __('Started'),
}); });
} }
if (extraOptions.length) { if (extraOptions.length) {
......
import $ from 'jquery'; import $ from 'jquery';
import flash from './flash'; import flash from './flash';
import axios from './lib/utils/axios_utils'; import axios from './lib/utils/axios_utils';
import { __ } from './locale';
/** /**
* In each pipelines table we have a mini pipeline graph for each pipeline. * In each pipelines table we have a mini pipeline graph for each pipeline.
...@@ -98,7 +99,7 @@ export default class MiniPipelineGraph { ...@@ -98,7 +99,7 @@ export default class MiniPipelineGraph {
) { ) {
$(button).dropdown('toggle'); $(button).dropdown('toggle');
} }
flash('An error occurred while fetching the builds.', 'alert'); flash(__('An error occurred while fetching the builds.'), 'alert');
}); });
} }
......
...@@ -868,6 +868,9 @@ msgstr "" ...@@ -868,6 +868,9 @@ msgstr ""
msgid "An error occurred while fetching the board lists. Please try again." msgid "An error occurred while fetching the board lists. Please try again."
msgstr "" msgstr ""
msgid "An error occurred while fetching the builds."
msgstr ""
msgid "An error occurred while fetching the job log." msgid "An error occurred while fetching the job log."
msgstr "" msgstr ""
...@@ -883,6 +886,9 @@ msgstr "" ...@@ -883,6 +886,9 @@ msgstr ""
msgid "An error occurred while fetching the releases. Please try again." msgid "An error occurred while fetching the releases. Please try again."
msgstr "" msgstr ""
msgid "An error occurred while fetching this tab."
msgstr ""
msgid "An error occurred while getting projects" msgid "An error occurred while getting projects"
msgstr "" msgstr ""
...@@ -970,6 +976,9 @@ msgstr "" ...@@ -970,6 +976,9 @@ msgstr ""
msgid "Any" msgid "Any"
msgstr "" msgstr ""
msgid "Any Milestone"
msgstr ""
msgid "Any encrypted tokens" msgid "Any encrypted tokens"
msgstr "" msgstr ""
...@@ -3905,6 +3914,9 @@ msgstr "" ...@@ -3905,6 +3914,9 @@ msgstr ""
msgid "Error loading merge requests." msgid "Error loading merge requests."
msgstr "" msgstr ""
msgid "Error loading milestone tab"
msgstr ""
msgid "Error loading project data. Please try again." msgid "Error loading project data. Please try again."
msgstr "" msgstr ""
...@@ -11149,6 +11161,9 @@ msgstr "" ...@@ -11149,6 +11161,9 @@ msgstr ""
msgid "You need permission." msgid "You need permission."
msgstr "" msgstr ""
msgid "You need to be logged in."
msgstr ""
msgid "You need to register a two-factor authentication app before you can set up a U2F device." msgid "You need to register a two-factor authentication app before you can set up a U2F device."
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