diff options
author | Constance Okoghenun <cokoghenun@gitlab.com> | 2018-08-10 22:53:57 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-08-10 22:53:57 +0300 |
commit | a053e5dbc64f198cb5a1a578ec0aa17bab9ce5ae (patch) | |
tree | 8bc59b21bbeac6a15ebb42ebe3a2425d31e472b8 /app/assets/javascripts/labels_select.js | |
parent | a3c2b39d10fc3cdf4d50bd1d1157814fc10feeee (diff) |
Resolve "Add missing i18n strings to issue boards."
Diffstat (limited to 'app/assets/javascripts/labels_select.js')
-rw-r--r-- | app/assets/javascripts/labels_select.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/assets/javascripts/labels_select.js b/app/assets/javascripts/labels_select.js index cb851ff6745..6499b919787 100644 --- a/app/assets/javascripts/labels_select.js +++ b/app/assets/javascripts/labels_select.js @@ -4,7 +4,7 @@ import $ from 'jquery'; import _ from 'underscore'; -import { __ } from './locale'; +import { sprintf, __ } from './locale'; import axios from './lib/utils/axios_utils'; import IssuableBulkUpdateActions from './issuable_bulk_update_actions'; import DropdownUtils from './filtered_search/dropdown_utils'; @@ -39,7 +39,7 @@ export default class LabelsSelect { showNo = $dropdown.data('showNo'); showAny = $dropdown.data('showAny'); showMenuAbove = $dropdown.data('showMenuAbove'); - defaultLabel = $dropdown.data('defaultLabel') || 'Label'; + defaultLabel = $dropdown.data('defaultLabel') || __('Label'); abilityName = $dropdown.data('abilityName'); $selectbox = $dropdown.closest('.selectbox'); $block = $selectbox.closest('.block'); @@ -267,7 +267,10 @@ export default class LabelsSelect { return selectedLabels; } else if (selectedLabels.length) { - return selectedLabels[0] + " +" + (selectedLabels.length - 1) + " more"; + return sprintf(__('%{firstLabel} +%{labelCount} more'), { + firstLabel: selectedLabels[0], + labelCount: selectedLabels.length - 1 + }); } else { return defaultLabel; |