Skip to content
Snippets Groups Projects
Commit 623b2039 authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Anja Leichsenring
Browse files

[FEATURE] Make label of bookmarkGroups translatable

Add possibility to use language labels as value for the
user TSconfig `options.bookmarkGroups` option.

Resolves: #15760
Resolves: #92337
Releases: master
Change-Id: I0e0e2467b8ab87b05ec432f09d65abc676081228
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65764


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: default avatarGeorg Tiefenbrunn <georg.tiefenbrunn@gmail.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent f13e9b55
Branches
Tags
No related merge requests found
......@@ -395,7 +395,8 @@ class ShortcutRepository
if (is_array($bookmarkGroups)) {
foreach ($bookmarkGroups as $groupId => $label) {
if (!empty($label)) {
$shortcutGroups[$groupId] = (string)$label;
$label = (string)$label;
$shortcutGroups[$groupId] = strpos($label, 'LLL:') === 0 ? $languageService->sL($label) : $label;
} elseif ($backendUser->isAdmin()) {
unset($shortcutGroups[$groupId]);
}
......
.. include:: ../../Includes.txt
===============================================================
Feature: #92337 - Allow translatable labels for bookmark groups
===============================================================
See :issue:`92337`
Description
===========
The user TSconfig `options.bookmarkGroups` option allows to configure the bookmark
groups that can be accessed by the user. In addition to that, it's also possible
to define custom labels for each group as simple :php:`string`. Extended TSconfig
syntax now allows the LLL prefix for the use of language labels.
Example
=======
.. code-block:: ts
options.bookmarkGroups.2 = LLL:EXT:sitepackage/Resources/Private/Language/locallang_be.xlf:bookmarkGroups.2
Impact
======
It is now possible to use custom language labels for bookmark groups.
.. index:: Backend, TSConfig, ext:backend
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment