[TASK] Live search placholder is hard-coded 44/44344/2
authorEric Chavaillaz <eric@hemmer.ch>
Thu, 29 Oct 2015 08:44:21 +0000 (09:44 +0100)
committerXavier Perseguers <xavier@typo3.org>
Thu, 29 Oct 2015 08:53:52 +0000 (09:53 +0100)
Resolves: #71115
Releases: master
Change-Id: If7aa0e242c96f3f31db9fc67c6450b86fb0546c6
Reviewed-on: https://review.typo3.org/44344
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
typo3/sysext/backend/Classes/Backend/ToolbarItems/LiveSearchToolbarItem.php

index 6b4670f..5f6b87b 100644 (file)
@@ -18,6 +18,7 @@ use TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository;
 use TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface;
 use TYPO3\CMS\Core\Page\PageRenderer;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Lang\LanguageService;
 
 /**
  * Adds backend live search to the toolbar
@@ -59,7 +60,7 @@ class LiveSearchToolbarItem implements ToolbarItemInterface
         return '
                        <form class="typo3-topbar-navigation-search t3js-topbar-navigation-search live-search-wrapper" role="search">
                                <div class="form-group">
-                                       <input type="text" class="form-control t3js-topbar-navigation-search-field" placeholder="Search" id="live-search-box" autocomplete="off">
+                                       <input type="text" class="form-control t3js-topbar-navigation-search-field" placeholder="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.search', true) . '" id="live-search-box" autocomplete="off">
                                </div>
                        </form>
                        <div class="dropdown-menu" role="menu"></div>
@@ -115,4 +116,14 @@ class LiveSearchToolbarItem implements ToolbarItemInterface
     {
         return GeneralUtility::makeInstance(PageRenderer::class);
     }
+
+    /**
+     * Returns LanguageService
+     *
+     * @return LanguageService
+     */
+    protected function getLanguageService()
+    {
+        return $GLOBALS['LANG'];
+    }
 }