fix 26478, i18n work. r=sspitzer

This commit is contained in:
sford3%swbell.net 2000-02-05 22:07:24 +00:00
parent 6f64e96705
commit f4d114f9e6
5 changed files with 13 additions and 7 deletions

View File

@ -35,7 +35,10 @@ CHROME_CONTENT = \
downloadProgress.js \
$(NULL)
CHROME_L10N = ./locale/en-US/downloadProgress.dtd
CHROME_L10N = \
./locale/en-US/downloadProgress.dtd \
./locale/en-US/downloadProgress.properties \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -23,6 +23,7 @@
*/
var data; // nsIStreamTransferOperation object
var dialog;
var bundle = srGetStrBundle("chrome://global/locale/downloadProgress.properties");
function loadDialog() {
dialog.location.setAttribute( "value", data.source.URI.spec );
@ -317,11 +318,11 @@ function onCompletion( status ) {
// Close the window in 2 seconds (to ensure user sees we're done).
window.setTimeout( "window.close();", 2000 );
} catch ( exception ) {
dump( "Error setting close timeout\n" );
dump( "Error setting close timeout\n");
// OK, try to just close the window immediately.
window.close();
// If that's not working either, change button text to give user a clue.
dialog.cancel.childNodes[0].nodeValue = "Close";
dialog.cancel.childNodes[0].nodeValue = bundle.GetStringFromName("close");
}
}
@ -347,6 +348,6 @@ function onError( errorCode ) {
} catch ( exception ) {
}
dump( "Error closing dialog\n" );
onStatus( "Error. Press Close button to close dialog." );
dialog.cancel.childNodes[0].nodeValue = "Close";
onStatus( bundle.GetStringFromName("error"));
dialog.cancel.childNodes[0].nodeValue = bundle.GetStringFromName("close");
}

View File

@ -7,7 +7,7 @@
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
title="Saving file"
title="&downloadWindow.title"
onload="onLoad()"
onunload="onUnload()">

View File

@ -1 +1,2 @@
en-US:downloadProgress.dtd
en-US:downloadProgress.properties

View File

@ -37,6 +37,7 @@ CHROME_SKIN=
CHROME_L10N=\
.\locale\en-US\downloadProgress.dtd \
.\locale\en-US\downloadProgress.properties \
$(NULL)
include <$(DEPTH)\config\rules.mak>