Commit a12207e9 authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch 'cngo-make-edit-board-text-sentence-case' into 'master'

Make edit board text sentence case

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