Bug 1788595 - Remove remaining DTD files from mozilla-central, r=eemeli

Differential Revision: https://phabricator.services.mozilla.com/D162097
This commit is contained in:
Francesco Lodolo (:flod) 2022-11-15 13:23:23 +00:00
Родитель 5220f173b3
Коммит bc607c85dd
7 изменённых файлов: 0 добавлений и 132 удалений

Просмотреть файл

@ -292,11 +292,6 @@ var whitelist = [
// References to esm generated from jsm programatically
{ file: "resource://gre/modules/LangPackMatcher.sys.mjs" },
{ file: "resource://gre/modules/PluralForm.sys.mjs" },
// Bug 1788595 - used by Firefox Translations extension
// see also https://github.com/mozilla/firefox-translations/issues/496
{ file: "chrome://browser/locale/translation.dtd" },
{ file: "chrome://global/locale/notification.dtd" },
];
if (AppConstants.NIGHTLY_BUILD && AppConstants.platform != "win") {

Просмотреть файл

@ -1,62 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!-- This file is only used by the Firefox Translations extension,
- and should be removed once possible.
- See: https://bugzilla.mozilla.org/show_bug.cgi?id=1788595 -->
<!-- LOCALIZATION NOTE (translation.thisPageIsIn.label,
- translation.translateThisPage.label):
- These 2 strings are used to construct a sentence that contains a dropdown
- showing the detected language of the current web page.
- In en-US it looks like this:
- This page is in [detected language] Translate this page?
- "detected language" here is a language name coming from the
- toolkit/intl/languageNames.ftl file; for some locales it may not be in
- the correct grammar case to keep the same structure of the original
- sentence. -->
<!ENTITY translation.thisPageIsIn.label "This page is in">
<!ENTITY translation.translateThisPage.label "Translate this page?">
<!ENTITY translation.translate.button "Translate">
<!ENTITY translation.notNow.button "Not Now">
<!ENTITY translation.translatingContent.label "Translating page content…">
<!-- LOCALIZATION NOTE (translation.translatedFrom.label,
- translation.translatedTo.label,
- translation.translatedToSuffix.label):
- These 3 strings are used to construct a sentence that contains 2 dropdowns
- showing the source and target language of a translated web page.
- In en-US it looks like this:
- This page has been translated from [from language] to [to language]
- "from language" and "to language" here are language names coming from the
- toolkit/intl/languageNames.ftl file; for some locales they may not be in
- the correct grammar case to keep the same structure of the original
- sentence.
-
- translation.translatedToSuffix.label (empty in en-US) is for locales that
- need to display some text after the second drop down for the sentence to
- be grammatically correct. -->
<!ENTITY translation.translatedFrom.label "This page has been translated from">
<!ENTITY translation.translatedTo.label "to">
<!ENTITY translation.translatedToSuffix.label "">
<!ENTITY translation.showOriginal.button "Show Original">
<!ENTITY translation.showTranslation.button "Show Translation">
<!ENTITY translation.errorTranslating.label "There has been an error translating this page.">
<!ENTITY translation.tryAgain.button "Try Again">
<!ENTITY translation.serviceUnavailable.label "Translation is not available at the moment. Please try again later.">
<!ENTITY translation.options.menu "Options">
<!-- LOCALIZATION NOTE (translation.options.neverForSite.accesskey,
- translation.options.preferences.accesskey):
- The accesskey values used here should not clash with the value used for
- translation.options.neverForLanguage.accesskey in translation.properties
-->
<!ENTITY translation.options.neverForSite.label "Never translate this site">
<!ENTITY translation.options.neverForSite.accesskey "e">
<!ENTITY translation.options.preferences.label "Translation preferences">
<!ENTITY translation.options.preferences.accesskey "T">

Просмотреть файл

@ -28,7 +28,6 @@
locale/browser/shellservice.properties (%chrome/browser/shellservice.properties)
locale/browser/tabbrowser.properties (%chrome/browser/tabbrowser.properties)
locale/browser/taskbar.properties (%chrome/browser/taskbar.properties)
locale/browser/translation.dtd (%chrome/browser/translation.dtd)
locale/browser/downloads/downloads.properties (%chrome/browser/downloads/downloads.properties)
locale/browser/places/places.properties (%chrome/browser/places/places.properties)
locale/browser/places/bookmarkProperties.properties (%chrome/browser/places/bookmarkProperties.properties)

Просмотреть файл

@ -160,7 +160,6 @@ skip-if = toolkit == 'android' #Windows can't change size on Android
support-files = window_bug1171215.html
[test_bug1530292.html]
[test_instanceof_error_message.html]
[test_bug467035.html]
[test_no_find_showDialog.html]
skip-if = toolkit == 'android' # Bug 1358633 - window.find doesn't work for Android
[test_postmessage.html]

Просмотреть файл

@ -1,45 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=467035
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 467035</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
/** Test for Bug 467035 **/
SimpleTest.waitForExplicitFinish();
addLoadEvent(() => {
const s = `<!DOCTYPE html SYSTEM \"chrome://global/locale/notification.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\">
<head>
<meta charset=\"utf-8\"/>
<title>&closeNotification.tooltip;</title>
</head>
</html>`;
const parser = new DOMParser();
let doc = parser.parseFromString(s, 'application/xhtml+xml');
is(doc.getElementsByTagName('parsererror').length, 1, 'parseFromString cannot access locale DTD');
SpecialPowers.wrap(parser).forceEnableDTD();
doc = parser.parseFromString(s, 'application/xhtml+xml');
const isTitleLocalized = doc.getElementsByTagName('parsererror').length === 0 &&
typeof doc.title === 'string' &&
!!doc.title;
ok(isTitleLocalized, 'parseFromString can access locale DTD with forceEnableDTD');
SimpleTest.finish();
});
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=467035">Mozilla Bug 467035</a>
<p id="display"></p>
<pre id="test">
</pre>
</body>
</html>

Просмотреть файл

@ -1,17 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!-- This file is only used by the Firefox Translations extension
- and by dom/tests/mochitest/bugs/test_bug467035.html.
- It should be removed once possible.
- See: https://bugzilla.mozilla.org/show_bug.cgi?id=1788595 -->
<!ENTITY closeNotification.tooltip "Close this message">
<!ENTITY learnMoreNoEllipsis "Learn more">
<!ENTITY defaultButton.label "OK!">
<!ENTITY defaultButton.accesskey "O">
<!ENTITY moreActionsButton.accessibleLabel "More actions">

Просмотреть файл

@ -26,7 +26,6 @@
#ifndef MOZ_FENNEC
locale/@AB_CD@/global/narrate.properties (%chrome/global/narrate.properties)
#endif
locale/@AB_CD@/global/notification.dtd (%chrome/global/notification.dtd)
#if !defined(XP_WIN) && !defined(MOZ_FENNEC)
locale/@AB_CD@/global/printdialog.properties (%chrome/global/printdialog.properties)
#endif