зеркало из https://github.com/mozilla/pjs.git
Bug #247838 --> Same string used twice in pref-viewing_messages.xul
break it up into two separate entities for localizers.
This commit is contained in:
Родитель
ab9a876cd8
Коммит
e4e8b018ac
|
@ -1,221 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE page SYSTEM "chrome://messenger/locale/pref-viewing_messages.dtd">
|
||||
|
||||
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="parent.initPanel('chrome://messenger/content/pref-viewing_messages.xul');"
|
||||
headertitle="&pane.title;">
|
||||
|
||||
<script type="application/x-javascript">
|
||||
<![CDATA[
|
||||
var _elementIDs = ["mailFixedWidthMessages", "mailQuotedStyle", "mailQuotedSize", "wrapLongLines", "displayGlyph",
|
||||
"mailCitationColor", "foregroundText", "background",
|
||||
// labels
|
||||
"label1TextBox", "label1Color", "label2TextBox", "label2Color", "label3TextBox",
|
||||
"label3Color", "label4TextBox", "label4Color", "label5TextBox", "label5Color" ];
|
||||
|
||||
function Startup()
|
||||
{
|
||||
getColorFromPickerAndSetWell('citationmenu', 'mailCitationColor');
|
||||
getColorFromWellAndSetValue('foregroundtextmenu');
|
||||
getColorFromWellAndSetValue('backgroundmenu');
|
||||
getColorFromWellAndSetValue("labelColorPicker1");
|
||||
getColorFromWellAndSetValue("labelColorPicker2");
|
||||
getColorFromWellAndSetValue("labelColorPicker3");
|
||||
getColorFromWellAndSetValue("labelColorPicker4");
|
||||
getColorFromWellAndSetValue("labelColorPicker5");
|
||||
}
|
||||
|
||||
function getColorFromPickerAndSetWell(menuID, colorfield)
|
||||
{
|
||||
var picker = document.getElementById( menuID );
|
||||
var colorValue = document.getElementById( colorfield );
|
||||
if (picker) {
|
||||
picker.color = colorValue.getAttribute("value");
|
||||
}
|
||||
}
|
||||
|
||||
function setColorWell(aPicker)
|
||||
{
|
||||
var colorRef = aPicker.nextSibling;
|
||||
colorRef.setAttribute("value", aPicker.color );
|
||||
}
|
||||
|
||||
function getColorFromWellAndSetValue(aPickerId)
|
||||
{
|
||||
var picker = document.getElementById(aPickerId);
|
||||
var colorRef = picker.nextSibling;
|
||||
var color = colorRef.getAttribute("value");
|
||||
picker.color = color;
|
||||
return color;
|
||||
}
|
||||
|
||||
/* Function to restore pref values to application defaults */
|
||||
function restoreColorAndDescriptionToDefaults()
|
||||
{
|
||||
var prefColor;
|
||||
var description;
|
||||
var pickerColor;
|
||||
var dataColor;
|
||||
var labelDescription;
|
||||
var prefService = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefService);
|
||||
var prefs = prefService.getDefaultBranch(null);
|
||||
|
||||
/* there are only 5 labels */
|
||||
for(var i = 1; i <= 5; i++)
|
||||
{
|
||||
/* set the default description from prefs */
|
||||
description = prefs.getComplexValue("mailnews.labels.description." + i,
|
||||
Components.interfaces.nsIPrefLocalizedString).data;
|
||||
labelDescription = document.getElementById("label" + i + "TextBox");
|
||||
labelDescription.value = description;
|
||||
|
||||
/* set the default color from prefs */
|
||||
prefColor = prefs.getCharPref("mailnews.labels.color." + i);
|
||||
pickerColor = document.getElementById("labelColorPicker" + i);
|
||||
pickerColor.color = prefColor;
|
||||
|
||||
// need to call setColorWell() so that the default pref value will be updated
|
||||
// in the preferences file.
|
||||
setColorWell(pickerColor);
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&displayWidth.label;"/>
|
||||
|
||||
<description>&viewingPlainText.label;</description>
|
||||
<vbox class="indent" align="start">
|
||||
<checkbox id="wrapLongLines" label="&wrapInMsg.label;"
|
||||
prefstring="mail.wrap_long_lines" accesskey="&wrapInMsg.accesskey;"/>
|
||||
|
||||
<checkbox id="displayGlyph" label="&convertEmoticons.label;"
|
||||
prefstring="mail.display_glyph" accesskey="&convertEmoticons.accesskey;"/>
|
||||
</vbox>
|
||||
|
||||
<separator class="thin"/>
|
||||
|
||||
<hbox align="center">
|
||||
<description>&plainText.label;</description>
|
||||
|
||||
<radiogroup id="mailFixedWidthMessages" orient="horizontal" class="indent"
|
||||
preftype="bool" prefstring="mail.fixed_width_messages">
|
||||
<radio value="true" label="&fixedWidth.label;" accesskey="&fixedWidth.accesskey;"/>
|
||||
<radio value="false" label="&variableWidth.label;" accesskey="&variableWidth.accesskey;"/>
|
||||
</radiogroup>
|
||||
</hbox>
|
||||
|
||||
<separator class="thin"/>
|
||||
|
||||
<description>&displayText.label;</description>
|
||||
<hbox class="indent" align="center">
|
||||
<label value="&style.label;" accesskey="&style.accesskey;" control="mailQuotedStyle"/>
|
||||
<menulist id="mailQuotedStyle" prefstring="mail.quoted_style">
|
||||
<menupopup>
|
||||
<menuitem value="0" label="®ular.label;"/>
|
||||
<menuitem value="1" label="&bold.label;"/>
|
||||
<menuitem value="2" label="&italic.label;"/>
|
||||
<menuitem value="3" label="&boldItalic.label;"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
|
||||
<label value="&size.label;" accesskey="&size.accesskey;" control="mailQuotedSize"/>
|
||||
<menulist id="mailQuotedSize" prefstring="mail.quoted_size">
|
||||
<menupopup>
|
||||
<menuitem value="0" label="®ular.label;"/>
|
||||
<menuitem value="1" label="&bigger.label;"/>
|
||||
<menuitem value="2" label="&smaller.label;"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
|
||||
<label value="&color.label;" accesskey="&color.accesskey;" control="citationmenu"/>
|
||||
<colorpicker type="button" id="citationmenu" palettename="standard" onchange="setColorWell(this);"/>
|
||||
<broadcaster id="mailCitationColor" pref="true" preftype="color" prefstring="mail.citation_color" prefattribute="value" wsm_attributes="value"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&htmlColors.label;"/>
|
||||
<description>&overrideSender.label;</description>
|
||||
<hbox align="center" class="indent">
|
||||
<label value="&textColor.label;" accesskey="&textColor.accesskey;" control="foregroundtextmenu"/>
|
||||
|
||||
<colorpicker type="button" id="foregroundtextmenu" palettename="standard" onchange="setColorWell(this)"/>
|
||||
<data id="foregroundText" preftype="color" prefstring="browser.display.foreground_color" prefattribute="value" wsm_attributes="value"/>
|
||||
|
||||
<spacer style="width: 25px"/>
|
||||
|
||||
<label value="&backgroundColor.label;" accesskey="&backgroundColor.accesskey;" control="backgroundmenu"/>
|
||||
<colorpicker type="button" id="backgroundmenu" palettename="standard" onchange="setColorWell(this)"/>
|
||||
<data id="background" preftype="color" prefstring="browser.display.background_color" prefattribute="value" wsm_attributes="value"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
<!-- Labels -->
|
||||
<groupbox>
|
||||
<caption label="&labelsSettings.label;"/>
|
||||
<description>&displayLabelsText.label;</description>
|
||||
|
||||
<hbox align="top">
|
||||
<vbox>
|
||||
<!-- label color: 1 (default red) -->
|
||||
<hbox class="indent" align="center">
|
||||
<textbox id="label1TextBox" pref="true" preftype="localizedstring"
|
||||
prefstring="mailnews.labels.description.1" prefattribute="value"/>
|
||||
<colorpicker class="small-margin" type="button" id="labelColorPicker1"
|
||||
palettename="standard" onchange="setColorWell(this);"/>
|
||||
<data id="label1Color" pref="true" preftype="color" prefstring="mailnews.labels.color.1"
|
||||
prefattribute="value" wsm_attributes="value"/>
|
||||
</hbox>
|
||||
|
||||
<!-- label color: 2 (default orange) -->
|
||||
<hbox class="indent" align="center">
|
||||
<textbox id="label2TextBox" pref="true" preftype="localizedstring"
|
||||
prefstring="mailnews.labels.description.2" prefattribute="value"/>
|
||||
<colorpicker class="small-margin" type="button" id="labelColorPicker2"
|
||||
palettename="standard" onchange="setColorWell(this);"/>
|
||||
<data id="label2Color" pref="true" preftype="color" prefstring="mailnews.labels.color.2"
|
||||
prefattribute="value" wsm_attributes="value"/>
|
||||
</hbox>
|
||||
|
||||
<!-- label color: 3 (default green) -->
|
||||
<hbox class="indent" align="center">
|
||||
<textbox id="label3TextBox" pref="true" preftype="localizedstring"
|
||||
prefstring="mailnews.labels.description.3" prefattribute="value"/>
|
||||
<colorpicker class="small-margin" type="button" id="labelColorPicker3"
|
||||
palettename="standard" onchange="setColorWell(this);"/>
|
||||
<data id="label3Color" pref="true" preftype="color" prefstring="mailnews.labels.color.3"
|
||||
prefattribute="value" wsm_attributes="value"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
<vbox>
|
||||
<!-- label color: 4 (default blue) -->
|
||||
<hbox class="indent" align="center">
|
||||
<textbox id="label4TextBox" pref="true" preftype="localizedstring" prefstring="mailnews.labels.description.4" prefattribute="value"/>
|
||||
<colorpicker class="small-margin" type="button" id="labelColorPicker4" palettename="standard" onchange="setColorWell(this);"/>
|
||||
<data id="label4Color" pref="true" preftype="color" prefstring="mailnews.labels.color.4" prefattribute="value" wsm_attributes="value"/>
|
||||
</hbox>
|
||||
|
||||
<!-- label color: 5 (default purple) -->
|
||||
<hbox class="indent" align="center">
|
||||
<textbox id="label5TextBox" pref="true" preftype="localizedstring" prefstring="mailnews.labels.description.5" prefattribute="value"/>
|
||||
<colorpicker class="small-margin" type="button" id="labelColorPicker5" palettename="standard" onchange="setColorWell(this);"/>
|
||||
<data id="label5Color" pref="true" preftype="color" prefstring="mailnews.labels.color.5" prefattribute="value" wsm_attributes="value"/>
|
||||
</hbox>
|
||||
|
||||
<hbox pack="end">
|
||||
<button label="&restoreDefaults.label;" accesskey="&restoreDefaults.accesskey;" oncommand="restoreColorAndDescriptionToDefaults();">
|
||||
</button>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
</page>
|
|
@ -1,43 +0,0 @@
|
|||
<!ENTITY pane.title "Message Display">
|
||||
<!ENTITY pane.description "Settings for message display">
|
||||
<!ENTITY textBegin.label "Quoted plain text appearance">
|
||||
<!ENTITY style.label "Style:">
|
||||
<!ENTITY style.accesskey "t">
|
||||
<!ENTITY regular.label "Regular">
|
||||
<!ENTITY bold.label "Bold">
|
||||
<!ENTITY italic.label "Italic">
|
||||
<!ENTITY boldItalic.label "Bold Italic">
|
||||
<!ENTITY size.label "Size:">
|
||||
<!ENTITY size.accesskey "s">
|
||||
<!ENTITY bigger.label "Bigger">
|
||||
<!ENTITY smaller.label "Smaller">
|
||||
<!ENTITY color.label "Color:">
|
||||
<!ENTITY color.accesskey "c">
|
||||
<!ENTITY displayWidth.label "Plain Text Messages">
|
||||
<!ENTITY plainText.label "Use the following font:">
|
||||
<!ENTITY displayText.label "When displaying quoted plain text messages:">
|
||||
<!ENTITY viewingPlainText.label "When displaying plain text messages:">
|
||||
<!ENTITY fixedWidth.label "Fixed width font">
|
||||
<!ENTITY fixedWidth.accesskey "f">
|
||||
<!ENTITY variableWidth.label "Variable width font">
|
||||
<!ENTITY variableWidth.accesskey "v">
|
||||
<!ENTITY readingMessagesHeader.label "For incoming messages">
|
||||
<!ENTITY messageWrapping.label "Message Wrapping">
|
||||
<!ENTITY wrapInMsg.label "Wrap text to fit window width">
|
||||
<!ENTITY wrapInMsg.accesskey "w">
|
||||
<!-- LOCALIZATION NOTE : (emoticonsAndStructs.label) 'Emoticons' are also known as 'Smileys', e.g. :-) -->
|
||||
<!ENTITY convertEmoticons.label "Display emoticons as graphics">
|
||||
<!ENTITY convertEmoticons.accesskey "d">
|
||||
<!ENTITY htmlColors.label "HTML Messages">
|
||||
<!ENTITY overrideSender.label "When displaying HTML messages, use the following:">
|
||||
<!ENTITY overrideSender.accesskey "e">
|
||||
<!ENTITY textColor.label "Text Color:">
|
||||
<!ENTITY textColor.accesskey "T">
|
||||
<!ENTITY backgroundColor.label "Background Color:">
|
||||
<!ENTITY backgroundColor.accesskey "b">
|
||||
|
||||
<!-- labels -->
|
||||
<!ENTITY labelsSettings.label "Labels">
|
||||
<!ENTITY displayLabelsText.label "Labels can be used to categorize and prioritize your messages.">
|
||||
<!ENTITY restoreDefaults.label "Restore Defaults">
|
||||
<!ENTITY restoreDefaults.accesskey "R">
|
Загрузка…
Ссылка в новой задаче