This repository has been archived by the owner on Aug 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1613801 - Don't include brand name in the window title on Mac. r=…
…fluent-reviewers,flod,Gijs Differential Revision: https://phabricator.services.mozilla.com/D62391
- Loading branch information
Zibi Braniecki
committed
Feb 17, 2020
1 parent
29f983b
commit 1dc9143
Showing
3 changed files
with
61 additions
and
17 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
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
31 changes: 31 additions & 0 deletions
31
python/l10n/fluent_migrations/bug_1613801_window_title_mac.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,31 @@ | ||
# coding=utf8 | ||
|
||
# Any copyright is dedicated to the Public Domain. | ||
# http://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
from __future__ import absolute_import | ||
import fluent.syntax.ast as FTL | ||
from fluent.migrate.helpers import transforms_from | ||
|
||
|
||
def migrate(ctx): | ||
"""Bug 1613801 - Don't include brand name in the window title on Mac., part {index}.""" | ||
|
||
ctx.add_transforms( | ||
'browser/browser/browser.ftl', | ||
'browser/browser/browser.ftl', | ||
transforms_from( | ||
""" | ||
browser-main-window-content-title-default = { PLATFORM() -> | ||
[macos] { $title } | ||
*[other] { $title } - { -brand-full-name } | ||
} | ||
browser-main-window-content-title-private = { PLATFORM() -> | ||
[macos] { $title } - {COPY(from_path, "mainWindow.titlePrivateBrowsingSuffix", trim:"True")} | ||
*[other] { $title } - { -brand-full-name } {COPY(from_path, "mainWindow.titlePrivateBrowsingSuffix", trim:"True")} | ||
} | ||
""", from_path="browser/chrome/browser/browser.dtd") | ||
) | ||
|
||
|