зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1609557 - Migrate placesContextMenu.inc.xhtml to Fluent. r=fluent-reviewers,flod,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D68733 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a9cd50a889
Коммит
ef534a1b06
|
@ -83,6 +83,7 @@
|
|||
<link rel="localization" href="preview/interventions.ftl"/>
|
||||
<link rel="localization" href="browser/sidebarMenu.ftl"/>
|
||||
<link rel="localization" href="browser/allTabsMenu.ftl"/>
|
||||
<link rel="localization" href="browser/places.ftl"/>
|
||||
|
||||
<title>&mainWindow.title;</title>
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
<?xml-stylesheet href="chrome://browser/skin/places/sidebar.css"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
|
||||
%placesDTD;
|
||||
<!ENTITY % editMenuDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
|
||||
%editMenuDTD;
|
||||
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
|
||||
|
@ -34,6 +32,7 @@
|
|||
|
||||
<linkset>
|
||||
<html:link rel="localization" href="toolkit/global/textActions.ftl"/>
|
||||
<html:link rel="localization" href="browser/places.ftl"/>
|
||||
</linkset>
|
||||
|
||||
#include placesCommands.inc.xhtml
|
||||
|
@ -42,7 +41,8 @@
|
|||
|
||||
<hbox id="sidebar-search-container" align="center">
|
||||
<search-textbox id="search-box" flex="1"
|
||||
placeholder="&bookmarksSearch.placeholder;"
|
||||
data-l10n-id="places-bookmarks-search"
|
||||
data-l10n-attrs="placeholder"
|
||||
aria-controls="bookmarks-view"
|
||||
oncommand="searchBookmarks(this.value);"/>
|
||||
</hbox>
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
<?xml-stylesheet href="chrome://browser/skin/places/sidebar.css"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
|
||||
%placesDTD;
|
||||
<!ENTITY % editMenuDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
|
||||
%editMenuDTD;
|
||||
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
|
||||
|
@ -35,6 +33,7 @@
|
|||
|
||||
<linkset>
|
||||
<html:link rel="localization" href="toolkit/global/textActions.ftl"/>
|
||||
<html:link rel="localization" href="browser/places.ftl"/>
|
||||
</linkset>
|
||||
|
||||
#include placesCommands.inc.xhtml
|
||||
|
@ -51,29 +50,31 @@
|
|||
|
||||
<hbox id="sidebar-search-container">
|
||||
<search-textbox id="search-box" flex="1"
|
||||
placeholder="&historySearch.placeholder;"
|
||||
data-l10n-id="places-history-search"
|
||||
data-l10n-attrs="placeholder"
|
||||
aria-controls="historyTree"
|
||||
oncommand="searchHistory(this.value);"/>
|
||||
<button id="viewButton" style="min-width:0px !important;" type="menu"
|
||||
label="&view.label;" accesskey="&view.accesskey;" selectedsort="day"
|
||||
data-l10n-id="places-view" selectedsort="day"
|
||||
persist="selectedsort">
|
||||
<menupopup>
|
||||
<menuitem id="bydayandsite" label="&byDayAndSite.label;"
|
||||
accesskey="&byDayAndSite.accesskey;" type="radio"
|
||||
<menuitem id="bydayandsite"
|
||||
data-l10n-id="places-by-day-and-site" type="radio"
|
||||
oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'dayandsite'); GroupBy('dayandsite');"/>
|
||||
<menuitem id="bysite" label="&bySite.label;"
|
||||
accesskey="&bySite.accesskey;" type="radio"
|
||||
<menuitem id="bysite"
|
||||
data-l10n-id="places-by-site"
|
||||
type="radio"
|
||||
oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'site'); GroupBy('site');"/>
|
||||
<menuitem id="byday" label="&byDate.label;"
|
||||
accesskey="&byDate.accesskey;"
|
||||
<menuitem id="byday"
|
||||
data-l10n-id="places-by-date"
|
||||
type="radio"
|
||||
oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'day'); GroupBy('day');"/>
|
||||
<menuitem id="byvisited" label="&byMostVisited.label;"
|
||||
accesskey="&byMostVisited.accesskey;"
|
||||
<menuitem id="byvisited"
|
||||
data-l10n-id="places-by-most-visited"
|
||||
type="radio"
|
||||
oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'visited'); GroupBy('visited');"/>
|
||||
<menuitem id="bylastvisited" label="&byLastVisited.label;"
|
||||
accesskey="&byLastVisited.accesskey;"
|
||||
<menuitem id="bylastvisited"
|
||||
data-l10n-id="places-by-last-visited"
|
||||
type="radio"
|
||||
oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'lastvisited'); GroupBy('lastvisited');"/>
|
||||
</menupopup>
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
<linkset>
|
||||
<html:link rel="localization" href="toolkit/global/textActions.ftl"/>
|
||||
<html:link rel="localization" href="browser/browserSets.ftl"/>
|
||||
<html:link rel="localization" href="browser/places.ftl"/>
|
||||
<html:link rel="localization" href="browser/downloads.ftl"/>
|
||||
<html:link rel="localization" href="browser/editBookmarkOverlay.ftl"/>
|
||||
</linkset>
|
||||
|
@ -176,16 +177,13 @@
|
|||
<menupopup id="organizeButtonPopup">
|
||||
<menuitem id="newbookmark"
|
||||
command="placesCmd_new:bookmark"
|
||||
label="&cmd.new_bookmark.label;"
|
||||
accesskey="&cmd.new_bookmark.accesskey;"/>
|
||||
data-l10n-id="places-new-bookmark"/>
|
||||
<menuitem id="newfolder"
|
||||
command="placesCmd_new:folder"
|
||||
label="&cmd.new_folder.label;"
|
||||
accesskey="&cmd.new_folder.accesskey;"/>
|
||||
data-l10n-id="places-new-folder"/>
|
||||
<menuitem id="newseparator"
|
||||
command="placesCmd_new:separator"
|
||||
label="&cmd.new_separator.label;"
|
||||
accesskey="&cmd.new_separator.accesskey;"/>
|
||||
data-l10n-id="places-new-separator"/>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<menuseparator id="orgDeleteSeparator"/>
|
||||
|
|
|
@ -12,64 +12,55 @@
|
|||
onpopuphiding="this._view.destroyContextMenu();">
|
||||
<menuitem id="placesContext_open"
|
||||
command="placesCmd_open"
|
||||
label="&cmd.open.label;"
|
||||
accesskey="&cmd.open.accesskey;"
|
||||
data-l10n-id="places-open"
|
||||
default="true"
|
||||
selectiontype="single"
|
||||
selection="link"
|
||||
forcehideintabbrowser="true"/>
|
||||
<menuitem id="placesContext_open:newtab"
|
||||
command="placesCmd_open:tab"
|
||||
label="&cmd.open_tab.label;"
|
||||
accesskey="&cmd.open_tab.accesskey;"
|
||||
data-l10n-id="places-open-tab"
|
||||
selectiontype="single"
|
||||
selection="link"/>
|
||||
<menuitem id="placesContext_openContainer:tabs"
|
||||
oncommand="var view = PlacesUIUtils.getViewForNode(document.popupNode);
|
||||
view.controller.openSelectionInTabs(event);"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
label="&cmd.open_all_in_tabs.label;"
|
||||
accesskey="&cmd.open_all_in_tabs.accesskey;"
|
||||
data-l10n-id="places-open-all-in-tabs"
|
||||
selectiontype="single|none"
|
||||
selection="folder|host|query"/>
|
||||
<menuitem id="placesContext_openLinks:tabs"
|
||||
oncommand="var view = PlacesUIUtils.getViewForNode(document.popupNode);
|
||||
view.controller.openSelectionInTabs(event);"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
label="&cmd.open_all_in_tabs.label;"
|
||||
accesskey="&cmd.open_all_in_tabs.accesskey;"
|
||||
data-l10n-id="places-open-all-in-tabs"
|
||||
selectiontype="multiple"
|
||||
selection="link"/>
|
||||
<menuitem id="placesContext_open:newwindow"
|
||||
command="placesCmd_open:window"
|
||||
label="&cmd.open_window.label;"
|
||||
accesskey="&cmd.open_window.accesskey;"
|
||||
data-l10n-id="places-open-window"
|
||||
selectiontype="single"
|
||||
selection="link"/>
|
||||
<menuitem id="placesContext_open:newprivatewindow"
|
||||
command="placesCmd_open:privatewindow"
|
||||
label="&cmd.open_private_window.label;"
|
||||
accesskey="&cmd.open_private_window.accesskey;"
|
||||
data-l10n-id="places-open-private-window"
|
||||
selectiontype="single"
|
||||
selection="link"
|
||||
hideifprivatebrowsing="true"/>
|
||||
<menuseparator id="placesContext_openSeparator"/>
|
||||
<menuitem id="placesContext_new:bookmark"
|
||||
command="placesCmd_new:bookmark"
|
||||
label="&cmd.new_bookmark.label;"
|
||||
accesskey="&cmd.new_bookmark.accesskey;"
|
||||
data-l10n-id="places-new-bookmark"
|
||||
selectiontype="any"
|
||||
hideifnoinsertionpoint="true"/>
|
||||
<menuitem id="placesContext_new:folder"
|
||||
command="placesCmd_new:folder"
|
||||
label="&cmd.new_folder.label;"
|
||||
accesskey="&cmd.context_new_folder.accesskey;"
|
||||
data-l10n-id="places-new-folder-contextmenu"
|
||||
selectiontype="any"
|
||||
hideifnoinsertionpoint="true"/>
|
||||
<menuitem id="placesContext_new:separator"
|
||||
command="placesCmd_new:separator"
|
||||
label="&cmd.new_separator.label;"
|
||||
accesskey="&cmd.new_separator.accesskey;"
|
||||
data-l10n-id="places-new-separator"
|
||||
closemenu="single"
|
||||
selectiontype="any"
|
||||
hideifnoinsertionpoint="true"/>
|
||||
|
@ -108,8 +99,7 @@
|
|||
forcehideselection="bookmark"/>
|
||||
<menuitem id="placesContext_deleteHost"
|
||||
command="placesCmd_deleteDataHost"
|
||||
label="&cmd.deleteDomainData.label;"
|
||||
accesskey="&cmd.deleteDomainData.accesskey;"
|
||||
data-l10n-id="places-delete-domain-data"
|
||||
closemenu="single"
|
||||
selection="link|host"
|
||||
selectiontype="single"
|
||||
|
@ -117,14 +107,12 @@
|
|||
<menuseparator id="placesContext_deleteSeparator"/>
|
||||
<menuitem id="placesContext_sortBy:name"
|
||||
command="placesCmd_sortBy:name"
|
||||
label="&cmd.sortby_name.label;"
|
||||
accesskey="&cmd.context_sortby_name.accesskey;"
|
||||
data-l10n-id="places-sortby-name"
|
||||
closemenu="single"
|
||||
selection="folder"/>
|
||||
<menuseparator id="placesContext_sortSeparator"/>
|
||||
<menuitem id="placesContext_show:info"
|
||||
command="placesCmd_show:info"
|
||||
label="&cmd.properties.label;"
|
||||
accesskey="&cmd.properties.accesskey;"
|
||||
data-l10n-id="places-properties"
|
||||
selection="bookmark|folder|query"/>
|
||||
</menupopup>
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
# 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/.
|
||||
|
||||
places-open =
|
||||
.label = Open
|
||||
.accesskey = O
|
||||
places-open-tab =
|
||||
.label = Open in a New Tab
|
||||
.accesskey = w
|
||||
places-open-all-in-tabs =
|
||||
.label = Open All in Tabs
|
||||
.accesskey = O
|
||||
places-open-window =
|
||||
.label = Open in a New Window
|
||||
.accesskey = N
|
||||
places-open-private-window =
|
||||
.label = Open in a New Private Window
|
||||
.accesskey = P
|
||||
|
||||
places-new-bookmark =
|
||||
.label = New Bookmark…
|
||||
.accesskey = B
|
||||
places-new-folder-contextmenu =
|
||||
.label = New Folder…
|
||||
.accesskey = F
|
||||
places-new-folder =
|
||||
.label = New Folder…
|
||||
.accesskey = o
|
||||
places-new-separator =
|
||||
.label = New Separator
|
||||
.accesskey = S
|
||||
|
||||
places-view =
|
||||
.label = View
|
||||
.accesskey = w
|
||||
places-by-date =
|
||||
.label = By Date
|
||||
.accesskey = D
|
||||
places-by-site =
|
||||
.label = By Site
|
||||
.accesskey = S
|
||||
places-by-most-visited =
|
||||
.label = By Most Visited
|
||||
.accesskey = V
|
||||
places-by-last-visited =
|
||||
.label = By Last Visited
|
||||
.accesskey = L
|
||||
places-by-day-and-site =
|
||||
.label = By Date and Site
|
||||
.accesskey = t
|
||||
|
||||
places-history-search =
|
||||
.placeholder = Search history
|
||||
places-bookmarks-search =
|
||||
.placeholder = Search bookmarks
|
||||
|
||||
places-delete-domain-data =
|
||||
.label = Forget About This Site
|
||||
.accesskey = F
|
||||
places-sortby-name =
|
||||
.label = Sort By Name
|
||||
.accesskey = r
|
||||
places-properties =
|
||||
.label = Properties
|
||||
.accesskey = i
|
|
@ -41,34 +41,6 @@
|
|||
<!ENTITY cmd.restoreFromFile.label "Choose File…">
|
||||
<!ENTITY cmd.restoreFromFile.accesskey "C">
|
||||
|
||||
<!ENTITY cmd.deleteDomainData.label "Forget About This Site">
|
||||
<!ENTITY cmd.deleteDomainData.accesskey "F">
|
||||
|
||||
<!ENTITY cmd.open.label "Open">
|
||||
<!ENTITY cmd.open.accesskey "O">
|
||||
<!ENTITY cmd.open_window.label "Open in a New Window">
|
||||
<!ENTITY cmd.open_window.accesskey "N">
|
||||
<!ENTITY cmd.open_private_window.label "Open in a New Private Window">
|
||||
<!ENTITY cmd.open_private_window.accesskey "P">
|
||||
<!ENTITY cmd.open_tab.label "Open in a New Tab">
|
||||
<!ENTITY cmd.open_tab.accesskey "w">
|
||||
<!ENTITY cmd.open_all_in_tabs.label "Open All in Tabs">
|
||||
<!ENTITY cmd.open_all_in_tabs.accesskey "O">
|
||||
|
||||
<!ENTITY cmd.properties.label "Properties">
|
||||
<!ENTITY cmd.properties.accesskey "i">
|
||||
|
||||
<!ENTITY cmd.sortby_name.label "Sort By Name">
|
||||
<!ENTITY cmd.context_sortby_name.accesskey "r">
|
||||
|
||||
<!ENTITY cmd.new_bookmark.label "New Bookmark…">
|
||||
<!ENTITY cmd.new_bookmark.accesskey "B">
|
||||
<!ENTITY cmd.new_folder.label "New Folder…">
|
||||
<!ENTITY cmd.new_folder.accesskey "o">
|
||||
<!ENTITY cmd.context_new_folder.accesskey "F">
|
||||
<!ENTITY cmd.new_separator.label "New Separator">
|
||||
<!ENTITY cmd.new_separator.accesskey "S">
|
||||
|
||||
<!ENTITY col.name.label "Name">
|
||||
<!ENTITY col.tags.label "Tags">
|
||||
<!ENTITY col.url.label "Location">
|
||||
|
@ -77,9 +49,6 @@
|
|||
<!ENTITY col.dateadded.label "Added">
|
||||
<!ENTITY col.lastmodified.label "Last Modified">
|
||||
|
||||
<!ENTITY historySearch.placeholder "Search history">
|
||||
<!ENTITY bookmarksSearch.placeholder "Search bookmarks">
|
||||
|
||||
<!ENTITY cmd.find.key "f">
|
||||
|
||||
<!ENTITY maintenance.label "Import and Backup">
|
||||
|
@ -91,16 +60,3 @@
|
|||
<!ENTITY forwardButton.tooltip "Go forward">
|
||||
|
||||
<!ENTITY detailsPane.selectAnItemText.description "Select an item to view and edit its properties">
|
||||
|
||||
<!ENTITY view.label "View">
|
||||
<!ENTITY view.accesskey "w">
|
||||
<!ENTITY byDate.label "By Date">
|
||||
<!ENTITY byDate.accesskey "D">
|
||||
<!ENTITY bySite.label "By Site">
|
||||
<!ENTITY bySite.accesskey "S">
|
||||
<!ENTITY byMostVisited.label "By Most Visited">
|
||||
<!ENTITY byMostVisited.accesskey "V">
|
||||
<!ENTITY byLastVisited.label "By Last Visited">
|
||||
<!ENTITY byLastVisited.accesskey "L">
|
||||
<!ENTITY byDayAndSite.label "By Date and Site">
|
||||
<!ENTITY byDayAndSite.accesskey "t">
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
# 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, TERM_REFERENCE, MESSAGE_REFERENCE
|
||||
from fluent.migrate import COPY_PATTERN, REPLACE, COPY
|
||||
|
||||
|
||||
def migrate(ctx):
|
||||
"""Bug 1609557 - Migrate placesContextMenu.inc.xhtml to Fluent, part {index}."""
|
||||
|
||||
ctx.add_transforms(
|
||||
'browser/browser/places.ftl',
|
||||
'browser/browser/places.ftl',
|
||||
transforms_from(
|
||||
"""
|
||||
places-open =
|
||||
.label = { COPY(from_path, "cmd.open.label") }
|
||||
.accesskey = { COPY(from_path, "cmd.open.accesskey") }
|
||||
places-open-tab =
|
||||
.label = { COPY(from_path, "cmd.open_tab.label") }
|
||||
.accesskey = { COPY(from_path, "cmd.open_tab.accesskey") }
|
||||
places-open-all-in-tabs =
|
||||
.label = { COPY(from_path, "cmd.open_all_in_tabs.label") }
|
||||
.accesskey = { COPY(from_path, "cmd.open_all_in_tabs.accesskey") }
|
||||
places-open-window =
|
||||
.label = { COPY(from_path, "cmd.open_window.label") }
|
||||
.accesskey = { COPY(from_path, "cmd.open_window.accesskey") }
|
||||
places-open-private-window =
|
||||
.label = { COPY(from_path, "cmd.open_private_window.label") }
|
||||
.accesskey = { COPY(from_path, "cmd.open_private_window.accesskey") }
|
||||
places-new-bookmark =
|
||||
.label = { COPY(from_path, "cmd.new_bookmark.label") }
|
||||
.accesskey = { COPY(from_path, "cmd.new_bookmark.accesskey") }
|
||||
places-new-folder-contextmenu =
|
||||
.label = { COPY(from_path, "cmd.new_folder.label") }
|
||||
.accesskey = { COPY(from_path, "cmd.context_new_folder.accesskey") }
|
||||
places-new-folder =
|
||||
.label = { COPY(from_path, "cmd.new_folder.label") }
|
||||
.accesskey = { COPY(from_path, "cmd.new_folder.accesskey") }
|
||||
places-new-separator =
|
||||
.label = { COPY(from_path, "cmd.new_separator.label") }
|
||||
.accesskey = { COPY(from_path, "cmd.new_separator.accesskey") }
|
||||
places-view =
|
||||
.label = { COPY(from_path, "view.label" ) }
|
||||
.accesskey = { COPY(from_path, "view.accesskey") }
|
||||
places-by-date =
|
||||
.label = { COPY(from_path, "byDate.label" ) }
|
||||
.accesskey = { COPY(from_path, "byDate.accesskey" ) }
|
||||
places-by-site =
|
||||
.label = { COPY(from_path, "bySite.label" ) }
|
||||
.accesskey = { COPY(from_path, "bySite.accesskey" ) }
|
||||
places-by-most-visited =
|
||||
.label = { COPY(from_path, "byMostVisited.label" ) }
|
||||
.accesskey = { COPY(from_path, "byMostVisited.accesskey" ) }
|
||||
places-by-last-visited =
|
||||
.label = { COPY(from_path, "byLastVisited.label" ) }
|
||||
.accesskey = { COPY(from_path, "byLastVisited.accesskey" ) }
|
||||
places-by-day-and-site =
|
||||
.label = { COPY(from_path, "byDayAndSite.label" ) }
|
||||
.accesskey = { COPY(from_path, "byDayAndSite.accesskey" ) }
|
||||
places-history-search =
|
||||
.placeholder = { COPY(from_path, "historySearch.placeholder" ) }
|
||||
places-bookmarks-search =
|
||||
.placeholder = { COPY(from_path, "bookmarksSearch.placeholder" ) }
|
||||
places-delete-domain-data =
|
||||
.label = { COPY(from_path, "cmd.deleteDomainData.label") }
|
||||
.accesskey = { COPY(from_path, "cmd.deleteDomainData.accesskey") }
|
||||
places-sortby-name =
|
||||
.label = { COPY(from_path, "cmd.sortby_name.label") }
|
||||
.accesskey = { COPY(from_path, "cmd.context_sortby_name.accesskey") }
|
||||
places-properties =
|
||||
.label = { COPY(from_path, "cmd.properties.label") }
|
||||
.accesskey = { COPY(from_path, "cmd.properties.accesskey") }
|
||||
""", from_path="browser/chrome/browser/places/places.dtd")
|
||||
)
|
Загрузка…
Ссылка в новой задаче