Skip to content

Conversation

hamidrezaghanbari
Copy link
Contributor

@hamidrezaghanbari hamidrezaghanbari commented Aug 13, 2025

What changed?

Complete Persian (fa-IR) localization with all missing translations.

Description

This PR completes the Persian localization by:

  • ✅ Translating all undefined API key management strings
  • ✅ Adding complete commerce/billing translations
  • ✅ Completing organization profile translations
  • ✅ Adding all missing error messages
  • ✅ Including form labels and placeholders
  • ✅ Adding fa-IR to package.json files array for proper publishing

The Persian localization now provides a complete user experience for Persian-speaking users.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Localization update

Checklist

  • I have added a changeset to document this change
  • I have tested this change
  • This change follows the contribution guidelines

Impact

This enhancement provides complete Persian language support for Clerk's authentication UI, benefiting Persian-speaking developers and end users.

Summary by CodeRabbit

  • New Features
    • Added complete Persian (fa-IR) localization across the app, covering UI labels, navigation, API keys, billing/subscriptions, organization and user profiles, forms, validation and error messages, and date/status formatting.
  • Chores
    • Included the fa-IR locale in the published localization package to ensure availability for consumers.

hamidreza.gh added 2 commits August 13, 2025 18:04
- Translate all undefined API key management strings
- Add complete commerce/billing translations
- Complete organization profile translations
- Add all missing error messages
- Include form labels and placeholders
- Add fa-IR to package.json files array for publishing

The Persian localization now provides a complete user experience for Persian-speaking users.
Copy link

changeset-bot bot commented Aug 13, 2025

🦋 Changeset detected

Latest commit: 431c10a

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

This PR includes changesets to release 4 packages
Name Type
@clerk/localizations Minor
@clerk/clerk-js Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo 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 13, 2025

Someone is attempting to deploy a commit to the Clerk Production Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Aug 13, 2025

📝 Walkthrough

Walkthrough

Adds a comprehensive Persian (fa-IR) localization: fills numerous strings across UI sections (API keys, billing/subscriptions, organization and user profiles, errors/validation, navigation). Introduces formatted/date-templated messages within fa-IR. Updates packages/localizations/package.json to include "fa-IR" in the files array. Adds two changeset entries: one documenting the Persian localization as a minor release for @clerk/localizations, and another placeholder changeset with only YAML delimiters. No public APIs or exports changed; only localization data/content updated.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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
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: 2

🔭 Outside diff range comments (5)
packages/localizations/src/fa-IR.ts (5)

314-318: Undefined headers in organization subscriptions list

These headers are still undefined and will surface in UI.

Apply:

-        tableHeader__edit: undefined,
-        tableHeader__plan: undefined,
-        tableHeader__startDate: undefined,
+        tableHeader__edit: 'ویرایش',
+        tableHeader__plan: 'طرح',
+        tableHeader__startDate: 'تاریخ شروع',

610-610: Fix typo in “invalid link” title

Missing initial “این” and diacritics in “تأیید”.

-        title: 'ین لینک تایید نامعتبر است',
+        title: 'این لینک تأیید نامعتبر است',

1181-1187: Wrong meaning for “Primary” and consistency with nonPrimary

“detailsAction__primary” represents a “Primary” status/label, not “Full verification”. Use “اصلی” and keep consistency with nonPrimary.

-        detailsAction__nonPrimary: 'به عنوان اصلی تنظیم کنید',
-        detailsAction__primary: 'تایید کامل',
+        detailsAction__nonPrimary: 'به‌عنوان اصلی تنظیم کنید',
+        detailsAction__primary: 'اصلی',

1224-1230: Wrong meaning for “Primary” in phone numbers + trailing space

Same issue as email addresses; remove trailing space and use “اصلی”.

-        detailsAction__nonPrimary: 'به عنوان اصلی تنظیم کنید',
-        detailsAction__primary: 'تایید کامل ',
+        detailsAction__nonPrimary: 'به‌عنوان اصلی تنظیم کنید',
+        detailsAction__primary: 'اصلی',

175-181: Missing translations and English placeholders in packages/localizations/src/fa-IR.ts

  • Lines 314–316:
    tableHeader__edit, tableHeader__plan, tableHeader__startDate are still undefined. Please supply Persian translations.
  • Line 176:
    • The literal English connector “at” appears in next6Days/previous6Days. Replace it with a Persian equivalent (e.g. “ساعت”).
  • Lines 440 & 933:
    uploadAction__title: 'Logo' and actionLabel__download: 'Download .txt' remain in English. Localize these labels.
  • Line 9 (file header comment) is in English—consider translating or removing if not needed.
  • Date-formatting pipes use en-US (to force Latin numerals), which matches other locales. If you’d rather render Persian numerals or weekday names, switch those pipes to fa-IR; otherwise leave them as en-US for consistency.
🧹 Nitpick comments (16)
packages/localizations/src/fa-IR.ts (15)

57-57: Typo: extra letter in “expired” badge

"مننقضی شده" → "منقضی شده".

-  badge__expired: 'مننقضی شده',
+  badge__expired: 'منقضی شده',

933-933: Untranslated label: Download .txt

Localize “Download .txt”.

-      actionLabel__download: 'Download .txt',
+      actionLabel__download: 'دانلود فایل .txt',

441-441: Untranslated label: Logo

Localize to Persian.

-        uploadAction__title: 'Logo',
+        uploadAction__title: 'لوگو',

654-656: Fix typo at start of sentence

“ستفاده” → “استفاده”.

-        'ستفاده از کلید عبور، هویت شما را تأیید می‌کند. ممکن است دستگاه از شما اثر انگشت، چهره یا قفل صفحه را درخواست کند.',
+        'استفاده از کلید عبور، هویت شما را تأیید می‌کند. ممکن است دستگاه از شما اثر انگشت، چهره یا قفل صفحه را درخواست کند.',

1075-1077: Missing حرف اضافه “برای”

“رای ثبت نام” → “برای ثبت نام”.

-        'رای ثبت نام در تأیید دو مرحله‌ای با کد پیامکی، یک شماره تلفن موجود را انتخاب کنید یا یک شماره جدید اضافه کنید.',
+        'برای ثبت نام در تأیید دو مرحله‌ای با کد پیامکی، یک شماره تلفن موجود را انتخاب کنید یا یک شماره جدید اضافه کنید.',

457-457: Remove double period

Ends with “..”.

-        calloutInfoLabel: 'تغییر حالت ثبت نام فقط روی کاربران جدید تأثیر می‌گذارد..',
+        calloutInfoLabel: 'تغییر حالت ثبت نام فقط روی کاربران جدید تأثیر می‌گذارد.',

1134-1135: Fix spelling of “به‌روزرسانی”

Use consistent and correct form “به‌روزرسانی”.

-      title__update: 'ه‌روزرسانی رمز عبور',
+      title__update: 'به‌روزرسانی رمز عبور',
-        primaryButton__updatePassword: 'ه‌روزرسانی رمز عبور',
+        primaryButton__updatePassword: 'به‌روزرسانی رمز عبور',

Also applies to: 1220-1221


711-711: Remove unintended double spaces

There is a double space in “تأیید دو مرحله‌ای”.

-      title: 'تأیید  دو مرحله‌ای',
+      title: 'تأیید دو مرحله‌ای',
-        title: 'تأیید  دو مرحله‌ای',
+        title: 'تأیید دو مرحله‌ای',

Also applies to: 1206-1207


176-176: Localize “at” in date format

Keep placeholders, but translate the connecting word.

-    next6Days: "{{ date | weekday('en-US','long') }} at {{ date | timeString('en-US') }}",
+    next6Days: "{{ date | weekday('en-US','long') }} در {{ date | timeString('en-US') }}",

345-349: Header “Joined” should be date-oriented

“عضو شدید” reads like an action. Prefer “تاریخ عضویت”.

-        tableHeader__joined: 'عضو شدید',
+        tableHeader__joined: 'تاریخ عضویت',

243-244: Tone/voice improvement for impersonation title

Use a neutral “Signed in as …” instead of first-person.

-    title: 'با نام کاربری {{identifier}} وارد سیستم شدم',
+    title: 'ورود به‌عنوان {{identifier}}',

218-219: Normalize spacing

Remove double space.

-  formFieldLabel__backupCode: 'کد  پشتیبان',
+  formFieldLabel__backupCode: 'کد پشتیبان',

872-875: Natural terminology for password rules

Use “عدد” and “کاراکتر ویژه”.

-      requireNumbers: 'یک شماره',
-      requireSpecialCharacter: 'یک نشانه خاص',
+      requireNumbers: 'یک عدد',
+      requireSpecialCharacter: 'یک کاراکتر ویژه',

295-299: Consistency: plural form of Subscriptions

Use the same pluralization across org and user pages; recommend “اشتراک‌ها”.

-        headerTitle__subscriptions: 'اشتراک ها',
+        headerTitle__subscriptions: 'اشتراک‌ها',
-        headerTitle__subscriptions: 'اشتراک',
+        headerTitle__subscriptions: 'اشتراک‌ها',

Also applies to: 973-977


277-283: Natural phrasing for “Set as default”

“پیش فرض کنید” sounds imperative; “به‌عنوان پیش‌فرض تنظیم کنید” is clearer.

-        actionLabel__default: 'پیش فرض کنید',
+        actionLabel__default: 'به‌عنوان پیش‌فرض تنظیم کنید',

Also applies to: 955-961

.changeset/complete-persian-localization.md (1)

1-16: Changeset reads well and matches the PR scope

Scope, bump type, and summary align with the actual changes.

Optional: Remove the two trailing spaces in the second bullet to stay Prettier-clean.

-- Adding complete commerce/billing translations  
+- Adding complete commerce/billing translations
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 21c2956 and 479da36.

📒 Files selected for processing (4)
  • .changeset/complete-persian-localization.md (1 hunks)
  • .changeset/small-schools-yell.md (1 hunks)
  • packages/localizations/package.json (1 hunks)
  • packages/localizations/src/fa-IR.ts (17 hunks)
🧰 Additional context used
📓 Path-based instructions (11)
.changeset/**

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

Automated releases must use Changesets.

Files:

  • .changeset/small-schools-yell.md
  • .changeset/complete-persian-localization.md
**/*.{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/package.json
  • packages/localizations/src/fa-IR.ts
packages/*/package.json

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

All publishable packages should be placed under the packages/ directory

packages/*/package.json: All publishable packages must be located in the 'packages/' directory.
All packages must be published under the @clerk namespace on npm.
Semantic versioning must be used across all packages.

Files:

  • packages/localizations/package.json
packages/localizations/**/*

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

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

Files:

  • packages/localizations/package.json
  • packages/localizations/src/fa-IR.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.

Files:

  • packages/localizations/package.json
  • packages/localizations/src/fa-IR.ts
**/*.{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/fa-IR.ts
packages/**/*.{ts,tsx}

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

TypeScript is required for all packages

Files:

  • packages/localizations/src/fa-IR.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/fa-IR.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/fa-IR.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/fa-IR.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/fa-IR.ts

Comment on lines +1 to +2
---
---
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove empty placeholder Changeset file to avoid CI/release noise

This file contains only YAML delimiters with no releases. It’s likely an accidental leftover and may confuse automation.

Please delete this file from the PR.

🤖 Prompt for AI Agents
In .changeset/small-schools-yell.md around lines 1 to 2, the file contains only
empty YAML delimiters and no release entries which can confuse CI/release
tooling; remove this file from the branch/PR (delete
.changeset/small-schools-yell.md) so it is not included in the commit and rerun
CI to confirm no release noise.

@tmilewski tmilewski changed the title Feat/complete persian localization feat(localizations): Persian localization updates Aug 13, 2025
@tmilewski tmilewski self-assigned this Aug 13, 2025
Copy link

pkg-pr-new bot commented Aug 13, 2025

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/elements

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

@clerk/clerk-expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/clerk-react

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

@clerk/react-router

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

@clerk/remix

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/themes

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

@clerk/types

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

@clerk/upgrade

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

@clerk/vue

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

commit: 431c10a

@tmilewski tmilewski merged commit 69622af into clerk:main Aug 13, 2025
15 of 34 checks passed
mwerder pushed a commit to mwerder/clerk-javascript that referenced this pull request Aug 13, 2025
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