Merge changes If0d4ed46,I37e0362a
* changes:
gr-change-actions: Fix typo in comment
gr-change-actions: Remove redundant code
diff --git a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js
index 98f9707..6af94a1 100644
--- a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js
+++ b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js
@@ -744,7 +744,7 @@
} else if (!values.includes(a)) {
return;
}
- actions[a].label = this._getActionLabel(actions[a], type);
+ actions[a].label = this._getActionLabel(actions[a]);
// Triggers a re-render by ensuring object inequality.
result.push(Object.assign({}, actions[a]));
@@ -774,15 +774,15 @@
* Given a change action, return a display label that uses the appropriate
* casing or includes explanatory details.
*/
- _getActionLabel(action, type) {
- if (action.label === 'Delete' && type === ActionType.CHANGE) {
+ _getActionLabel(action) {
+ if (action.label === 'Delete') {
// This label is common within change and revision actions. Make it more
// explicit to the user.
return 'Delete change';
- } else if (action.label === 'WIP' && type === ActionType.CHANGE) {
+ } else if (action.label === 'WIP') {
return 'Mark as work in progress';
}
- // Otherwise, just map the anme to sentence case.
+ // Otherwise, just map the name to sentence case.
return this._toSentenceCase(action.label);
},