Skip to content

feat(localizations): Add zh-TW translations#7937

Open
ridemountainpig wants to merge 5 commits intoclerk:mainfrom
ridemountainpig:zh-tw-translations
Open

feat(localizations): Add zh-TW translations#7937
ridemountainpig wants to merge 5 commits intoclerk:mainfrom
ridemountainpig:zh-tw-translations

Conversation

@ridemountainpig
Copy link
Copy Markdown

@ridemountainpig ridemountainpig commented Feb 26, 2026

Description

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

  • Localization

    • Expanded Traditional Chinese (zh-TW) coverage across the product: translations added for API key management, billing/checkout, subscriptions, account/org pages, authentication flows, maintenance/notice text, and UI labels/tables/empty states.
    • Introduced dynamic templates for dates, amounts, plans, identifiers, and expiry info so zh-TW UI shows contextual values.
  • Bug Fixes

    • Restored missing security/error, MFA/reverification, and password/passkey/web3 messages; added password-strength guidance and confirmation copy.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 26, 2026

🦋 Changeset detected

Latest commit: 8e8359e

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

This PR includes changesets to release 3 packages
Name Type
@clerk/localizations Patch
@clerk/ui 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

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 26, 2026

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

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9a610b8f-4103-4fb9-a2ec-970526942489

📥 Commits

Reviewing files that changed from the base of the PR and between db5f928 and 8e8359e.

📒 Files selected for processing (1)
  • .changeset/tangy-things-hide.md

📝 Walkthrough

Walkthrough

The `zh-TW` localization file was updated to replace many previously undefined entries with Traditional Chinese strings across API key management, billing/subscriptions/checkout, account/organization pages, MFA/reverification, authentication/security messages, and UI components. Multiple strings now include interpolation/formatting placeholders (e.g., dates, amounts, plan identifiers). Lines changed: +411/‑401. The exported `zhTW: LocalizationResource` signature remains unchanged.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(localizations): Add zh-TW translations' clearly and directly summarizes the main change in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@lynda0214
Copy link
Copy Markdown

I'm also a developer from Taiwan
Clerk is really powerful, but being lack of complete translations for zh-tw
I hope this PR can be reviewed and merged soon

Copy link
Copy Markdown
Member

@Ephem Ephem left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution, this is a great addition!

I let an agent do a review pass and a few suggestions came up that I've commented on. Since I do not speak the language I rely on your judgement here however, so feel free to resolve these comments however you see fit.

Send a comment when it's all resolved and we'll take another look and likely approve and get this in. The PR will also need a changeset, you can generate one by running pnpm changeset and following the guide, it should be a patch version for the localizations package.

Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>
Copy link
Copy Markdown
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.

♻️ Duplicate comments (1)
packages/localizations/src/zh-TW.ts (1)

77-183: ⚠️ Potential issue | 🟠 Major

Backfill the current base-locale keys that are still missing here.

en-US.ts now defines keys that still do not exist in this zh-TW resource, including formFieldInputPlaceholder__signUpPassword, billing.billedAnnuallyOnly, billing.prorationCredit, billing.accountCredit, billing.payerCreditRemainder, the seat-pricing subtree under billing.pricingTable.seatCost, organizationProfile.start.membershipSeatUsageLabel, organizationProfile.plansPage.alerts.planMembershipLimitExceeded, and itemCaption__payerCredit in both org/user billing statements. Because LocalizationResource is a DeepPartial, these omissions will not be caught by type-checking, so the locale can silently drift out of sync with the current base file. Please add translations or explicit undefined placeholders for the missing keys before merge. (raw.githubusercontent.com)
Based on learnings: in packages/localizations/src/*.ts, undefined values for newly added localization keys are intentional placeholders for future translations.

Also applies to: 213-230, 317-327, 413-416, 453-460, 1118-1128

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/localizations/src/zh-TW.ts` around lines 77 - 183, The zh-TW locale
is missing several keys introduced in en-US; add translations or explicit
undefined placeholders for the following keys (matching the en-US structure)
into packages/localizations/src/zh-TW.ts:
formFieldInputPlaceholder__signUpPassword, billing.billedAnnuallyOnly,
billing.prorationCredit, billing.accountCredit, billing.payerCreditRemainder,
the billing.pricingTable.seatCost subtree (seatCost and its children),
organizationProfile.start.membershipSeatUsageLabel,
organizationProfile.plansPage.alerts.planMembershipLimitExceeded, and
itemCaption__payerCredit for both org and user billing statements; ensure you
place each key under the exact parent object (e.g., billing.*,
billing.pricingTable.seatCost.*, organizationProfile.start.*,
organizationProfile.plansPage.alerts.*, statement itemCaption__payerCredit)
following the existing zh-TW file structure and use either translated strings or
explicit undefined values as placeholders.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@packages/localizations/src/zh-TW.ts`:
- Around line 77-183: The zh-TW locale is missing several keys introduced in
en-US; add translations or explicit undefined placeholders for the following
keys (matching the en-US structure) into packages/localizations/src/zh-TW.ts:
formFieldInputPlaceholder__signUpPassword, billing.billedAnnuallyOnly,
billing.prorationCredit, billing.accountCredit, billing.payerCreditRemainder,
the billing.pricingTable.seatCost subtree (seatCost and its children),
organizationProfile.start.membershipSeatUsageLabel,
organizationProfile.plansPage.alerts.planMembershipLimitExceeded, and
itemCaption__payerCredit for both org and user billing statements; ensure you
place each key under the exact parent object (e.g., billing.*,
billing.pricingTable.seatCost.*, organizationProfile.start.*,
organizationProfile.plansPage.alerts.*, statement itemCaption__payerCredit)
following the existing zh-TW file structure and use either translated strings or
explicit undefined values as placeholders.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1fdffddf-25b9-4382-b057-8f71b128d184

📥 Commits

Reviewing files that changed from the base of the PR and between 5ee3432 and 5259be7.

📒 Files selected for processing (1)
  • packages/localizations/src/zh-TW.ts

Copy link
Copy Markdown
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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/localizations/src/zh-TW.ts`:
- Around line 25-27: The translation uses {{ createdDate }} / {{ expiresDate }}
but the UI supplies positional params (n-based), so update the placeholders in
the keys createdAndExpirationStatus__expiresOn and
createdAndExpirationStatus__never to use the n-param names passed at runtime
(e.g., replace createdDate with n0 and expiresDate with n1) while preserving the
date filters (shortDate/longDate) so the interpolation matches the call site.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1b147b8d-7c33-494f-bb28-771cecffbb7c

📥 Commits

Reviewing files that changed from the base of the PR and between 5259be7 and db5f928.

📒 Files selected for processing (1)
  • packages/localizations/src/zh-TW.ts

@ridemountainpig
Copy link
Copy Markdown
Author

Hello @Ephem, thanks for your review. I updated the comment and generated the changeset, could you please check it again? Thank you.

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