From c864bc38f7077d064bc26c00e6a7deebf2250251 Mon Sep 17 00:00:00 2001 From: Artem Date: Thu, 9 Apr 2020 06:14:25 +0000 Subject: [PATCH] Bug 1609563 - Migrate browser-allTabsMenu.inc.xhtml to Fluent r=fluent-reviewers,mconley,flod Differential Revision: https://phabricator.services.mozilla.com/D70238 --HG-- extra : moz-landing-system : lando --- .../content/browser-allTabsMenu.inc.xhtml | 11 ++++--- browser/base/content/browser.xhtml | 1 + browser/locales/en-US/browser/allTabsMenu.ftl | 20 +++++++++++++ .../locales/en-US/chrome/browser/browser.dtd | 8 ----- .../bug_1609563_allTabsMenu.py | 29 +++++++++++++++++++ 5 files changed, 55 insertions(+), 14 deletions(-) create mode 100644 browser/locales/en-US/browser/allTabsMenu.ftl create mode 100644 python/l10n/fluent_migrations/bug_1609563_allTabsMenu.py diff --git a/browser/base/content/browser-allTabsMenu.inc.xhtml b/browser/base/content/browser-allTabsMenu.inc.xhtml index 05506b5805d1..9df828d0d7a8 100644 --- a/browser/base/content/browser-allTabsMenu.inc.xhtml +++ b/browser/base/content/browser-allTabsMenu.inc.xhtml @@ -15,24 +15,24 @@ + data-l10n-id="all-tabs-menu-search-tabs"/> + data-l10n-id="all-tabs-menu-new-user-context"/> + data-l10n-id="all-tabs-menu-hidden-tabs"/> @@ -46,8 +46,7 @@ diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml index e9ec581d5a4a..21f3ff49dbab 100644 --- a/browser/base/content/browser.xhtml +++ b/browser/base/content/browser.xhtml @@ -82,6 +82,7 @@ + &mainWindow.title; diff --git a/browser/locales/en-US/browser/allTabsMenu.ftl b/browser/locales/en-US/browser/allTabsMenu.ftl new file mode 100644 index 000000000000..c3058b648908 --- /dev/null +++ b/browser/locales/en-US/browser/allTabsMenu.ftl @@ -0,0 +1,20 @@ +# 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/. + +all-tabs-menu-undo-close-tab = + .label = Undo Close Tab + +# "Search" is a verb, as in "Search through tabs". +all-tabs-menu-search-tabs = + .label = Search Tabs + +all-tabs-menu-new-user-context = + .label = New Container Tab + +all-tabs-menu-hidden-tabs = + .label = Hidden Tabs + +all-tabs-menu-manage-user-context = + .label = Manage Containers + .accesskey = o diff --git a/browser/locales/en-US/chrome/browser/browser.dtd b/browser/locales/en-US/chrome/browser/browser.dtd index aa9957f3eac1..b0b43569cd80 100644 --- a/browser/locales/en-US/chrome/browser/browser.dtd +++ b/browser/locales/en-US/chrome/browser/browser.dtd @@ -27,13 +27,8 @@ that this is a lightweight and reversible action that keeps your tab where you can reach it easily. --> - - - - @@ -152,9 +147,6 @@ this container is a toolbar. This avoids double-speaking. --> - - - diff --git a/python/l10n/fluent_migrations/bug_1609563_allTabsMenu.py b/python/l10n/fluent_migrations/bug_1609563_allTabsMenu.py new file mode 100644 index 000000000000..0001230d22c3 --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1609563_allTabsMenu.py @@ -0,0 +1,29 @@ +# 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 1609563 - Migrate browser-allTabsMenu.inc.xhtml to Fluent, part {index}.""" + + ctx.add_transforms( + "browser/browser/allTabsMenu.ftl", + "browser/browser/allTabsMenu.ftl", + transforms_from( +""" +all-tabs-menu-undo-close-tab = + .label = { COPY(from_path, "undoCloseTab.label") } +all-tabs-menu-search-tabs = + .label = { COPY(from_path, "allTabsMenu.searchTabs.label") } +all-tabs-menu-new-user-context = + .label = { COPY(from_path, "newUserContext.label") } +all-tabs-menu-hidden-tabs = + .label = { COPY(from_path, "hiddenTabs.label") } +all-tabs-menu-manage-user-context = + .label = { COPY(from_path, "manageUserContext.label") } + .accesskey = { COPY(from_path, "manageUserContext.accesskey") } +""", from_path="browser/chrome/browser/browser.dtd"))