mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
bug 209097: Default mailto form subject should be localizable
patch by Chris Thomas (CTho) <cst@andrew.cmu.edu>, r=neil, sr=roc
This commit is contained in:
parent
55d8f73bcb
commit
1eb67d2f10
@ -447,7 +447,21 @@ HandleMailtoSubject(nsCString& aPath) {
|
||||
aPath.Append('?');
|
||||
}
|
||||
|
||||
aPath.AppendLiteral("subject=Form%20Post%20From%20Mozilla&");
|
||||
// Get the default subject
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return;
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
rv = bundleService->CreateBundle("chrome://communicator/locale/layout/HtmlForm.properties",
|
||||
getter_AddRefs(bundle));
|
||||
if (NS_FAILED(rv))
|
||||
return;
|
||||
nsXPIDLString subjectStr;
|
||||
bundle->GetStringFromName(NS_LITERAL_STRING("DefaultFormSubject").get(), getter_Copies(subjectStr));
|
||||
aPath.AppendLiteral("subject=");
|
||||
nsCString subjectStrEscaped;
|
||||
aPath.Append(NS_EscapeURL(NS_ConvertUTF16toUTF8(subjectStr), esc_Query, subjectStrEscaped));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,3 +41,4 @@ FileUpload=File Upload
|
||||
IsIndexPrompt=This is a searchable index. Enter search keywords:
|
||||
ForgotPostWarning=Form contains enctype=%S, but does not contain method=post. Submitting normally with method=GET and no enctype instead.
|
||||
ForgotFileEnctypeWarning=Form contains a file input, but is missing method=POST and enctype=multipart/form-data on the form. The file will not be sent.
|
||||
DefaultFormSubject=Form Post from Mozilla
|
||||
|
Loading…
Reference in New Issue
Block a user