Skip to content

Commit

Permalink
Merge branch '6.x' into 7.0
Browse files Browse the repository at this point in the history
* 6.x:
  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 06c5a8b + 8b7ef10 commit 53b4966
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
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);
}
}
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 53b4966

Please sign in to comment.