Skip to content

Conversation

@vpomerleau
Copy link
Contributor

Because

  • We want to enable customization of the legal terms shown for certain clientIds or services

This pull request

  • Adds LegalTermsConfigurationManager to query legal terms from Strapi by clientId or service identifier
  • Creates GraphQL query, types, and utility classes for legal terms in libs/shared/cms
  • Implements /cms/legal-terms REST endpoint in fxa-auth-server with localization support
  • Integrates FTL translation merging using the same pattern as relying party configs
  • Adds useLegalTermsState() React hook in fxa-settings to fetch legal terms via REST API
  • Updates TermsPrivacyAgreement component to display custom RP legal terms when available
  • Passes legal terms through Integration layer to Signin/Signup/Index pages

Issue that this pull request solves

Closes: FXA-12371

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

@vpomerleau vpomerleau requested a review from vbudhram January 7, 2026 20:12
@vpomerleau vpomerleau marked this pull request as ready for review January 7, 2026 23:58
@vpomerleau vpomerleau requested review from a team as code owners January 7, 2026 23:58
# This item is part of a bulleted list and follows terms-privacy-agreement-intro
# $serviceName (String) - The name of the service (e.g., "Mozilla Subscription Services")
# $serviceName is customizable via Strapi and will be localized separately
terms-privacy-agreement-customized-terms = { $serviceName } <termsLink>Terms of Service</termsLink> and <privacyLink>Privacy Notice</privacyLink>
Copy link
Contributor

Choose a reason for hiding this comment

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

This is going to be awkward to localize and could potentially lead to translation issues. For example in French, "Mozilla Subscription Services" is translated as des services d’abonnement de Mozilla (see string below). With the service names localized, and in a separate project (assuming they'll be localized in the CMS project), it's going to be very difficult to keep things consistent with this sentence structure.
https://pontoon.mozilla.org/fr/mozilla-accounts/all-resources/?search=terms+of+service&search_identifiers=true&string=292330

Les <mozSubscriptionTosLink>conditions d’utilisation</mozSubscriptionTosLink> et la 
<mozSubscriptionPrivacyLink>politique de confidentialité</mozSubscriptionPrivacyLink> 
des services d’abonnement de { -brand-mozilla }

It might be better to refactor this somehow, for example (just brainstorming here):

By proceeding, you agree to the Terms of Service and Privacy Notice for the following:
- Mozilla Subscription Services: <link>Terms of Service</link>, <link>Privacy Notice</link>
- Mozilla Accounts: <link>Terms of Service</link>, <link>Privacy Notice</link>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was wondering about this, I should have looked up how it had been translated for a few locales.

How about:

By continuing, you agree to the following:
- Mozilla Subscription Services: <Terms of Service>, <Privacy Notice>
- Mozilla accounts: <Terms of Service>, <Privacy Notice>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With this format, I imagine we could have separate ids for:
(fxa) By continuing, you agree to the following:
(CMS l10n) Mozilla Subscription Services
(fxa) Terms of Service
(fxa) Privacy Notice
(fxa - can we directly use the brand term?) Mozilla accounts

Copy link
Contributor

Choose a reason for hiding this comment

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

How about:

By continuing, you agree to the following:
- Mozilla Subscription Services: <Terms of Service>, <Privacy Notice>
- Mozilla accounts: <Terms of Service>, <Privacy Notice>

From an l10n perspective that seems fine to me (assuming equates to <link>Terms of Service</link> where Terms of Service would be translated in the string), but I wonder if legal would be okay with that wording?

In terms of structure of the sentence, we'd still want locales to be able to format the term appropriately so we'd need a string still like the below (e.g. French having a half-width space before colon, different comma characters for Japanese, etc.):

terms-privacy-agreement-customized-terms = { $serviceName }: <termsLink>Terms of Service</termsLink>, <privacyLink>Privacy Notice</privacyLink>

I suppose if we needed additional flexibility (e.g. X service only has a Privacy Notice and no Terms of Service) we could use something like Intl.ListFormat to format what comes after { $serviceName }: and localize Terms of Service / Privacy Notice separately.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed an updated version of the strings. Could you take another look @bcolsson ? TY!

Copy link
Contributor

@vbudhram vbudhram left a comment

Choose a reason for hiding this comment

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

@vpomerleau Code looks good 👍🏽 In my local testing its showing the terms and conditions.

Image

Because:

* We want to enable customization of the legal terms shown for certain clientIds or services

This commit:

* Adds `LegalTermsConfigurationManager` to query legal terms from Strapi by `clientId` or `service` identifier
* Creates GraphQL query, types, and utility classes for legal terms in `libs/shared/cms`
* Implements `/cms/legal-terms` REST endpoint in fxa-auth-server with localization support
* Integrates FTL translation merging using the same pattern as relying party configs
* Adds `useLegalTermsState()` React hook in fxa-settings to fetch legal terms via REST API
* Updates `TermsPrivacyAgreement` component to display custom RP legal terms when available
* Passes legal terms through Integration layer to Signin/Signup/Index pages

Closes #FXA-12371
@vpomerleau vpomerleau merged commit e937a6b into main Jan 14, 2026
20 checks passed
@vpomerleau vpomerleau deleted the FXA-12371 branch January 14, 2026 16:13
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.

4 participants