From c5bafecad39463d5c042ef282d5f6c58b258beab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=9B=BD=E7=92=87?= <37972689+YangGuoXuan-0503@users.noreply.github.com> Date: Fri, 27 Dec 2024 14:11:39 +0800 Subject: [PATCH] fix: after delete people photo, can not remove (#7269) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: after delete people photo, can not remove * feat: add translate --------- Co-authored-by: 杨国璇 --- frontend/src/metadata/store/operations/constants.js | 1 + frontend/src/metadata/views/gallery/context-menu/index.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/metadata/store/operations/constants.js b/frontend/src/metadata/store/operations/constants.js index 364e6cbe55..592432663b 100644 --- a/frontend/src/metadata/store/operations/constants.js +++ b/frontend/src/metadata/store/operations/constants.js @@ -90,6 +90,7 @@ export const LOCAL_APPLY_OPERATION_TYPE = [ OPERATION_TYPE.MODIFY_COLUMN_WIDTH, OPERATION_TYPE.MODIFY_LOCAL_RECORD, OPERATION_TYPE.MODIFY_LOCAL_COLUMN_DATA, + OPERATION_TYPE.DELETE_PEOPLE_PHOTOS, ]; // apply operation after exec operation on the server diff --git a/frontend/src/metadata/views/gallery/context-menu/index.js b/frontend/src/metadata/views/gallery/context-menu/index.js index f2490ba44f..307d39d8c7 100644 --- a/frontend/src/metadata/views/gallery/context-menu/index.js +++ b/frontend/src/metadata/views/gallery/context-menu/index.js @@ -37,7 +37,7 @@ const GalleryContextMenu = ({ metadata, selectedImages, onDelete, onDuplicate, a validOptions.push({ value: CONTEXT_MENU_KEY.DUPLICATE, label: gettext('Duplicate') }); } if (canRemovePhotoFromPeople) { - validOptions.push({ value: CONTEXT_MENU_KEY.REMOVE, label: 'Remove from this group' }); + validOptions.push({ value: CONTEXT_MENU_KEY.REMOVE, label: gettext('Remove from this group') }); } return validOptions; }, [checkCanDeleteRow, canDuplicateRow, canRemovePhotoFromPeople, selectedImages]);