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

Internationalize purpose descriptions #181

Merged
merged 20 commits into from
Oct 25, 2024
Merged

Conversation

kate-kazantseva
Copy link
Member

@kate-kazantseva kate-kazantseva commented Oct 9, 2024

Related Issues

Security Implications

[none]

System Availability

[none]

Kapture.2024-10-25.at.13.16.32.mp4

Copy link

height bot commented Oct 9, 2024

This pull request has been linked to 1 task:

  • T-38707 Make Purpose descriptions showing in CompleteOptionsToggles customizable (unlink task)

💡Tip: Add "Close T-38707" to the pull request title or description, to a commit message, or in a comment to mark this task as "Pending Deploy" when the pull request is merged.

Copy link

vercel bot commented Oct 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
consent-manager-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 25, 2024 11:10pm

@kate-kazantseva kate-kazantseva changed the title [WIP] Internationalize purpose descriptions Internationalize purpose descriptions Oct 22, 2024
@kate-kazantseva kate-kazantseva requested a review from a team October 22, 2024 23:06
Copy link
Member

@csmccarthy csmccarthy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few changes needed, lmk if you want to huddle and get through them quick!

package.json Outdated
@@ -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.21.2",
"version": "4.21.3",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets bump this a minor version, this is more than a bugfix

return {
...allMessages,
[purposeType]: {
id: `cm-ui.purpose.${purposeType}`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh actually i see whats going on here, nvm, we will have to split out inverted. lets make a useGetInvertedPurposeMessageKeys hook for now (in the future these should probably also be messages?)

src/messages.ts Show resolved Hide resolved
src/messages.ts Outdated
@@ -456,32 +456,60 @@ export const bottomMenuMessages = defineMessages('ui.src.bottomMenu', {
},
});

export const purposeMessages = defineMessages('purpose.trackingType', {
'essential.title': {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'essential.title': {
'Essential.title': {

these tracking types should all be pascal case, right? we switched it in the monorepo

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh right, I need to fix this. weirdly it still worked

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah because the ones being displayed are overwritten successfully. if you remember when we were testing we had like Functional: undefined, p sure that was because of this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, yeah I think you're right!

return {
...allMessages,
[purposeType]: {
id: `cm-ui.purpose.${purposeType}`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh actually i see whats going on here, nvm, we will have to split out inverted. lets make a useGetInvertedPurposeMessageKeys hook for now (in the future these should probably also be messages?)

Copy link
Member

@csmccarthy csmccarthy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥🔥🔥🔥🔥

@kate-kazantseva kate-kazantseva merged commit 395c9bb into main Oct 25, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants