-
Notifications
You must be signed in to change notification settings - Fork 381
feat(localizations): Persian localization updates #6533
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
feat(localizations): Persian localization updates #6533
Conversation
- 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.
🦋 Changeset detectedLatest commit: 431c10a The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
Someone is attempting to deploy a commit to the Clerk Production Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughAdds 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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 listThese 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” titleMissing 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 spaceSame 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 stillundefined
. Please supply Persian translations.- Line 176:
• The literal English connector “at” appears innext6Days
/previous6Days
. Replace it with a Persian equivalent (e.g. “ساعت”).- Lines 440 & 933:
•uploadAction__title: 'Logo'
andactionLabel__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 tofa-IR
; otherwise leave them asen-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 .txtLocalize “Download .txt”.
- actionLabel__download: 'Download .txt', + actionLabel__download: 'دانلود فایل .txt',
441-441
: Untranslated label: LogoLocalize to Persian.
- uploadAction__title: 'Logo', + uploadAction__title: 'لوگو',
654-656
: Fix typo at start of sentence“ستفاده” → “استفاده”.
- 'ستفاده از کلید عبور، هویت شما را تأیید میکند. ممکن است دستگاه از شما اثر انگشت، چهره یا قفل صفحه را درخواست کند.', + 'استفاده از کلید عبور، هویت شما را تأیید میکند. ممکن است دستگاه از شما اثر انگشت، چهره یا قفل صفحه را درخواست کند.',
1075-1077
: Missing حرف اضافه “برای”“رای ثبت نام” → “برای ثبت نام”.
- 'رای ثبت نام در تأیید دو مرحلهای با کد پیامکی، یک شماره تلفن موجود را انتخاب کنید یا یک شماره جدید اضافه کنید.', + 'برای ثبت نام در تأیید دو مرحلهای با کد پیامکی، یک شماره تلفن موجود را انتخاب کنید یا یک شماره جدید اضافه کنید.',
457-457
: Remove double periodEnds 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 spacesThere is a double space in “تأیید دو مرحلهای”.
- title: 'تأیید دو مرحلهای', + title: 'تأیید دو مرحلهای',- title: 'تأیید دو مرحلهای', + title: 'تأیید دو مرحلهای',Also applies to: 1206-1207
176-176
: Localize “at” in date formatKeep 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 titleUse a neutral “Signed in as …” instead of first-person.
- title: 'با نام کاربری {{identifier}} وارد سیستم شدم', + title: 'ورود بهعنوان {{identifier}}',
218-219
: Normalize spacingRemove double space.
- formFieldLabel__backupCode: 'کد پشتیبان', + formFieldLabel__backupCode: 'کد پشتیبان',
872-875
: Natural terminology for password rulesUse “عدد” and “کاراکتر ویژه”.
- requireNumbers: 'یک شماره', - requireSpecialCharacter: 'یک نشانه خاص', + requireNumbers: 'یک عدد', + requireSpecialCharacter: 'یک کاراکتر ویژه',
295-299
: Consistency: plural form of SubscriptionsUse 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 scopeScope, 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
📒 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
Avoidany
type - preferunknown
when type is uncertain, then narrow with type guards
Useinterface
for object shapes that might be extended
Usetype
for unions, primitives, and computed types
Preferreadonly
properties for immutable data structures
Useprivate
for internal implementation details
Useprotected
for inheritance hierarchies
Usepublic
explicitly for clarity in public APIs
Preferreadonly
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
Useconst assertions
for literal types:as const
Usesatisfies
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 ...
Noany
types without justification
Proper error handling with typed errors
Consistent use ofreadonly
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
--- | ||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/elements
@clerk/clerk-expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/clerk-react
@clerk/react-router
@clerk/remix
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/themes
@clerk/types
@clerk/upgrade
@clerk/vue
commit: |
Co-authored-by: hamidreza.gh <[email protected]> Co-authored-by: Tom Milewski <[email protected]>
What changed?
Complete Persian (fa-IR) localization with all missing translations.
Description
This PR completes the Persian localization by:
The Persian localization now provides a complete user experience for Persian-speaking users.
Type of change
Checklist
Impact
This enhancement provides complete Persian language support for Clerk's authentication UI, benefiting Persian-speaking developers and end users.
Summary by CodeRabbit