Bug 1626842 - Migrate browser window title to Fluent, part 2
authorAnas Husseini <linux.anas@gmail.com>
Tue, 26 May 2020 06:33:45 +0200
changeset 1961 24740b3ebbe86608fbbbee55294d4391912241ea
parent 1960 36f798058e79c60f79c3928632e919ee36464254
child 1962 7db8c46dcdbc4436782578f1827b1094d00fd728
push id987
push userflodolo@mozilla.com
push dateTue, 26 May 2020 04:34:06 +0000
bugs1626842
Bug 1626842 - Migrate browser window title to Fluent, part 2
browser/browser/browser.ftl
--- a/browser/browser/browser.ftl
+++ b/browser/browser/browser.ftl
@@ -1,15 +1,48 @@
 # 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/.
 
 
 ## The main browser window's title
 
+# These are the default window titles everywhere except macOS. The first two
+# attributes are used when the web content opened has no title:
+#
+# default - "Mozilla Firefox"
+# private - "Mozilla Firefox (Private Browsing)"
+#
+# The last two are for use when there *is* a content title.
+# Variables:
+#  $content-title (String): the title of the web content.
+browser-main-window =
+    .data-title-default = { -brand-full-name }
+    .data-title-private = { -brand-full-name } (التصفح الخاص)
+    .data-content-title-default = { $content-title } - { -brand-full-name }
+    .data-content-title-private = { $content-title } - { -brand-full-name } (التصفح الخاص)
+# These are the default window titles on macOS. The first two are for use when
+# there is no content title:
+#
+# "default" - "Mozilla Firefox"
+# "private" - "Mozilla Firefox - (Private Browsing)"
+#
+# The last two are for use when there *is* a content title.
+# Do not use the brand name in the last two attributes, as we do on non-macOS.
+#
+# Also note the other subtle difference here: we use a `-` to separate the
+# brand name from `(Private Browsing)`, which does not happen on other OSes.
+#
+# Variables:
+#  $content-title (String): the title of the web content.
+browser-main-window-mac =
+    .data-title-default = { -brand-full-name }
+    .data-title-private = { -brand-full-name } - (التصفح الخاص)
+    .data-content-title-default = { $content-title }
+    .data-content-title-private = { $content-title } - (التصفح الخاص)
 # This gets set as the initial title, and is overridden as soon as we start
 # updating the titlebar based on loaded tabs or private browsing state.
 # This should match the `data-title-default` attribute in both
 # `browser-main-window` and `browser-main-window-mac`.
 browser-main-window-title = { -brand-full-name }
 
 ##