Bug 1626842 - Migrate browser window title to Fluent, part 1
authorMarcelo Poli <enzomatrix@gmail.com>
Tue, 26 May 2020 06:39:39 +0200
changeset 3323 72adbdc8c6423e88ac19f2ab338f9713115cacb8
parent 3322 1ff6be33e8ac2bec64d99557580caf3de789c896
child 3324 311bbc5c3d35346aa1b0fd2699da4434d7265fd9
push id2274
push userflodolo@mozilla.com
push dateTue, 26 May 2020 04:40:00 +0000
bugs1626842
Bug 1626842 - Migrate browser window title to Fluent, part 1
browser/browser/browser.ftl
--- a/browser/browser/browser.ftl
+++ b/browser/browser/browser.ftl
@@ -1,13 +1,56 @@
 # 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 } (Navegación privada)
+    .data-content-title-default = { $content-title } - { -brand-full-name }
+    .data-content-title-private = { $content-title } - { -brand-full-name } (Navegación privada)
+# 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 } - (Navegación privada)
+    .data-content-title-default = { $content-title }
+    .data-content-title-private = { $content-title } - (Navegación privada)
+# 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 }
+
+##
+
 urlbar-identity-button =
     .aria-label = Ver información del sitio
 
 ## Tooltips for images appearing in the address bar
 
 urlbar-services-notification-anchor =
     .tooltiptext = Abrir panel de mensajes de instalación
 urlbar-web-notification-anchor =
@@ -88,36 +131,33 @@ urlbar-popup-blocked =
 urlbar-autoplay-media-blocked =
     .tooltiptext = Bloqueó los medios de reproducción automática con sonido para este sitio web.
 urlbar-canvas-blocked =
     .tooltiptext = Bloqueó la extracción de datos de canvas para este sitio web.
 urlbar-midi-blocked =
     .tooltiptext = Bloqueó el acceso a MIDI para este sitio web.
 urlbar-install-blocked =
     .tooltiptext = Bloqueó la instalación de complementos para este sitio web.
-
 # Variables
 #   $shortcut (String) - A keyboard shortcut for the edit bookmark command.
 urlbar-star-edit-bookmark =
     .tooltiptext = Editar este marcador ({ $shortcut })
-
 # Variables
 #   $shortcut (String) - A keyboard shortcut for the add bookmark command.
 urlbar-star-add-bookmark =
     .tooltiptext = Marcar esta página ({ $shortcut })
 
 ## Page Action Context Menu
 
 page-action-add-to-urlbar =
     .label = Agregar a la barra de direcciones
 page-action-manage-extension =
     .label = Administrar extensión…
 page-action-remove-from-urlbar =
     .label = Eliminar de la barra de direcciones
-
 page-action-remove-extension =
     .label = Eliminar la extensión
 
 ## Auto-hide Context Menu
 
 full-screen-autohide =
     .label = Ocultar barras de herramientas
     .accesskey = h
@@ -125,43 +165,39 @@ full-screen-exit =
     .label = Salir de pantalla completa
     .accesskey = S
 
 ## Search Engine selection buttons (one-offs)
 
 # This string prompts the user to use the list of one-click search engines in
 # the Urlbar and searchbar.
 search-one-offs-with-title = Esta vez, buscar con:
-
 # This string won't wrap, so if the translated string is longer,
 # consider translating it as if it said only "Search Settings".
 search-one-offs-change-settings-button =
     .label = Cambiar configuración de búsqueda
 search-one-offs-change-settings-compact-button =
     .tooltiptext = Cambiar opciones de búsqueda
-
 search-one-offs-context-open-new-tab =
     .label = Buscar en nueva pestaña
     .accesskey = T
 search-one-offs-context-set-as-default =
     .label = Configurar como buscador predeterminado
     .accesskey = D
 search-one-offs-context-set-as-default-private =
     .label = Establecer como motor de búsqueda predeterminado para ventanas privadas
     .accesskey = P
 
 ## Bookmark Panel
 
 bookmark-panel-show-editor-checkbox =
     .label = Mostrar editor al guardar
     .accesskey = s
-
 bookmark-panel-done-button =
     .label = Listo
-
 # Width of the bookmark panel.
 # Should be large enough to fully display the Done and
 # Cancel/Remove Bookmark buttons.
 bookmark-panel =
     .style = min-width: 23em
 
 ## Identity Panel
 
@@ -226,36 +262,36 @@ browser-window-close-button =
 popup-select-camera =
     .value = Cámara a compartir:
     .accesskey = C
 popup-select-microphone =
     .value = Micrófono a compartir:
     .accesskey = M
 popup-all-windows-shared = Todas las ventanas visibles de su pantalla serán compartidas.
 
+## WebRTC window or screen share tab switch warning
+
+
 ## DevTools F12 popup
 
 enable-devtools-popup-description = Para usar el atajo F12, primero abra DevTools a través del menú de Desarrollador web
 
-
 ## URL Bar
 
 urlbar-default-placeholder =
     .defaultPlaceholder = Buscar o ingresar dirección
 urlbar-placeholder =
     .placeholder = Buscar o ingresar dirección
 urlbar-remote-control-notification-anchor =
     .tooltiptext = El navegador está controlado remotamente
 urlbar-permissions-granted =
     .tooltiptext = Otorgó a este sitio web permisos adicionales.
 urlbar-switch-to-tab =
     .value = Cambiar a pestaña:
-
 # Used to indicate that a selected autocomplete entry is provided by an extension.
 urlbar-extension =
     .value = Extensión:
-
 urlbar-go-button =
     .tooltiptext = Ir a la dirección de la barra de direcciones
 urlbar-page-action-button =
     .tooltiptext = Acciones de página
 urlbar-pocket-button =
     .tooltiptext = Guardar en { -pocket-brand-name }