Skip to content

Conversation

@Vinnl
Copy link
Collaborator

@Vinnl Vinnl commented Dec 30, 2025

References:

Jira: MNTOR-5145
Figma:

Description

I:

  • removed more some unused code (discovered after tracking down strings from locales-pending that were still in use),
  • moved other strings that were in locales-pending but were still in use after removing Plus code to locales/en, so that they can be localised,
  • removed remaining strings in locales-pending, and
  • removed a bunch of strings in locales/en that I think were no longer in use.

I let an LLM write a few one-off scripts to find these strings. Since the scripts were doing literal string matching, they weren't 100% accurate, so especially for finding unused strings, I was relatively conservative and left a bunch of strings in that I suspected were still in use somewhere. Hopefully I only have false negatives, no false positives.

How to test

Behaviour should be unchanged.

Checklist (Definition of Done)

  • Localization strings (if needed) have been added.
  • Commits in this PR are minimal and have descriptive commit messages.
  • I've added or updated the relevant sections in readme and/or code comments
  • I've added a unit test to test for potential regressions of this bug. - Existing tests should apply
  • If this PR implements a feature flag or experimentation, I've checked that it still works with the flag both on, and with the flag off.
  • If this PR implements a feature flag or experimentation, the Ship Behind Feature Flag status in Jira has been set
  • Product Owner accepted the User Story (demo of functionality completed) or waived the privilege.
  • All acceptance criteria are met.
  • Jira ticket has been updated (if needed) to match changes made during the development process.
  • Jira ticket has been updated (if needed) with suggestions for QA when this PR is deployed to stage.

@Vinnl Vinnl self-assigned this Dec 30, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR performs a comprehensive cleanup of FTL (Fluent Translation List) localization files by removing unused code and reorganizing localization strings. The changes involve removing deprecated Plus subscription features, eliminating unused components, and moving still-active strings from the locales-pending directory to proper localization files.

Key changes:

  • Removed unused React components (SubscriberWaitlistDialog, ProgressBar, DataBrokers) and their associated styles
  • Consolidated localization strings by moving active strings from locales-pending to locales/en and removing unused ones
  • Updated function signatures to remove unnecessary localization parameters where error messages are now string keys

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/db/tables/emailAddresses.ts Removed unused ReactLocalization import and l10n parameter from resetUnverifiedEmailAddress function
src/app/api/utils/email.tsx Updated function call to match new signature without l10n parameter
src/app/components/client/InputField.tsx Updated error icon alt text to use new localization key
src/app/components/client/SubscriberWaitlistDialog.tsx Removed entire waitlist dialog component (no longer needed)
src/app/components/client/SubscriberWaitlistDialog.module.scss Removed styles for deleted waitlist component
src/app/components/client/ProgressBar.tsx Removed entire progress bar component (no longer needed)
src/app/components/client/ProgressBar.module.scss Removed styles for deleted progress bar component
src/app/(proper_react)/(redesign)/Shell/ShellNavbarList.tsx Updated navigation link to use consolidated localization key
src/app/(proper_react)/(redesign)/(public)/TopNavBar.tsx Updated all navigation links to use consolidated localization keys
src/app/(proper_react)/(redesign)/(public)/how-it-works/components/DataBrokers.tsx Removed entire data brokers component (Plus feature cleanup)
locales/en/settings.ftl Moved email address settings strings from pending, removed Plus-specific strings
locales/en/landing-all.ftl Added consolidated navigation link strings
locales/en/how-it-works.ftl Created new file with data breaches content from pending
locales/en/exposure-card.ftl Removed unused exposure type and status strings
locales/en/email-strings.ftl Added email footer strings from pending, removed unused strings
locales/en/dashboard.ftl Added exposure reduction chart strings, removed unused banner strings
locales/en/breaches.ftl Removed extensive breach checklist guidance strings
locales/en/app.ftl Removed numerous unused legacy strings
locales/en/announcements.ftl Created new file with free tier announcement strings
locales/en/unsubscribe.ftl Removed entire unsubscribe flow file
locales/en/add-email.ftl Removed entire add email dialog file
locales-pending/*.ftl Removed all pending localization files (Plus features, onboarding, premium content)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

: parseInt(emailAddressId, 10))
) {
throw new ForbiddenError(l10n.getString("error-email-validation-pending"));
throw new ForbiddenError("error-email-validation-pending");
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The error message has been changed from a localized string to a static key. This error is now thrown with a string key instead of a localized message, which means the error handling code will need to handle localization lookup. Verify that all error handlers consuming this ForbiddenError are updated to treat the message as a localization key rather than a display-ready string.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, this is intentional - other parts of our code are looking for this exact string, so it shouldn't be (and wasn't) localised.

Comment on lines +24 to +35
announcement-add-up-to-20-emails-free-title = Upgrade to { -brand-plus } and monitor up to 20 emails
announcement-add-up-to-20-emails-free-description = { -brand-monitor-plus } gets you more protection. Upgrade to see if any of your email addresses were in a data breach.
announcement-add-up-to-20-emails-free-cta-label = Upgrade
# Variables:
# $emailAddressesCount (string) - number of email addresses allowed for data breach monitoring
announcement-free-data-breach-monitoring-title =
{ $emailAddressesCount ->
*[other] Get free data breach monitoring for up to { $emailAddressesCount } email addresses.
}
announcement-free-data-breach-monitoring-description = Help keep your info safe with data breach monitoring. { -brand-monitor } will alert you if your info appears in a data breach.
announcement-free-data-breach-monitoring-cta-label = Learn more
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@codemist I deleted the other announcement strings (see the locales-pending's announcements.ftl), since I think those were no longer in use, right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

By adding this file to en, we're exposing these strings for localization in all locales. Is that what we want here? Is Monitor Plus open to more locales now?

Copy link
Collaborator

@flodolo flodolo left a comment

Choose a reason for hiding this comment

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

We're exposing a lot of content to localization through this PR, and I'm not sure that's what we want.

P.S. I'm technically OOO this week, so it's unlikely that I will take another look before Monday.

Comment on lines +24 to +35
announcement-add-up-to-20-emails-free-title = Upgrade to { -brand-plus } and monitor up to 20 emails
announcement-add-up-to-20-emails-free-description = { -brand-monitor-plus } gets you more protection. Upgrade to see if any of your email addresses were in a data breach.
announcement-add-up-to-20-emails-free-cta-label = Upgrade
# Variables:
# $emailAddressesCount (string) - number of email addresses allowed for data breach monitoring
announcement-free-data-breach-monitoring-title =
{ $emailAddressesCount ->
*[other] Get free data breach monitoring for up to { $emailAddressesCount } email addresses.
}
announcement-free-data-breach-monitoring-description = Help keep your info safe with data breach monitoring. { -brand-monitor } will alert you if your info appears in a data breach.
announcement-free-data-breach-monitoring-cta-label = Learn more
Copy link
Collaborator

Choose a reason for hiding this comment

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

By adding this file to en, we're exposing these strings for localization in all locales. Is that what we want here? Is Monitor Plus open to more locales now?


# id: add-up-to-20-emails-free

-brand-plus = Plus
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pending an answer to the general question on this file, we should move this brand definition where other terms are defined (at the top of app.ftl).

# the label inside <label_line_2> will be shown in smaller font. Second line of the label
# Variables:
# $nr (number) - % of exposures reduced for the user
exposure-reduction-chart-explanation = <label_line_1>exposures may</label_line_1><label_line_2>be reduced</label_line_2>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where is $nr?

# Variables:
# $support_link (string) - The URL the user can visit for support, e.g. "https://support.mozilla.org"
email-footer-support-content-plain = Visit our Support Center for help:
{ $support_link }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the line break meaningful here?

If it is, this might be more readable. If not, better to put everything on one line.

email-footer-support-content-plain = 
    Visit our Support Center for help:
    { $support_link }

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