зеркало из https://github.com/mozilla/gecko-dev.git
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 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
fd1ef47bde
Коммит
53ffd7288a
|
@ -973,10 +973,12 @@
|
|||
|
||||
if (title) {
|
||||
return {
|
||||
id: "browser-main-window-content-title",
|
||||
id:
|
||||
mode == "private"
|
||||
? "browser-main-window-content-title-private"
|
||||
: "browser-main-window-content-title-default",
|
||||
args: {
|
||||
title,
|
||||
mode,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
@ -18,21 +18,32 @@ browser-main-window-title = { $mode ->
|
|||
*[default] { -brand-full-name }
|
||||
}
|
||||
|
||||
# This is the default window title in case there is a content
|
||||
# title to be displayed.
|
||||
#
|
||||
# Depending on the $mode, the string will look like this (in en-US):
|
||||
#
|
||||
# "default" - "Example Title - Mozilla Firefox"
|
||||
# "private" - "Example Title - Mozilla Firefox (Private Browsing)"
|
||||
#
|
||||
# Variables
|
||||
# $mode (String) - "private" in case of a private browsing mode, "default" otherwise.
|
||||
# $title (String) - Content title string.
|
||||
browser-main-window-content-title = { $mode ->
|
||||
[private] { $title } - { -brand-full-name } (Private Browsing)
|
||||
*[default] { $title } - { -brand-full-name }
|
||||
}
|
||||
## This is the default window title in case there is content
|
||||
## title to be displayed.
|
||||
##
|
||||
## On macOS the title doesn't include the brand name, on all other
|
||||
## platforms it does.
|
||||
##
|
||||
## For example, in private mode on Windows, the title will be:
|
||||
## "Example Title - Mozilla Firefox (Private Browsing)"
|
||||
##
|
||||
## while on macOS in default mode it will be:
|
||||
## "Example Title"
|
||||
##
|
||||
## Variables
|
||||
## $title (String) - Content title string.
|
||||
|
||||
browser-main-window-content-title-default = { PLATFORM() ->
|
||||
[macos] { $title }
|
||||
*[other] { $title } - { -brand-full-name }
|
||||
}
|
||||
|
||||
browser-main-window-content-title-private = { PLATFORM() ->
|
||||
[macos] { $title } - (Private Browsing)
|
||||
*[other] { $title } - { -brand-full-name } (Private Browsing)
|
||||
}
|
||||
|
||||
##
|
||||
|
||||
urlbar-identity-button =
|
||||
.aria-label = View site information
|
||||
|
|
|
@ -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")
|
||||
)
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче