Skip to content

Localizations - #372

Merged
nikosdouvlis merged 9 commits into
mainfrom
localizations_wip
Sep 14, 2022
Merged

nikosdouvlis merged 9 commits into
mainfrom
localizations_wip

Conversation

@nikosdouvlis

Copy link
Copy Markdown
Member

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Packages affected

  • @clerk/clerk-js
  • @clerk/clerk-react
  • @clerk/nextjs
  • @clerk/remix
  • @clerk/types
  • @clerk/themes
  • @clerk/clerk-expo
  • @clerk/backend-core
  • @clerk/clerk-sdk-node
  • @clerk/edge
  • build/tooling/chore

Description

  • npm test runs as expected.
  • npm run build runs as expected.

@nikosdouvlis
nikosdouvlis force-pushed the localizations_wip branch 3 times, most recently from a4abe8f to 463c3f9 Compare September 13, 2022 10:23
@nikosdouvlis nikosdouvlis changed the title Localizations - WIP Localizations Sep 13, 2022
@nikosdouvlis nikosdouvlis self-assigned this Sep 13, 2022
@nikosdouvlis
nikosdouvlis force-pushed the localizations_wip branch 2 times, most recently from 47ba7b2 to 55f639d Compare September 13, 2022 10:57
@nikosdouvlis
nikosdouvlis force-pushed the localizations_wip branch 3 times, most recently from 9e220bb to 2e3065f Compare September 13, 2022 22:59
Comment thread packages/types/src/localization.ts Outdated
};
};
userProfile: {
headerTitle__account: LocalizationValue;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

These keys are used in the UserProfile homepage. I'm thinking of nesting them under userProfile.home key so they feel more similar with the other UserProfile pages (eg: userProfile.usernamePage).

Thoughts?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That makes sense.

@colinclerk

Copy link
Copy Markdown
Member

Can you add the recommended usage pattern here as a comment?


export type RecordToPath<T> = PathImpl2<T> extends string | keyof T ? PathImpl2<T> : keyof T;

export type PathValue<T, P extends RecordToPath<T>> = P extends `${infer Key}.${infer Rest}`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@nikosdouvlis Can you provide some more context on these type helpers to help the future reader?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done ✅

Comment thread packages/types/src/localization.ts Outdated
};
};
userProfile: {
headerTitle__account: LocalizationValue;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That makes sense.

@nikosdouvlis
nikosdouvlis merged commit 1a66e86 into main Sep 14, 2022
@nikosdouvlis
nikosdouvlis deleted the localizations_wip branch September 14, 2022 15:42
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants