From 765345a390686293b5bb86cacefde554050b5966 Mon Sep 17 00:00:00 2001 From: "ftang%netscape.com" Date: Thu, 16 Aug 2001 23:49:22 +0000 Subject: [PATCH] fix 54957. add one control to decide show theme description or not. r=vishy sr=blizzard git-svn-id: svn://10.0.0.236/trunk@101237 18797224-902f-48f8-a5cc-f745e15eee43 --- .../locale/en-US/navigator.properties | 5 ++++ .../resources/content/pref-themes.js | 23 ++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/mozilla/xpfe/browser/resources/locale/en-US/navigator.properties b/mozilla/xpfe/browser/resources/locale/en-US/navigator.properties index c0fa2e9c391..395a4ccfeed 100644 --- a/mozilla/xpfe/browser/resources/locale/en-US/navigator.properties +++ b/mozilla/xpfe/browser/resources/locale/en-US/navigator.properties @@ -49,3 +49,8 @@ oldTheme=You have selected a theme which was designed for an earlier version of # XXX - this sucks and should only be temporary. switchskins=Theme changes will take effect when you restart %S. switchskinstitle=Apply Theme +# Localization Note: Use 'true' or 'false' to control the pref:theme to +# show the English description or not +# for example, in Japanese build, instead of showing English description +# set the following value to false so it won't show up. +showskinsdescription=true diff --git a/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.js b/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.js index e61257cc6ba..280c9e9aadb 100644 --- a/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.js +++ b/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.js @@ -4,6 +4,7 @@ var gPrefutilitiesBundle; var gBrandBundle; +var gShowDescription = true; const DEBUG_USE_PROFILE = true; @@ -28,6 +29,19 @@ function Startup() var theSkinKids = document.getElementById("theSkinKids"); if (theSkinKids.hasChildNodes() && theSkinKids.firstChild) tree.selectItem(theSkinKids.firstChild); + try { + var strbundle = srGetStrBundle("chrome://navigator/locale/navigator.properties"); + } + catch(e) { + } + var showSkinsDescription = strbundle.GetStringFromName("showskinsdescription"); + if( showSkinsDescription == "false" ) + { + gShowDescription = false; + var description = document.getElementById("description"); + while (description.hasChildNodes()) + description.removeChild(description.firstChild); + } } function applySkin() @@ -119,7 +133,8 @@ function themeSelect() catch (e) { } if (!oldTheme) { - description.appendChild(descText); + if( gShowDescription ) + description.appendChild(descText); var locType = selectedItem.getAttribute("loctype"); uninstallButton.disabled = (selectedSkin == skinName) || (locType == "install"); @@ -147,8 +162,10 @@ function themeSelect() newText = newText.replace(/%brand%/g, gBrandBundle.getString("brandShortName")); - descText = document.createTextNode(newText); - description.appendChild(descText); + if( gShowDescription ) { + descText = document.createTextNode(newText); + description.appendChild(descText); + } } } else {