Skip to content

fix(localizations): keep the apostrophe in the fr-FR legal consent link - #10089

Closed
chanido wants to merge 2 commits into
clerk:mainfrom
chanido:fix/fr-fr-legal-consent-apostrophe
Closed

chanido wants to merge 2 commits into
clerk:mainfrom
chanido:fix/fr-fr-legal-consent-apostrophe

Conversation

@chanido

@chanido chanido commented Oct 6, 2026 •

Copy link
Copy Markdown

Description

In fr-FR, the legal consent checkbox renders its Terms of Service link as "Conditions dutilisation", without the apostrophe.

signUp.legalConsent.checkbox.label__termsOfServiceAndPrivacyPolicy writes the link label as link("Conditions d'utilisation"). getModifierWithParams in packages/ui/src/localization/applyTokensToString.ts splits the modifier arguments and runs p.replace(/['"]+/g, '') on each of them, which removes every ' and " in the label rather than just the delimiting pair, so the apostrophe is gone before link() builds the markdown.

This changes that one character to the typographic apostrophe ’, which the parser leaves intact. It is the only link("…") label in the package with a straight quote inside.

To reproduce: <SignUp /> with frFR from @clerk/localizations, legal consent enabled, Terms of Service and Privacy Policy URLs set. The checkbox reads "J'accepte les Conditions dutilisation et la Politique de confidentialité." Same in the published 4.21.2. In the clerk-js sandbox (pnpm dev:sandbox, /sign-up, localization frFR) the link reads "Conditions dutilisation" on main and "Conditions d’utilisation" with this change.
fr-FR-consent-before-after

Note: the parser will still strip a quote inside any future label, and a comma inside a label splits it in two. If you want it, I can follow up with a fix(ui) that strips only the surrounding quote pair, with a case in __tests__/applyTokensToString.test.ts.

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:

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 6, 2026 11:54
@changeset-bot

changeset-bot Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c8493ff

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

vercel Bot commented Oct 6, 2026

Copy link
Copy Markdown

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

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Repository YAML (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 759fa7ef-18aa-417c-8b11-dfd682ab4818
📥 Commits

Reviewing files that changed from the base of the PR and between d6d0863 and c8493ff.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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: Advanced
  • Run ID: 3e09a27a-073e-408b-b5c4-e44924cfc552
📥 Commits

Reviewing files that changed from the base of the PR and between 2a82276 and d6d0863.

📒 Files selected for processing (1)
  • .changeset/fr-fr-legal-consent-apostrophe.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The French legal-consent Terms of Service fallback label now uses a typographic apostrophe. The privacy-policy fallback is unchanged. A patch changeset records the update.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to d6d08

The French Terms-of-Service label now retains its apostrophe in the link text, without changing the privacy-policy label. No actionable merge-blocking risk remains.

Architecture Summary

Architecture risk: 🔵 Low · up to d6d08

The change affects 1 system.

Changed systems: packages/localizations

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — packages/localizations (library) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in packages/localizations/src/fr-FR.ts: Updated the legal-consent terms-of-service link fallback from an ASCII apostrophe to a typographic apostrophe; the privacy-policy fallback is unchanged.
  • observed — Modified behavior in .changeset/fr-fr-legal-consent-apostrophe.md: Adds a patch changeset for @clerk/localizations describing the fr-FR legal-consent link-label apostrophe change.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the fix to the apostrophe in the fr-FR legal-consent link.
Description check ✅ Passed The description explains the missing apostrophe, the localization change, and how to reproduce the issue.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The changeset includes implementation details contrary to the repository’s changelog convention.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Corrects the missing apostrophe in the French legal-consent link.

Changes:

  • Uses a typographic apostrophe preserved by the localization parser.
  • Adds a patch changeset.
File Description
packages/​localizations/​src/​fr-FR.ts Corrects the French link label.
.changeset/​fr-fr-legal-consent-apostrophe.md Documents the patch release.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .changeset/fr-fr-legal-consent-apostrophe.md Outdated
The label inside link("…") in
signUp.legalConsent.checkbox.label__termsOfServiceAndPrivacyPolicy used a
straight apostrophe. The modifier parser in @clerk/ui strips it together
with the quotes around the label, so the checkbox rendered
"Conditions dutilisation". Use the typographic apostrophe (’), which the
parser leaves intact.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@alexcarpenter

Copy link
Copy Markdown
Member

Thanks so much for reporting this and putting up a fix, @chanido! Your PR helped us track down the root cause: the localization parser in @clerk/ui was stripping quote characters from modifier params, so any link("…") label containing an apostrophe would lose it, not just this fr-FR string. We're fixing it in the parser in #10091, which keeps the existing fr-FR string rendering correctly as "Conditions d'utilisation", so I'm closing this one in favor of that. Really appreciate the contribution 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants