Skip to content

fix(localizations,types): Add types for form_param_type_invalid errors #6457

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

Merged
merged 2 commits into from
Aug 1, 2025

Conversation

dstaley
Copy link
Member

@dstaley dstaley commented Aug 1, 2025

Description

This PR adds types for form_param_type_invalid error messages to our localizations.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

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

Summary by CodeRabbit

  • New Features

    • Added new error message keys for invalid form parameter types, including specific cases for phone numbers and email addresses, across multiple localization resources.
  • Documentation

    • Updated type definitions to include the new form parameter type validation errors for improved clarity in error handling.

Copy link

changeset-bot bot commented Aug 1, 2025

🦋 Changeset detected

Latest commit: aee424f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 22 packages
Name Type
@clerk/localizations Patch
@clerk/types Patch
@clerk/clerk-js Patch
@clerk/clerk-react Patch
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/elements Patch
@clerk/expo-passkeys Patch
@clerk/clerk-expo Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/remix Patch
@clerk/shared Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/themes Patch
@clerk/vue Patch
@clerk/chrome-extension Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Aug 1, 2025

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

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 1, 2025 5:12pm

@dstaley dstaley changed the title fix(localization,types): Add types for form_param_type_invalid errors fix(localizations,types): Add types for form_param_type_invalid errors Aug 1, 2025
Copy link
Contributor

coderabbitai bot commented Aug 1, 2025

📝 Walkthrough

Walkthrough

This change adds new type declarations for form_param_type_invalid errors in the @clerk/types package and introduces corresponding localization keys in the @clerk/localizations package. Specifically, three new error keys—form_param_type_invalid, form_param_type_invalid__phone_number, and form_param_type_invalid__email_address—are added to the English localization resource and type definitions. Additionally, these three keys are added with undefined values to the unstable__errors section across numerous localization files for various languages, expanding the set of form parameter validation error keys without modifying existing keys or values.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

pkg-pr-new bot commented Aug 1, 2025

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@6457

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@6457

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@6457

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@6457

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@6457

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@6457

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@6457

@clerk/clerk-expo

npm i https://pkg.pr.new/@clerk/clerk-expo@6457

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@6457

@clerk/express

npm i https://pkg.pr.new/@clerk/express@6457

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@6457

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@6457

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@6457

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@6457

@clerk/clerk-react

npm i https://pkg.pr.new/@clerk/clerk-react@6457

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@6457

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@6457

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@6457

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@6457

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@6457

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@6457

@clerk/types

npm i https://pkg.pr.new/@clerk/types@6457

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@6457

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@6457

commit: aee424f

Copy link
Member

@alexcarpenter alexcarpenter left a comment

Choose a reason for hiding this comment

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

I think with the additions, we need to run the generate function to update all locales with the new params right?

Comment on lines 801 to 803
form_param_type_invalid: undefined,
form_param_type_invalid__phone_number: undefined,
form_param_type_invalid__email_address: undefined,
Copy link
Member

Choose a reason for hiding this comment

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

are these different then the ones directly above. did we migrate from format to type?

Copy link
Member Author

Choose a reason for hiding this comment

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

FAPI has both!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
packages/localizations/src/it-IT.ts (1)

817-819: LGTM! New error keys added consistently.

The three new form_param_type_invalid error keys are properly placed within the unstable__errors section and follow the established naming conventions. The undefined values are consistent with the pattern used for other untranslated keys in this file.

However, consider adding Italian translations for these keys to provide a complete localization experience:

-    form_param_type_invalid: undefined,
-    form_param_type_invalid__email_address: undefined,
-    form_param_type_invalid__phone_number: undefined,
+    form_param_type_invalid: 'Tipo di parametro non valido.',
+    form_param_type_invalid__email_address: 'Il tipo di indirizzo email non è valido.',
+    form_param_type_invalid__phone_number: 'Il tipo di numero di telefono non è valido.',
packages/localizations/src/bg-BG.ts (1)

807-809: LGTM! Consistent implementation across localization files.

The new form parameter type validation error keys are correctly implemented, maintaining consistency with other localization files in the PR. The undefined values are appropriate for community-contributed localization files.

Consider adding tests for the new error keys.

Since no tests were added or modified as part of this PR, consider adding tests to verify that the new form_param_type_invalid error keys are properly typed and accessible in the localization system.

packages/localizations/src/fr-FR.ts (1)

819-821: LGTM! Placeholder entries added correctly for new form validation errors.

The three new form_param_type_invalid error keys have been properly added to the unstable__errors section with undefined values, which is consistent with the pattern used throughout this localization file for untranslated strings.

However, consider providing French translations for these new error keys to improve the user experience for French-speaking users:

-    form_param_type_invalid: undefined,
-    form_param_type_invalid__email_address: undefined,
-    form_param_type_invalid__phone_number: undefined,
+    form_param_type_invalid: 'Le type de paramètre est invalide.',
+    form_param_type_invalid__email_address: 'Le type de paramètre pour l\'adresse e-mail est invalide.',
+    form_param_type_invalid__phone_number: 'Le type de paramètre pour le numéro de téléphone est invalide.',
packages/localizations/src/es-CR.ts (1)

816-818: LGTM! Consistent addition of new form validation error keys.

The addition of the three new form_param_type_invalid error keys with undefined values is consistent with the broader coordinated effort described in the PR objectives. This establishes the proper structure for future Spanish (Costa Rica) translations of these form parameter type validation errors.

Consider adding actual Spanish translations for these keys in a follow-up PR to provide localized error messages for Costa Rican users.

packages/localizations/src/be-BY.ts (1)

815-817: LGTM! Proper addition of form validation error keys.

The three new form_param_type_invalid error keys are correctly added with undefined values, maintaining consistency with the coordinated localization update across all language files. This establishes the foundation for future Belarusian translations.

Since this file already has comprehensive Belarusian translations for similar error keys (e.g., form_param_format_invalid__email_address on line 808-810), consider adding Belarusian translations for these new keys in a subsequent update.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 84d2de1 and aee424f.

📒 Files selected for processing (49)
  • packages/localizations/src/ar-SA.ts (1 hunks)
  • packages/localizations/src/be-BY.ts (1 hunks)
  • packages/localizations/src/bg-BG.ts (1 hunks)
  • packages/localizations/src/bn-IN.ts (1 hunks)
  • packages/localizations/src/ca-ES.ts (1 hunks)
  • packages/localizations/src/cs-CZ.ts (1 hunks)
  • packages/localizations/src/da-DK.ts (1 hunks)
  • packages/localizations/src/de-DE.ts (1 hunks)
  • packages/localizations/src/el-GR.ts (1 hunks)
  • packages/localizations/src/en-GB.ts (1 hunks)
  • packages/localizations/src/en-US.ts (1 hunks)
  • packages/localizations/src/es-CR.ts (1 hunks)
  • packages/localizations/src/es-ES.ts (1 hunks)
  • packages/localizations/src/es-MX.ts (1 hunks)
  • packages/localizations/src/es-UY.ts (1 hunks)
  • packages/localizations/src/fa-IR.ts (1 hunks)
  • packages/localizations/src/fi-FI.ts (1 hunks)
  • packages/localizations/src/fr-FR.ts (1 hunks)
  • packages/localizations/src/he-IL.ts (1 hunks)
  • packages/localizations/src/hi-IN.ts (1 hunks)
  • packages/localizations/src/hr-HR.ts (1 hunks)
  • packages/localizations/src/hu-HU.ts (1 hunks)
  • packages/localizations/src/id-ID.ts (1 hunks)
  • packages/localizations/src/is-IS.ts (1 hunks)
  • packages/localizations/src/it-IT.ts (1 hunks)
  • packages/localizations/src/ja-JP.ts (1 hunks)
  • packages/localizations/src/kk-KZ.ts (1 hunks)
  • packages/localizations/src/ko-KR.ts (1 hunks)
  • packages/localizations/src/mn-MN.ts (1 hunks)
  • packages/localizations/src/ms-MY.ts (1 hunks)
  • packages/localizations/src/nb-NO.ts (1 hunks)
  • packages/localizations/src/nl-BE.ts (1 hunks)
  • packages/localizations/src/nl-NL.ts (1 hunks)
  • packages/localizations/src/pl-PL.ts (1 hunks)
  • packages/localizations/src/pt-BR.ts (1 hunks)
  • packages/localizations/src/pt-PT.ts (1 hunks)
  • packages/localizations/src/ro-RO.ts (1 hunks)
  • packages/localizations/src/ru-RU.ts (1 hunks)
  • packages/localizations/src/sk-SK.ts (1 hunks)
  • packages/localizations/src/sr-RS.ts (1 hunks)
  • packages/localizations/src/sv-SE.ts (1 hunks)
  • packages/localizations/src/ta-IN.ts (1 hunks)
  • packages/localizations/src/te-IN.ts (1 hunks)
  • packages/localizations/src/th-TH.ts (1 hunks)
  • packages/localizations/src/tr-TR.ts (1 hunks)
  • packages/localizations/src/uk-UA.ts (1 hunks)
  • packages/localizations/src/vi-VN.ts (1 hunks)
  • packages/localizations/src/zh-CN.ts (1 hunks)
  • packages/localizations/src/zh-TW.ts (1 hunks)
✅ Files skipped from review due to trivial changes (27)
  • packages/localizations/src/nl-NL.ts
  • packages/localizations/src/sk-SK.ts
  • packages/localizations/src/he-IL.ts
  • packages/localizations/src/es-MX.ts
  • packages/localizations/src/ro-RO.ts
  • packages/localizations/src/de-DE.ts
  • packages/localizations/src/es-ES.ts
  • packages/localizations/src/mn-MN.ts
  • packages/localizations/src/en-GB.ts
  • packages/localizations/src/ta-IN.ts
  • packages/localizations/src/ar-SA.ts
  • packages/localizations/src/vi-VN.ts
  • packages/localizations/src/hr-HR.ts
  • packages/localizations/src/fa-IR.ts
  • packages/localizations/src/bn-IN.ts
  • packages/localizations/src/ko-KR.ts
  • packages/localizations/src/ms-MY.ts
  • packages/localizations/src/pt-BR.ts
  • packages/localizations/src/pt-PT.ts
  • packages/localizations/src/zh-CN.ts
  • packages/localizations/src/el-GR.ts
  • packages/localizations/src/tr-TR.ts
  • packages/localizations/src/uk-UA.ts
  • packages/localizations/src/zh-TW.ts
  • packages/localizations/src/th-TH.ts
  • packages/localizations/src/nl-BE.ts
  • packages/localizations/src/ru-RU.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/localizations/src/en-US.ts
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

**/*.{js,jsx,ts,tsx}: All code must pass ESLint checks with the project's configuration
Follow established naming conventions (PascalCase for components, camelCase for variables)
Maintain comprehensive JSDoc comments for public APIs
Use dynamic imports for optional features
All public APIs must be documented with JSDoc
Provide meaningful error messages to developers
Include error recovery suggestions where applicable
Log errors appropriately for debugging
Lazy load components and features when possible
Implement proper caching strategies
Use efficient data structures and algorithms
Profile and optimize critical paths
Validate all inputs and sanitize outputs
Implement proper logging with different levels

Files:

  • packages/localizations/src/nb-NO.ts
  • packages/localizations/src/fi-FI.ts
  • packages/localizations/src/id-ID.ts
  • packages/localizations/src/bg-BG.ts
  • packages/localizations/src/ja-JP.ts
  • packages/localizations/src/da-DK.ts
  • packages/localizations/src/is-IS.ts
  • packages/localizations/src/cs-CZ.ts
  • packages/localizations/src/fr-FR.ts
  • packages/localizations/src/hi-IN.ts
  • packages/localizations/src/sv-SE.ts
  • packages/localizations/src/ca-ES.ts
  • packages/localizations/src/es-UY.ts
  • packages/localizations/src/it-IT.ts
  • packages/localizations/src/hu-HU.ts
  • packages/localizations/src/sr-RS.ts
  • packages/localizations/src/te-IN.ts
  • packages/localizations/src/be-BY.ts
  • packages/localizations/src/es-CR.ts
  • packages/localizations/src/pl-PL.ts
  • packages/localizations/src/kk-KZ.ts
**/*.{js,jsx,ts,tsx,json,css,scss,md,yaml,yml}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

Use Prettier for consistent code formatting

Files:

  • packages/localizations/src/nb-NO.ts
  • packages/localizations/src/fi-FI.ts
  • packages/localizations/src/id-ID.ts
  • packages/localizations/src/bg-BG.ts
  • packages/localizations/src/ja-JP.ts
  • packages/localizations/src/da-DK.ts
  • packages/localizations/src/is-IS.ts
  • packages/localizations/src/cs-CZ.ts
  • packages/localizations/src/fr-FR.ts
  • packages/localizations/src/hi-IN.ts
  • packages/localizations/src/sv-SE.ts
  • packages/localizations/src/ca-ES.ts
  • packages/localizations/src/es-UY.ts
  • packages/localizations/src/it-IT.ts
  • packages/localizations/src/hu-HU.ts
  • packages/localizations/src/sr-RS.ts
  • packages/localizations/src/te-IN.ts
  • packages/localizations/src/be-BY.ts
  • packages/localizations/src/es-CR.ts
  • packages/localizations/src/pl-PL.ts
  • packages/localizations/src/kk-KZ.ts
packages/**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

TypeScript is required for all packages

Files:

  • packages/localizations/src/nb-NO.ts
  • packages/localizations/src/fi-FI.ts
  • packages/localizations/src/id-ID.ts
  • packages/localizations/src/bg-BG.ts
  • packages/localizations/src/ja-JP.ts
  • packages/localizations/src/da-DK.ts
  • packages/localizations/src/is-IS.ts
  • packages/localizations/src/cs-CZ.ts
  • packages/localizations/src/fr-FR.ts
  • packages/localizations/src/hi-IN.ts
  • packages/localizations/src/sv-SE.ts
  • packages/localizations/src/ca-ES.ts
  • packages/localizations/src/es-UY.ts
  • packages/localizations/src/it-IT.ts
  • packages/localizations/src/hu-HU.ts
  • packages/localizations/src/sr-RS.ts
  • packages/localizations/src/te-IN.ts
  • packages/localizations/src/be-BY.ts
  • packages/localizations/src/es-CR.ts
  • packages/localizations/src/pl-PL.ts
  • packages/localizations/src/kk-KZ.ts
packages/**/*.{ts,tsx,d.ts}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

Packages should export TypeScript types alongside runtime code

Files:

  • packages/localizations/src/nb-NO.ts
  • packages/localizations/src/fi-FI.ts
  • packages/localizations/src/id-ID.ts
  • packages/localizations/src/bg-BG.ts
  • packages/localizations/src/ja-JP.ts
  • packages/localizations/src/da-DK.ts
  • packages/localizations/src/is-IS.ts
  • packages/localizations/src/cs-CZ.ts
  • packages/localizations/src/fr-FR.ts
  • packages/localizations/src/hi-IN.ts
  • packages/localizations/src/sv-SE.ts
  • packages/localizations/src/ca-ES.ts
  • packages/localizations/src/es-UY.ts
  • packages/localizations/src/it-IT.ts
  • packages/localizations/src/hu-HU.ts
  • packages/localizations/src/sr-RS.ts
  • packages/localizations/src/te-IN.ts
  • packages/localizations/src/be-BY.ts
  • packages/localizations/src/es-CR.ts
  • packages/localizations/src/pl-PL.ts
  • packages/localizations/src/kk-KZ.ts
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

Use proper TypeScript error types

**/*.{ts,tsx}: Always define explicit return types for functions, especially public APIs
Use proper type annotations for variables and parameters where inference isn't clear
Avoid any type - prefer unknown when type is uncertain, then narrow with type guards
Use interface for object shapes that might be extended
Use type for unions, primitives, and computed types
Prefer readonly properties for immutable data structures
Use private for internal implementation details
Use protected for inheritance hierarchies
Use public explicitly for clarity in public APIs
Prefer readonly for properties that shouldn't change after construction
Prefer composition and interfaces over deep inheritance chains
Use mixins for shared behavior across unrelated classes
Implement dependency injection for loose coupling
Let TypeScript infer when types are obvious
Use const assertions for literal types: as const
Use satisfies operator for type checking without widening
Use mapped types for transforming object types
Use conditional types for type-level logic
Leverage template literal types for string manipulation
Use ES6 imports/exports consistently
Use default exports sparingly, prefer named exports
Use type-only imports: import type { ... } from ...
No any types without justification
Proper error handling with typed errors
Consistent use of readonly for immutable data
Proper generic constraints
No unused type parameters
Proper use of utility types instead of manual type construction
Type-only imports where possible
Proper tree-shaking friendly exports
No circular dependencies
Efficient type computations (avoid deep recursion)

Files:

  • packages/localizations/src/nb-NO.ts
  • packages/localizations/src/fi-FI.ts
  • packages/localizations/src/id-ID.ts
  • packages/localizations/src/bg-BG.ts
  • packages/localizations/src/ja-JP.ts
  • packages/localizations/src/da-DK.ts
  • packages/localizations/src/is-IS.ts
  • packages/localizations/src/cs-CZ.ts
  • packages/localizations/src/fr-FR.ts
  • packages/localizations/src/hi-IN.ts
  • packages/localizations/src/sv-SE.ts
  • packages/localizations/src/ca-ES.ts
  • packages/localizations/src/es-UY.ts
  • packages/localizations/src/it-IT.ts
  • packages/localizations/src/hu-HU.ts
  • packages/localizations/src/sr-RS.ts
  • packages/localizations/src/te-IN.ts
  • packages/localizations/src/be-BY.ts
  • packages/localizations/src/es-CR.ts
  • packages/localizations/src/pl-PL.ts
  • packages/localizations/src/kk-KZ.ts
packages/localizations/**/*

📄 CodeRabbit Inference Engine (.cursor/rules/monorepo.mdc)

Localization files must be placed in 'packages/localizations/'.

Files:

  • packages/localizations/src/nb-NO.ts
  • packages/localizations/src/fi-FI.ts
  • packages/localizations/src/id-ID.ts
  • packages/localizations/src/bg-BG.ts
  • packages/localizations/src/ja-JP.ts
  • packages/localizations/src/da-DK.ts
  • packages/localizations/src/is-IS.ts
  • packages/localizations/src/cs-CZ.ts
  • packages/localizations/src/fr-FR.ts
  • packages/localizations/src/hi-IN.ts
  • packages/localizations/src/sv-SE.ts
  • packages/localizations/src/ca-ES.ts
  • packages/localizations/src/es-UY.ts
  • packages/localizations/src/it-IT.ts
  • packages/localizations/src/hu-HU.ts
  • packages/localizations/src/sr-RS.ts
  • packages/localizations/src/te-IN.ts
  • packages/localizations/src/be-BY.ts
  • packages/localizations/src/es-CR.ts
  • packages/localizations/src/pl-PL.ts
  • packages/localizations/src/kk-KZ.ts
**/*.{js,ts,tsx,jsx}

📄 CodeRabbit Inference Engine (.cursor/rules/monorepo.mdc)

Support multiple Clerk environment variables (CLERK_, NEXT_PUBLIC_CLERK_, etc.) for configuration.

Files:

  • packages/localizations/src/nb-NO.ts
  • packages/localizations/src/fi-FI.ts
  • packages/localizations/src/id-ID.ts
  • packages/localizations/src/bg-BG.ts
  • packages/localizations/src/ja-JP.ts
  • packages/localizations/src/da-DK.ts
  • packages/localizations/src/is-IS.ts
  • packages/localizations/src/cs-CZ.ts
  • packages/localizations/src/fr-FR.ts
  • packages/localizations/src/hi-IN.ts
  • packages/localizations/src/sv-SE.ts
  • packages/localizations/src/ca-ES.ts
  • packages/localizations/src/es-UY.ts
  • packages/localizations/src/it-IT.ts
  • packages/localizations/src/hu-HU.ts
  • packages/localizations/src/sr-RS.ts
  • packages/localizations/src/te-IN.ts
  • packages/localizations/src/be-BY.ts
  • packages/localizations/src/es-CR.ts
  • packages/localizations/src/pl-PL.ts
  • packages/localizations/src/kk-KZ.ts
**/*

⚙️ CodeRabbit Configuration File

**/*: If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes.

Whenever reviewing a pull request, if there are any changes that could impact security, always tag @clerk/security in the PR.

Security-impacting changes include, but are not limited to:

  • Changes to authentication logic or mechanisms (e.g. login, session handling, token issuance)
  • Any modification to access control, authorization checks, or role-based permissions
  • Introduction or modification of hashing algorithms, signature verification, or cryptographic primitives
  • Handling of sensitive data (e.g. passwords, tokens, secrets, PII)
  • Integration with external identity providers (e.g. SSO, OAuth, OpenID Connect)
  • Modifications to security headers, cookie flags, CORS policies, or CSRF protections
  • Bypass mechanisms (e.g. feature flags, testing overrides) that could weaken protections
  • Changes to rate limiting, abuse prevention, or input validation

If you're unsure whether a change is security-relevant, err on the side of caution and tag @clerk/security.

Any time that you tag @clerk/security, please do so explicitly in a code comment, rather than within a collapsed section in a coderabbit comment, such as the "recent review details" section. If you do use the team name in any thinking or non-direct-code-comment content, it can be referred to as "clerk security team" to avoid accidentally printing the tag which sends a notification to the team.

Files:

  • packages/localizations/src/nb-NO.ts
  • packages/localizations/src/fi-FI.ts
  • packages/localizations/src/id-ID.ts
  • packages/localizations/src/bg-BG.ts
  • packages/localizations/src/ja-JP.ts
  • packages/localizations/src/da-DK.ts
  • packages/localizations/src/is-IS.ts
  • packages/localizations/src/cs-CZ.ts
  • packages/localizations/src/fr-FR.ts
  • packages/localizations/src/hi-IN.ts
  • packages/localizations/src/sv-SE.ts
  • packages/localizations/src/ca-ES.ts
  • packages/localizations/src/es-UY.ts
  • packages/localizations/src/it-IT.ts
  • packages/localizations/src/hu-HU.ts
  • packages/localizations/src/sr-RS.ts
  • packages/localizations/src/te-IN.ts
  • packages/localizations/src/be-BY.ts
  • packages/localizations/src/es-CR.ts
  • packages/localizations/src/pl-PL.ts
  • packages/localizations/src/kk-KZ.ts
**/localizations/**/*.ts

⚙️ CodeRabbit Configuration File

**/localizations/**/*.ts: Review the changes to localization files with the following guidelines:

  • Ensure that no existing translations are accidentally removed unless they are being replaced or fixed. If a string is removed, verify that it is intentional and justified.
  • Check that all translations are friendly, formal, or semi-formal. Explicit, offensive, or inappropriate language is not allowed. If you find any potentially offensive language or are unsure, tag the @clerk/sdk-infra team in a separate comment. If you do not intend to tag the team, refer to it as "Clerk SDK Infra team" instead.
  • Use the most up-to-date base localization file (https://github.com/clerk/javascript/blob/main/packages/localizations/src/en-US.ts) to validate changes, ensuring consistency and completeness.
  • Confirm that new translations are accurate, contextually appropriate, and match the intent of the original English strings.
  • Check for formatting issues, such as missing placeholders, incorrect variable usage, or syntax errors.
  • Ensure that all keys are unique and that there are no duplicate or conflicting entries.
  • If you notice missing translations for new keys, flag them for completion.

Files:

  • packages/localizations/src/nb-NO.ts
  • packages/localizations/src/fi-FI.ts
  • packages/localizations/src/id-ID.ts
  • packages/localizations/src/bg-BG.ts
  • packages/localizations/src/ja-JP.ts
  • packages/localizations/src/da-DK.ts
  • packages/localizations/src/is-IS.ts
  • packages/localizations/src/cs-CZ.ts
  • packages/localizations/src/fr-FR.ts
  • packages/localizations/src/hi-IN.ts
  • packages/localizations/src/sv-SE.ts
  • packages/localizations/src/ca-ES.ts
  • packages/localizations/src/es-UY.ts
  • packages/localizations/src/it-IT.ts
  • packages/localizations/src/hu-HU.ts
  • packages/localizations/src/sr-RS.ts
  • packages/localizations/src/te-IN.ts
  • packages/localizations/src/be-BY.ts
  • packages/localizations/src/es-CR.ts
  • packages/localizations/src/pl-PL.ts
  • packages/localizations/src/kk-KZ.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Build Packages
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: semgrep/ci
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (16)
packages/localizations/src/es-UY.ts (1)

816-818: LGTM! Consistent addition of form parameter type validation error keys.

The three new error keys (form_param_type_invalid, form_param_type_invalid__email_address, and form_param_type_invalid__phone_number) are properly placed within the unstable__errors section and follow the established naming conventions. Setting them to undefined is appropriate for community-maintained localization files as placeholders for future translations.

packages/localizations/src/da-DK.ts (1)

807-809: LGTM! Consistent addition of form parameter type validation error keys.

The three new error keys (form_param_type_invalid, form_param_type_invalid__email_address, and form_param_type_invalid__phone_number) are properly placed within the unstable__errors section and follow the established naming conventions. The implementation is consistent with the Spanish Uruguay file, indicating a systematic update across locales. Setting them to undefined is appropriate for community-maintained localization files as placeholders for future translations.

packages/localizations/src/ca-ES.ts (1)

808-810: LGTM! Well-structured addition of new error message keys.

The addition of the three new form_param_type_invalid error keys follows the established naming conventions and is properly placed within the unstable__errors section. Setting the values to undefined is consistent with the pattern used throughout this localization file for untranslated strings, and this change enhances type safety by ensuring these keys are available in the type definitions.

packages/localizations/src/nb-NO.ts (1)

808-810: LGTM! Consistent implementation across localization files.

The addition of the new form_param_type_invalid error keys is implemented consistently with the Catalan localization file and follows the established patterns. The keys are properly structured with the general error key and specific variants for email and phone validation. Using undefined values aligns with the existing approach in this file for untranslated strings and contributes to improved type safety across the localization system.

packages/localizations/src/fi-FI.ts (1)

810-812: LGTM! Properly structured placeholder keys for form parameter type validation errors.

The three new error keys follow the established naming conventions and are appropriately placed in the unstable__errors section with undefined values as placeholders for future Finnish translations.

packages/localizations/src/pl-PL.ts (1)

814-816: LGTM! Consistent implementation of placeholder keys across localization files.

The three new error keys are properly structured and match the implementation pattern used in other localization files. Using undefined values as placeholders for future Polish translations is the correct approach.

packages/localizations/src/te-IN.ts (1)

816-818: LGTM! Proper addition of error key placeholders.

The three new form_param_type_invalid error keys are correctly added with undefined values, which is consistent with the pattern used throughout this Telugu localization file for untranslated strings. These placeholders properly support the type safety improvements mentioned in the PR objectives.

packages/localizations/src/ja-JP.ts (1)

809-811: LGTM! Consistent addition of error key placeholders.

The three new form_param_type_invalid error keys are properly added with undefined values, maintaining consistency with both the Telugu localization file and this Japanese file's existing pattern for untranslated strings. This supports the coordinated type safety improvements across the localization system.

packages/localizations/src/sv-SE.ts (1)

812-814: LGTM! Consistent localization update.

The three new form parameter type validation error keys have been properly added with undefined values, which is appropriate for community-maintained localization files. The placement and naming follow established conventions.

packages/localizations/src/kk-KZ.ts (1)

799-801: LGTM! Consistent localization update.

The three new form parameter type validation error keys have been properly added with undefined values, maintaining consistency with the established pattern for community-maintained localization files.

packages/localizations/src/sr-RS.ts (1)

807-809: LGTM! New error keys properly added.

The three new form parameter type validation error keys have been correctly added to the unstable__errors section with appropriate undefined values, which is the expected pattern for community-contributed localization files.

packages/localizations/src/hu-HU.ts (1)

808-810: LGTM! Localization keys added correctly.

The three new error keys are appropriately added with undefined values, which follows the established pattern for untranslated strings in community-contributed localization files. The keys are properly positioned within the unstable__errors section and follow the correct naming convention.

packages/localizations/src/hi-IN.ts (1)

814-816: LGTM! Localization keys added correctly.

The three new error keys are appropriately added with undefined values, which follows the established pattern for untranslated strings in community-contributed localization files. The keys are properly positioned within the unstable__errors section and follow the correct naming convention.

packages/localizations/src/cs-CZ.ts (1)

819-821: LGTM - Proper placeholder addition for new error keys

The three new form parameter type validation error keys are correctly added with undefined values as placeholders. The naming convention follows the established pattern with double underscores for specificity (form_param_type_invalid__email_address, form_param_type_invalid__phone_number), and they're appropriately placed within the unstable__errors section.

packages/localizations/src/is-IS.ts (1)

811-813: LGTM - Consistent placeholder addition

The three new form parameter type validation error keys are properly added with undefined values as placeholders, maintaining consistency with the pattern established across other localization files. The keys follow the correct naming convention and are appropriately positioned within the unstable__errors section.

packages/localizations/src/id-ID.ts (1)

815-817: ✅ Verified placeholder keys across all localization files

  • The three new keys (form_param_type_invalid, form_param_type_invalid__email_address, form_param_type_invalid__phone_number) are present in the base English file (en-US.ts).
  • After excluding index.ts and the utils/ scripts, every locale file under packages/localizations/src/ includes these keys with undefined values.

No further action needed—these additions correctly follow the placeholder-pattern for future translations.

@dstaley dstaley merged commit f93965f into main Aug 1, 2025
38 checks passed
@dstaley dstaley deleted the ds.fix/add-invalid-type-error branch August 1, 2025 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants