Backed out changeset 1d87c269da8a (bug 1581537) for causing bc failures in browser_misused_characters_in_strings.js CLOSED TREE

This commit is contained in:
Mihai Alexandru Michis
2019-11-04 16:06:37 +02:00
parent dcb3e8083b
commit 6be7f1be0b
25 changed files with 149 additions and 290 deletions

View File

@@ -742,16 +742,15 @@ nsresult HTMLInputElement::InitFilePicker(FilePickerType aType) {
nsAutoString title;
nsAutoString okButtonLabel;
if (aType == FILE_PICKER_DIRECTORY) {
nsContentUtils::GetMaybeLocalizedString(nsContentUtils::eFORMS_PROPERTIES,
"DirectoryUpload", OwnerDoc(),
title);
nsContentUtils::GetLocalizedString(
nsContentUtils::eFORMS_PROPERTIES_MAYBESPOOF, "DirectoryUpload", title);
nsContentUtils::GetMaybeLocalizedString(nsContentUtils::eFORMS_PROPERTIES,
"DirectoryPickerOkButtonLabel",
OwnerDoc(), okButtonLabel);
nsContentUtils::GetLocalizedString(
nsContentUtils::eFORMS_PROPERTIES_MAYBESPOOF,
"DirectoryPickerOkButtonLabel", okButtonLabel);
} else {
nsContentUtils::GetMaybeLocalizedString(nsContentUtils::eFORMS_PROPERTIES,
"FileUpload", OwnerDoc(), title);
nsContentUtils::GetLocalizedString(
nsContentUtils::eFORMS_PROPERTIES_MAYBESPOOF, "FileUpload", title);
}
nsCOMPtr<nsIFilePicker> filePicker =
@@ -2367,24 +2366,23 @@ void HTMLInputElement::GetDisplayFileName(nsAString& aValue) const {
if ((StaticPrefs::dom_input_dirpicker() && Allowdirs()) ||
(StaticPrefs::dom_webkitBlink_dirPicker_enabled() &&
HasAttr(kNameSpaceID_None, nsGkAtoms::webkitdirectory))) {
nsContentUtils::GetMaybeLocalizedString(nsContentUtils::eFORMS_PROPERTIES,
"NoDirSelected", OwnerDoc(),
value);
nsContentUtils::GetLocalizedString(
nsContentUtils::eFORMS_PROPERTIES_MAYBESPOOF, "NoDirSelected", value);
} else if (HasAttr(kNameSpaceID_None, nsGkAtoms::multiple)) {
nsContentUtils::GetMaybeLocalizedString(nsContentUtils::eFORMS_PROPERTIES,
"NoFilesSelected", OwnerDoc(),
value);
nsContentUtils::GetLocalizedString(
nsContentUtils::eFORMS_PROPERTIES_MAYBESPOOF, "NoFilesSelected",
value);
} else {
nsContentUtils::GetMaybeLocalizedString(nsContentUtils::eFORMS_PROPERTIES,
"NoFileSelected", OwnerDoc(),
value);
nsContentUtils::GetLocalizedString(
nsContentUtils::eFORMS_PROPERTIES_MAYBESPOOF, "NoFileSelected",
value);
}
} else {
nsString count;
count.AppendInt(int(mFileData->mFilesOrDirectories.Length()));
nsContentUtils::FormatMaybeLocalizedString(
value, nsContentUtils::eFORMS_PROPERTIES, "XFilesSelected", OwnerDoc(),
nsContentUtils::FormatLocalizedString(
value, nsContentUtils::eFORMS_PROPERTIES_MAYBESPOOF, "XFilesSelected",
count);
}
@@ -5821,8 +5819,8 @@ HTMLInputElement::SubmitNamesValues(HTMLFormSubmission* aFormSubmission) {
!HasAttr(kNameSpaceID_None, nsGkAtoms::value)) {
// Get our default value, which is the same as our default label
nsAutoString defaultValue;
nsContentUtils::GetMaybeLocalizedString(nsContentUtils::eFORMS_PROPERTIES,
"Submit", OwnerDoc(), defaultValue);
nsContentUtils::GetLocalizedString(
nsContentUtils::eFORMS_PROPERTIES_MAYBESPOOF, "Submit", defaultValue);
value = defaultValue;
}