Commit 58a9778e authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ee-js-i18n-l' into 'master'

i18n JS Files starting with l - EE

See merge request gitlab-org/gitlab-ee!12593
parents 221f0060 69abf336
...@@ -5,13 +5,14 @@ import Sortable from 'sortablejs'; ...@@ -5,13 +5,14 @@ import Sortable from 'sortablejs';
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';
export default class LabelManager { export default class LabelManager {
constructor({ togglePriorityButton, prioritizedLabels, otherLabels } = {}) { constructor({ togglePriorityButton, prioritizedLabels, otherLabels } = {}) {
this.togglePriorityButton = togglePriorityButton || $('.js-toggle-priority'); this.togglePriorityButton = togglePriorityButton || $('.js-toggle-priority');
this.prioritizedLabels = prioritizedLabels || $('.js-prioritized-labels'); this.prioritizedLabels = prioritizedLabels || $('.js-prioritized-labels');
this.otherLabels = otherLabels || $('.js-other-labels'); this.otherLabels = otherLabels || $('.js-other-labels');
this.errorMessage = 'Unable to update label prioritization at this time'; this.errorMessage = __('Unable to update label prioritization at this time');
this.emptyState = document.querySelector('#js-priority-labels-empty-state'); this.emptyState = document.querySelector('#js-priority-labels-empty-state');
this.$badgeItemTemplate = $('#js-badge-item-template'); this.$badgeItemTemplate = $('#js-badge-item-template');
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
import $ from 'jquery'; import $ from 'jquery';
import _ from 'underscore'; import _ from 'underscore';
import { sprintf, __ } from './locale'; import { sprintf, s__, __ } from './locale';
import axios from './lib/utils/axios_utils'; import axios from './lib/utils/axios_utils';
import IssuableBulkUpdateActions from './issuable_bulk_update_actions'; import IssuableBulkUpdateActions from './issuable_bulk_update_actions';
import CreateLabelDropdown from './create_label'; import CreateLabelDropdown from './create_label';
...@@ -178,7 +178,7 @@ export default class LabelsSelect { ...@@ -178,7 +178,7 @@ export default class LabelsSelect {
}); });
} }
} else { } else {
template = '<span class="no-value">None</span>'; template = `<span class="no-value">${__('None')}</span>`;
} }
$value.removeAttr('style').html(template); $value.removeAttr('style').html(template);
$sidebarCollapsedValue.text(labelCount); $sidebarCollapsedValue.text(labelCount);
...@@ -190,7 +190,9 @@ export default class LabelsSelect { ...@@ -190,7 +190,9 @@ export default class LabelsSelect {
if (labelTitles.length > 5) { if (labelTitles.length > 5) {
labelTitles = labelTitles.slice(0, 5); labelTitles = labelTitles.slice(0, 5);
labelTitles.push('and ' + (data.labels.length - 5) + ' more'); labelTitles.push(
sprintf(s__('Labels|and %{count} more'), { count: data.labels.length - 5 }),
);
} }
labelTooltipTitle = labelTitles.join(', '); labelTooltipTitle = labelTitles.join(', ');
...@@ -219,13 +221,13 @@ export default class LabelsSelect { ...@@ -219,13 +221,13 @@ export default class LabelsSelect {
if (showNo) { if (showNo) {
extraData.unshift({ extraData.unshift({
id: 0, id: 0,
title: 'No Label', title: __('No Label'),
}); });
} }
if (showAny) { if (showAny) {
extraData.unshift({ extraData.unshift({
isAny: true, isAny: true,
title: 'Any Label', title: __('Any Label'),
}); });
} }
if (extraData.length) { if (extraData.length) {
...@@ -341,7 +343,7 @@ export default class LabelsSelect { ...@@ -341,7 +343,7 @@ export default class LabelsSelect {
if (selected && selected.id === 0) { if (selected && selected.id === 0) {
this.selected = []; this.selected = [];
return 'No Label'; return __('No Label');
} else if (isSelected) { } else if (isSelected) {
this.selected.push(title); this.selected.push(title);
} else if (!isSelected && title) { } else if (!isSelected && title) {
...@@ -579,7 +581,7 @@ export default class LabelsSelect { ...@@ -579,7 +581,7 @@ export default class LabelsSelect {
if ($('.selected-issuable:checked').length) { if ($('.selected-issuable:checked').length) {
return; return;
} }
return $('.issues-bulk-update .labels-filter .dropdown-toggle-text').text('Label'); return $('.issues-bulk-update .labels-filter .dropdown-toggle-text').text(__('Label'));
} }
// eslint-disable-next-line class-methods-use-this // eslint-disable-next-line class-methods-use-this
enableBulkLabelDropdown() { enableBulkLabelDropdown() {
......
...@@ -7264,6 +7264,9 @@ msgstr "" ...@@ -7264,6 +7264,9 @@ msgstr ""
msgid "Labels|Promoting %{labelTitle} will make it available for all projects inside %{groupName}. Existing project labels with the same title will be merged. This action cannot be reversed." msgid "Labels|Promoting %{labelTitle} will make it available for all projects inside %{groupName}. Existing project labels with the same title will be merged. This action cannot be reversed."
msgstr "" msgstr ""
msgid "Labels|and %{count} more"
msgstr ""
msgid "Language" msgid "Language"
msgstr "" msgstr ""
...@@ -13429,6 +13432,9 @@ msgstr "" ...@@ -13429,6 +13432,9 @@ msgstr ""
msgid "Unable to sign you in to the group with SAML due to \"%{reason}\"" msgid "Unable to sign you in to the group with SAML due to \"%{reason}\""
msgstr "" msgstr ""
msgid "Unable to update label prioritization at this time"
msgstr ""
msgid "Unable to update this epic at this time." msgid "Unable to update this epic at this time."
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