forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1854425 - Migrate WDBA .ini files to Fluent r=nrishel,fluent-revi…
…ewers,flod Differential Revision: https://phabricator.services.mozilla.com/D189144
- Loading branch information
1 parent
46c52f6
commit bdefd9a
Showing
11 changed files
with
264 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
browser/locales/en-US/browser/backgroundtasks/defaultagent.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# 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/. | ||
|
||
default-browser-agent-task-description = The Default Browser Agent task checks when the default changes from { -brand-short-name } to another browser. If the change happens under suspicious circumstances, it will prompt users to change back to { -brand-short-name } no more than two times. This task is installed automatically by { -brand-short-name }, and is reinstalled when { -brand-short-name } updates. To disable this task, update the “default-browser-agent.enabled” preference on the about:config page or the { -brand-short-name } enterprise policy setting “DisableDefaultBrowserAgent”. | ||
default-browser-notification-header-text = Keep using { -brand-short-name }? | ||
default-browser-notification-body-text = Your default browser was recently changed. Tap to restore { -brand-short-name } to default. | ||
default-browser-notification-yes-button-text = Yes | ||
default-browser-notification-no-button-text = No |
12 changes: 0 additions & 12 deletions
12
browser/locales/en-US/defaultagent/defaultagent_localized.ini
This file was deleted.
Oops, something went wrong.
58 changes: 58 additions & 0 deletions
58
python/l10n/fluent_migrations/bug_1854425_default_agent.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Any copyright is dedicated to the Public Domain. | ||
# http://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
import fluent.syntax.ast as FTL | ||
from fluent.migrate.helpers import TERM_REFERENCE | ||
from fluent.migrate.transforms import REPLACE, COPY | ||
|
||
|
||
def migrate(ctx): | ||
"""Bug 1854425 - Migrate defaultagent_localized.ini to Fluent, part {index}.""" | ||
|
||
source = "browser/defaultagent/defaultagent_localized.ini" | ||
target = "browser/browser/backgroundtasks/defaultagent.ftl" | ||
|
||
ctx.add_transforms( | ||
target, | ||
target, | ||
[ | ||
FTL.Message( | ||
id=FTL.Identifier("default-browser-agent-task-description"), | ||
value=REPLACE( | ||
source, | ||
"DefaultBrowserAgentTaskDescription", | ||
{ | ||
"%MOZ_APP_DISPLAYNAME%": TERM_REFERENCE("brand-short-name"), | ||
}, | ||
), | ||
), | ||
FTL.Message( | ||
id=FTL.Identifier("default-browser-notification-header-text"), | ||
value=REPLACE( | ||
source, | ||
"DefaultBrowserNotificationHeaderText", | ||
{ | ||
"%MOZ_APP_DISPLAYNAME%": TERM_REFERENCE("brand-short-name"), | ||
}, | ||
), | ||
), | ||
FTL.Message( | ||
id=FTL.Identifier("default-browser-notification-body-text"), | ||
value=REPLACE( | ||
source, | ||
"DefaultBrowserNotificationBodyText", | ||
{ | ||
"%MOZ_APP_DISPLAYNAME%": TERM_REFERENCE("brand-short-name"), | ||
}, | ||
), | ||
), | ||
FTL.Message( | ||
id=FTL.Identifier("default-browser-notification-yes-button-text"), | ||
value=COPY(source, "DefaultBrowserNotificationYesButtonText"), | ||
), | ||
FTL.Message( | ||
id=FTL.Identifier("default-browser-notification-no-button-text"), | ||
value=COPY(source, "DefaultBrowserNotificationNoButtonText"), | ||
), | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.