3 # -*- Mode: Java; tab-width:
4; indent-tabs-mode: nil; c-basic-offset:
4 -*-
4 # ***** BEGIN LICENSE BLOCK *****
5 # Version: MPL
1.1/GPL
2.0/LGPL
2.1
7 # The contents of this file are subject to the Mozilla Public License Version
8 #
1.1 (the
"License"); you may not use this file except in compliance with
9 # the License. You may obtain a copy of the License at
10 # http://www.mozilla.org/MPL/
12 # Software distributed under the License is distributed on an
"AS IS" basis,
13 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14 # for the specific language governing rights and limitations under the
17 # The Original Code is The Update Service.
19 # The Initial Developer of the Original Code is
21 # Portions created by the Initial Developer are Copyright (C)
2004
22 # the Initial Developer. All Rights Reserved.
25 # Ben Goodger
<ben@bengoodger.com
>
27 # Alternatively, the contents of this file may be used under the terms of
28 # either the GNU General Public License Version
2 or later (the
"GPL"), or
29 # the GNU Lesser General Public License Version
2.1 or later (the
"LGPL"),
30 # in which case the provisions of the GPL or the LGPL are applicable instead
31 # of those above. If you wish to allow use of your version of this file only
32 # under the terms of either the GPL or the LGPL, and not to allow others to
33 # use your version of this file under the terms of the MPL, indicate your
34 # decision by deleting the provisions above and replace them with the notice
35 # and other provisions required by the GPL or the LGPL. If you do not delete
36 # the provisions above, a recipient may use your version of this file under
37 # the terms of any one of the MPL, the GPL or the LGPL.
39 # ***** END LICENSE BLOCK *****
41 <?xml-stylesheet href=
"chrome://global/skin/" type=
"text/css"?>
43 <!DOCTYPE dialog SYSTEM
"chrome://mozapps/locale/update/errors.dtd">
46 xmlns=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
47 title=
"&errors.title;"
52 <script type=
"application/javascript">
56 dump(
"*** " + string +
"\n");
57 var console = Components.classes[
"@mozilla.org/consoleservice;1"]
58 .getService(Components.interfaces.nsIConsoleService);
59 console.logStringMessage(string);
64 var state = window.arguments[
0].state;
65 var brandShortName = document.getElementById(
"brandStrings").getString(
"brandShortName");
66 var updateStrings = document.getElementById(
"updateStrings");
67 var str = updateStrings.getFormattedString(state +
"Errors", [brandShortName]);
68 document.getElementById(
"intro").appendChild(document.createTextNode(str));
70 var xpinstallStrings = document.getElementById(
"xpinstallStrings");
72 var items = window.arguments[
0].errors;
73 var listbox = document.getElementById(
"extensions");
74 for (var i =
0; i < items.length; ++i) {
76 if (items[i].error == -
207) {
77 LOG(
"Error -207 (\"Not a valid install package\
") generally implies\r\n" +
78 "a 404 at the URL specified for the update. Check for typos in\r\n" +
79 "your update manifest.");
81 var listitem = document.createElement(
"listitem");
83 var errorString = xpinstallStrings.getString(
"error" + items[i].error);
84 var label = updateStrings.getFormattedString(
"installErrorItemFormat",
85 [items[i].name, errorString]);
87 catch (e) { label = items[i].name; }
88 listitem.setAttribute(
"label", label);
89 listbox.appendChild(listitem);
92 var strings = document.getElementById(
"updateStrings");
93 var cancel = document.documentElement.getButton(
"cancel");
94 cancel.label = strings.getString(
"closeButton");
100 <stringbundleset id=
"updateSet">
101 <stringbundle id=
"brandStrings" src=
"chrome://branding/locale/brand.properties"/>
102 <stringbundle id=
"xpinstallStrings" src=
"chrome://global/locale/xpinstall/xpinstall.properties"/>
103 <stringbundle id=
"updateStrings" src=
"chrome://mozapps/locale/extensions/update.properties"/>
106 <description id=
"intro"/>
107 <separator class=
"thin"/>
108 <listbox id=
"extensions" rows=
"7"/>
109 <separator class=
"thin"/>