diff --git a/typo3/sysext/backend/Classes/ContextMenu/ItemProviders/RecordProvider.php b/typo3/sysext/backend/Classes/ContextMenu/ItemProviders/RecordProvider.php index 530985af55f1c42ed883f77ce9a6e31ee35e6e0c..2f209d24d0713f68be067371dd813b36c61828d5 100644 --- a/typo3/sysext/backend/Classes/ContextMenu/ItemProviders/RecordProvider.php +++ b/typo3/sysext/backend/Classes/ContextMenu/ItemProviders/RecordProvider.php @@ -287,7 +287,7 @@ class RecordProvider extends AbstractProvider $url = (string)$uriBuilder->buildUriFromRoute('new_content_element_wizard', $urlParameters); $attributes += [ 'data-new-wizard-url' => htmlspecialchars($url), - 'data-title' => $this->languageService->getLL('newContentElement'), + 'data-title' => $this->languageService->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:newContentElement'), ]; } if ($itemName === 'delete') { diff --git a/typo3/sysext/backend/Classes/Controller/AbstractLinkBrowserController.php b/typo3/sysext/backend/Classes/Controller/AbstractLinkBrowserController.php index 3b61854028af7bb4ea8d35e7fe306e0d9dd3063a..45c5e4c9ca4649cc7a2e073cf375e5ec24a0f3f4 100644 --- a/typo3/sysext/backend/Classes/Controller/AbstractLinkBrowserController.php +++ b/typo3/sysext/backend/Classes/Controller/AbstractLinkBrowserController.php @@ -155,8 +155,6 @@ abstract class AbstractLinkBrowserController */ public function mainAction(ServerRequestInterface $request): ResponseInterface { - $this->getLanguageService()->includeLLFile('EXT:backend/Resources/Private/Language/locallang_browse_links.xlf'); - $this->setUpBasicPageRendererForBackend($this->pageRenderer, $this->extensionConfiguration, $request, $this->getLanguageService()); $this->pageRenderer->addInlineLanguageLabelFile('EXT:core/Resources/Private/Language/locallang_misc.xlf'); $this->pageRenderer->addInlineLanguageLabelFile('EXT:core/Resources/Private/Language/locallang_core.xlf'); @@ -468,14 +466,14 @@ abstract class AbstractLinkBrowserController $fieldRenderingDefinitions['target'] = ' <!-- Selecting target for link: --> <div class="element-browser-form-group"> - <label for="ltarget" class="form-label">' . htmlspecialchars($lang->getLL('target')) . '</label> + <label for="ltarget" class="form-label">' . htmlspecialchars($lang->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:target')) . '</label> <span class="input-group"> <input id="ltarget" type="text" name="ltarget" class="t3js-linkTarget form-control" value="' . htmlspecialchars($this->linkAttributeValues['target'] ?? '') . '" /> <select name="ltarget_type" class="t3js-targetPreselect form-select"> <option value=""></option> - <option value="_top">' . htmlspecialchars($lang->getLL('top')) . '</option> - <option value="_blank">' . htmlspecialchars($lang->getLL('newWindow')) . '</option> + <option value="_top">' . htmlspecialchars($lang->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:top')) . '</option> + <option value="_blank">' . htmlspecialchars($lang->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:newWindow')) . '</option> </select> </span> </div>'; @@ -483,7 +481,7 @@ abstract class AbstractLinkBrowserController $fieldRenderingDefinitions['title'] = ' <!-- Selecting title for link: --> <div class="element-browser-form-group"> - <label for="ltitle" class="form-label">' . htmlspecialchars($lang->getLL('title')) . '</label> + <label for="ltitle" class="form-label">' . htmlspecialchars($lang->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:title')) . '</label> <input id="ltitle" type="text" name="ltitle" class="form-control" value="' . htmlspecialchars($this->linkAttributeValues['title'] ?? '') . '" /> </div>'; @@ -492,7 +490,7 @@ abstract class AbstractLinkBrowserController <!-- Selecting class for link: --> <div class="element-browser-form-group"> <label for="lclass" class="form-label"> - ' . htmlspecialchars($lang->getLL('class')) . ' + ' . htmlspecialchars($lang->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:class')) . ' </label> <input id="lclass" type="text" name="lclass" class="form-control" value="' . htmlspecialchars($this->linkAttributeValues['class'] ?? '') . '" /> @@ -501,7 +499,7 @@ abstract class AbstractLinkBrowserController $fieldRenderingDefinitions['params'] = ' <!-- Selecting params for link: --> <div class="element-browser-form-group"> - <label for="lparams" class="form-label">' . htmlspecialchars($lang->getLL('params')) . '</label> + <label for="lparams" class="form-label">' . htmlspecialchars($lang->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:params')) . '</label> <input id="lparams" type="text" name="lparams" class="form-control" value="' . htmlspecialchars($this->linkAttributeValues['params'] ?? '') . '" /> </div>'; diff --git a/typo3/sysext/backend/Classes/Controller/EditDocumentController.php b/typo3/sysext/backend/Classes/Controller/EditDocumentController.php index 7f3b2a03209d1dc5d926c45f13a6d7a6e583ffe2..59933e8348366d017ef59c8a91922b0c02ed4a8a 100644 --- a/typo3/sysext/backend/Classes/Controller/EditDocumentController.php +++ b/typo3/sysext/backend/Classes/Controller/EditDocumentController.php @@ -359,8 +359,6 @@ class EditDocumentController $view->setUiBlock(true); $view->setTitle($this->getShortcutTitle($request)); - $this->getLanguageService()->includeLLFile('EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf'); - // Unlock all locked records BackendUtility::lockRecords(); if ($response = $this->preInit($request)) { @@ -535,7 +533,6 @@ class EditDocumentController $beUser->user['lang'] = $newLanguageKey; // Re-create LANG to have the current request updated the translated page as well $this->getLanguageService()->init($newLanguageKey); - $this->getLanguageService()->includeLLFile('EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf'); BackendUtility::setUpdateSignal('updateModuleMenu'); BackendUtility::setUpdateSignal('updateTopbar'); } @@ -675,20 +672,23 @@ class EditDocumentController } } $recordTitle = GeneralUtility::fixed_lgd_cs(BackendUtility::getRecordTitle($table, $row), (int)$this->getBackendUser()->uc['titleLen']); - $messages[] = sprintf($this->getLanguageService()->getLL('notification.record_saved.message'), $recordTitle); + $messages[] = sprintf($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:notification.record_saved.message'), $recordTitle); } } } // Add messages to the flash message container only if the request is a save action (excludes "duplicate") if ($messages !== []) { - $title = count($messages) === 1 ? 'notification.record_saved.title.singular' : 'notification.record_saved.title.plural'; + $label = $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:notification.record_saved.title.plural'); + if (count($messages) === 1) { + $label = $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:notification.record_saved.title.singular'); + } $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier(FlashMessageQueue::NOTIFICATION_QUEUE); $flashMessage = GeneralUtility::makeInstance( FlashMessage::class, implode(LF, $messages), - $this->getLanguageService()->getLL($title), + $label, ContextualFeedbackSeverity::OK, true ); @@ -1001,8 +1001,8 @@ class EditDocumentController // info box and remove the spinner, since it will never be resolved by FormEngine. $view->setUiBlock(false); $body .= $this->getInfobox( - $this->getLanguageService()->getLL('noEditForm.message'), - $this->getLanguageService()->getLL('noEditForm'), + $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:noEditForm.message'), + $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:noEditForm'), ); } @@ -1577,7 +1577,7 @@ class EditDocumentController ->setHref($deleteUrl) ->setIcon($this->iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL)) ->setShowLabelText(true) - ->setTitle($this->getLanguageService()->getLL('deleteItem')); + ->setTitle($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:deleteItem')); $buttonBar->addButton($deleteButton, $position, $group); } } @@ -1597,7 +1597,7 @@ class EditDocumentController ]); $historyButton = $buttonBar->makeLinkButton() ->setHref($historyUrl) - ->setTitle($this->getLanguageService()->getLL('recordHistory')) + ->setTitle($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:recordHistory')) ->setIcon($this->iconFactory->getIcon('actions-document-history-open', Icon::SIZE_SMALL)); $buttonBar->addButton($historyButton, $position, $group); } @@ -1613,7 +1613,7 @@ class EditDocumentController ) { $columnsOnlyButton = $buttonBar->makeLinkButton() ->setHref($this->R_URI . '&columnsOnly=') - ->setTitle($this->getLanguageService()->getLL('editWholeRecord')) + ->setTitle($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:editWholeRecord')) ->setShowLabelText(true) ->setIcon($this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL)); diff --git a/typo3/sysext/backend/Classes/Controller/PageLayoutController.php b/typo3/sysext/backend/Classes/Controller/PageLayoutController.php index 22a83f5f57e8067ab74753002ade567873bc55d7..ca689388d8fccb09621aae23c175d89917a1bfc4 100644 --- a/typo3/sysext/backend/Classes/Controller/PageLayoutController.php +++ b/typo3/sysext/backend/Classes/Controller/PageLayoutController.php @@ -96,7 +96,6 @@ class PageLayoutController protected function initialize(ServerRequestInterface $request): void { $backendUser = $this->getBackendUser(); - $this->getLanguageService()->includeLLFile('EXT:backend/Resources/Private/Language/locallang_layout.xlf'); $this->id = (int)($request->getParsedBody()['id'] ?? $request->getQueryParams()['id'] ?? 0); $this->moduleData = $request->getAttribute('moduleData'); $this->pageinfo = BackendUtility::readPageAccess($this->id, $backendUser->getPagePermsClause(Permission::PAGE_SHOW)); @@ -190,7 +189,7 @@ class PageLayoutController 2 => $languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.view.language_comparison'), ], 'language' => [ - 0 => isset($this->availableLanguages[0]) ? $this->availableLanguages[0]->getTitle() : $languageService->getLL('m_default'), + 0 => isset($this->availableLanguages[0]) ? $this->availableLanguages[0]->getTitle() : $languageService->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:m_default'), ], ]; @@ -666,7 +665,7 @@ class PageLayoutController return $buttonBar->makeLinkButton() ->setHref((string)$this->uriBuilder->buildUriFromRoute('record_edit', $params)) - ->setTitle($this->getLanguageService()->getLL('editPageProperties')) + ->setTitle($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:editPageProperties')) ->setShowLabelText(true) ->setIcon($this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL)); } diff --git a/typo3/sysext/backend/Classes/Form/Element/BackendLayoutWizardElement.php b/typo3/sysext/backend/Classes/Form/Element/BackendLayoutWizardElement.php index 2075aa8bc3707e0fea8aa174be4c7a98142c7d1a..1ffdd88bd5322e719923b6faaaff0e9c8df34df9 100644 --- a/typo3/sysext/backend/Classes/Form/Element/BackendLayoutWizardElement.php +++ b/typo3/sysext/backend/Classes/Form/Element/BackendLayoutWizardElement.php @@ -81,7 +81,7 @@ class BackendLayoutWizardElement extends AbstractFormElement // Use CodeMirror if available if (ExtensionManagementUtility::isLoaded('t3editor')) { $codeMirrorConfig = [ - 'label' => $lang->getLL('buttons.pageTsConfig'), + 'label' => $lang->sL('LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:buttons.pageTsConfig'), 'panel' => 'top', 'mode' => GeneralUtility::jsonEncodeForHtmlAttribute(JavaScriptModuleInstruction::create('@typo3/t3editor/language/typoscript.js', 'typoscript')->invoke(), false), 'nolazyload' => 'true', @@ -95,7 +95,7 @@ class BackendLayoutWizardElement extends AbstractFormElement $resultArray['javaScriptModules'][] = JavaScriptModuleInstruction::create('@typo3/t3editor/element/code-mirror-element.js'); } else { $editor = ' - <label>' . htmlspecialchars($lang->getLL('buttons.pageTsConfig')) . '</label> + <label>' . htmlspecialchars($lang->sL('LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:buttons.pageTsConfig')) . '</label> <div class="t3js-grideditor-preview-config grideditor-preview"> <textarea class="t3js-tsconfig-preview-area form-control" rows="25" readonly></textarea> </div>'; @@ -118,11 +118,11 @@ class BackendLayoutWizardElement extends AbstractFormElement $html[] = '<div class="grideditor-control grideditor-control-top">'; $html[] = '<div class="btn-group">'; $html[] = '<a class="btn btn-default btn-sm t3js-grideditor-addrow-top" href="#"'; - $html[] = ' title="' . htmlspecialchars($lang->getLL('grid_addRow')) . '">'; + $html[] = ' title="' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_wizards.xlf:grid_addRow')) . '">'; $html[] = $this->iconFactory->getIcon('actions-plus', Icon::SIZE_SMALL)->render(); $html[] = '</a>'; $html[] = '<a class="btn btn-default btn-sm t3js-grideditor-removerow-top" href="#"'; - $html[] = ' title="' . htmlspecialchars($lang->getLL('grid_removeRow')) . '">'; + $html[] = ' title="' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_wizards.xlf:grid_removeRow')) . '">'; $html[] = $this->iconFactory->getIcon('actions-minus', Icon::SIZE_SMALL)->render(); $html[] = '</a>'; $html[] = '</div>'; @@ -143,11 +143,11 @@ class BackendLayoutWizardElement extends AbstractFormElement $html[] = '<div class="grideditor-control grideditor-control-right">'; $html[] = '<div class="btn-group-vertical">'; $html[] = '<a class="btn btn-default btn-sm t3js-grideditor-addcolumn" href="#"'; - $html[] = ' title="' . htmlspecialchars($lang->getLL('grid_addColumn')) . '">'; + $html[] = ' title="' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_wizards.xlf:grid_addColumn')) . '">'; $html[] = $this->iconFactory->getIcon('actions-plus', Icon::SIZE_SMALL)->render(); $html[] = '</a>'; $html[] = '<a class="btn btn-default btn-sm t3js-grideditor-removecolumn" href="#"'; - $html[] = ' title="' . htmlspecialchars($lang->getLL('grid_removeColumn')) . '">'; + $html[] = ' title="' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_wizards.xlf:grid_removeColumn')) . '">'; $html[] = $this->iconFactory->getIcon('actions-minus', Icon::SIZE_SMALL)->render(); $html[] = '</a>'; $html[] = '</div>'; @@ -155,11 +155,11 @@ class BackendLayoutWizardElement extends AbstractFormElement $html[] = '<div class="grideditor-control grideditor-control-bottom">'; $html[] = '<div class="btn-group">'; $html[] = '<a class="btn btn-default btn-sm t3js-grideditor-addrow-bottom" href="#"'; - $html[] = ' title="' . htmlspecialchars($lang->getLL('grid_addRow')) . '">'; + $html[] = ' title="' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_wizards.xlf:grid_addRow')) . '">'; $html[] = $this->iconFactory->getIcon('actions-plus', Icon::SIZE_SMALL)->render(); $html[] = '</a>'; $html[] = '<a class="btn btn-default btn-sm t3js-grideditor-removerow-bottom" href="#"'; - $html[] = ' title="' . htmlspecialchars($lang->getLL('grid_removeRow')) . '">'; + $html[] = ' title="' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_wizards.xlf:grid_removeRow')) . '">'; $html[] = $this->iconFactory->getIcon('actions-minus', Icon::SIZE_SMALL)->render(); $html[] = '</a>'; $html[] = '</div>'; diff --git a/typo3/sysext/backend/Classes/LinkHandler/PageLinkHandler.php b/typo3/sysext/backend/Classes/LinkHandler/PageLinkHandler.php index 62ba814c77344f30267ac30acac8393c5b66ba4e..c805e6658c2bf4489cbe6a65352f3788b0de4d40 100644 --- a/typo3/sysext/backend/Classes/LinkHandler/PageLinkHandler.php +++ b/typo3/sysext/backend/Classes/LinkHandler/PageLinkHandler.php @@ -89,7 +89,7 @@ class PageLinkHandler extends AbstractLinkHandler implements LinkHandlerInterfac $id = (int)$this->linkParts['url']['pageuid']; $pageTitle = BackendUtility::getRecordWSOL('pages', $id, 'title')['title'] ?? ''; - return $lang->getLL('page') + return $lang->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:page') . ($pageTitle ? ' \'' . GeneralUtility::fixed_lgd_cs($pageTitle, $titleLen) . '\'' : '') . ' (ID: ' . $id . (!empty($this->linkParts['url']['fragment']) ? ', #' . $this->linkParts['url']['fragment'] : '') . ')'; } @@ -245,13 +245,13 @@ class PageLinkHandler extends AbstractLinkHandler implements LinkHandlerInterfac $fieldDefinitions['pageIdSelector'] = ' <form><div class="row mt-3"> <label class="col-3 col-form-label"> - ' . htmlspecialchars($this->getLanguageService()->getLL('page_id')) . ' + ' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:page_id')) . ' </label> <div class="col-2"> <input type="number" size="6" name="luid" id="luid" class="form-control" /> </div> <div class="col-7"> - <input class="btn btn-default t3js-pageLink" type="submit" value="' . htmlspecialchars($this->getLanguageService()->getLL('setLink')) . '" /> + <input class="btn btn-default t3js-pageLink" type="submit" value="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:setLink')) . '" /> </div> </div></form>'; } diff --git a/typo3/sysext/backend/Classes/LinkHandler/RecordLinkHandler.php b/typo3/sysext/backend/Classes/LinkHandler/RecordLinkHandler.php index 0acfba91935a75a74c55492df13ea8bd231537fb..33fefca7256fe555c966754db153112022fdfe22 100644 --- a/typo3/sysext/backend/Classes/LinkHandler/RecordLinkHandler.php +++ b/typo3/sysext/backend/Classes/LinkHandler/RecordLinkHandler.php @@ -112,7 +112,7 @@ final class RecordLinkHandler extends AbstractLinkHandler implements LinkHandler $table = $this->configuration['table']; $record = BackendUtility::getRecord($table, $data['uid']); if ($record === null) { - $linkParts['title'] = $this->getLanguageService()->getLL('recordNotFound'); + $linkParts['title'] = $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:recordNotFound'); } else { $linkParts['pid'] = (int)$record['pid']; $linkParts['title'] = !empty($linkParts['title']) ? $linkParts['title'] : BackendUtility::getRecordTitle($table, $record); diff --git a/typo3/sysext/backend/Classes/Preview/StandardContentPreviewRenderer.php b/typo3/sysext/backend/Classes/Preview/StandardContentPreviewRenderer.php index 158881e14b9f2b8847aff17f4101a6b6ac4abae5..23ce857669567f2e1363e4e69f6e64151c70ce46 100644 --- a/typo3/sysext/backend/Classes/Preview/StandardContentPreviewRenderer.php +++ b/typo3/sysext/backend/Classes/Preview/StandardContentPreviewRenderer.php @@ -152,7 +152,7 @@ class StandardContentPreviewRenderer implements PreviewRendererInterface, Logger $out .= '<div class="alert alert-danger">' . htmlspecialchars($message) . '</div>'; } } else { - $out .= '<div class="alert alert-warning">' . $languageService->getLL('noPluginSelected') . '</div>'; + $out .= '<div class="alert alert-warning">' . $languageService->sL('LLL:EXT:typo3/sysext/backend/Resources/Private/Language/locallang_layout.xlf:noPluginSelected') . '</div>'; } break; default: @@ -375,7 +375,7 @@ class StandardContentPreviewRenderer implements PreviewRendererInterface, Logger ]; $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class); $url = (string)$uriBuilder->buildUriFromRoute('record_edit', $urlParameters); - return '<a href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars($this->getLanguageService()->getLL('edit')) . '">' . $linkText . '</a>'; + return '<a href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:typo3/sysext/backend/Resources/Private/Language/locallang_layout.xlf:edit')) . '">' . $linkText . '</a>'; } return $linkText; } diff --git a/typo3/sysext/backend/Classes/RecordList/DatabaseRecordList.php b/typo3/sysext/backend/Classes/RecordList/DatabaseRecordList.php index 9fb17531e5f5633d4cf2f9391bac4ddb08e47408..150e6700c369b76c70716541d08c61026dce8a5e 100644 --- a/typo3/sysext/backend/Classes/RecordList/DatabaseRecordList.php +++ b/typo3/sysext/backend/Classes/RecordList/DatabaseRecordList.php @@ -620,8 +620,8 @@ class DatabaseRecordList $theData[$titleCol] = $tableTitle . ' (<span class="t3js-table-total-items">' . $totalItems . '</span>)'; } else { $icon = $this->table // @todo separate table header from contract/expand link - ? '<span title="' . htmlspecialchars($lang->getLL('contractView')) . '">' . $this->iconFactory->getIcon('actions-view-table-collapse', Icon::SIZE_SMALL)->render() . '</span>' - : '<span title="' . htmlspecialchars($lang->getLL('expandView')) . '">' . $this->iconFactory->getIcon('actions-view-table-expand', Icon::SIZE_SMALL)->render() . '</span>'; + ? '<span title="' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:contractView')) . '">' . $this->iconFactory->getIcon('actions-view-table-collapse', Icon::SIZE_SMALL)->render() . '</span>' + : '<span title="' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:expandView')) . '">' . $this->iconFactory->getIcon('actions-view-table-expand', Icon::SIZE_SMALL)->render() . '</span>'; $theData[$titleCol] = $this->linkWrapTable($table, $tableTitle . ' (<span class="t3js-table-total-items">' . $totalItems . '</span>) ' . $icon); } $tableActions = ''; @@ -631,7 +631,7 @@ class DatabaseRecordList $tableActions .= $this->createNewRecordButton($table); // Render collapse button if in multi table mode if (!$this->table) { - $title = sprintf(htmlspecialchars($lang->getLL('collapseExpandTable')), $tableTitle); + $title = sprintf(htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:collapseExpandTable')), $tableTitle); $icon = '<span class="collapseIcon">' . $this->iconFactory->getIcon(($tableCollapsed ? 'actions-view-list-expand' : 'actions-view-list-collapse'), Icon::SIZE_SMALL)->render() . '</span>'; $tableActions .= ' <button type="button"' @@ -817,7 +817,7 @@ class DatabaseRecordList } $iconIdentifier = 'actions-plus'; - $title = $this->getLanguageService()->getLL('new'); + $title = $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:new'); $attributes = [ 'title' => $title, 'aria-label' => $title, @@ -1155,10 +1155,11 @@ class DatabaseRecordList $theData[$fCol] = '<i class="hidden">' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels._CONTROL_')) . '</i>'; // In single table view, add button to edit displayed fields of marked / listed records if ($this->table && $permsEdit && is_array($currentIdList) && $this->isEditable($table)) { + $label = htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:editShownColumns')); $theData[$fCol] = '<button type="button"' . ' class="btn btn-default t3js-record-edit-multiple"' - . ' title="' . htmlspecialchars($lang->getLL('editShownColumns')) . '"' - . ' aria-label="' . htmlspecialchars($lang->getLL('editShownColumns')) . '"' + . ' title="' . $label . '"' + . ' aria-label="' . $label . '"' . ' data-return-url="' . htmlspecialchars($this->listURL()) . '"' . ' data-columns-only="' . htmlspecialchars(implode(',', $this->fieldArray)) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() @@ -1180,7 +1181,7 @@ class DatabaseRecordList case '_LOCALIZATION_b': // Show translation options if ($this->showLocalizeColumn[$table] ?? false) { - $theData[$fCol] = '<i>' . htmlspecialchars($lang->getLL('Localize')) . '</i>'; + $theData[$fCol] = '<i>' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:Localize')) . '</i>'; } break; default: @@ -1218,13 +1219,13 @@ class DatabaseRecordList && $this->clipObj->current !== 'normal' ) { $theData[$fCol] .= '<a class="btn btn-default" href="' . htmlspecialchars($this->listURL() . '&duplicateField=' . $fCol) - . '" title="' . htmlspecialchars($lang->getLL('clip_duplicates')) . '">' + . '" title="' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:clip_duplicates')) . '">' . $this->iconFactory->getIcon('actions-document-duplicates-select', Icon::SIZE_SMALL)->render() . '</a>'; } // If the table can be edited, add link for editing THIS field for all // listed records: if ($this->isEditable($table) && $permsEdit && ($GLOBALS['TCA'][$table]['columns'][$fCol] ?? false)) { - $iTitle = sprintf($lang->getLL('editThisColumn'), $sortLabel); + $iTitle = sprintf($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:editThisColumn'), $sortLabel); $theData[$fCol] .= '<button type="button"' . ' class="btn btn-default t3js-record-edit-multiple"' . ' title="' . htmlspecialchars($iTitle) . '"' @@ -1370,7 +1371,7 @@ class DatabaseRecordList $params['returnUrl'] = $this->listURL(); $editLink = $this->uriBuilder->buildUriFromRoute('record_edit', $params); $editAction = '<a class="btn btn-default" href="' . htmlspecialchars($editLink) . '"' - . ' title="' . htmlspecialchars($this->getLanguageService()->getLL('edit')) . '">' . $this->iconFactory->getIcon($iconIdentifier, Icon::SIZE_SMALL)->render() . '</a>'; + . ' title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:edit')) . '">' . $this->iconFactory->getIcon($iconIdentifier, Icon::SIZE_SMALL)->render() . '</a>'; } else { $editAction = $this->spaceIcon; } @@ -1378,11 +1379,12 @@ class DatabaseRecordList // "Info" if (!$isDeletePlaceHolder) { + $label = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:showInfo')); $viewBigAction = '<button type="button" aria-haspopup="dialog"' . ' class="btn btn-default" ' . $this->createShowItemTagAttributes($table . ',' . ($row['uid'] ?? 0)) - . ' title="' . htmlspecialchars($this->getLanguageService()->getLL('showInfo')) . '"' - . ' aria-label="' . htmlspecialchars($this->getLanguageService()->getLL('showInfo')) . '">' + . ' title="' . $label . '"' + . ' aria-label="' . $label . '">' . $this->iconFactory->getIcon('actions-document-info', Icon::SIZE_SMALL)->render() . '</button>'; $this->addActionToCellGroup($cells, $viewBigAction, 'viewBig'); @@ -1395,7 +1397,7 @@ class DatabaseRecordList if ($isL10nOverlay || $isDeletePlaceHolder) { $moveAction = $this->spaceIcon; } elseif ($table === 'pages') { - $linkTitleLL = htmlspecialchars($this->getLanguageService()->getLL('move_page')); + $linkTitleLL = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:move_page')); $icon = $this->iconFactory->getIcon('actions-page-move', Icon::SIZE_SMALL); $url = (string)$this->uriBuilder->buildUriFromRoute('move_page', [ 'uid' => $row['uid'], @@ -1403,7 +1405,7 @@ class DatabaseRecordList ]); $moveAction = '<a class="btn btn-default" href="' . htmlspecialchars($url) . '" aria-label="' . $linkTitleLL . '">' . $icon->render() . '</a>'; } else { - $linkTitleLL = htmlspecialchars($this->getLanguageService()->getLL('move_record')); + $linkTitleLL = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:move_record')); $icon = $this->iconFactory->getIcon('actions-document-move', Icon::SIZE_SMALL); $url = (string)$this->uriBuilder->buildUriFromRoute('move_element', [ 'uid' => $row['uid'], @@ -1424,7 +1426,7 @@ class DatabaseRecordList 'returnUrl' => $this->listURL(), ]) . '#latest'; $historyAction = '<a class="btn btn-default" href="' . htmlspecialchars($moduleUrl) . '" title="' - . htmlspecialchars($this->getLanguageService()->getLL('history')) . '">' + . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:history')) . '">' . $this->iconFactory->getIcon('actions-document-history-open', Icon::SIZE_SMALL)->render() . '</a>'; $this->addActionToCellGroup($cells, $historyAction, 'history'); } else { @@ -1444,7 +1446,7 @@ class DatabaseRecordList ]; $href = (string)$this->uriBuilder->buildUriFromRoute('permissions_pages', $params); $permsAction = '<a class="btn btn-default" href="' . htmlspecialchars($href) . '" title="' - . htmlspecialchars($this->getLanguageService()->getLL('permissions')) . '">' + . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:permissions')) . '">' . $this->iconFactory->getIcon('actions-lock', Icon::SIZE_SMALL)->render() . '</a>'; } $this->addActionToCellGroup($cells, $permsAction, 'perms'); @@ -1467,12 +1469,15 @@ class DatabaseRecordList 'returnUrl' => $this->listURL(), ]; $icon = ($table === 'pages' ? $this->iconFactory->getIcon('actions-page-new', Icon::SIZE_SMALL) : $this->iconFactory->getIcon('actions-plus', Icon::SIZE_SMALL)); - $titleLabel = 'new'; + $titleLabel = $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:new'); if ($GLOBALS['TCA'][$table]['ctrl']['sortby'] ?? false) { - $titleLabel .= ($table === 'pages' ? 'Page' : 'Record'); + $titleLabel = $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:newRecord'); + if ($table === 'pages') { + $titleLabel = $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:newPage'); + } } $newLink = $this->uriBuilder->buildUriFromRoute('record_edit', $params); - $newAction = '<a class="btn btn-default" href="' . htmlspecialchars($newLink) . '" title="' . htmlspecialchars($this->getLanguageService()->getLL($titleLabel)) . '">' + $newAction = '<a class="btn btn-default" href="' . htmlspecialchars($newLink) . '" title="' . htmlspecialchars($titleLabel) . '">' . $icon->render() . '</a>'; $this->addActionToCellGroup($cells, $newAction, 'new'); } @@ -1488,8 +1493,8 @@ class DatabaseRecordList if (!$permsEdit || $isDeletePlaceHolder || $this->isRecordCurrentBackendUser($table, $row)) { $hideAction = $this->spaceIcon; } else { - $hideTitle = htmlspecialchars($this->getLanguageService()->getLL('hide' . ($table === 'pages' ? 'Page' : ''))); - $unhideTitle = htmlspecialchars($this->getLanguageService()->getLL('unHide' . ($table === 'pages' ? 'Page' : ''))); + $hideTitle = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:hide' . ($table === 'pages' ? 'Page' : ''))); + $unhideTitle = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:unHide' . ($table === 'pages' ? 'Page' : ''))); if ($row[$hiddenField] ?? false) { $params = 'data[' . $table . '][' . $rowUid . '][' . $hiddenField . ']=0'; $hideAction = '<button type="button"' @@ -1523,7 +1528,7 @@ class DatabaseRecordList $params['redirect'] = $this->listURL(); $params['cmd'][$table][$row['uid']]['move'] = $this->currentTable['prev'][$row['uid']]; $url = (string)$this->uriBuilder->buildUriFromRoute('tce_db', $params); - $moveUpAction = '<a class="btn btn-default" href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars($this->getLanguageService()->getLL('moveUp')) . '">' + $moveUpAction = '<a class="btn btn-default" href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:moveUp')) . '">' . $this->iconFactory->getIcon('actions-move-up', Icon::SIZE_SMALL)->render() . '</a>'; } else { $moveUpAction = $this->spaceIcon; @@ -1536,7 +1541,7 @@ class DatabaseRecordList $params['redirect'] = $this->listURL(); $params['cmd'][$table][$row['uid']]['move'] = $this->currentTable['next'][$row['uid']]; $url = (string)$this->uriBuilder->buildUriFromRoute('tce_db', $params); - $moveDownAction = '<a class="btn btn-default" href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars($this->getLanguageService()->getLL('moveDown')) . '">' + $moveDownAction = '<a class="btn btn-default" href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:moveDown')) . '">' . $this->iconFactory->getIcon('actions-move-down', Icon::SIZE_SMALL)->render() . '</a>'; } else { $moveDownAction = $this->spaceIcon; @@ -1567,10 +1572,10 @@ class DatabaseRecordList $row['uid'], LF . $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.translationsOfRecord') ); - $warningText = sprintf($this->getLanguageService()->getLL($actionName . 'Warning'), trim($recordInfo)) . $refCountMsg; + $warningText = sprintf($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:' . $actionName . 'Warning'), trim($recordInfo)) . $refCountMsg; $params = 'cmd[' . $table . '][' . $row['uid'] . '][delete]=1'; $icon = $this->iconFactory->getIcon('actions-edit-' . $actionName, Icon::SIZE_SMALL)->render(); - $linkTitle = htmlspecialchars($this->getLanguageService()->getLL($actionName)); + $linkTitle = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:' . $actionName)); $titleText = $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:label.confirm.delete_record.title'); $l10nParentField = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] ?? ''; $deleteAction = '<button type="button" class="btn btn-default t3js-record-delete"' @@ -1598,10 +1603,11 @@ class DatabaseRecordList $params['redirect'] = $this->listURL(); $params['cmd'][$table][$row['uid']]['move'] = -$this->id; $url = (string)$this->uriBuilder->buildUriFromRoute('tce_db', $params); + $label = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:prevLevel')); $moveLeftAction = '<a class="btn btn-default"' . ' href="' . htmlspecialchars($url) . '"' - . ' title="' . htmlspecialchars($this->getLanguageService()->getLL('prevLevel')) . '"' - . ' aria-label="' . htmlspecialchars($this->getLanguageService()->getLL('prevLevel')) . '">' + . ' title="' . $label . '"' + . ' aria-label="' . $label . '">' . $this->iconFactory->getIcon('actions-move-left', Icon::SIZE_SMALL)->render() . '</a>'; $this->addActionToCellGroup($cells, $moveLeftAction, 'moveLeft'); @@ -1620,10 +1626,11 @@ class DatabaseRecordList $params['redirect'] = $this->listURL(); $params['cmd'][$table][$row['uid']]['move'] = $this->currentTable['prevUid'][$row['uid']]; $url = (string)$this->uriBuilder->buildUriFromRoute('tce_db', $params); + $label = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:nextLevel')); $moveRightAction = '<a class="btn btn-default"' . ' href="' . htmlspecialchars($url) . '"' - . ' title="' . htmlspecialchars($this->getLanguageService()->getLL('nextLevel')) . '"' - . ' aria-label="' . htmlspecialchars($this->getLanguageService()->getLL('nextLevel')) . '">' + . ' title="' . $label . '"' + . ' aria-label="' . $label . '">' . $this->iconFactory->getIcon('actions-move-right', Icon::SIZE_SMALL)->render() . '</a>'; } else { $moveRightAction = $this->spaceIcon; @@ -1755,7 +1762,7 @@ class DatabaseRecordList } else { $this->addDividerToCellGroup($cells); $pasteAfterUrl = $this->clipObj->pasteUrl($table, -$row['uid']); - $pasteAfterTitle = $this->getLanguageService()->getLL('clip_pasteAfter'); + $pasteAfterTitle = $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:clip_pasteAfter'); $pasteAfterContent = $this->clipObj->confirmMsgText($table, $row, 'after', $elFromTable); $clipboardCells['pasteAfter'] = ' <button type="button" class="btn btn-default t3js-modal-trigger" data-severity="warning" aria-haspopup="dialog" title="' . htmlspecialchars($pasteAfterTitle) . '" aria-label="' . htmlspecialchars($pasteAfterTitle) . '" data-uri="' . htmlspecialchars($pasteAfterUrl) . '" data-bs-content="' . htmlspecialchars($pasteAfterContent) . '"> @@ -1769,7 +1776,7 @@ class DatabaseRecordList } else { $this->addDividerToCellGroup($cells); $pasteIntoUrl = $this->clipObj->pasteUrl('', $row['uid']); - $pasteIntoTitle = $this->getLanguageService()->getLL('clip_pasteInto'); + $pasteIntoTitle = $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:clip_pasteInto'); $pasteIntoContent = $this->clipObj->confirmMsgText($table, $row, 'into', $elFromTable); $clipboardCells['pasteInto'] = ' <button type="button" class="btn btn-default t3js-modal-trigger" aria-haspopup="dialog" data-severity="warning" title="' . htmlspecialchars($pasteIntoTitle) . '" aria-label="' . htmlspecialchars($pasteIntoTitle) . '" data-uri="' . htmlspecialchars($pasteIntoUrl) . '" data-bs-content="' . htmlspecialchars($pasteIntoContent) . '"> @@ -2509,9 +2516,10 @@ class DatabaseRecordList 'returnUrl' => $this->listURL(), ]; $editLink = $this->uriBuilder->buildUriFromRoute('record_edit', $params); + $label = htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:edit')); $code = '<a href="' . htmlspecialchars($editLink) . '"' - . ' title="' . htmlspecialchars($lang->getLL('edit')) . '"' - . ' aria-label="' . htmlspecialchars($lang->getLL('edit')) . '">' + . ' title="' . $label . '"' + . ' aria-label="' . $label . '">' . $code . '</a>'; } break; @@ -2528,10 +2536,11 @@ class DatabaseRecordList break; case 'info': // "Info": (All records) + $label = htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:showInfo')); $code = '<a href="#" role="button"' // @todo add handler that triggers click on space key . $this->createShowItemTagAttributes($table . ',' . (int)$row['uid']) - . ' title="' . htmlspecialchars($lang->getLL('showInfo')) . '"' - . ' aria-label="' . htmlspecialchars($lang->getLL('showInfo')) . '"' + . ' title="' . $label . '"' + . ' aria-label="' . $label . '"' . ' aria-haspopup="dialog">' . $code . '</a>'; @@ -3009,8 +3018,8 @@ class DatabaseRecordList $deleteActionConfiguration = GeneralUtility::jsonEncodeForHtmlAttribute([ 'idField' => 'uid', 'ok' => $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.delete'), - 'title' => $lang->getLL('clip_deleteMarked'), - 'content' => sprintf($lang->getLL('clip_deleteMarkedWarning'), $lang->sL($GLOBALS['TCA'][$table]['ctrl']['title'])), + 'title' => $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:clip_deleteMarked'), + 'content' => sprintf($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:clip_deleteMarkedWarning'), $lang->sL($GLOBALS['TCA'][$table]['ctrl']['title'])), ], true); $actions['delete'] = ' <button type="button" class="btn btn-sm btn-default" data-multi-record-selection-action="delete" data-multi-record-selection-action-config="' . $deleteActionConfiguration . '" aria-haspopup="dialog"> diff --git a/typo3/sysext/backend/Classes/RecordList/ElementBrowserRecordList.php b/typo3/sysext/backend/Classes/RecordList/ElementBrowserRecordList.php index f1d18ae48abf4295747815a3a19e3ef15dc28be1..aa53c5af02059a346580ea146042dac7934abb7c 100644 --- a/typo3/sysext/backend/Classes/RecordList/ElementBrowserRecordList.php +++ b/typo3/sysext/backend/Classes/RecordList/ElementBrowserRecordList.php @@ -57,8 +57,8 @@ class ElementBrowserRecordList extends DatabaseRecordList } $title = BackendUtility::getRecordTitle($table, $row, false, true); - $ATag = '<a href="#" data-close="0" title="' . htmlspecialchars($this->getLanguageService()->getLL('addToList')) . '">'; - $ATag_alt = '<a href="#" data-close="1" title="' . htmlspecialchars($this->getLanguageService()->getLL('addToList')) . '">'; + $ATag = '<a href="#" data-close="0" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:addToList')) . '">'; + $ATag_alt = '<a href="#" data-close="1" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:addToList')) . '">'; $ATag_e = '</a>'; $out = '<span data-uid="' . htmlspecialchars($row['uid']) . '" data-table="' . htmlspecialchars($table) . '" data-title="' . htmlspecialchars($title) . '">'; $out .= $ATag . $this->iconFactory->getIcon('actions-plus', Icon::SIZE_SMALL)->render() . $ATag_e . $ATag_alt . $code . $ATag_e; diff --git a/typo3/sysext/backend/Classes/View/BackendLayout/ContentFetcher.php b/typo3/sysext/backend/Classes/View/BackendLayout/ContentFetcher.php index 6c71d8dde81fc3e61ac31b0d0f69dcb275362add..6cec186aa050c36872ee161663a0acbfa09857b3 100644 --- a/typo3/sysext/backend/Classes/View/BackendLayout/ContentFetcher.php +++ b/typo3/sysext/backend/Classes/View/BackendLayout/ContentFetcher.php @@ -192,8 +192,8 @@ class ContentFetcher $message = GeneralUtility::makeInstance( FlashMessage::class, - $this->getLanguageService()->getLL('staleTranslationWarning'), - sprintf($this->getLanguageService()->getLL('staleTranslationWarningTitle'), $siteLanguage->getTitle()), + $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:staleTranslationWarning'), + sprintf($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:staleTranslationWarningTitle'), $siteLanguage->getTitle()), ContextualFeedbackSeverity::WARNING ); $service = GeneralUtility::makeInstance(FlashMessageService::class); diff --git a/typo3/sysext/backend/Classes/View/BackendLayout/Grid/GridColumn.php b/typo3/sysext/backend/Classes/View/BackendLayout/Grid/GridColumn.php index 3dc9bed0e0dfb8432a2327a7fa2e4ddf11be7b2c..186f4cdcdc2849368dd52abcb9b1e83b01459845 100644 --- a/typo3/sysext/backend/Classes/View/BackendLayout/Grid/GridColumn.php +++ b/typo3/sysext/backend/Classes/View/BackendLayout/Grid/GridColumn.php @@ -206,12 +206,12 @@ class GridColumn extends AbstractGridObject public function getTitleInaccessible(): string { - return $this->getLanguageService()->sL($this->columnName) . ' (' . $this->getLanguageService()->getLL('noAccess') . ')'; + return $this->getLanguageService()->sL($this->columnName) . ' (' . $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:noAccess') . ')'; } public function getTitleUnassigned(): string { - return $this->getLanguageService()->sL($this->columnName) . ' (' . $this->getLanguageService()->getLL('notAssigned') . ')'; + return $this->getLanguageService()->sL($this->columnName) . ' (' . $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:notAssigned') . ')'; } public function getBeforeSectionMarkup(): string diff --git a/typo3/sysext/backend/Classes/View/BackendLayout/Grid/GridColumnItem.php b/typo3/sysext/backend/Classes/View/BackendLayout/Grid/GridColumnItem.php index 53ff548e2b763f3e043dba23d5154221254a74e5..7358701740504903a24a3f6c232c92cfdef2905a 100644 --- a/typo3/sysext/backend/Classes/View/BackendLayout/Grid/GridColumnItem.php +++ b/typo3/sysext/backend/Classes/View/BackendLayout/Grid/GridColumnItem.php @@ -313,7 +313,10 @@ class GridColumnItem extends AbstractGridObject public function getVisibilityToggleTitle(): string { $hiddenField = $GLOBALS['TCA']['tt_content']['ctrl']['enablecolumns']['disabled']; - return $this->getLanguageService()->getLL($this->record[$hiddenField] ? 'unhide' : 'hide'); + if ($this->record[$hiddenField]) { + return $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:unhide'); + } + return $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:hide'); } public function getVisibilityToggleIconName(): string diff --git a/typo3/sysext/backend/Classes/View/BackendLayout/Grid/LanguageColumn.php b/typo3/sysext/backend/Classes/View/BackendLayout/Grid/LanguageColumn.php index 5508bf59605c7452a6d8afaffdf4c4124bfa758b..4ec003e506aee51a7023cc5db1bd3b2e4b3b06e7 100644 --- a/typo3/sysext/backend/Classes/View/BackendLayout/Grid/LanguageColumn.php +++ b/typo3/sysext/backend/Classes/View/BackendLayout/Grid/LanguageColumn.php @@ -103,7 +103,7 @@ class LanguageColumn extends AbstractGridObject public function getTranslatePageTitle(): string { - return $this->getLanguageService()->getLL('newPageContent_translate'); + return $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:newPageContent_translate'); } public function getAllowEditPage(): bool @@ -114,7 +114,7 @@ class LanguageColumn extends AbstractGridObject public function getPageEditTitle(): string { - return $this->getLanguageService()->getLL('edit'); + return $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:edit'); } public function getPageEditUrl(): string diff --git a/typo3/sysext/backend/Classes/View/Drawing/BackendLayoutRenderer.php b/typo3/sysext/backend/Classes/View/Drawing/BackendLayoutRenderer.php index 6896caf7071596204222c3ec941f63a70206196b..63a3321b7e006557538306264e0bb924112abdf1 100644 --- a/typo3/sysext/backend/Classes/View/Drawing/BackendLayoutRenderer.php +++ b/typo3/sysext/backend/Classes/View/Drawing/BackendLayoutRenderer.php @@ -94,8 +94,8 @@ class BackendLayoutRenderer $view->assignMultiple([ 'context' => $pageLayoutContext, 'hideRestrictedColumns' => (bool)(BackendUtility::getPagesTSconfig($pageLayoutContext->getPageId())['mod.']['web_layout.']['hideRestrictedCols'] ?? false), - 'newContentTitle' => $this->getLanguageService()->getLL('newContentElement'), - 'newContentTitleShort' => $this->getLanguageService()->getLL('content'), + 'newContentTitle' => $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:newContentElement'), + 'newContentTitleShort' => $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:content'), 'allowEditContent' => $backendUser->check('tables_modify', 'tt_content'), 'maxTitleLength' => $backendUser->uc['titleLen'] ?? 20, ]); @@ -130,8 +130,8 @@ class BackendLayoutRenderer if (!empty($unusedRecords)) { $unusedElementsMessage = GeneralUtility::makeInstance( FlashMessage::class, - $this->getLanguageService()->getLL('staleUnusedElementsWarning'), - $this->getLanguageService()->getLL('staleUnusedElementsWarningTitle'), + $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:staleUnusedElementsWarning'), + $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:staleUnusedElementsWarningTitle'), ContextualFeedbackSeverity::WARNING ); $service = GeneralUtility::makeInstance(FlashMessageService::class); diff --git a/typo3/sysext/backend/Classes/View/PageLayoutContext.php b/typo3/sysext/backend/Classes/View/PageLayoutContext.php index f98d259068b0910dc93f0629207b00e6d5b4eb4e..de29f97ccc6df384f692023a99fd0c7bb171bf3b 100644 --- a/typo3/sysext/backend/Classes/View/PageLayoutContext.php +++ b/typo3/sysext/backend/Classes/View/PageLayoutContext.php @@ -273,13 +273,13 @@ class PageLayoutContext { switch ($this->getLanguageModeIdentifier()) { case 'mixed': - $languageMode = $this->getLanguageService()->getLL('languageModeMixed'); + $languageMode = $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:languageModeMixed'); break; case 'connected': - $languageMode = $this->getLanguageService()->getLL('languageModeConnected'); + $languageMode = $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:languageModeConnected'); break; case 'free': - $languageMode = $this->getLanguageService()->getLL('languageModeFree'); + $languageMode = $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:languageModeFree'); break; default: $languageMode = ''; @@ -331,7 +331,7 @@ class PageLayoutContext // If any languages are left, make selector: $options = []; if (!empty($availableTranslations)) { - $options[] = $this->getLanguageService()->getLL('new_language'); + $options[] = $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:new_language'); foreach ($availableTranslations as $languageUid => $languageTitle) { // Build localize command URL to DataHandler (tce_db) // which redirects to FormEngine (record_edit) diff --git a/typo3/sysext/backend/Resources/Private/Language/locallang_browse_links.xlf b/typo3/sysext/backend/Resources/Private/Language/locallang_browse_links.xlf index 82f3f2aa06d8f45c789ad312fcc958b256cfe803..a712ad8d7d21602523d9134b634601f8d03ac050 100644 --- a/typo3/sysext/backend/Resources/Private/Language/locallang_browse_links.xlf +++ b/typo3/sysext/backend/Resources/Private/Language/locallang_browse_links.xlf @@ -156,6 +156,9 @@ <trans-unit id="no_files_search" resname="no_files_search"> <source>No files found in %s for "%s"</source> </trans-unit> + <trans-unit id="recordNotFound" resname="recordNotFound"> + <source>Record not found</source> + </trans-unit> </body> </file> </xliff> diff --git a/typo3/sysext/extensionmanager/Tests/Unit/Report/ExtensionStatusTest.php b/typo3/sysext/extensionmanager/Tests/Unit/Report/ExtensionStatusTest.php index 695d7d6915b778df16fcda96ab6c8279fa829e5c..c7dcc7867f39a4bb0e1697b409d90eff854944ba 100644 --- a/typo3/sysext/extensionmanager/Tests/Unit/Report/ExtensionStatusTest.php +++ b/typo3/sysext/extensionmanager/Tests/Unit/Report/ExtensionStatusTest.php @@ -200,8 +200,6 @@ final class ExtensionStatusTest extends UnitTestCase public function getStatusReturnsErrorForLoadedExtensionIfInsecureExtensionIsLoaded(): void { $languageServiceMock = $this->createMock(LanguageService::class); - $languageServiceMock->method('includeLLFile')->with(self::anything())->willReturn([]); - $languageServiceMock->method('getLL')->with(self::anything())->willReturn(''); $languageServiceFactoryMock = $this->createMock(LanguageServiceFactory::class); $languageServiceFactoryMock->method('createFromUserPreferences')->with(self::anything())->willReturn($languageServiceMock); @@ -225,8 +223,6 @@ final class ExtensionStatusTest extends UnitTestCase public function getStatusReturnsOkForExistingExtensionIfNoInsecureExtensionExists(): void { $languageServiceMock = $this->createMock(LanguageService::class); - $languageServiceMock->method('includeLLFile')->with(self::anything())->willReturn([]); - $languageServiceMock->method('getLL')->with(self::anything())->willReturn(''); $languageServiceFactoryMock = $this->createMock(LanguageServiceFactory::class); $languageServiceFactoryMock->method('createFromUserPreferences')->with(self::anything())->willReturn($languageServiceMock); @@ -251,8 +247,6 @@ final class ExtensionStatusTest extends UnitTestCase public function getStatusReturnsWarningForExistingExtensionIfInsecureExtensionExistsButIsNotLoaded(): void { $languageServiceMock = $this->createMock(LanguageService::class); - $languageServiceMock->method('includeLLFile')->with(self::anything())->willReturn([]); - $languageServiceMock->method('getLL')->with(self::anything())->willReturn(''); $languageServiceFactoryMock = $this->createMock(LanguageServiceFactory::class); $languageServiceFactoryMock->method('createFromUserPreferences')->with(self::anything())->willReturn($languageServiceMock); @@ -276,8 +270,6 @@ final class ExtensionStatusTest extends UnitTestCase public function getStatusReturnsWarningForLoadedExtensionIfOutdatedExtensionIsLoaded(): void { $languageServiceMock = $this->createMock(LanguageService::class); - $languageServiceMock->method('includeLLFile')->with(self::anything())->willReturn([]); - $languageServiceMock->method('getLL')->with(self::anything())->willReturn(''); $languageServiceFactoryMock = $this->createMock(LanguageServiceFactory::class); $languageServiceFactoryMock->method('createFromUserPreferences')->with(self::anything())->willReturn($languageServiceMock); @@ -301,8 +293,6 @@ final class ExtensionStatusTest extends UnitTestCase public function getStatusReturnsErrorForExistingExtensionIfOutdatedExtensionExists(): void { $languageServiceMock = $this->createMock(LanguageService::class); - $languageServiceMock->method('includeLLFile')->with(self::anything())->willReturn([]); - $languageServiceMock->method('getLL')->with(self::anything())->willReturn(''); $languageServiceFactoryMock = $this->createMock(LanguageServiceFactory::class); $languageServiceFactoryMock->method('createFromUserPreferences')->with(self::anything())->willReturn($languageServiceMock); diff --git a/typo3/sysext/extensionmanager/Tests/Unit/Utility/FileHandlingUtilityTest.php b/typo3/sysext/extensionmanager/Tests/Unit/Utility/FileHandlingUtilityTest.php index 35706b8e7a54d2ca7d93aae05e26c7bcbb50db70..5c63970800b405c7cd06c4695782dab76a958d58 100644 --- a/typo3/sysext/extensionmanager/Tests/Unit/Utility/FileHandlingUtilityTest.php +++ b/typo3/sysext/extensionmanager/Tests/Unit/Utility/FileHandlingUtilityTest.php @@ -105,8 +105,6 @@ final class FileHandlingUtilityTest extends UnitTestCase $GLOBALS['BE_USER'] = $this->getMockBuilder(BackendUserAuthentication::class)->getMock(); $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, ['removeDirectory', 'addDirectory']); $languageServiceMock = $this->createMock(LanguageService::class); - $languageServiceMock->method('includeLLFile')->with(self::anything())->willReturn([]); - $languageServiceMock->method('getLL')->with(self::anything())->willReturn(''); $languageServiceFactoryMock = $this->createMock(LanguageServiceFactory::class); $languageServiceFactoryMock->method('createFromUserPreferences')->with(self::anything())->willReturn($languageServiceMock); $fileHandlerMock->injectLanguageServiceFactory($languageServiceFactoryMock); diff --git a/typo3/sysext/linkvalidator/Classes/Controller/LinkValidatorController.php b/typo3/sysext/linkvalidator/Classes/Controller/LinkValidatorController.php index 5ea172146fbaf7031db87ef21fe4eb267b5e0df1..c74a1a5c63951d720b6d0e2f670784bb032a3cd6 100644 --- a/typo3/sysext/linkvalidator/Classes/Controller/LinkValidatorController.php +++ b/typo3/sysext/linkvalidator/Classes/Controller/LinkValidatorController.php @@ -99,7 +99,6 @@ class LinkValidatorController { $backendUser = $this->getBackendUser(); $languageService = $this->getLanguageService(); - $languageService->includeLLFile('EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf'); $this->request = $request; $this->id = (int)($this->request->getQueryParams()['id'] ?? 0); @@ -138,7 +137,7 @@ class LinkValidatorController $view->setTitle($this->getModuleTitle()); if ($backendUser->workspace !== 0 || !(($this->id && $this->pageRecord !== []) || (!$this->id && $backendUser->isAdmin()))) { - $view->addFlashMessage($languageService->getLL('no.access'), $languageService->getLL('no.access.title'), ContextualFeedbackSeverity::ERROR); + $view->addFlashMessage($languageService->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:no.access'), $languageService->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:no.access.title'), ContextualFeedbackSeverity::ERROR); return $view->renderResponse('Backend/Empty'); } @@ -164,12 +163,12 @@ class LinkValidatorController 'selectedLevel' => $this->searchLevel['report'], 'options' => $this->getCheckOptions('report'), 'brokenLinks' => $this->getBrokenLinks(), - 'tableheadPath' => $languageService->getLL('list.tableHead.path'), - 'tableheadElement' => $languageService->getLL('list.tableHead.element'), - 'tableheadHeadlink' => $languageService->getLL('list.tableHead.headlink'), - 'tableheadLinktarget' => $languageService->getLL('list.tableHead.linktarget'), - 'tableheadLinkmessage' => $languageService->getLL('list.tableHead.linkmessage'), - 'tableheadLastcheck' => $languageService->getLL('list.tableHead.lastCheck'), + 'tableheadPath' => $languageService->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.tableHead.path'), + 'tableheadElement' => $languageService->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.tableHead.element'), + 'tableheadHeadlink' => $languageService->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.tableHead.headlink'), + 'tableheadLinktarget' => $languageService->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.tableHead.linktarget'), + 'tableheadLinkmessage' => $languageService->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.tableHead.linkmessage'), + 'tableheadLastcheck' => $languageService->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.tableHead.lastCheck'), ]); return $view->renderResponse('Backend/Report'); } @@ -352,8 +351,8 @@ class LinkValidatorController $languageService = $this->getLanguageService(); $message = GeneralUtility::makeInstance( FlashMessage::class, - $languageService->getLL('list.no.broken.links'), - $languageService->getLL('list.no.broken.links.title'), + $languageService->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.no.broken.links'), + $languageService->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.no.broken.links.title'), ContextualFeedbackSeverity::OK, false ); @@ -385,14 +384,14 @@ class LinkValidatorController 'title' => $table . ':' . $row['record_uid'], 'icon' => $this->iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render(), 'headline' => $row['headline'], - 'label' => sprintf($languageService->getLL('list.field'), $fieldLabel), + 'label' => sprintf($languageService->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.field'), $fieldLabel), 'path' => BackendUtility::getRecordPath($row['record_pid'], $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW), 0), 'linkTitle' => $row['link_title'], 'linkTarget' => $hookObj?->getBrokenUrl($row), 'linkStatus' => (bool)($row['url_response']['valid'] ?? false), 'linkMessage' => $hookObj?->getErrorMessage($row['url_response']['errorParams']), 'lastCheck' => sprintf( - $languageService->getLL('list.msg.lastRun'), + $languageService->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.msg.lastRun'), date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $row['last_check']), date($GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $row['last_check']) ), @@ -427,7 +426,7 @@ class LinkValidatorController { $brokenLinksInformation = $this->linkAnalyzer->getLinkCounts(); $options = [ - 'totalCountLabel' => $this->getLanguageService()->getLL('overviews.nbtotal'), + 'totalCountLabel' => $this->getLanguageService()->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:overviews.nbtotal'), 'totalCount' => $brokenLinksInformation['total'] ?: '0', 'optionsByType' => [], ]; @@ -439,7 +438,7 @@ class LinkValidatorController $options['optionsByType'][$type] = [ 'id' => $prefix . '_SET_' . $type, 'name' => $prefix . '_SET[' . $type . ']', - 'label' => $this->getLanguageService()->getLL('hooks.' . $type) ?: $type, + 'label' => $this->getLanguageService()->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:hooks.' . $type) ?: $type, 'checked' => !empty($this->checkOpt[$prefix][$type]) ? ' checked="checked"' : '', 'count' => (!empty($brokenLinksInformation[$type]) ? $brokenLinksInformation[$type] : '0'), ]; @@ -464,13 +463,13 @@ class LinkValidatorController $actionMenu->setIdentifier('reportLinkvalidatorSelector'); $actionMenu->addMenuItem( $actionMenu->makeMenuItem() - ->setTitle($languageService->getLL('Report')) + ->setTitle($languageService->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:Report')) ->setHref($this->getModuleUri('report')) ->setActive($currentAction === 'report') ); $actionMenu->addMenuItem( $actionMenu->makeMenuItem() - ->setTitle($languageService->getLL('CheckLink')) + ->setTitle($languageService->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:CheckLink')) ->setHref($this->getModuleUri('check')) ->setActive($currentAction === 'check') ); diff --git a/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php b/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php index 4b825207d7430f93dae6e0b0dbaca38fca56e281..3aabac45173f2e71365f56361288b73b6610fea3 100644 --- a/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php +++ b/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php @@ -257,24 +257,24 @@ class ExternalLinktype extends AbstractLinktype // in this case error is HTTP status code switch ($errno) { case 300: - $message = $lang->getLL('list.report.error.httpstatuscode.300'); + $message = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.error.httpstatuscode.300'); break; case 305: - $message = $lang->getLL('list.report.error.httpstatuscode.305'); + $message = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.error.httpstatuscode.305'); break; case 403: - $message = $lang->getLL('list.report.pageforbidden403'); + $message = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.pageforbidden403'); break; case 404: - $message = $lang->getLL('list.report.pagenotfound404'); + $message = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.pagenotfound404'); break; case 500: - $message = $lang->getLL('list.report.internalerror500'); + $message = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.internalerror500'); break; default: if ($errno) { // show generic error message with HTTP status code - $message = sprintf($lang->getLL('list.report.externalerror'), $errno); + $message = sprintf($lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.externalerror'), $errno); } } break; @@ -282,10 +282,10 @@ class ExternalLinktype extends AbstractLinktype case self::ERROR_TYPE_LOWLEVEL_LIBCURL_ERRNO: if ($errno) { // get localized error message - $message = $lang->getLL('list.report.error.libcurl.' . $errorParams['errno']); + $message = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.error.libcurl.' . $errorParams['errno']); } else { // fallback to generic error message and show exception - $message = $lang->getLL('list.report.networkexception'); + $message = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.networkexception'); if ($exception !== '') { $message .= ' (' . $errorParams['exception'] @@ -296,19 +296,19 @@ class ExternalLinktype extends AbstractLinktype case 'loop': $message = sprintf( - $lang->getLL('list.report.redirectloop'), + $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.redirectloop'), ($errorParams['exception'] ?? ''), '' ); break; case 'tooManyRedirects': - $message = $lang->getLL('list.report.tooManyRedirects'); + $message = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.tooManyRedirects'); break; case 'exception': if ($exception) { - $message = sprintf($lang->getLL('list.report.httpexception'), $exception); + $message = sprintf($lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.httpexception'), $exception); } break; } @@ -316,9 +316,9 @@ class ExternalLinktype extends AbstractLinktype // use generic error message as fallback if ($exception) { // Show exception, if available - $message = sprintf($lang->getLL('list.report.httpexception'), $exception); + $message = sprintf($lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.httpexception'), $exception); } else { - $message = $lang->getLL('linkcheck.error.external.generic'); + $message = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:linkcheck.error.external.generic'); } } return $message; diff --git a/typo3/sysext/linkvalidator/Classes/Linktype/FileLinktype.php b/typo3/sysext/linkvalidator/Classes/Linktype/FileLinktype.php index 89e71f710727472b734d5aac741fb354a09e52c8..b30dda07d429a6056136253a1ee833bb6a61e01c 100644 --- a/typo3/sysext/linkvalidator/Classes/Linktype/FileLinktype.php +++ b/typo3/sysext/linkvalidator/Classes/Linktype/FileLinktype.php @@ -71,7 +71,7 @@ class FileLinktype extends AbstractLinktype */ public function getErrorMessage($errorParams) { - return $this->getLanguageService()->getLL('list.report.filenotexisting'); + return $this->getLanguageService()->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.filenotexisting'); } /** diff --git a/typo3/sysext/linkvalidator/Classes/Linktype/InternalLinktype.php b/typo3/sysext/linkvalidator/Classes/Linktype/InternalLinktype.php index f3a2ddb73da3b0871e21aca27eb99d2d348c4728..0625f48ed70249095e790e72c217900f1259d2c5 100644 --- a/typo3/sysext/linkvalidator/Classes/Linktype/InternalLinktype.php +++ b/typo3/sysext/linkvalidator/Classes/Linktype/InternalLinktype.php @@ -250,7 +250,7 @@ class InternalLinktype extends AbstractLinktype $errorParams['page']['title'], $errorParams['page']['uid'], ], - $lang->getLL('list.report.pagedeleted') + $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.pagedeleted') ); break; case self::HIDDEN: @@ -263,14 +263,14 @@ class InternalLinktype extends AbstractLinktype $errorParams['page']['title'], $errorParams['page']['uid'], ], - $lang->getLL('list.report.pagenotvisible') + $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.pagenotvisible') ); break; default: $errorPage = str_replace( '###uid###', $errorParams['page']['uid'], - $lang->getLL('list.report.pagenotexisting') + $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.pagenotexisting') ); } } @@ -286,7 +286,7 @@ class InternalLinktype extends AbstractLinktype $errorParams['content']['title'], $errorParams['content']['uid'], ], - $lang->getLL('list.report.contentdeleted') + $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.contentdeleted') ); break; case self::HIDDEN: @@ -299,7 +299,7 @@ class InternalLinktype extends AbstractLinktype $errorParams['content']['title'], $errorParams['content']['uid'], ], - $lang->getLL('list.report.contentnotvisible') + $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.contentnotvisible') ); break; case self::MOVED: @@ -316,11 +316,11 @@ class InternalLinktype extends AbstractLinktype $errorParams['content']['wrongPage'], $errorParams['content']['rightPage'], ], - $lang->getLL('list.report.contentmoved') + $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.contentmoved') ); break; default: - $errorContent = str_replace('###uid###', $errorParams['content']['uid'], $lang->getLL('list.report.contentnotexisting')); + $errorContent = str_replace('###uid###', $errorParams['content']['uid'], $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.contentnotexisting')); } } if (isset($errorPage) && isset($errorContent)) { @@ -331,7 +331,7 @@ class InternalLinktype extends AbstractLinktype $response = $errorContent; } else { // This should not happen - $response = $lang->getLL('list.report.noinformation'); + $response = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.noinformation'); } return $response; } diff --git a/typo3/sysext/linkvalidator/Documentation/CodeSnippets/Examples/ExampleLinkType.rst.txt b/typo3/sysext/linkvalidator/Documentation/CodeSnippets/Examples/ExampleLinkType.rst.txt index fdaac5356e271a9a7697ca745437410726c8b3e5..862d1c9a034201cecbc1667fd20a481f7005bce7 100644 --- a/typo3/sysext/linkvalidator/Documentation/CodeSnippets/Examples/ExampleLinkType.rst.txt +++ b/typo3/sysext/linkvalidator/Documentation/CodeSnippets/Examples/ExampleLinkType.rst.txt @@ -19,11 +19,11 @@ $lang = $this->getLanguageService(); switch ($errorParams['errno'] ?? 0) { case 404: - $message = $lang->getLL('list.report.pagenotfound404'); + $message = $lang->sL('LLL:EXT:typo3/sysext/linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.pagenotfound404'); break; default: // fall back to generic error message - $message = sprintf($lang->getLL('list.report.externalerror'), $errorParams['errno']); + $message = sprintf($lang->sL('LLL:EXT:typo3/sysext/linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.externalerror'), $errorParams['errno']); } return $message; } diff --git a/typo3/sysext/linkvalidator/Tests/Unit/Linktype/ExternalLinktypeTest.php b/typo3/sysext/linkvalidator/Tests/Unit/Linktype/ExternalLinktypeTest.php index 61690fdf70f4e291d00aae292f30c5273c76bed4..3d0d5896ad423a89570619470dd8644b4c8af421 100644 --- a/typo3/sysext/linkvalidator/Tests/Unit/Linktype/ExternalLinktypeTest.php +++ b/typo3/sysext/linkvalidator/Tests/Unit/Linktype/ExternalLinktypeTest.php @@ -39,7 +39,6 @@ final class ExternalLinktypeTest extends UnitTestCase private function buildLanguageServiceMock(): MockObject { $languageServiceMock = $this->getMockBuilder(LanguageService::class)->disableOriginalConstructor()->getMock(); - $languageServiceMock->method('getLL')->with(self::anything())->willReturn('translation string'); return $languageServiceMock; } diff --git a/typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php b/typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php index 7eec8a8c5aebf712364d004b2ef3c8a11c187c79..c5c946524c0d2a02a3e5afb2b500dc10c9a51abd 100644 --- a/typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php +++ b/typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php @@ -319,7 +319,7 @@ class BrowseLinksController extends AbstractLinkBrowserController return ' <div class="element-browser-form-group"> <label for="lrel" class="form-label">' . - htmlspecialchars($this->getLanguageService()->getLL('linkRelationship')) . + htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:linkRelationship')) . '</label> <input type="text" name="lrel" class="form-control" value="' . htmlspecialchars($currentRel) . '" /> </div> @@ -343,15 +343,15 @@ class BrowseLinksController extends AbstractLinkBrowserController return ' <div class="element-browser-form-group"> <label for="ltarget" class="form-label"> - ' . htmlspecialchars($lang->getLL('target')) . ' + ' . htmlspecialchars($lang->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:target')) . ' </label> <span class="input-group"> <input id="ltarget" type="text" name="ltarget" class="t3js-linkTarget form-control" value="' . htmlspecialchars($target) . '" /> <select name="ltarget_type" class="t3js-targetPreselect form-select"> <option value=""></option> - <option value="_top">' . htmlspecialchars($lang->getLL('top')) . '</option> - <option value="_blank">' . htmlspecialchars($lang->getLL('newWindow')) . '</option> + <option value="_top">' . htmlspecialchars($lang->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:top')) . '</option> + <option value="_blank">' . htmlspecialchars($lang->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:newWindow')) . '</option> </select> </span> </div>'; @@ -371,7 +371,7 @@ class BrowseLinksController extends AbstractLinkBrowserController return ' <div class="element-browser-form-group"> <label for="lclass" class="form-label"> - ' . htmlspecialchars($this->getLanguageService()->getLL('class')) . ' + ' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_browse_links.xlf:class')) . ' </label> <select id="lclass" name="lclass" class="t3js-class-selector form-select"> ' . $this->classesAnchorJSOptions[$this->displayedLinkHandlerId] . '