Standarize labels on actions in the Groups and Projects dashboard
The following discussion from !188966 (merged) should be addressed:
-
@peterhegman started a discussion: @smaglangit @jason_istakinganap yeah we should decide how we want to label actions so they are consistent. Should we open a follow-up to make them consistent?
Edit groupDelete groupRestore groupLeave group
Edit projectDelete projectRestore projectLeave project
We should standarize the labels used for the action buttons in the groups (https://gitlab.com/dashboard/groups) and projects (https://gitlab.com/dashboard/projects) dashboard
Implementation Guide
- Update the Group dashboard labels in app/assets/javascripts/groups/constants.js
LEAVE_BTN_TITLE: s__('GroupsTree|Leave group'),
- EDIT_BTN_TITLE: s__('GroupsTree|Edit'),
- REMOVE_BTN_TITLE: s__('GroupsTree|Delete'),
+ EDIT_BTN_TITLE: s__('GroupsTree|Edit group'),
+ REMOVE_BTN_TITLE: s__('GroupsTree|Delete group'),
};
- Update the LEAVE label in app/assets/javascripts/vue_shared/components/list_actions/constants.js to make it generic
order: 2,
},
[ACTION_LEAVE]: {
- text: __('Leave group'),
+ text: __('Leave'),
variant: 'danger',
order: 3,
},
- Override the group action labels in app/assets/javascripts/vue_shared/components/groups_list/group_list_item_actions.vue
actions() {
return {
[ACTION_EDIT]: {
+ text: s__('GroupsTree|Edit group'),
href: this.group.editPath,
},
[ACTION_RESTORE]: {
+ text: s__('GroupsTree|Restore group'),
action: this.onActionRestore,
},
[ACTION_DELETE]: {
+ text: s__('GroupsTree|Delete group'),
action: this.onActionDelete,
},
[ACTION_LEAVE]: {
+ text: s__('GroupsTree|Leave group'),
action: this.onActionLeave,
},
};
- Override the project action labels in app/assets/javascripts/vue_shared/components/projects_list/project_list_item_actions.vue
actions() {
return {
[ACTION_EDIT]: {
+ text: __('Edit project'),
href: this.project.editPath,
},
[ACTION_RESTORE]: {
+ text: __('Restore project'),
action: this.onActionRestore,
},
[ACTION_DELETE]: {
+ text: __('Delete project'),
action: this.onActionDelete,
},
};
- Run
tooling/bin/gettext_extractor locale/gitlab.potto generate the translation file changes. - Add/update specs accordingly.
Edited by Rémy Coutable