Skip to content

Commit

Permalink
Merge branch '7.1' into 7.x
Browse files Browse the repository at this point in the history
* 7.1:
  Fixed MessageCatalogue strict type parameters in Translator Loader
  [AdminBundle] fixed base route name for exception admin lists
  Fix node reorder parents
  • Loading branch information
acrobat committed Apr 28, 2024
2 parents 212f82d + 4a3c486 commit 6cfff87
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
Expand Up @@ -107,4 +107,18 @@ public function getEntityClass(): string
{
return Exception::class;
}

/**
* @param string|null $suffix
*
* @return string
*/
public function getPathByConvention($suffix = null)
{
if (null === $suffix || $suffix === '') {
return 'kunstmaanadminbundle_admin_exception';
}

return sprintf('kunstmaanadminbundle_admin_exception_%s', $suffix);
}
}
Expand Up @@ -644,7 +644,7 @@ public function reorderAction(Request $request): Response
$this->init($request);
$nodes = [];
$nodeIds = $request->request->all('nodes');
$changeParents = $request->request->get('parent');
$changeParents = $request->request->all('parent');

foreach ($nodeIds as $id) {
/* @var Node $node */
Expand Down
6 changes: 5 additions & 1 deletion src/Kunstmaan/TranslatorBundle/Service/Translator/Loader.php
Expand Up @@ -21,7 +21,11 @@ public function load($resource, $locale, $domain = 'messages'): MessageCatalogue
$catalogue = new MessageCatalogue($locale);
$translations = $this->translationRepository->findBy(['locale' => $locale]);
foreach ($translations as $translation) {
$catalogue->set($translation->getKeyword(), $translation->getText(), $translation->getDomain());
$catalogue->set(
(string) $translation->getKeyword(),
(string) $translation->getText(),
(string) $translation->getDomain()
);
}
$this->catalogues[$locale] = $catalogue;
} else {
Expand Down

0 comments on commit 6cfff87

Please sign in to comment.