diff --git a/src/components/constants.ts b/src/components/constants.ts index dee21c2..9f0ce8d 100644 --- a/src/components/constants.ts +++ b/src/components/constants.ts @@ -1,13 +1,13 @@ import { DefinedMessage } from '@transcend-io/internationalization'; -import { completeOptionsInvertedMessages, purposeMessages } from '../messages'; +import { completeOptionsMessages, completeOptionsInvertedMessages, purposeMessages } from '../messages'; // Mapping of purposes to the message translation key export const DEFAULT_PURPOSE_TO_MESSAGE_KEY: Record = { - Essential: purposeMessages['Essential.title'], - Functional: purposeMessages['Functional.title'], - Analytics: purposeMessages['Analytics.title'], - Advertising: purposeMessages['Advertising.title'], - SaleOfInfo: purposeMessages['SaleOfInfo.title'], + Essential: completeOptionsMessages.essentialLabel, + Functional: completeOptionsMessages.functionalLabel, + Analytics: completeOptionsMessages.analyticsLabel, + Advertising: completeOptionsMessages.advertisingLabel, + SaleOfInfo: completeOptionsMessages.saleOfInfoLabel, }; export const DEFAULT_PURPOSE_TO_DESCRIPTION_KEY: Record< @@ -25,7 +25,7 @@ export const DEFAULT_PURPOSE_TO_INVERTED_MESSAGE_KEY: Record< string, DefinedMessage > = { - Essential: purposeMessages['Essential.title'], + Essential: completeOptionsMessages.essentialLabel, Functional: completeOptionsInvertedMessages.functionalLabel, Analytics: completeOptionsInvertedMessages.analyticsLabel, Advertising: completeOptionsInvertedMessages.advertisingLabel, diff --git a/src/messages.ts b/src/messages.ts index 0aeeaf7..0539019 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -508,6 +508,27 @@ export const purposeMessages = defineMessages('purpose.trackingType', { export const completeOptionsMessages = defineMessages( 'ui.src.completeOptions', { + essentialLabel: { + defaultMessage: 'Essential', + description: 'Text for essential purposes in CompleteOptions view state.', + }, + functionalLabel: { + defaultMessage: 'Functional', + description: 'Text for functional purposes in CompleteOptions view state.', + }, + analyticsLabel: { + defaultMessage: 'Analytics', + description: 'Text for analytics purposes in CompleteOptions view state.', + }, + advertisingLabel: { + defaultMessage: 'Advertising', + description: 'Text for advertising purposes in CompleteOptions view state.', + }, + saleOfInfoLabel: { + defaultMessage: 'SaleOfInfo', + description: + 'Text for sale of information purposes in CompleteOptions view state.', + }, saveButtonPrimary: { defaultMessage: 'Confirm', description: 'Confirm button text in CompleteOptions view state.',