fix bug 46947, localization of strings in wallet interview form, r=dp
git-svn-id: svn://10.0.0.236/trunk@75212 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -37,22 +37,11 @@ your Form Manager Information here</font></font></font></h3></center>
|
||||
<script>
|
||||
|
||||
function Save() {
|
||||
appCore = Components
|
||||
appCore = Components
|
||||
.classes["component://netscape/appshell/component/browser/instance"]
|
||||
.createInstance(Components.interfaces.nsIBrowserInstance);
|
||||
if (appCore) {
|
||||
if (appCore) {
|
||||
status = appCore.walletRequestToCapture(window._content);
|
||||
|
||||
/* need to localize the following strings */
|
||||
if (status == -1) { /* UnableToCapture */
|
||||
alert("UnableToCapture");
|
||||
} else if (status == 0) { /* Captured */
|
||||
alert("Your interview information has been saved");
|
||||
} else if (status == +1) { /* NotCaptured */
|
||||
alert("There is no information to save.");
|
||||
}
|
||||
} else {
|
||||
alert("Error occured when trying to save data");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3379,15 +3379,23 @@ WLLT_RequestToCapture(nsIPresShell* shell, nsIDOMWindow* win, PRUint32* status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PRUnichar * message;
|
||||
|
||||
if (gEncryptionFailure) {
|
||||
*status = -1; /* UnableToCapture */
|
||||
message = Wallet_Localize("UnableToCapture");
|
||||
*status = -1;
|
||||
} else if (captureCount) {
|
||||
/* give caveat if this is the first time data is being captured */
|
||||
Wallet_GiveCaveat(win, nsnull);
|
||||
*status = 0; /* Captured */
|
||||
message = Wallet_Localize("Captured");
|
||||
*status = 0;
|
||||
} else {
|
||||
*status = +1; /* NotCaptured */
|
||||
message = Wallet_Localize("NotCaptured");
|
||||
*status = +1;
|
||||
}
|
||||
wallet_Alert(message, win);
|
||||
Recycle(message);
|
||||
}
|
||||
|
||||
/* should move this to an include file */
|
||||
|
||||
@@ -359,13 +359,6 @@ function WalletAction( action )
|
||||
case "capture":
|
||||
default:
|
||||
status = appCore.walletRequestToCapture(window._content);
|
||||
if (status == -1) { /* UnableToCapture */
|
||||
window.alert(strings.getAttribute("UnableToCapture"));
|
||||
} else if (status == 0) { /* Captured */
|
||||
window.alert(strings.getAttribute("Captured"));
|
||||
} else if (status == +1) { /* NotCaptured */
|
||||
window.alert(strings.getAttribute("NotCaptured"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user