summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2017-12-20 20:49:05 (GMT)
committerNathaniel Catchpole2017-12-20 20:49:05 (GMT)
commit0308764eb40290b7cfcfefd3c74cf73ed5f51c11 (patch)
tree744641f8dc6d801d8e785f7a271a5234ff89b15c
parent8e9f1b61208087991afb783bd7d920f1e39fbcae (diff)
Issue #2551259 by Mile23, gaurav.kapoor, Jo Fitzgerald, googletorp, Jeremy, xjm, webchick: Deprecate dead code locale_translation_manual_status()
-rw-r--r--core/modules/locale/locale.pages.inc7
-rw-r--r--core/modules/locale/tests/src/Kernel/LocaleDeprecationsTest.php30
2 files changed, 36 insertions, 1 deletions
diff --git a/core/modules/locale/locale.pages.inc b/core/modules/locale/locale.pages.inc
index d8d7659..2f8957c 100644
--- a/core/modules/locale/locale.pages.inc
+++ b/core/modules/locale/locale.pages.inc
@@ -13,9 +13,14 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
*
* Manually checks the translation status without the use of cron.
*
- * @see locale_menu()
+ * @deprecated in Drupal 8.5.0 and will be removed before 9.0.0. It is unused by
+ * Drupal core. Duplicate this function in your own extension if you need its
+ * behavior.
+ *
+ * @see https://www.drupal.org/node/2931188
*/
function locale_translation_manual_status() {
+ @trigger_error('locale_translation_manual_status() is deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. It is unused by Drupal core. Duplicate this function in your own extension if you need its behavior.', E_USER_DEPRECATED);
module_load_include('compare.inc', 'locale');
// Check the translation status of all translatable projects in all languages.
diff --git a/core/modules/locale/tests/src/Kernel/LocaleDeprecationsTest.php b/core/modules/locale/tests/src/Kernel/LocaleDeprecationsTest.php
new file mode 100644
index 0000000..b98bc05
--- /dev/null
+++ b/core/modules/locale/tests/src/Kernel/LocaleDeprecationsTest.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace Drupal\Tests\locale\Kernel;
+
+use Drupal\KernelTests\KernelTestBase;
+
+/**
+ * Tests deprecations in the locale module.
+ *
+ * @group locale
+ * @group legacy
+ */
+class LocaleDeprecationsTest extends KernelTestBase {
+
+ /**
+ * Modules to enable.
+ *
+ * @var array
+ */
+ public static $modules = ['locale', 'system'];
+
+ /**
+ * @expectedDeprecation locale_translation_manual_status() is deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. It is unused by Drupal core. Duplicate this function in your own extension if you need its behavior.
+ */
+ public function testLocaleTranslationManualStatusDeprecation() {
+ module_load_include('pages.inc', 'locale');
+ $this->assertNotNull(\locale_translation_manual_status());
+ }
+
+}