feat(localizations): Add zh-TW translations#7937
feat(localizations): Add zh-TW translations#7937ridemountainpig wants to merge 5 commits intoclerk:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 8e8359e The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
|
@ridemountainpig is attempting to deploy a commit to the Clerk Production Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe `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)
✏️ 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. Comment |
|
I'm also a developer from Taiwan |
Ephem
left a comment
There was a problem hiding this comment.
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>
There was a problem hiding this comment.
♻️ Duplicate comments (1)
packages/localizations/src/zh-TW.ts (1)
77-183:⚠️ Potential issue | 🟠 MajorBackfill the current base-locale keys that are still missing here.
en-US.tsnow defines keys that still do not exist in thiszh-TWresource, includingformFieldInputPlaceholder__signUpPassword,billing.billedAnnuallyOnly,billing.prorationCredit,billing.accountCredit,billing.payerCreditRemainder, the seat-pricing subtree underbilling.pricingTable.seatCost,organizationProfile.start.membershipSeatUsageLabel,organizationProfile.plansPage.alerts.planMembershipLimitExceeded, anditemCaption__payerCreditin both org/user billing statements. BecauseLocalizationResourceis aDeepPartial, 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 explicitundefinedplaceholders for the missing keys before merge. (raw.githubusercontent.com)
Based on learnings: inpackages/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
📒 Files selected for processing (1)
packages/localizations/src/zh-TW.ts
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
packages/localizations/src/zh-TW.ts
|
Hello @Ephem, thanks for your review. I updated the comment and generated the changeset, could you please check it again? Thank you. |
Description
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
Localization
Bug Fixes