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
This commit is contained in:
Artem 2020-04-09 06:14:25 +00:00
Родитель 667d022b80
Коммит c864bc38f7
5 изменённых файлов: 55 добавлений и 14 удалений

Просмотреть файл

@ -15,24 +15,24 @@
<vbox class="panel-subview-body">
<toolbarbutton id="allTabsMenu-undoCloseTab"
class="subviewbutton subviewbutton-iconic"
label="&undoCloseTab.label;"
data-l10n-id="all-tabs-menu-undo-close-tab"
key="key_undoCloseTab"
command="History:UndoCloseTab"/>
<toolbarbutton id="allTabsMenu-searchTabs"
class="subviewbutton subviewbutton-iconic"
oncommand="gTabsPanel.searchTabs();"
label="&allTabsMenu.searchTabs.label;"/>
data-l10n-id="all-tabs-menu-search-tabs"/>
<toolbarbutton id="allTabsMenu-containerTabsButton"
class="subviewbutton subviewbutton-nav"
closemenu="none"
oncommand="PanelUI.showSubView('allTabsMenu-containerTabsView', this);"
label="&newUserContext.label;"/>
data-l10n-id="all-tabs-menu-new-user-context"/>
<toolbarseparator id="allTabsMenu-hiddenTabsSeparator"/>
<toolbarbutton id="allTabsMenu-hiddenTabsButton"
class="subviewbutton subviewbutton-nav"
closemenu="none"
oncommand="PanelUI.showSubView('allTabsMenu-hiddenTabsView', this);"
label="&hiddenTabs.label;" />
data-l10n-id="all-tabs-menu-hidden-tabs"/>
<toolbarseparator id="allTabsMenu-tabsSeparator"/>
<vbox id="allTabsMenu-allTabsViewTabs" class="panel-subview-body"/>
</vbox>
@ -46,8 +46,7 @@
<vbox class="panel-subview-body">
<toolbarseparator class="container-tabs-submenu-separator"/>
<toolbarbutton class="subviewbutton"
label="&manageUserContext.label;"
accesskey="&manageUserContext.accesskey;"
data-l10n-id="all-tabs-menu-manage-user-context"
command="Browser:OpenAboutContainers"/>
</vbox>
</panelview>

Просмотреть файл

@ -82,6 +82,7 @@
<link rel="localization" href="browser/appmenu.ftl"/>
<link rel="localization" href="preview/interventions.ftl"/>
<link rel="localization" href="browser/sidebarMenu.ftl"/>
<link rel="localization" href="browser/allTabsMenu.ftl"/>
<title>&mainWindow.title;</title>

Просмотреть файл

@ -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

Просмотреть файл

@ -27,13 +27,8 @@ that this is a lightweight and reversible action that keeps your tab where you
can reach it easily. -->
<!ENTITY pinTab.label "Pin Tab">
<!ENTITY unpinTab.label "Unpin Tab">
<!ENTITY undoCloseTab.label "Undo Close Tab">
<!ENTITY hiddenTabs.label "Hidden Tabs">
<!ENTITY listAllTabs.label "List all tabs">
<!-- LOCALIZATION NOTE (allTabsMenu.searchTabs.label): "Search" is a verb, as
in "Search through tabs". -->
<!ENTITY allTabsMenu.searchTabs.label "Search Tabs">
<!ENTITY tabCmd.label "New Tab">
<!ENTITY openFileCmd.label "Open File…">
@ -152,9 +147,6 @@ this container is a toolbar. This avoids double-speaking. -->
<!ENTITY webDeveloperMenu.label "Web Developer">
<!ENTITY newUserContext.label "New Container Tab">
<!ENTITY manageUserContext.label "Manage Containers">
<!ENTITY manageUserContext.accesskey "O">
<!ENTITY newNavigatorCmd.label "New Window">
<!ENTITY newPrivateWindow.label "New Private Window">

Просмотреть файл

@ -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"))