Bug 1136716 - Consolidate reader view strings in one .properties file, and make the strings to close reader view consistent. r=bnicholson,Unfocused
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Fri, 27 Feb 2015 11:29:18 -0800
changeset 261775 26c42369d83a26fb35c6dacd7367cf90d82923f0
parent 261774 aebb5e9855dda4e3ca380102ef260c6749be03b7
child 261776 084827e66581eeae60485b8a9ca1780816984aa8
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbnicholson, Unfocused
bugs1136716
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1136716 - Consolidate reader view strings in one .properties file, and make the strings to close reader view consistent. r=bnicholson,Unfocused
browser/locales/en-US/chrome/browser/readerMode.properties
browser/locales/jar.mn
browser/modules/ReaderParent.jsm
mobile/android/chrome/content/Reader.js
mobile/android/chrome/content/browser.js
mobile/android/locales/en-US/chrome/browser.properties
toolkit/locales/en-US/chrome/global/aboutReader.properties
deleted file mode 100644
--- a/browser/locales/en-US/chrome/browser/readerMode.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-# 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/.
-
-readerView.enter=Enter Reader View
-readerView.exit=Exit Reader View
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -134,17 +134,16 @@
     locale/browser/preferences/privacy.dtd            (%chrome/browser/preferences/privacy.dtd)
     locale/browser/preferences/security.dtd           (%chrome/browser/preferences/security.dtd)
 #ifdef MOZ_SERVICES_SYNC
     locale/browser/preferences/sync.dtd               (%chrome/browser/preferences/sync.dtd)
 #endif
     locale/browser/preferences/tabs.dtd               (%chrome/browser/preferences/tabs.dtd)
     locale/browser/preferences/search.dtd             (%chrome/browser/preferences/search.dtd)
     locale/browser/preferences/translation.dtd        (%chrome/browser/preferences/translation.dtd)
-    locale/browser/readerMode.properties              (%chrome/browser/readerMode.properties)
 #ifdef MOZ_SERVICES_SYNC
     locale/browser/syncBrand.dtd                (%chrome/browser/syncBrand.dtd)
     locale/browser/syncSetup.dtd                (%chrome/browser/syncSetup.dtd)
     locale/browser/syncSetup.properties         (%chrome/browser/syncSetup.properties)
     locale/browser/syncGenericChange.properties         (%chrome/browser/syncGenericChange.properties)
     locale/browser/syncKey.dtd                  (%chrome/browser/syncKey.dtd)
     locale/browser/syncQuota.dtd                (%chrome/browser/syncQuota.dtd)
     locale/browser/syncQuota.properties         (%chrome/browser/syncQuota.properties)
--- a/browser/modules/ReaderParent.jsm
+++ b/browser/modules/ReaderParent.jsm
@@ -10,17 +10,17 @@ const { classes: Cc, interfaces: Ci, uti
 this.EXPORTED_SYMBOLS = [ "ReaderParent" ];
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/Task.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "ReaderMode", "resource://gre/modules/ReaderMode.jsm");
 
-const gStringBundle = Services.strings.createBundle("chrome://browser/locale/readerMode.properties");
+const gStringBundle = Services.strings.createBundle("chrome://global/locale/aboutReader.properties");
 
 let ReaderParent = {
 
   MESSAGES: [
     "Reader:AddToList",
     "Reader:ArticleGet",
     "Reader:FaviconRequest",
     "Reader:ListStatusRequest",
@@ -102,17 +102,17 @@ let ReaderParent = {
     if (browser != win.gBrowser.selectedBrowser) {
       return;
     }
 
     let button = win.document.getElementById("reader-mode-button");
     if (browser.currentURI.spec.startsWith("about:reader")) {
       button.setAttribute("readeractive", true);
       button.hidden = false;
-      button.setAttribute("tooltiptext", gStringBundle.GetStringFromName("readerView.exit"));
+      button.setAttribute("tooltiptext", gStringBundle.GetStringFromName("readerView.close"));
     } else {
       button.removeAttribute("readeractive");
       button.setAttribute("tooltiptext", gStringBundle.GetStringFromName("readerView.enter"));
       button.hidden = !browser.isArticle;
     }
   },
 
   handleReaderButtonEvent: function(event) {
--- a/mobile/android/chrome/content/Reader.js
+++ b/mobile/android/chrome/content/Reader.js
@@ -166,34 +166,34 @@ let Reader = {
     if (this.pageAction.id) {
       PageActions.remove(this.pageAction.id);
       delete this.pageAction.id;
     }
 
     let browser = tab.browser;
     if (browser.currentURI.spec.startsWith("about:reader")) {
       this.pageAction.id = PageActions.add({
-        title: Strings.browser.GetStringFromName("readerView.exit"),
+        title: Strings.reader.GetStringFromName("readerView.close"),
         icon: "drawable://reader_active",
         clickCallback: () => this.pageAction.readerModeCallback(tab.id),
         important: true
       });
 
       // Only start a reader session if the viewer is in the foreground. We do
       // not track background reader viewers.
       UITelemetry.startSession("reader.1", null);
       return;
     }
 
     // Only stop a reader session if the foreground viewer is not visible.
     UITelemetry.stopSession("reader.1", "", null);
 
     if (browser.isArticle) {
       this.pageAction.id = PageActions.add({
-        title: Strings.browser.GetStringFromName("readerView.enter"),
+        title: Strings.reader.GetStringFromName("readerView.enter"),
         icon: "drawable://reader",
         clickCallback: () => this.pageAction.readerModeCallback(tab.id),
         longClickCallback: () => this.pageAction.readerModeActiveCallback(tab.id),
         important: true
       });
     }
   },
 
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -318,16 +318,17 @@ function resolveGeckoURI(aURI) {
 
 /**
  * Cache of commonly used string bundles.
  */
 let Strings = {
   init: function () {
     XPCOMUtils.defineLazyGetter(Strings, "brand", () => Services.strings.createBundle("chrome://branding/locale/brand.properties"));
     XPCOMUtils.defineLazyGetter(Strings, "browser", () => Services.strings.createBundle("chrome://browser/locale/browser.properties"));
+    XPCOMUtils.defineLazyGetter(Strings, "reader", () => Services.strings.createBundle("chrome://global/locale/aboutReader.properties"));
   },
 
   flush: function () {
     Services.strings.flushBundles();
     this.init();
   },
 };
 
--- a/mobile/android/locales/en-US/chrome/browser.properties
+++ b/mobile/android/locales/en-US/chrome/browser.properties
@@ -356,20 +356,16 @@ getUserMedia.videoSource.tabShare = Choo
 getUserMedia.videoSource.prompt = Video source
 getUserMedia.audioDevice.default = Microphone %S
 getUserMedia.audioDevice.none = No Audio
 getUserMedia.audioDevice.prompt = Microphone to use
 getUserMedia.sharingCamera.message2 = Camera is on
 getUserMedia.sharingMicrophone.message2 = Microphone is on
 getUserMedia.sharingCameraAndMicrophone.message2 = Camera and microphone are on
 
-#Reader view
-readerView.enter = Enter Reader View
-readerView.exit = Exit Reader View
-
 # LOCALIZATION NOTE (readerMode.toolbarTip):
 # Tip shown to users the first time we hide the reader mode toolbar.
 readerMode.toolbarTip=Tap the screen to show reader options
 
 #Open in App
 openInApp.pageAction = Open in App
 openInApp.ok = OK
 openInApp.cancel = Cancel
--- a/toolkit/locales/en-US/chrome/global/aboutReader.properties
+++ b/toolkit/locales/en-US/chrome/global/aboutReader.properties
@@ -22,8 +22,12 @@ aboutReader.toolbar.close=Close Reader V
 aboutReader.toolbar.typeControls=Type controls
 aboutReader.toolbar.addToReadingList=Add to Reading List
 aboutReader.toolbar.removeFromReadingList=Remove from Reading List
 aboutReader.toolbar.openReadingList=Open Reading List
 aboutReader.toolbar.closeReadingList=Close Reading List
 aboutReader.toolbar.share=Share
 
 aboutReader.footer.deleteThisArticle=Delete this article
+
+# Reader View toolbar button
+readerView.enter=Enter Reader View
+readerView.close=Close Reader View