Bug 1967342 - Add preview update string for existing user TOU infobar r=fluent-reviewers,omc-reviewers,bolsson,pdahiya

Add preview string for use in TOU infobar

Differential Revision: https://phabricator.services.mozilla.com/D250273
This commit is contained in:
Meg Viar
2025-05-20 20:18:21 +00:00
committed by mviar@mozilla.com
parent 010aacb03a
commit 48389d49cb
5 changed files with 23 additions and 6 deletions

View File

@@ -17,6 +17,12 @@ const TYPES = {
GLOBAL: "global",
};
const FTL_FILES = [
"browser/newtab/asrouter.ftl",
"browser/defaultBrowserNotification.ftl",
"preview/termsOfUse.ftl",
];
class InfoBarNotification {
constructor(message, dispatch) {
this._dispatch = dispatch;
@@ -222,10 +228,7 @@ export const InfoBar = {
},
maybeInsertFTL(win) {
win.MozXULElement.insertFTLIfNeeded("browser/newtab/asrouter.ftl");
win.MozXULElement.insertFTLIfNeeded(
"browser/defaultBrowserNotification.ftl"
);
FTL_FILES.forEach(path => win.MozXULElement.insertFTLIfNeeded(path));
},
async showNotificationAllWindows(notification) {

View File

@@ -1574,11 +1574,15 @@ const MESSAGES = () => [
id: "UNIVERSAL_INFOBAR_WITH_EMBEDDED_LINKS",
content: {
text: [
"Read the release notes ",
{
raw: "here. ",
string_id: "existing-user-tou-update",
},
" - Read the release notes ",
{
raw: "here",
href: "https://www.mozilla.org/en-US/firefox/releases/",
},
". ",
{
string_id: "cookie-banner-blocker-onboarding-learn-more",
href: "https://mozilla.org/privacy/firefox/?v=product",

View File

@@ -205,6 +205,7 @@ export class _RemoteL10n {
"browser/defaultBrowserNotification.ftl",
"browser/newtab/asrouter.ftl",
"toolkit/branding/brandings.ftl",
"preview/termsOfUse.ftl",
],
false
);

View File

@@ -0,0 +1,8 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
## Existing User Terms of Use InfoBar
# This text will be bolded and precedes the full infobar message. "Update" is a noun, not a verb. The infobar isn't asking users to update Firebox, but rather informing them that we have updated our terms of use.
existing-user-tou-update = <strong>Update</strong>

View File

@@ -20,6 +20,7 @@
preview/linkPreview.ftl (../locales-preview/linkPreview.ftl)
preview/smartTabGroups.ftl (../locales-preview/smartTabGroups.ftl)
preview/taskbartabs.ftl (../locales-preview/taskbartabs.ftl)
preview/termsOfUse.ftl (../locales-preview/termsOfUse.ftl)
@AB_CD@.jar:
% locale browser @AB_CD@ %locale/browser/