Commit 24c3b460 authored by Coung Ngo's avatar Coung Ngo

Make edit board text sentence case

The text in the edit board dialog had inconsistent case
parent 5ee1e505
...@@ -51,7 +51,7 @@ export default Vue.extend({ ...@@ -51,7 +51,7 @@ export default Vue.extend({
return Object.keys(this.issue).length; return Object.keys(this.issue).length;
}, },
milestoneTitle() { milestoneTitle() {
return this.issue.milestone ? this.issue.milestone.title : __('No Milestone'); return this.issue.milestone ? this.issue.milestone.title : __('No milestone');
}, },
canRemove() { canRemove() {
return !this.list.preset; return !this.list.preset;
......
...@@ -186,13 +186,13 @@ export default class LabelsSelect { ...@@ -186,13 +186,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) {
...@@ -294,7 +294,7 @@ export default class LabelsSelect { ...@@ -294,7 +294,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) {
......
...@@ -56,7 +56,7 @@ export default class MilestoneSelect { ...@@ -56,7 +56,7 @@ export default class MilestoneSelect {
const $loading = $block.find('.block-loading').fadeOut(); const $loading = $block.find('.block-loading').fadeOut();
selectedMilestoneDefault = showAny ? '' : null; selectedMilestoneDefault = showAny ? '' : null;
selectedMilestoneDefault = selectedMilestoneDefault =
showNo && defaultNo ? __('No Milestone') : selectedMilestoneDefault; showNo && defaultNo ? __('No milestone') : selectedMilestoneDefault;
selectedMilestone = $dropdown.data('selected') || selectedMilestoneDefault; selectedMilestone = $dropdown.data('selected') || selectedMilestoneDefault;
if (issueUpdateURL) { if (issueUpdateURL) {
...@@ -74,14 +74,14 @@ export default class MilestoneSelect { ...@@ -74,14 +74,14 @@ 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) {
......
---
title: Make edit board text sentence case
merge_request: 31418
author:
type: fixed
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
ability-name="issue" ability-name="issue"
@onLabelClick="handleLabelClick" @onLabelClick="handleLabelClick"
> >
{{ __('Any Label') }} {{ __('Any label') }}
</board-labels-select> </board-labels-select>
<assignee-select <assignee-select
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon } from '@gitlab/ui';
import MilestoneSelect from '~/milestone_select'; import MilestoneSelect from '~/milestone_select';
const ANY_MILESTONE = 'Any Milestone'; const ANY_MILESTONE = 'Any milestone';
const NO_MILESTONE = 'No Milestone'; const NO_MILESTONE = 'No milestone';
export default { export default {
components: { components: {
......
<script> <script>
import { GlDeprecatedButton, GlDropdown, GlDropdownItem } from '@gitlab/ui'; import { GlDeprecatedButton, GlDropdown, GlDropdownItem } from '@gitlab/ui';
const ANY_WEIGHT = 'Any Weight'; const ANY_WEIGHT = 'Any weight';
const NO_WEIGHT = 'None'; const NO_WEIGHT = 'None';
export default { export default {
......
...@@ -3,7 +3,7 @@ import { __ } from '~/locale'; ...@@ -3,7 +3,7 @@ import { __ } from '~/locale';
export default [ export default [
{ {
id: null, id: null,
title: __('Any Milestone'), title: __('Any milestone'),
}, },
{ {
id: -2, id: -2,
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
%ul{ data: { dropdown: true } } %ul{ data: { dropdown: true } }
%li.filter-dropdown-item{ data: { value: 'none' } } %li.filter-dropdown-item{ data: { value: 'none' } }
%button.btn.btn-link{ type: 'button' } %button.btn.btn-link{ type: 'button' }
= _("No Label") = _("No label")
%li.divider.droplab-item-ignore %li.divider.droplab-item-ignore
%ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
%li.filter-dropdown-item{ type: 'button' } %li.filter-dropdown-item{ type: 'button' }
......
...@@ -48,15 +48,15 @@ describe 'Scoped issue boards', :js do ...@@ -48,15 +48,15 @@ describe 'Scoped issue boards', :js do
expect(page).to have_selector('.board-card', count: 1) expect(page).to have_selector('.board-card', count: 1)
end end
it 'creates board filtering by No Milestone' do it 'creates board filtering by No milestone' do
create_board_milestone('No Milestone') create_board_milestone('No milestone')
expect(find('.tokens-container')).to have_content("") expect(find('.tokens-container')).to have_content("")
expect(page).to have_selector('.board-card', count: 2) expect(page).to have_selector('.board-card', count: 2)
end end
it 'creates board filtering by Any Milestone' do it 'creates board filtering by Any milestone' do
create_board_milestone('Any Milestone') create_board_milestone('Any milestone')
expect(find('.tokens-container')).to have_content("") expect(find('.tokens-container')).to have_content("")
expect(page).to have_selector('.board-card', count: 3) expect(page).to have_selector('.board-card', count: 3)
...@@ -232,7 +232,7 @@ describe 'Scoped issue boards', :js do ...@@ -232,7 +232,7 @@ describe 'Scoped issue boards', :js do
end end
it 'sets board to any milestone' do it 'sets board to any milestone' do
update_board_milestone('Any Milestone') update_board_milestone('Any milestone')
expect(find('.tokens-container')).not_to have_content(milestone.title) expect(find('.tokens-container')).not_to have_content(milestone.title)
......
...@@ -36,8 +36,8 @@ describe('WeightSelect', () => { ...@@ -36,8 +36,8 @@ describe('WeightSelect', () => {
createComponent(); createComponent();
}); });
it('displays "Any Weight"', () => { it('displays "Any weight"', () => {
expect(valueContainer().text()).toEqual('Any Weight'); expect(valueContainer().text()).toEqual('Any weight');
}); });
it('hides the weight dropdown', () => { it('hides the weight dropdown', () => {
...@@ -98,10 +98,10 @@ describe('WeightSelect', () => { ...@@ -98,10 +98,10 @@ describe('WeightSelect', () => {
describe('when a new weight value is selected', () => { describe('when a new weight value is selected', () => {
it.each` it.each`
weight | text weight | text
${null} | ${'Any Weight'} ${null} | ${'Any weight'}
${0} | ${'0'} ${0} | ${'0'}
${1} | ${'1'} ${1} | ${'1'}
${-1} | ${'Any Weight'} ${-1} | ${'Any weight'}
${-2} | ${'None'} ${-2} | ${'None'}
`('$weight displays as "$text"', ({ weight, text }) => { `('$weight displays as "$text"', ({ weight, text }) => {
createComponent({ board: { weight } }); createComponent({ board: { weight } });
......
...@@ -67,14 +67,14 @@ describe('Milestone select component', () => { ...@@ -67,14 +67,14 @@ describe('Milestone select component', () => {
}); });
describe('selected value', () => { describe('selected value', () => {
it('defaults to Any Milestone', () => { it('defaults to Any milestone', () => {
expect(selectedText()).toContain('Any Milestone'); expect(selectedText()).toContain('Any milestone');
}); });
it('shows No Milestone', done => { it('shows No milestone', done => {
vm.board.milestone_id = 0; vm.board.milestone_id = 0;
Vue.nextTick(() => { Vue.nextTick(() => {
expect(selectedText()).toContain('No Milestone'); expect(selectedText()).toContain('No milestone');
done(); done();
}); });
}); });
...@@ -103,7 +103,7 @@ describe('Milestone select component', () => { ...@@ -103,7 +103,7 @@ describe('Milestone select component', () => {
mock.restore(); mock.restore();
}); });
it('sets Any Milestone', done => { it('sets Any milestone', done => {
vm.board.milestone_id = 0; vm.board.milestone_id = 0;
vm.$el.querySelector('.edit-link').click(); vm.$el.querySelector('.edit-link').click();
...@@ -112,13 +112,13 @@ describe('Milestone select component', () => { ...@@ -112,13 +112,13 @@ describe('Milestone select component', () => {
}); });
setTimeout(() => { setTimeout(() => {
expect(activeDropdownItem(0)).toEqual('Any Milestone'); expect(activeDropdownItem(0)).toEqual('Any milestone');
expect(selectedText()).toEqual('Any Milestone'); expect(selectedText()).toEqual('Any milestone');
done(); done();
}); });
}); });
it('sets No Milestone', done => { it('sets No milestone', done => {
vm.$el.querySelector('.edit-link').click(); vm.$el.querySelector('.edit-link').click();
setTimeout(() => { setTimeout(() => {
...@@ -126,8 +126,8 @@ describe('Milestone select component', () => { ...@@ -126,8 +126,8 @@ describe('Milestone select component', () => {
}); });
setTimeout(() => { setTimeout(() => {
expect(activeDropdownItem(0)).toEqual('No Milestone'); expect(activeDropdownItem(0)).toEqual('No milestone');
expect(selectedText()).toEqual('No Milestone'); expect(selectedText()).toEqual('No milestone');
done(); done();
}); });
}); });
......
...@@ -2312,12 +2312,6 @@ msgstr "" ...@@ -2312,12 +2312,6 @@ msgstr ""
msgid "Any Author" msgid "Any Author"
msgstr "" msgstr ""
msgid "Any Label"
msgstr ""
msgid "Any Milestone"
msgstr ""
msgid "Any branch" msgid "Any branch"
msgstr "" msgstr ""
...@@ -2327,9 +2321,15 @@ msgstr "" ...@@ -2327,9 +2321,15 @@ msgstr ""
msgid "Any encrypted tokens" msgid "Any encrypted tokens"
msgstr "" msgstr ""
msgid "Any label"
msgstr ""
msgid "Any member with Developer or higher permissions to the project." msgid "Any member with Developer or higher permissions to the project."
msgstr "" msgstr ""
msgid "Any milestone"
msgstr ""
msgid "Any namespace" msgid "Any namespace"
msgstr "" msgstr ""
...@@ -13892,12 +13892,6 @@ msgstr "" ...@@ -13892,12 +13892,6 @@ msgstr ""
msgid "No Epic" msgid "No Epic"
msgstr "" msgstr ""
msgid "No Label"
msgstr ""
msgid "No Milestone"
msgstr ""
msgid "No Scopes" msgid "No Scopes"
msgstr "" msgstr ""
...@@ -13994,6 +13988,9 @@ msgstr "" ...@@ -13994,6 +13988,9 @@ msgstr ""
msgid "No jobs to show" msgid "No jobs to show"
msgstr "" msgstr ""
msgid "No label"
msgstr ""
msgid "No labels with such name or description" msgid "No labels with such name or description"
msgstr "" msgstr ""
......
...@@ -217,7 +217,7 @@ describe 'Issue Boards', :js do ...@@ -217,7 +217,7 @@ describe 'Issue Boards', :js do
wait_for_requests wait_for_requests
click_link "No Milestone" click_link "No milestone"
wait_for_requests wait_for_requests
......
...@@ -274,7 +274,7 @@ describe 'Issues > Labels bulk assignment' do ...@@ -274,7 +274,7 @@ describe 'Issues > Labels bulk assignment' do
expect(find("#issue_#{issue2.id}")).to have_content 'First Release' expect(find("#issue_#{issue2.id}")).to have_content 'First Release'
check 'check-all-issues' check 'check-all-issues'
open_milestone_dropdown(['No Milestone']) open_milestone_dropdown(['No milestone'])
update_issues update_issues
expect(find("#issue_#{issue1.id}")).to have_content 'bug' expect(find("#issue_#{issue1.id}")).to have_content 'bug'
......
...@@ -95,7 +95,7 @@ describe 'Multiple issue updating from issues#index', :js do ...@@ -95,7 +95,7 @@ describe 'Multiple issue updating from issues#index', :js do
find('#check-all-issues').click find('#check-all-issues').click
find('.issues-bulk-update .js-milestone-select').click find('.issues-bulk-update .js-milestone-select').click
find('.dropdown-menu-milestone a', text: "No Milestone").click find('.dropdown-menu-milestone a', text: "No milestone").click
click_update_issues_button click_update_issues_button
expect(find('.issue:first-child')).not_to have_content milestone.title expect(find('.issue:first-child')).not_to have_content milestone.title
......
...@@ -91,7 +91,7 @@ describe 'Merge requests > User mass updates', :js do ...@@ -91,7 +91,7 @@ describe 'Merge requests > User mass updates', :js do
end end
it 'removes milestone from the merge request' do it 'removes milestone from the merge request' do
change_milestone("No Milestone") change_milestone("No milestone")
expect(find('.merge-request')).not_to have_content milestone.title expect(find('.merge-request')).not_to have_content milestone.title
end end
......
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