-
Notifications
You must be signed in to change notification settings - Fork 218
feat(cms): Enable legal terms customization via Strapi #19858
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
Conversation
| # 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> |
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.
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>
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.
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>
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.
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
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.
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.
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.
Pushed an updated version of the strings. Could you take another look @bcolsson ? TY!
vbudhram
left a comment
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.
@vpomerleau Code looks good 👍🏽 In my local testing its showing the terms and conditions.
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
Because
This pull request
LegalTermsConfigurationManagerto query legal terms from Strapi byclientIdorserviceidentifierlibs/shared/cms/cms/legal-termsREST endpoint in fxa-auth-server with localization supportuseLegalTermsState()React hook in fxa-settings to fetch legal terms via REST APITermsPrivacyAgreementcomponent to display custom RP legal terms when availableIssue that this pull request solves
Closes: FXA-12371
Checklist
Put an
xin the boxes that applyScreenshots (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.