Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring labels back for now #195

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/transcend-io/consent-manager-ui.git"
},
"homepage": "https://github.com/transcend-io/consent-manager-ui",
"version": "4.22.0",
"version": "4.22.1",
"license": "MIT",
"main": "build/ui",
"files": [
Expand Down
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
Loading