diff --git a/app/actions/definitions/documents.tsx b/app/actions/definitions/documents.tsx index a9275e489..129f5b994 100644 --- a/app/actions/definitions/documents.tsx +++ b/app/actions/definitions/documents.tsx @@ -352,7 +352,17 @@ export const duplicateDocument = createAction({ * of the collection for all collection members to see. */ export const pinDocumentToCollection = createAction({ - name: ({ t }) => t("Pin to collection"), + name: ({ activeDocumentId = "", t, stores }) => { + const selectedDocument = stores.documents.get(activeDocumentId); + const collectionName = selectedDocument + ? stores.documents.getCollectionForDocument(selectedDocument)?.name + : t("collection"); + + return t("Pin to {{collectionName}}", { + collectionName, + }); + }, + section: DocumentSection, icon: , iconInContextMenu: false, diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json index d015e82cc..e97275a88 100644 --- a/shared/i18n/locales/en_US/translation.json +++ b/shared/i18n/locales/en_US/translation.json @@ -30,7 +30,7 @@ "Duplicate": "Duplicate", "Duplicate document": "Duplicate document", "Document duplicated": "Document duplicated", - "Pin to collection": "Pin to collection", + "Pin to {{collectionName}}": "Pin to {{collectionName}}", "Pinned to collection": "Pinned to collection", "Pin to home": "Pin to home", "Pinned to team home": "Pinned to team home",