Commit 5d880d71 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/227414/wipToDraftFilteredBar' into 'master'

Rename the WIP filter to draft in the filtered search bar

See merge request gitlab-org/gitlab!38161
parents 49b8392e 58475767
import { __ } from '~/locale';
export default IssuableTokenKeys => {
const wipToken = {
formattedKey: __('WIP'),
key: 'wip',
const draftToken = {
token: {
formattedKey: __('Draft'),
key: 'draft',
type: 'string',
param: '',
symbol: '',
icon: 'admin',
tag: __('Yes or No'),
lowercaseValueOnSubmit: true,
uppercaseTokenName: true,
capitalizeTokenValue: true,
},
conditions: [
{
url: 'wip=yes',
// eslint-disable-next-line @gitlab/require-i18n-strings
replacementUrl: 'draft=yes',
tokenKey: 'draft',
value: __('Yes'),
operator: '=',
},
{
url: 'wip=no',
// eslint-disable-next-line @gitlab/require-i18n-strings
replacementUrl: 'draft=no',
tokenKey: 'draft',
value: __('No'),
operator: '=',
},
{
url: 'not[wip]=yes',
replacementUrl: 'not[draft]=yes',
tokenKey: 'draft',
value: __('Yes'),
operator: '!=',
},
{
url: 'not[wip]=no',
replacementUrl: 'not[draft]=no',
tokenKey: 'draft',
value: __('No'),
operator: '!=',
},
],
};
IssuableTokenKeys.tokenKeys.push(wipToken);
IssuableTokenKeys.tokenKeysWithAlternative.push(wipToken);
IssuableTokenKeys.tokenKeys.push(draftToken.token);
IssuableTokenKeys.tokenKeysWithAlternative.push(draftToken.token);
IssuableTokenKeys.conditions.push(...draftToken.conditions);
const targetBranchToken = {
formattedKey: __('Target-Branch'),
......
......@@ -106,7 +106,7 @@ export default class AvailableDropdownMappings {
gl: DropdownEmoji,
element: this.container.querySelector('#js-dropdown-my-reaction'),
},
wip: {
draft: {
reference: null,
gl: DropdownNonUser,
element: this.container.querySelector('#js-dropdown-wip'),
......
......@@ -8646,6 +8646,9 @@ msgstr ""
msgid "Downvotes"
msgstr ""
msgid "Draft"
msgstr ""
msgid "Draft merge requests can't be merged."
msgstr ""
......@@ -27000,9 +27003,6 @@ msgstr ""
msgid "Vulnerability|Status"
msgstr ""
msgid "WIP"
msgstr ""
msgid "Wait for the file to load to copy its contents"
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