Skip to content

Commit

Permalink
bring labels back for now
Browse files Browse the repository at this point in the history
  • Loading branch information
kate-kazantseva committed Oct 28, 2024
1 parent 5b9fe65 commit 18ac6d9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/constants.ts
Original file line number Diff line number Diff line change
@@ -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<string, DefinedMessage> = {
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<
Expand All @@ -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,
Expand Down
21 changes: 21 additions & 0 deletions src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down

0 comments on commit 18ac6d9

Please sign in to comment.