Skip to content

Commit

Permalink
Ensure only translation keys are added to client side translations fo…
Browse files Browse the repository at this point in the history
…r menu entries (#22866)
  • Loading branch information
sgiehl authored Dec 16, 2024
1 parent 153f637 commit 30db94c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/CoreHome/CoreHome.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,9 @@ public function getClientSideTranslationKeys(&$translationKeys)
Access::doAsSuperUser(function () use (&$translationKeys) {
$menu = MenuAdmin::getInstance()->getMenu();
foreach ($menu as $level1 => $level2) {
$translationKeys[] = $level1;
if (strpos($level1, '_') !== false) {
$translationKeys[] = $level1;
}
foreach ($level2 as $name => $params) {
if (strpos($name, '_') !== false) {
$translationKeys[] = $name;
Expand Down

0 comments on commit 30db94c

Please sign in to comment.