Skip to content

Commit

Permalink
IBX-9285: Navigation anchor on content creation/edition not working w…
Browse files Browse the repository at this point in the history
…ith diacritical marks
  • Loading branch information
lucasOsti committed Dec 13, 2024
1 parent 843ac71 commit 33f753f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 28 deletions.
26 changes: 0 additions & 26 deletions src/bundle/Resources/translations/ibexa_fields_groups.en.xliff

This file was deleted.

3 changes: 2 additions & 1 deletion src/lib/Menu/ContentEditAnchorMenuBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ private function getContentFieldGroupItems(array $groupedFields): array
$order = 0;
foreach ($groupedFields as $group => $fields) {
$order += self::ITEM_ORDER_SPAN;
$groupNameASCII = transliterator_transliterate('Any-Latin; Latin-ASCII', $group);
$items[$group] = $this->createMenuItem($group, [
'attributes' => [
'data-target-id' => sprintf('ibexa-edit-content-sections-content-fields-%s', str_replace(' ', '-', mb_strtolower($group))),
'data-target-id' => sprintf('ibexa-edit-content-sections-content-fields-%s', str_replace(' ', '-', mb_strtolower($groupNameASCII))),

Check failure on line 110 in src/lib/Menu/ContentEditAnchorMenuBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (7.4)

Parameter #1 $str of function mb_strtolower expects string, string|false given.

Check failure on line 110 in src/lib/Menu/ContentEditAnchorMenuBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.0)

Parameter #1 $string of function mb_strtolower expects string, string|false given.

Check failure on line 110 in src/lib/Menu/ContentEditAnchorMenuBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.1)

Parameter #1 $string of function mb_strtolower expects string, string|false given.
],
'extras' => [
'orderNumber' => $order,
Expand Down
3 changes: 2 additions & 1 deletion src/lib/UserProfile/UserProfileFieldGroupsProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

final class UserProfileFieldGroupsProvider implements FieldsGroupsList, TranslationContainerInterface
{
private const FIELD_GROUPS = ['about', 'contact'];
private const FIELD_GROUPS = ['about', 'contact', 'test'];

private FieldsGroupsList $innerService;

Expand Down Expand Up @@ -59,6 +59,7 @@ public static function getTranslationMessages(): array
return [
Message::create('about', 'ibexa_fields_groups')->setDesc('About'),
Message::create('contact', 'ibexa_fields_groups')->setDesc('Contact'),
Message::create('test', 'ibexa_fields_groups')->setDesc('Aąćęźdsdad 123'),
];
}
}

0 comments on commit 33f753f

Please sign in to comment.