Bug 1599303 - Migrate bookmark panel to Fluent. r=fluent-reviewers,Gijs

Differential Revision: https://phabricator.services.mozilla.com/D54647

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Zibi Braniecki 2019-11-29 07:18:04 +00:00
Родитель c78008bc74
Коммит 15b552dc41
4 изменённых файлов: 48 добавлений и 13 удалений

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

@ -275,17 +275,17 @@
<vbox id="editBookmarkPanelBottomContent"
flex="1">
<checkbox id="editBookmarkPanel_showForNewBookmarks"
label="&editBookmark.showForNewBookmarks.label;"
accesskey="&editBookmark.showForNewBookmarks.accesskey;"
data-l10n-id="bookmark-panel-show-editor-checkbox"
oncommand="StarUI.onShowForNewBookmarksCheckboxCommand();"/>
</vbox>
<hbox id="editBookmarkPanelBottomButtons"
class="panel-footer"
style="min-width: &editBookmark.panel.width;;">
data-l10n-id="bookmark-panel"
data-l10n-attrs="style">
#ifndef XP_UNIX
<button id="editBookmarkPanelDoneButton"
class="editBookmarkPanelBottomButton"
label="&editBookmark.done.label;"
data-l10n-id="bookmark-panel-done-button"
default="true"
oncommand="StarUI.panel.hidePopup();"/>
<button id="editBookmarkPanelRemoveButton"
@ -297,7 +297,7 @@
oncommand="StarUI.removeBookmarkButtonCommand();"/>
<button id="editBookmarkPanelDoneButton"
class="editBookmarkPanelBottomButton"
label="&editBookmark.done.label;"
data-l10n-id="bookmark-panel-done-button"
default="true"
oncommand="StarUI.panel.hidePopup();"/>
#endif

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

@ -145,3 +145,18 @@ search-one-offs-context-set-as-default =
search-one-offs-context-set-as-default-private =
.label = Set as Default Search Engine for Private Windows
.accesskey = P
## Bookmark Panel
bookmark-panel-show-editor-checkbox =
.label = Show editor when saving
.accesskey = S
bookmark-panel-done-button =
.label = Done
# Width of the bookmark panel.
# Should be large enough to fully display the Done and
# Cancel/Remove Bookmark buttons.
bookmark-panel =
.style = 23em

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

@ -580,14 +580,6 @@ you can use these alternative items. Otherwise, their values should be empty. -
<!ENTITY spellAddDictionaries.label "Add Dictionaries…">
<!ENTITY spellAddDictionaries.accesskey "A">
<!-- LOCALIZATION NOTE (editBookmark.panel.width): width of the bookmark panel.
Should be large enough to fully display the Done and Cancel/
Remove Bookmark buttons. -->
<!ENTITY editBookmark.panel.width "23em">
<!ENTITY editBookmark.done.label "Done">
<!ENTITY editBookmark.showForNewBookmarks.label "Show editor when saving">
<!ENTITY editBookmark.showForNewBookmarks.accesskey "S">
<!ENTITY identity.connectionSecure3 "Connection secure">
<!ENTITY identity.connectionNotSecure2 "Connection not secure">
<!ENTITY identity.connectionNotSecureSecurityView "You are not securely connected to this site.">

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

@ -0,0 +1,28 @@
# 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
from fluent.migrate import COPY_PATTERN
def migrate(ctx):
"""Bug 1599303 - Migrate bookmark panel to Fluent, part {index}."""
ctx.add_transforms(
'browser/browser/browser.ftl',
'browser/browser/browser.ftl',
transforms_from(
"""
bookmark-panel-show-editor-checkbox =
.label = { COPY(from_path, "editBookmark.showForNewBookmarks.label") }
.accesskey = { COPY(from_path, "editBookmark.showForNewBookmarks.accesskey") }
bookmark-panel-done-button =
.label = { COPY(from_path, "editBookmark.done.label") }
bookmark-panel =
.style = { COPY(from_path, "editBookmark.panel.width") }
""", from_path="browser/chrome/browser/browser.dtd")
)