mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 18:27:35 +00:00
fix 26478, i18n work. r=sspitzer
This commit is contained in:
parent
6f64e96705
commit
f4d114f9e6
@ -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
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -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()">
|
||||
|
||||
|
@ -1 +1,2 @@
|
||||
en-US:downloadProgress.dtd
|
||||
en-US:downloadProgress.properties
|
||||
|
@ -37,6 +37,7 @@ CHROME_SKIN=
|
||||
|
||||
CHROME_L10N=\
|
||||
.\locale\en-US\downloadProgress.dtd \
|
||||
.\locale\en-US\downloadProgress.properties \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
Loading…
Reference in New Issue
Block a user