diff --git a/src/languages/en.ts b/src/languages/en.ts index 65d82235f7d7..43479ad2719f 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -4609,6 +4609,8 @@ const translations = { updateCategory: ({oldValue, categoryName}: UpdatedPolicyCategoryParams) => `${oldValue ? 'disabled' : 'enabled'} the category "${categoryName}"`, setCategoryName: ({oldName, newName}: UpdatedPolicyCategoryNameParams) => `renamed the category "${oldName}" to "${newName}"`, addTag: ({tagListName, tagName}: UpdatedPolicyTagParams) => `added the tag "${tagName}" to the list "${tagListName}"`, + deleteTag: ({tagListName, tagName}: UpdatedPolicyTagParams) => `removed the tag "${tagName}" from the list "${tagListName}"`, + updateTagEnabled: ({tagListName, tagName, enabled}: UpdatedPolicyTagParams) => `${enabled ? 'enabled' : 'disabled'} the tag "${tagName}" on the list "${tagListName}"`, addCustomUnitRate: ({customUnitName, rateName}: AddedPolicyCustomUnitRateParams) => `added a new "${customUnitName}" rate "${rateName}"`, addedReportField: ({fieldType, fieldName}: AddedPolicyReportFieldParams) => `added ${fieldType} Report Field "${fieldName}"`, preventSelfApproval: ({oldValue, newValue}: UpdatedPolicyPreventSelfApprovalParams) => diff --git a/src/languages/es.ts b/src/languages/es.ts index 14c3a6223947..67303dd57ec2 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -4657,6 +4657,8 @@ const translations = { updateCategory: ({oldValue, categoryName}: UpdatedPolicyCategoryParams) => `${oldValue ? 'deshabilitó' : 'habilitó'} la categoría "${categoryName}"`, setCategoryName: ({oldName, newName}: UpdatedPolicyCategoryNameParams) => `Renombró la categoría "${oldName}" a "${newName}".`, addTag: ({tagListName, tagName}: UpdatedPolicyTagParams) => `agregó la etiqueta "${tagName}" a la lista "${tagListName}"`, + deleteTag: ({tagListName, tagName}: UpdatedPolicyTagParams) => `eliminó la etiqueta "${tagName}" de la lista "${tagListName}"`, + updateTagEnabled: ({tagListName, tagName, enabled}: UpdatedPolicyTagParams) => `${enabled ? 'habilitó' : 'deshabilitó'} la etiqueta "${tagName}" en la lista "${tagListName}"`, addedReportField: ({fieldType, fieldName}: AddedPolicyReportFieldParams) => `agregó el Campo de Informe ${fieldType} "${fieldName}"`, addCustomUnitRate: ({customUnitName, rateName}: AddedPolicyCustomUnitRateParams) => `agregó una nueva tasa de "${rateName}" para "${customUnitName}"`, preventSelfApproval: ({oldValue, newValue}: UpdatedPolicyPreventSelfApprovalParams) => diff --git a/src/languages/params.ts b/src/languages/params.ts index 44d544216ded..ef3cbf2c0211 100644 --- a/src/languages/params.ts +++ b/src/languages/params.ts @@ -292,7 +292,7 @@ type UpdatedPolicyCurrencyParams = {oldCurrency: string; newCurrency: string}; type UpdatedPolicyCategoryParams = {categoryName: string; oldValue?: boolean}; -type UpdatedPolicyTagParams = {tagListName: string; tagName: string}; +type UpdatedPolicyTagParams = {tagListName: string; tagName: string; enabled?: boolean}; type UpdatedPolicyCategoryNameParams = {oldName: string; newName?: string}; diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index f0b10d39302f..2e5fa46939b0 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -1844,7 +1844,7 @@ function getWorkspaceCategoryUpdateMessage(action: ReportAction): string { } function getWorkspaceTagUpdateMessage(action: ReportAction): string { - const {tagListName, tagName} = getOriginalMessage(action as ReportAction) ?? {}; + const {tagListName, tagName, enabled} = getOriginalMessage(action as ReportAction) ?? {}; if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_TAG && tagListName && tagName) { return Localize.translateLocal('workspaceActions.addTag', { @@ -1853,6 +1853,20 @@ function getWorkspaceTagUpdateMessage(action: ReportAction): string { }); } + if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.DELETE_TAG && tagListName && tagName) { + return Localize.translateLocal('workspaceActions.deleteTag', { + tagListName, + tagName, + }); + } + + if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_TAG_ENABLED && tagListName && tagName) { + return Localize.translateLocal('workspaceActions.updateTagEnabled', { + tagListName, + tagName, + }); + } + return getReportActionText(action); } diff --git a/src/types/onyx/OriginalMessage.ts b/src/types/onyx/OriginalMessage.ts index 079650c7f5d8..286debb4633b 100644 --- a/src/types/onyx/OriginalMessage.ts +++ b/src/types/onyx/OriginalMessage.ts @@ -386,6 +386,9 @@ type OriginalMessagePolicyChangeLog = { /** Updated tag list name */ tagListName?: string; + + /** Updated tag enabled/disabled value */ + enabled?: boolean; }; /** Model of `join policy changelog` report action */