зеркало из https://github.com/mozilla/gecko-dev.git
bug 84188, Need to migrate existing localizable string preferences to a new pref type, r=tao, sr=blake
This commit is contained in:
Родитель
90d5cba1d6
Коммит
4b088c6dec
|
@ -61,7 +61,7 @@
|
||||||
|
|
||||||
function SwitchContentPack()
|
function SwitchContentPack()
|
||||||
{
|
{
|
||||||
var oldContentPack = parent.hPrefWindow.getPref( "string", "general.useragent.contentlocale");
|
var oldContentPack = parent.hPrefWindow.getPref( "localizedstring", "general.useragent.contentlocale");
|
||||||
var newContentPack;
|
var newContentPack;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
<textbox id="walletServer"
|
<textbox id="walletServer"
|
||||||
flex="1"
|
flex="1"
|
||||||
pref="true"
|
pref="true"
|
||||||
preftype="string"
|
preftype="localizedstring"
|
||||||
prefstring="wallet.Server"
|
prefstring="wallet.Server"
|
||||||
prefattribute="value"/>
|
prefattribute="value"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
|
@ -82,7 +82,7 @@ Contributor(s):
|
||||||
<hbox autostretch="never">
|
<hbox autostretch="never">
|
||||||
<text class="label" value="&location.label;" accesskey="&location.accesskey;"
|
<text class="label" value="&location.label;" accesskey="&location.accesskey;"
|
||||||
for="mailnews.start_page.url"/>
|
for="mailnews.start_page.url"/>
|
||||||
<textbox id="mailnewsStartPageUrl" flex="1" pref="true" preftype="string"
|
<textbox id="mailnewsStartPageUrl" flex="1" pref="true" preftype="localizedstring"
|
||||||
prefstring="mailnews.start_page.url" prefattribute="value"/>
|
prefstring="mailnews.start_page.url" prefattribute="value"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@
|
||||||
<text class="label" for="sendDefaultCharsetList"
|
<text class="label" for="sendDefaultCharsetList"
|
||||||
value="&sendDefaultCharset.label;" accesskey="&sendDefaultCharset.accesskey;"/>
|
value="&sendDefaultCharset.label;" accesskey="&sendDefaultCharset.accesskey;"/>
|
||||||
<menulist class="small-margin" id="sendDefaultCharsetList" ref="NC:DecodersRoot" datasources="rdf:charset-menu"
|
<menulist class="small-margin" id="sendDefaultCharsetList" ref="NC:DecodersRoot" datasources="rdf:charset-menu"
|
||||||
pref="true" preftype="string" prefstring="mailnews.view_default_charset"
|
pref="true" preftype="localizedstring" prefstring="mailnews.view_default_charset"
|
||||||
prefattribute="value">
|
prefattribute="value">
|
||||||
<template>
|
<template>
|
||||||
<menupopup>
|
<menupopup>
|
||||||
|
|
|
@ -110,7 +110,7 @@
|
||||||
<hbox autostretch="never">
|
<hbox autostretch="never">
|
||||||
<text class="label" value="&sendDefaultCharset.label;" accesskey="&sendDefaultCharset.accesskey;" for="sendDefaultCharsetList"/>
|
<text class="label" value="&sendDefaultCharset.label;" accesskey="&sendDefaultCharset.accesskey;" for="sendDefaultCharsetList"/>
|
||||||
<menulist id="sendDefaultCharsetList" ref="NC:MaileditCharsetMenuRoot" datasources="rdf:charset-menu"
|
<menulist id="sendDefaultCharsetList" ref="NC:MaileditCharsetMenuRoot" datasources="rdf:charset-menu"
|
||||||
pref="true" preftype="string" prefstring="mailnews.send_default_charset"
|
pref="true" preftype="localizedstring" prefstring="mailnews.send_default_charset"
|
||||||
prefattribute="value">
|
prefattribute="value">
|
||||||
<template>
|
<template>
|
||||||
<menupopup>
|
<menupopup>
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
<hbox autostretch="never">
|
<hbox autostretch="never">
|
||||||
<text class="label" value="&sendDefaultCharset.label;" for="sendDefaultCharsetList"/>
|
<text class="label" value="&sendDefaultCharset.label;" for="sendDefaultCharsetList"/>
|
||||||
<menulist id="sendDefaultCharsetList" ref="NC:MaileditCharsetMenuRoot" datasources="rdf:charset-menu"
|
<menulist id="sendDefaultCharsetList" ref="NC:MaileditCharsetMenuRoot" datasources="rdf:charset-menu"
|
||||||
pref="true" preftype="string" prefstring="mailnews.send_default_charset"
|
pref="true" preftype="localizedstring" prefstring="mailnews.send_default_charset"
|
||||||
prefattribute="value">
|
prefattribute="value">
|
||||||
<template>
|
<template>
|
||||||
<menupopup>
|
<menupopup>
|
||||||
|
|
|
@ -145,19 +145,7 @@ nsPrefWindow.prototype =
|
||||||
case "color":
|
case "color":
|
||||||
case "string":
|
case "string":
|
||||||
default:
|
default:
|
||||||
// BEN: please remove this hacky coe once you add a new
|
|
||||||
// preftype for localizable pref.
|
|
||||||
if((aPrefString == "browser.startup.homepage") ||
|
|
||||||
(aPrefString == "wallet.Server") ||
|
|
||||||
(aPrefString == "intl.accept_languages") ||
|
|
||||||
(aPrefString == "intl.charset.default") ||
|
|
||||||
(aPrefString == "mailnews.start_page.url") ||
|
|
||||||
(aPrefString == "mailnews.view_default_charset") ||
|
|
||||||
(aPrefString == "mailnews.send_default_charset")) {
|
|
||||||
return pref.getLocalizedUnicharPref( aPrefString );
|
|
||||||
} else {
|
|
||||||
return !aDefaultFlag ? pref.CopyUnicharPref( aPrefString ) : pref.CopyDefaultUnicharPref( aPrefString );
|
return !aDefaultFlag ? pref.CopyUnicharPref( aPrefString ) : pref.CopyDefaultUnicharPref( aPrefString );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e)
|
catch (e)
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
<broadcaster id="intlAcceptLanguages"
|
<broadcaster id="intlAcceptLanguages"
|
||||||
value=""
|
value=""
|
||||||
preftype="string"
|
preftype="localizedstring"
|
||||||
prefstring="intl.accept_languages"/>
|
prefstring="intl.accept_languages"/>
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
<html>&languages.customize.active.label;</html>
|
<html>&languages.customize.active.label;</html>
|
||||||
<hbox flex="1">
|
<hbox flex="1">
|
||||||
<tree class="inset" id="active_languages" flex="1" style="width: 0px; height: 0px;"
|
<tree class="inset" id="active_languages" flex="1" style="width: 0px; height: 0px;"
|
||||||
pref="true" preftype="string" prefstring="intl.accept_languages" prefvalue="" prefattribute="prefvalue" wsm_attributes="prefvalue"
|
pref="true" preftype="localizedstring" prefstring="intl.accept_languages" prefvalue="" prefattribute="prefvalue" wsm_attributes="prefvalue"
|
||||||
datasources="rdf:null" multiple="true" onselect="SelectLanguage();">
|
datasources="rdf:null" multiple="true" onselect="SelectLanguage();">
|
||||||
<treecolgroup>
|
<treecolgroup>
|
||||||
<treecol flex="1"/>
|
<treecol flex="1"/>
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
<label value="&languages.customize.Charset.grouplabel;"/>
|
<label value="&languages.customize.Charset.grouplabel;"/>
|
||||||
<text class="label" value="&languages.customize.DefaultCharset.label;" for="DefaultCharsetList"/>
|
<text class="label" value="&languages.customize.DefaultCharset.label;" for="DefaultCharsetList"/>
|
||||||
<menulist id="DefaultCharsetList" ref="NC:DecodersRoot" datasources="rdf:charset-menu"
|
<menulist id="DefaultCharsetList" ref="NC:DecodersRoot" datasources="rdf:charset-menu"
|
||||||
pref="true" preftype="string" prefstring="intl.charset.default"
|
pref="true" preftype="localizedstring" prefstring="intl.charset.default"
|
||||||
prefattribute="value" wsm_attributes="value">
|
prefattribute="value" wsm_attributes="value">
|
||||||
<template>
|
<template>
|
||||||
<menupopup>
|
<menupopup>
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
<text class="label" value="&location.label;" accesskey="&location.accesskey;" for="browserStartupHomepage"/>
|
<text class="label" value="&location.label;" accesskey="&location.accesskey;" for="browserStartupHomepage"/>
|
||||||
<textbox id="browserStartupHomepage" type="autocomplete" flex="1" wsm_persist="true"
|
<textbox id="browserStartupHomepage" type="autocomplete" flex="1" wsm_persist="true"
|
||||||
searchSessions="history" timeout="50" maxrows="6"
|
searchSessions="history" timeout="50" maxrows="6"
|
||||||
pref="true" preftype="string" prefstring="browser.startup.homepage"
|
pref="true" preftype="localizedstring" prefstring="browser.startup.homepage"
|
||||||
prefattribute="value"/> <!-- we may wish to change this to data
|
prefattribute="value"/> <!-- we may wish to change this to data
|
||||||
when we support fancy formatted local filenames -->
|
when we support fancy formatted local filenames -->
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче