summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonikamaheshwari <monikamaheshwari1996@gmail.com>2019-04-27 09:35:59 -0400
committerAscrod <32915892+Ascrod@users.noreply.github.com>2019-04-27 09:35:59 -0400
commit5c350eebcda338152572aea64400a07db5ce2ff4 (patch)
tree5acf6a80965d7d95a75b5811eb36da83d694ba94
parentb430def773d2ee2fb027d1798aced0c7566c6ed4 (diff)
downloaduxp-5c350eebcda338152572aea64400a07db5ce2ff4.tar.gz
Bug 1429442 - Buttons in "type control" popup in reader mode should have tooltips r=Gijs,MarcoZ
-rw-r--r--toolkit/components/reader/AboutReader.jsm19
-rw-r--r--toolkit/locales/en-US/chrome/global/aboutReader.properties11
2 files changed, 30 insertions, 0 deletions
diff --git a/toolkit/components/reader/AboutReader.jsm b/toolkit/components/reader/AboutReader.jsm
index 5defa623ed..9d9362a0cc 100644
--- a/toolkit/components/reader/AboutReader.jsm
+++ b/toolkit/components/reader/AboutReader.jsm
@@ -120,6 +120,25 @@ var AboutReader = function(win, articlePromise) {
}
this._loadArticle();
+
+ let dropdown = this._toolbarElement;
+
+ let elemL10nMap = {
+ ".minus-button": "minus",
+ ".plus-button": "plus",
+ ".content-width-minus-button": "contentwidthminus",
+ ".content-width-plus-button": "contentwidthplus",
+ ".line-height-minus-button": "lineheightminus",
+ ".line-height-plus-button": "lineheightplus",
+ ".light-button": "colorschemelight",
+ ".dark-button": "colorschemedark",
+ ".sepia-button": "colorschemesepia",
+ };
+
+ for (let [selector, stringID] of Object.entries(elemL10nMap)) {
+ dropdown.querySelector(selector).setAttribute("title",
+ gStrings.GetStringFromName("aboutReader.toolbar." + stringID));
+ }
};
AboutReader.prototype = {
diff --git a/toolkit/locales/en-US/chrome/global/aboutReader.properties b/toolkit/locales/en-US/chrome/global/aboutReader.properties
index ac004c545d..10d145686b 100644
--- a/toolkit/locales/en-US/chrome/global/aboutReader.properties
+++ b/toolkit/locales/en-US/chrome/global/aboutReader.properties
@@ -46,3 +46,14 @@ readerView.enter=Enter Reader View
readerView.enter.accesskey=R
readerView.close=Close Reader View
readerView.close.accesskey=R
+
+# These are used as tooltips in Type Control
+aboutReader.toolbar.minus = Decrease Font Size
+aboutReader.toolbar.plus = Increase Font Size
+aboutReader.toolbar.contentwidthminus = Decrease Content Width
+aboutReader.toolbar.contentwidthplus = Increase Content Width
+aboutReader.toolbar.lineheightminus = Decrease Line Height
+aboutReader.toolbar.lineheightplus = Increase Line Height
+aboutReader.toolbar.colorschemelight = Color Scheme Light
+aboutReader.toolbar.colorschemedark = Color Scheme Dark
+aboutReader.toolbar.colorschemesepia = Color Scheme Sepia