Commit 197fdddf authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'msj-add-a-todo' into 'master'

Fix "Add a to do" spelling on issuables

See merge request gitlab-org/gitlab!42488
parents 42261f92 d8fb8f3c
...@@ -435,7 +435,7 @@ module IssuablesHelper ...@@ -435,7 +435,7 @@ module IssuablesHelper
def issuable_todo_button_data(issuable, is_collapsed) def issuable_todo_button_data(issuable, is_collapsed)
{ {
todo_text: _('Add a To Do'), todo_text: _('Add a to do'),
mark_text: _('Mark as done'), mark_text: _('Mark as done'),
todo_icon: sprite_icon('todo-add'), todo_icon: sprite_icon('todo-add'),
mark_icon: sprite_icon('todo-done', css_class: 'todo-undone'), mark_icon: sprite_icon('todo-done', css_class: 'todo-undone'),
......
...@@ -57,5 +57,5 @@ ...@@ -57,5 +57,5 @@
- else - else
.todo-actions .todo-actions
= link_to restore_dashboard_todo_path(todo), method: :patch, class: 'btn btn-loading d-flex align-items-center js-add-todo', data: { href: restore_dashboard_todo_path(todo) } do = link_to restore_dashboard_todo_path(todo), method: :patch, class: 'btn btn-loading d-flex align-items-center js-add-todo', data: { href: restore_dashboard_todo_path(todo) } do
Add a To Do Add a to do
%span.spinner.ml-1 %span.spinner.ml-1
...@@ -80,7 +80,7 @@ The button to do this has a different label depending on whether the issue is al ...@@ -80,7 +80,7 @@ The button to do this has a different label depending on whether the issue is al
List or not. If the issue is: List or not. If the issue is:
- Already on your To-Do List: The button is labeled **Mark as done**. Click the button to remove the issue from your To-Do List. - Already on your To-Do List: The button is labeled **Mark as done**. Click the button to remove the issue from your To-Do List.
- Not on your To-Do List: The button is labeled **Add a To Do**. Click the button to add the issue to your To-Do List. - Not on your To-Do List: The button is labeled **Add a to do**. Click the button to add the issue to your To-Do List.
### Assignee ### Assignee
......
...@@ -93,8 +93,12 @@ for filtering purposes; otherwise, they appear as normal. ...@@ -93,8 +93,12 @@ for filtering purposes; otherwise, they appear as normal.
### Manually creating a to do ### Manually creating a to do
You can add an issue or merge request (or epic **(ULTIMATE)**) to your You can also add the following to your To-Do List by clicking the **Add a to do** button on an:
To-Do List by clicking its **Add a To Do** button.
- [Issue](project/issues/index.md)
- [Merge Request](project/merge_requests/index.md)
- [Epic](group/epics/index.md) **(ULTIMATE)**
- [Design](project/issues/design_management.md)
![Adding a To Do from the issuable sidebar](img/todos_add_todo_sidebar.png) ![Adding a To Do from the issuable sidebar](img/todos_add_todo_sidebar.png)
......
...@@ -145,9 +145,9 @@ module Gitlab ...@@ -145,9 +145,9 @@ module Gitlab
run_label_command(labels: find_labels(labels_param), command: :relabel, updates_key: :label_ids) run_label_command(labels: find_labels(labels_param), command: :relabel, updates_key: :label_ids)
end end
desc _('Add a To Do') desc _('Add a to do')
explanation _('Adds a To Do.') explanation _('Adds a to do.')
execution_message _('Added a To Do.') execution_message _('Added a to do.')
types Issuable types Issuable
condition do condition do
quick_action_target.persisted? && quick_action_target.persisted? &&
...@@ -157,9 +157,9 @@ module Gitlab ...@@ -157,9 +157,9 @@ module Gitlab
@updates[:todo_event] = 'add' @updates[:todo_event] = 'add'
end end
desc _('Mark To Do as done') desc _('Mark to do as done')
explanation _('Marks To Do as done.') explanation _('Marks to do as done.')
execution_message _('Marked To Do as done.') execution_message _('Marked to do as done.')
types Issuable types Issuable
condition do condition do
quick_action_target.persisted? && quick_action_target.persisted? &&
......
...@@ -1613,6 +1613,9 @@ msgstr "" ...@@ -1613,6 +1613,9 @@ msgstr ""
msgid "Add a task list" msgid "Add a task list"
msgstr "" msgstr ""
msgid "Add a to do"
msgstr ""
msgid "Add additional text to appear in all email communications. %{character_limit} character limit" msgid "Add additional text to appear in all email communications. %{character_limit} character limit"
msgstr "" msgstr ""
...@@ -1766,7 +1769,7 @@ msgstr "" ...@@ -1766,7 +1769,7 @@ msgstr ""
msgid "Added %{label_references} %{label_text}." msgid "Added %{label_references} %{label_text}."
msgstr "" msgstr ""
msgid "Added a To Do." msgid "Added a to do."
msgstr "" msgstr ""
msgid "Added an issue to an epic." msgid "Added an issue to an epic."
...@@ -1802,10 +1805,10 @@ msgstr "" ...@@ -1802,10 +1805,10 @@ msgstr ""
msgid "Adds %{labels} %{label_text}." msgid "Adds %{labels} %{label_text}."
msgstr "" msgstr ""
msgid "Adds a To Do." msgid "Adds a Zoom meeting"
msgstr "" msgstr ""
msgid "Adds a Zoom meeting" msgid "Adds a to do."
msgstr "" msgstr ""
msgid "Adds an issue to an epic." msgid "Adds an issue to an epic."
...@@ -15636,9 +15639,6 @@ msgstr "" ...@@ -15636,9 +15639,6 @@ msgstr ""
msgid "March" msgid "March"
msgstr "" msgstr ""
msgid "Mark To Do as done"
msgstr ""
msgid "Mark as done" msgid "Mark as done"
msgstr "" msgstr ""
...@@ -15657,6 +15657,9 @@ msgstr "" ...@@ -15657,6 +15657,9 @@ msgstr ""
msgid "Mark this issue as related to another issue" msgid "Mark this issue as related to another issue"
msgstr "" msgstr ""
msgid "Mark to do as done"
msgstr ""
msgid "Markdown" msgid "Markdown"
msgstr "" msgstr ""
...@@ -15690,9 +15693,6 @@ msgstr "" ...@@ -15690,9 +15693,6 @@ msgstr ""
msgid "Marked For Deletion At - %{deletion_time}" msgid "Marked For Deletion At - %{deletion_time}"
msgstr "" msgstr ""
msgid "Marked To Do as done."
msgstr ""
msgid "Marked this %{noun} as Work In Progress." msgid "Marked this %{noun} as Work In Progress."
msgstr "" msgstr ""
...@@ -15702,7 +15702,7 @@ msgstr "" ...@@ -15702,7 +15702,7 @@ msgstr ""
msgid "Marked this issue as related to %{issue_ref}." msgid "Marked this issue as related to %{issue_ref}."
msgstr "" msgstr ""
msgid "Marks To Do as done." msgid "Marked to do as done."
msgstr "" msgstr ""
msgid "Marks this %{noun} as Work In Progress." msgid "Marks this %{noun} as Work In Progress."
...@@ -15714,6 +15714,9 @@ msgstr "" ...@@ -15714,6 +15714,9 @@ msgstr ""
msgid "Marks this issue as related to %{issue_ref}." msgid "Marks this issue as related to %{issue_ref}."
msgstr "" msgstr ""
msgid "Marks to do as done."
msgstr ""
msgid "Mask variable" msgid "Mask variable"
msgstr "" msgstr ""
......
...@@ -228,7 +228,7 @@ RSpec.describe 'Dashboard Todos' do ...@@ -228,7 +228,7 @@ RSpec.describe 'Dashboard Todos' do
describe 'restoring the todo' do describe 'restoring the todo' do
before do before do
within first('.todo') do within first('.todo') do
click_link 'Add a To Do' click_link 'Add a to do'
end end
end end
...@@ -243,7 +243,7 @@ RSpec.describe 'Dashboard Todos' do ...@@ -243,7 +243,7 @@ RSpec.describe 'Dashboard Todos' do
end end
end end
context 'User has Todos with labels spanning multiple projects' do context 'User has to dos with labels spanning multiple projects' do
before do before do
label1 = create(:label, project: project) label1 = create(:label, project: project)
note1 = create(:note_on_issue, note: "Hello #{label1.to_reference(format: :name)}", noteable_id: issue.id, noteable_type: 'Issue', project: issue.project) note1 = create(:note_on_issue, note: "Hello #{label1.to_reference(format: :name)}", noteable_id: issue.id, noteable_type: 'Issue', project: issue.project)
......
...@@ -15,7 +15,7 @@ RSpec.describe 'Manually create a todo item from issue', :js do ...@@ -15,7 +15,7 @@ RSpec.describe 'Manually create a todo item from issue', :js do
it 'creates todo when clicking button' do it 'creates todo when clicking button' do
page.within '.issuable-sidebar' do page.within '.issuable-sidebar' do
click_button 'Add a To Do' click_button 'Add a to do'
expect(page).to have_content 'Mark as done' expect(page).to have_content 'Mark as done'
end end
...@@ -32,7 +32,7 @@ RSpec.describe 'Manually create a todo item from issue', :js do ...@@ -32,7 +32,7 @@ RSpec.describe 'Manually create a todo item from issue', :js do
it 'marks a todo as done' do it 'marks a todo as done' do
page.within '.issuable-sidebar' do page.within '.issuable-sidebar' do
click_button 'Add a To Do' click_button 'Add a to do'
click_button 'Mark as done' click_button 'Mark as done'
end end
......
...@@ -59,7 +59,7 @@ describe('Issuable right sidebar collapsed todo toggle', () => { ...@@ -59,7 +59,7 @@ describe('Issuable right sidebar collapsed todo toggle', () => {
it('sets default tooltip title', () => { it('sets default tooltip title', () => {
expect( expect(
document.querySelector('.js-issuable-todo.sidebar-collapsed-icon').getAttribute('title'), document.querySelector('.js-issuable-todo.sidebar-collapsed-icon').getAttribute('title'),
).toBe('Add a To Do'); ).toBe('Add a to do');
}); });
it('toggle todo state', done => { it('toggle todo state', done => {
...@@ -125,7 +125,7 @@ describe('Issuable right sidebar collapsed todo toggle', () => { ...@@ -125,7 +125,7 @@ describe('Issuable right sidebar collapsed todo toggle', () => {
expect( expect(
document.querySelector('.issuable-sidebar-header .js-issuable-todo').textContent.trim(), document.querySelector('.issuable-sidebar-header .js-issuable-todo').textContent.trim(),
).toBe('Add a To Do'); ).toBe('Add a to do');
}) })
.then(done) .then(done)
.catch(done.fail); .catch(done.fail);
...@@ -164,7 +164,7 @@ describe('Issuable right sidebar collapsed todo toggle', () => { ...@@ -164,7 +164,7 @@ describe('Issuable right sidebar collapsed todo toggle', () => {
document document
.querySelector('.js-issuable-todo.sidebar-collapsed-icon') .querySelector('.js-issuable-todo.sidebar-collapsed-icon')
.getAttribute('aria-label'), .getAttribute('aria-label'),
).toBe('Add a To Do'); ).toBe('Add a to do');
}) })
.then(done) .then(done)
.catch(done.fail); .catch(done.fail);
......
...@@ -228,7 +228,7 @@ RSpec.describe QuickActions::InterpretService do ...@@ -228,7 +228,7 @@ RSpec.describe QuickActions::InterpretService do
it 'returns the todo message' do it 'returns the todo message' do
_, _, message = service.execute(content, issuable) _, _, message = service.execute(content, issuable)
expect(message).to eq('Added a To Do.') expect(message).to eq('Added a to do.')
end end
end end
...@@ -244,7 +244,7 @@ RSpec.describe QuickActions::InterpretService do ...@@ -244,7 +244,7 @@ RSpec.describe QuickActions::InterpretService do
TodoService.new.mark_todo(issuable, developer) TodoService.new.mark_todo(issuable, developer)
_, _, message = service.execute(content, issuable) _, _, message = service.execute(content, issuable)
expect(message).to eq('Marked To Do as done.') expect(message).to eq('Marked to do as done.')
end end
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