Merge pull request #15530 from Snuffleupagus/sidebar-toggleButton-l10n
Re-factor the `toggleButton` l10n in the `PDFSidebar` class
This commit is contained in:
commit
2c38a14a14
@ -40,10 +40,6 @@ const DEFAULT_L10N_STRINGS = {
|
||||
|
||||
print_progress_percent: "{{progress}}%",
|
||||
|
||||
"toggle_sidebar.title": "Toggle Sidebar",
|
||||
"toggle_sidebar_notification2.title":
|
||||
"Toggle Sidebar (document contains outline/attachments/layers)",
|
||||
|
||||
additional_layers: "Additional Layers",
|
||||
page_landmark: "Page {{page}}",
|
||||
thumb_page_title: "Page {{page}}",
|
||||
|
@ -307,9 +307,11 @@ class PDFSidebar {
|
||||
}
|
||||
|
||||
#showUINotification() {
|
||||
this.l10n.get("toggle_sidebar_notification2.title").then(msg => {
|
||||
this.toggleButton.title = msg;
|
||||
});
|
||||
this.toggleButton.setAttribute(
|
||||
"data-l10n-id",
|
||||
"toggle_sidebar_notification2"
|
||||
);
|
||||
this.l10n.translate(this.toggleButton);
|
||||
|
||||
if (!this.isOpen) {
|
||||
// Only show the notification on the `toggleButton` if the sidebar is
|
||||
@ -326,9 +328,8 @@ class PDFSidebar {
|
||||
}
|
||||
|
||||
if (reset) {
|
||||
this.l10n.get("toggle_sidebar.title").then(msg => {
|
||||
this.toggleButton.title = msg;
|
||||
});
|
||||
this.toggleButton.setAttribute("data-l10n-id", "toggle_sidebar");
|
||||
this.l10n.translate(this.toggleButton);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user