Bug 287695 fix hardcoded app name in default mailto: form subject
r=biesi sr=bz
This commit is contained in:
Родитель
d32d35b284
Коммит
f4ada571e2
|
@ -495,6 +495,7 @@ public:
|
|||
eFORMS_PROPERTIES,
|
||||
ePRINTING_PROPERTIES,
|
||||
eDOM_PROPERTIES,
|
||||
eBRAND_PROPERTIES,
|
||||
PropertiesFile_COUNT
|
||||
};
|
||||
static nsresult ReportToConsole(PropertiesFile aFile,
|
||||
|
|
|
@ -2215,7 +2215,8 @@ static const char gPropertiesFiles[nsContentUtils::PropertiesFile_COUNT][56] = {
|
|||
"chrome://global/locale/layout_errors.properties",
|
||||
"chrome://global/locale/layout/HtmlForm.properties",
|
||||
"chrome://global/locale/printing.properties",
|
||||
"chrome://global/locale/dom/dom.properties"
|
||||
"chrome://global/locale/dom/dom.properties",
|
||||
"chrome://branding/locale/brand.properties"
|
||||
};
|
||||
|
||||
/* static */ nsresult
|
||||
|
|
|
@ -447,11 +447,26 @@ HandleMailtoSubject(nsCString& aPath) {
|
|||
}
|
||||
|
||||
// Get the default subject
|
||||
nsXPIDLString brandName;
|
||||
nsresult rv =
|
||||
nsContentUtils::GetLocalizedString(nsContentUtils::eBRAND_PROPERTIES,
|
||||
"brandShortName", brandName);
|
||||
if (NS_FAILED(rv))
|
||||
return;
|
||||
const PRUnichar *formatStrings[] = { brandName.get() };
|
||||
nsXPIDLString subjectStr;
|
||||
nsContentUtils::GetLocalizedString(nsContentUtils::eFORMS_PROPERTIES, "DefaultFormSubject", subjectStr);
|
||||
rv = nsContentUtils::FormatLocalizedString(
|
||||
nsContentUtils::eFORMS_PROPERTIES,
|
||||
"DefaultFormSubject",
|
||||
formatStrings,
|
||||
NS_ARRAY_LENGTH(formatStrings),
|
||||
subjectStr);
|
||||
if (NS_FAILED(rv))
|
||||
return;
|
||||
aPath.AppendLiteral("subject=");
|
||||
nsCString subjectStrEscaped;
|
||||
aPath.Append(NS_EscapeURL(NS_ConvertUTF16toUTF8(subjectStr), esc_Query, subjectStrEscaped));
|
||||
aPath.Append(NS_EscapeURL(NS_ConvertUTF16toUTF8(subjectStr), esc_Query,
|
||||
subjectStrEscaped));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,4 +41,5 @@ 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
|
||||
# LOCALIZATION NOTE (DefaultFormSubject): %S will be replaced with brandShortName
|
||||
DefaultFormSubject=Form Post from %S
|
||||
|
|
Загрузка…
Ссылка в новой задаче