From 7f5a2190c31290ac0d1b03e9c4cc412778000368 Mon Sep 17 00:00:00 2001 From: "bienvenu%nventure.com" Date: Tue, 8 Aug 2006 22:57:59 +0000 Subject: [PATCH] fix 347858 use .accesskey for properties to help localization automation tools, patch by giacomo.magnini@portalis.it, r/sr=bienvenu --- mail/base/content/ABSearchDialog.js | 2 +- .../en-US/chrome/messenger/search.properties | 4 +-- .../resources/content/ABSearchDialog.js | 2 +- .../search/resources/content/SearchDialog.js | 6 ++-- .../resources/locale/en-US/search.properties | 28 ------------------- 5 files changed, 7 insertions(+), 35 deletions(-) diff --git a/mail/base/content/ABSearchDialog.js b/mail/base/content/ABSearchDialog.js index 4fe2975ef7b..3c87dccc3fe 100644 --- a/mail/base/content/ABSearchDialog.js +++ b/mail/base/content/ABSearchDialog.js @@ -82,7 +82,7 @@ function searchOnLoad() gSearchBundle = document.getElementById("bundle_search"); gSearchStopButton.setAttribute("label", gSearchBundle.getString("labelForSearchButton")); - gSearchStopButton.setAttribute("accesskey", gSearchBundle.getString("accesskeyForSearchButton")); + gSearchStopButton.setAttribute("accesskey", gSearchBundle.getString("labelForSearchButton.accesskey")); gAddressBookBundle = document.getElementById("bundle_addressBook"); gSearchSession = Components.classes[searchSessionContractID].createInstance(Components.interfaces.nsIMsgSearchSession); diff --git a/mail/locales/en-US/chrome/messenger/search.properties b/mail/locales/en-US/chrome/messenger/search.properties index a3dbdbcec64..746982d1b2a 100644 --- a/mail/locales/en-US/chrome/messenger/search.properties +++ b/mail/locales/en-US/chrome/messenger/search.properties @@ -21,8 +21,8 @@ searchSuccessMessages=%S matches found searchFailureMessage=No matches found labelForStopButton=Stop labelForSearchButton=Search -accesskeyForStopButton=S -accesskeyForSearchButton=S +labelForStopButton.accesskey=S +labelForSearchButton.accesskey=S moreButtonTooltipText=Add a new rule lessButtonTooltipText=Remove this rule diff --git a/mailnews/base/search/resources/content/ABSearchDialog.js b/mailnews/base/search/resources/content/ABSearchDialog.js index e769a7b92b2..f6aef722238 100644 --- a/mailnews/base/search/resources/content/ABSearchDialog.js +++ b/mailnews/base/search/resources/content/ABSearchDialog.js @@ -84,7 +84,7 @@ function searchOnLoad() gSearchBundle = document.getElementById("bundle_search"); gSearchStopButton.setAttribute("label", gSearchBundle.getString("labelForSearchButton")); - gSearchStopButton.setAttribute("accesskey", gSearchBundle.getString("accesskeyForSearchButton")); + gSearchStopButton.setAttribute("accesskey", gSearchBundle.getString("labelForSearchButton.accesskey")); gAddressBookBundle = document.getElementById("bundle_addressBook"); gSearchSession = Components.classes[searchSessionContractID].createInstance(Components.interfaces.nsIMsgSearchSession); diff --git a/mailnews/base/search/resources/content/SearchDialog.js b/mailnews/base/search/resources/content/SearchDialog.js index 4635ff9bd9e..d19533fed23 100644 --- a/mailnews/base/search/resources/content/SearchDialog.js +++ b/mailnews/base/search/resources/content/SearchDialog.js @@ -198,7 +198,7 @@ var gSearchNotificationListener = onSearchDone: function(status) { gSearchStopButton.setAttribute("label", gSearchBundle.getString("labelForSearchButton")); - gSearchStopButton.setAttribute("accesskey", gSearchBundle.getString("accesskeyForSearchButton")); + gSearchStopButton.setAttribute("accesskey", gSearchBundle.getString("labelForSearchButton.accesskey")); gStatusFeedback._stopMeteors(); SetAdvancedSearchStatusText(gSearchView.QueryInterface(Components.interfaces.nsITreeView).rowCount); }, @@ -206,7 +206,7 @@ var gSearchNotificationListener = onNewSearch: function() { gSearchStopButton.setAttribute("label", gSearchBundle.getString("labelForStopButton")); - gSearchStopButton.setAttribute("accesskey", gSearchBundle.getString("accesskeyForStopButton")); + gSearchStopButton.setAttribute("accesskey", gSearchBundle.getString("labelForStopButton.accesskey")); UpdateMailSearch("new-search"); gStatusFeedback._startMeteors(); gStatusFeedback.showStatusString(gSearchBundle.getString("searchingMessage")); @@ -266,7 +266,7 @@ function searchOnLoad() gSearchBundle = document.getElementById("bundle_search"); gSearchStopButton.setAttribute("label", gSearchBundle.getString("labelForSearchButton")); - gSearchStopButton.setAttribute("accesskey", gSearchBundle.getString("accesskeyForSearchButton")); + gSearchStopButton.setAttribute("accesskey", gSearchBundle.getString("labelForSearchButton.accesskey")); gMessengerBundle = document.getElementById("bundle_messenger"); setupDatasource(); setupSearchListener(); diff --git a/mailnews/base/search/resources/locale/en-US/search.properties b/mailnews/base/search/resources/locale/en-US/search.properties index a3dbdbcec64..e69de29bb2d 100644 --- a/mailnews/base/search/resources/locale/en-US/search.properties +++ b/mailnews/base/search/resources/locale/en-US/search.properties @@ -1,28 +0,0 @@ -# search and filter strings - -searchCustomize="Customize Headers.." - -# these are the fields that get inserted in the search line -# for "and" searches, this looks like: -# -# searchAnd0 searchAnd1 searchAnd2 searchAnd4 -# -# for example, in english this looks like: -# and the [Sender ] [doesn't contain] [John] -# -# TODO: need to special-case the first line (filterindex==0) -# - -# filter stuff - -searchingMessage=Searching... -searchSuccessMessage=1 match found -searchSuccessMessages=%S matches found -searchFailureMessage=No matches found -labelForStopButton=Stop -labelForSearchButton=Search -accesskeyForStopButton=S -accesskeyForSearchButton=S - -moreButtonTooltipText=Add a new rule -lessButtonTooltipText=Remove this rule