From ee2ae8a8bbc09511954641aa0cd13eca369f6b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Wed, 8 Jan 2025 17:15:24 +0100 Subject: [PATCH] Customize icons & subheaders on all CRUD pages --- config/packages/sylius_twig_hooks.yaml | 20 ++++++++- .../State/Provider/BookCollectionProvider.php | 2 +- .../src/State/Provider/BookItemProvider.php | 2 +- .../tests/Functional/TemplatesTest.php | 4 +- .../header/title_block/title.html.twig | 10 +++-- .../header/title_block/title.html.twig | 18 -------- .../header/title_block/title.html.twig | 10 +++-- .../header/title_block/title.html.twig | 12 +++-- .../src/Grid/Provider/BookGridProvider.php | 2 +- .../src/State/Provider/BookItemProvider.php | 2 +- .../tests/Functional/TemplatesTest.php | 2 +- tests/Functional/BookTest.php | 36 ++++++++------- tests/Functional/ConferenceTest.php | 24 ++++++++++ tests/Functional/LegacyBookTest.php | 4 +- tests/Translations/FrenchTranslatedUiTest.php | 45 ++++++++++++++----- translations/flashes.fr.yaml | 3 ++ translations/messages.en.yaml | 3 ++ translations/messages.fr.yaml | 4 ++ 18 files changed, 138 insertions(+), 65 deletions(-) delete mode 100644 src/BootstrapAdminUi/templates/shared/crud/index/content/header/title_block/title.html.twig create mode 100644 translations/flashes.fr.yaml diff --git a/config/packages/sylius_twig_hooks.yaml b/config/packages/sylius_twig_hooks.yaml index 3ccd786a..0bdb1cd5 100644 --- a/config/packages/sylius_twig_hooks.yaml +++ b/config/packages/sylius_twig_hooks.yaml @@ -19,9 +19,27 @@ sylius_twig_hooks: 'sylius_admin.book.show.content.header.title_block': title: - template: '@SyliusBootstrapAdminUi/shared/crud/common/content/header/title_block/title.html.twig' + template: '@SyliusBootstrapAdminUi/shared/crud/show/content/header/title_block/title.html.twig' configuration: title: '@=_context.book.getTitle()' + icon: 'tabler:book' + subheader: '@=_context.book.getAuthorName()' + + 'sylius_admin.conference.create.content.header.title_block': + title: + template: '@SyliusBootstrapAdminUi/shared/crud/create/content/header/title_block/title.html.twig' + configuration: + title: 'app.ui.new_conference' + icon: 'tabler:plus' + subheader: app.ui.managing_your_conferences + + 'sylius_admin.conference.update.content.header.title_block': + title: + template: '@SyliusBootstrapAdminUi/shared/crud/update/content/header/title_block/title.html.twig' + configuration: + title: app.ui.edit_conference + icon: 'tabler:pencil' + subheader: app.ui.managing_your_conferences 'sylius_admin.talk.create.content': form: diff --git a/src/AdminUi/tests/Functional/.application/src/State/Provider/BookCollectionProvider.php b/src/AdminUi/tests/Functional/.application/src/State/Provider/BookCollectionProvider.php index 2e1e8483..cce5ccc8 100644 --- a/src/AdminUi/tests/Functional/.application/src/State/Provider/BookCollectionProvider.php +++ b/src/AdminUi/tests/Functional/.application/src/State/Provider/BookCollectionProvider.php @@ -23,7 +23,7 @@ class BookCollectionProvider implements ProviderInterface public function provide(Operation $operation, Context $context): array { return [ - new BookResource('shinning', 'Shinning'), + new BookResource('the-shining', 'The Shining'), new BookResource('carrie', 'Carrie'), ]; } diff --git a/src/AdminUi/tests/Functional/.application/src/State/Provider/BookItemProvider.php b/src/AdminUi/tests/Functional/.application/src/State/Provider/BookItemProvider.php index 83db9029..3395845b 100644 --- a/src/AdminUi/tests/Functional/.application/src/State/Provider/BookItemProvider.php +++ b/src/AdminUi/tests/Functional/.application/src/State/Provider/BookItemProvider.php @@ -22,6 +22,6 @@ class BookItemProvider implements ProviderInterface { public function provide(Operation $operation, Context $context): BookResource { - return new BookResource('shinning', 'Shinning'); + return new BookResource('the shining', 'The Shining'); } } diff --git a/src/AdminUi/tests/Functional/TemplatesTest.php b/src/AdminUi/tests/Functional/TemplatesTest.php index 78100e9e..4e8d0ee5 100644 --- a/src/AdminUi/tests/Functional/TemplatesTest.php +++ b/src/AdminUi/tests/Functional/TemplatesTest.php @@ -40,7 +40,7 @@ public function testIndexTemplate(): void self::assertResponseIsSuccessful(); self::assertSelectorTextContains('[data-test-title]', 'Books'); self::assertSelectorTextContains('[data-test-description]', 'List of books'); - self::assertSelectorTextContains('[data-test-book-name-shinning]', 'Shinning'); + self::assertSelectorTextContains('[data-test-book-name-the-shining]', 'The Shining'); self::assertSelectorTextContains('[data-test-book-name-carrie]', 'Carrie'); } @@ -53,7 +53,7 @@ public function testCreateTemplate(): void public function testUpdateTemplate(): void { - $this->client->request('GET', '/books/shinning/edit'); + $this->client->request('GET', '/books/the-shining/edit'); self::assertResponseIsSuccessful(); } diff --git a/src/BootstrapAdminUi/templates/shared/crud/create/content/header/title_block/title.html.twig b/src/BootstrapAdminUi/templates/shared/crud/create/content/header/title_block/title.html.twig index dea4bc04..11556bd1 100644 --- a/src/BootstrapAdminUi/templates/shared/crud/create/content/header/title_block/title.html.twig +++ b/src/BootstrapAdminUi/templates/shared/crud/create/content/header/title_block/title.html.twig @@ -5,14 +5,18 @@ {% set metadata = hookable_metadata.context.metadata %} {% set singular_name = hookable_metadata.configuration.resource_name|default(metadata.applicationName ~ '.ui.' ~ _context.metadata.name) %} - {% set header = hookable_metadata.configuration.header|default(null) %} + {% set header = hookable_metadata.configuration.title|default(hookable_metadata.configuration.header|default(null)) %} {% else %} {% set singular_name = hookable_metadata.configuration.resource_name %} - {% set header = hookable_metadata.configuration.header %} + {% set header = hookable_metadata.configuration.title|default(hookable_metadata.configuration.header) %} {% endif %} +{% set icon = hookable_metadata.configuration.icon|default(null) %} +{% set subheader = hookable_metadata.configuration.subheader|default(null) %} +{% set test_attribute = hookable_metadata.configuration.sylius_test_html_attribute is defined ? sylius_test_html_attribute(hookable_metadata.configuration.sylius_test_html_attribute) : null %} +
- {{ header.h1(header is not null ? header|trans : 'sylius.ui.new'|trans ~ ' ' ~ singular_name|trans) }} + {{ header.h1(header is not null ? header|trans : 'sylius.ui.new'|trans ~ ' ' ~ singular_name|trans, icon, subheader|trans) }}
diff --git a/src/BootstrapAdminUi/templates/shared/crud/index/content/header/title_block/title.html.twig b/src/BootstrapAdminUi/templates/shared/crud/index/content/header/title_block/title.html.twig deleted file mode 100644 index dea4bc04..00000000 --- a/src/BootstrapAdminUi/templates/shared/crud/index/content/header/title_block/title.html.twig +++ /dev/null @@ -1,18 +0,0 @@ -{% import '@SyliusBootstrapAdminUi/shared/helper/header.html.twig' as header %} - -{% if hookable_metadata.context.metadata is defined and hookable_metadata.context.configuration is defined %} - {% set configuration = hookable_metadata.context.configuration %} - {% set metadata = hookable_metadata.context.metadata %} - - {% set singular_name = hookable_metadata.configuration.resource_name|default(metadata.applicationName ~ '.ui.' ~ _context.metadata.name) %} - {% set header = hookable_metadata.configuration.header|default(null) %} -{% else %} - {% set singular_name = hookable_metadata.configuration.resource_name %} - {% set header = hookable_metadata.configuration.header %} -{% endif %} - -
-
- {{ header.h1(header is not null ? header|trans : 'sylius.ui.new'|trans ~ ' ' ~ singular_name|trans) }} -
-
diff --git a/src/BootstrapAdminUi/templates/shared/crud/show/content/header/title_block/title.html.twig b/src/BootstrapAdminUi/templates/shared/crud/show/content/header/title_block/title.html.twig index 283376e3..f4bdb389 100644 --- a/src/BootstrapAdminUi/templates/shared/crud/show/content/header/title_block/title.html.twig +++ b/src/BootstrapAdminUi/templates/shared/crud/show/content/header/title_block/title.html.twig @@ -5,14 +5,18 @@ {% set metadata = hookable_metadata.context.metadata %} {% set singular_name = hookable_metadata.configuration.resource_name|default(metadata.applicationName ~ '.ui.' ~ _context.metadata.name) %} - {% set header = hookable_metadata.configuration.header|default(null) %} + {% set header = hookable_metadata.configuration.title|default(hookable_metadata.configuration.header|default(null)) %} {% else %} {% set singular_name = hookable_metadata.configuration.resource_name %} - {% set header = hookable_metadata.configuration.header %} + {% set header = hookable_metadata.configuration.title|default(hookable_metadata.configuration.header) %} {% endif %} +{% set icon = hookable_metadata.configuration.icon|default(null) %} +{% set subheader = hookable_metadata.configuration.subheader|default(null) %} +{% set test_attribute = hookable_metadata.configuration.sylius_test_html_attribute is defined ? sylius_test_html_attribute(hookable_metadata.configuration.sylius_test_html_attribute) : null %} +
- {{ header.h1(header is not null ? header|trans : 'sylius.ui.show'|trans ~ ' ' ~ singular_name|trans) }} + {{ header.h1(header is not null ? header|trans : 'sylius.ui.show'|trans ~ ' ' ~ singular_name|trans, icon, subheader|trans) }}
diff --git a/src/BootstrapAdminUi/templates/shared/crud/update/content/header/title_block/title.html.twig b/src/BootstrapAdminUi/templates/shared/crud/update/content/header/title_block/title.html.twig index 4b6d4535..1f61fb14 100644 --- a/src/BootstrapAdminUi/templates/shared/crud/update/content/header/title_block/title.html.twig +++ b/src/BootstrapAdminUi/templates/shared/crud/update/content/header/title_block/title.html.twig @@ -5,14 +5,18 @@ {% set metadata = hookable_metadata.context.metadata %} {% set singular_name = hookable_metadata.configuration.resource_name|default(metadata.applicationName ~ '.ui.' ~ _context.metadata.name) %} - {% set header = hookable_metadata.configuration.header|default(null) %} + {% set header = hookable_metadata.configuration.title|default(hookable_metadata.configuration.header|default(null)) %} {% else %} {% set singular_name = hookable_metadata.configuration.resource_name %} - {% set header = hookable_metadata.configuration.header %} + {% set header = hookable_metadata.configuration.title|default(hookable_metadata.configuration.header) %} {% endif %} -
+{% set icon = hookable_metadata.configuration.icon|default(null) %} +{% set subheader = hookable_metadata.configuration.subheader|default(null) %} +{% set test_attribute = hookable_metadata.configuration.sylius_test_html_attribute is defined ? sylius_test_html_attribute(hookable_metadata.configuration.sylius_test_html_attribute) : null %} + +
- {{ header.h1(header is not null ? header|trans : 'sylius.ui.edit'|trans ~ ' ' ~ singular_name|trans) }} + {{ header.h1(header is not null ? header|trans : 'sylius.ui.edit'|trans ~ ' ' ~ singular_name|trans, icon, subheader|trans) }}
diff --git a/src/BootstrapAdminUi/tests/Functional/.application/src/Grid/Provider/BookGridProvider.php b/src/BootstrapAdminUi/tests/Functional/.application/src/Grid/Provider/BookGridProvider.php index 2306ffff..a7bfc936 100644 --- a/src/BootstrapAdminUi/tests/Functional/.application/src/Grid/Provider/BookGridProvider.php +++ b/src/BootstrapAdminUi/tests/Functional/.application/src/Grid/Provider/BookGridProvider.php @@ -25,7 +25,7 @@ class BookGridProvider implements DataProviderInterface public function getData(Grid $grid, Parameters $parameters): Pagerfanta { return new Pagerfanta(new ArrayAdapter([ - new BookResource('shinning', 'Shinning'), + new BookResource('the-shining', 'The Shining'), new BookResource('carrie', 'Carrie'), ])); } diff --git a/src/BootstrapAdminUi/tests/Functional/.application/src/State/Provider/BookItemProvider.php b/src/BootstrapAdminUi/tests/Functional/.application/src/State/Provider/BookItemProvider.php index c5de8154..84f2c43c 100644 --- a/src/BootstrapAdminUi/tests/Functional/.application/src/State/Provider/BookItemProvider.php +++ b/src/BootstrapAdminUi/tests/Functional/.application/src/State/Provider/BookItemProvider.php @@ -22,6 +22,6 @@ class BookItemProvider implements ProviderInterface { public function provide(Operation $operation, Context $context): BookResource { - return new BookResource('shinning', 'Shinning'); + return new BookResource('the-shining', 'The Shining'); } } diff --git a/src/BootstrapAdminUi/tests/Functional/TemplatesTest.php b/src/BootstrapAdminUi/tests/Functional/TemplatesTest.php index c703b6f6..0942bc3c 100644 --- a/src/BootstrapAdminUi/tests/Functional/TemplatesTest.php +++ b/src/BootstrapAdminUi/tests/Functional/TemplatesTest.php @@ -31,7 +31,7 @@ public function testIndexTemplate(): void self::assertResponseIsSuccessful(); self::assertSelectorTextContains('title', 'app.ui.books | Sylius'); - self::assertSelectorTextContains('tr.item:first-child[data-test-resource-id]', 'Shinning'); + self::assertSelectorTextContains('tr.item:first-child[data-test-resource-id]', 'The Shining'); self::assertSelectorTextContains('tr.item:last-child[data-test-resource-id]', 'Carrie'); } } diff --git a/tests/Functional/BookTest.php b/tests/Functional/BookTest.php index 1cca2614..160a0fdb 100644 --- a/tests/Functional/BookTest.php +++ b/tests/Functional/BookTest.php @@ -36,7 +36,7 @@ protected function setUp(): void public function testShowingBook(): void { $book = BookFactory::new() - ->withTitle('Shinning') + ->withTitle('The Shining') ->withAuthorName('Stephen King') ->create() ; @@ -46,7 +46,9 @@ public function testShowingBook(): void self::assertResponseIsSuccessful(); // Validate Header - self::assertSelectorTextContains('[data-test-page-title]', 'Shinning'); + self::assertSelectorTextContains('[data-test-page-title]', 'The Shining'); + self::assertSelectorTextContains('[data-test-subheader]', 'Stephen King'); + self::assertSelectorExists('[data-test-icon="tabler:book"]'); // Validate page body self::assertSelectorTextContains('[data-test-author-name]', 'Stephen King'); @@ -55,7 +57,7 @@ public function testShowingBook(): void public function testBrowsingBooks(): void { BookFactory::new() - ->withTitle('Shinning') + ->withTitle('The Shining') ->withAuthorName('Stephen King') ->create() ; @@ -89,7 +91,7 @@ public function testBrowsingBooks(): void self::assertSelectorExists('tr.item:first-child [data-bs-title=Edit]'); self::assertSelectorExists('tr.item:first-child [data-bs-title=Delete]'); - self::assertSelectorTextContains('tr.item:last-child', 'Shinning'); + self::assertSelectorTextContains('tr.item:last-child', 'The Shining'); self::assertSelectorTextContains('tr.item:last-child', 'Stephen King'); self::assertSelectorExists('tr.item:last-child [data-bs-title=Show]'); self::assertSelectorExists('tr.item:last-child [data-bs-title=Edit]'); @@ -99,7 +101,7 @@ public function testBrowsingBooks(): void public function testSortingBooks(): void { BookFactory::new() - ->withTitle('Shinning') + ->withTitle('The Shining') ->withAuthorName('Stephen King') ->create(); @@ -116,14 +118,14 @@ public function testSortingBooks(): void self::assertResponseIsSuccessful(); // Validate it's sorted by title desc - self::assertSelectorTextContains('tr.item:first-child', 'Shinning'); + self::assertSelectorTextContains('tr.item:first-child', 'The Shining'); self::assertSelectorTextContains('tr.item:last-child', 'Carrie'); } public function testFilteringBooks(): void { BookFactory::new() - ->withTitle('Shinning') + ->withTitle('The Shining') ->withAuthorName('Stephen King') ->create(); @@ -135,13 +137,13 @@ public function testFilteringBooks(): void $this->client->request('GET', '/admin/books'); $this->client->submitForm(button: 'Filter', fieldValues: [ - 'criteria[search][value]' => 'Shinn', + 'criteria[search][value]' => 'Shin', ], method: 'GET'); self::assertResponseIsSuccessful(); self::assertSelectorCount(1, 'tr.item'); - self::assertSelectorTextContains('tr.item:first-child', 'Shinning'); + self::assertSelectorTextContains('tr.item:first-child', 'The Shining'); } public function testAddingBookContent(): void @@ -159,7 +161,7 @@ public function testAddingBook(): void $this->client->request('GET', '/admin/books/new'); $this->client->submitForm('Create', [ - 'sylius_resource[title]' => 'Shinning', + 'sylius_resource[title]' => 'The Shining', 'sylius_resource[authorName]' => 'Stephen King', ]); @@ -171,9 +173,9 @@ public function testAddingBook(): void self::assertSelectorTextContains('[data-test-sylius-flash-message]', 'Book has been successfully created.'); /** @var Proxy $book */ - $book = BookFactory::find(['title' => 'Shinning']); + $book = BookFactory::find(['title' => 'The Shining']); - self::assertSame('Shinning', $book->getTitle()); + self::assertSame('The Shining', $book->getTitle()); self::assertSame('Stephen King', $book->getAuthorName()); } @@ -195,7 +197,7 @@ public function testValidationErrorsWhenAddingBook(): void public function testEditingBookContent(): void { $book = BookFactory::new() - ->withTitle('Shinning') + ->withTitle('The Shining') ->withAuthorName('Stephen King') ->create(); @@ -203,14 +205,14 @@ public function testEditingBookContent(): void self::assertResponseIsSuccessful(); - self::assertInputValueSame('sylius_resource[title]', 'Shinning'); + self::assertInputValueSame('sylius_resource[title]', 'The Shining'); self::assertInputValueSame('sylius_resource[authorName]', 'Stephen King'); } public function testEditingBook(): void { $book = BookFactory::new() - ->withTitle('Shinning') + ->withTitle('The Shining') ->withAuthorName('Stephen King') ->create(); @@ -238,7 +240,7 @@ public function testEditingBook(): void public function testValidationErrorsWhenEditingBook(): void { $book = BookFactory::new() - ->withTitle('Shinning') + ->withTitle('The Shining') ->withAuthorName('Stephen King') ->create(); @@ -258,7 +260,7 @@ public function testValidationErrorsWhenEditingBook(): void public function testRemovingBook(): void { BookFactory::new() - ->withTitle('Shinning') + ->withTitle('The Shining') ->withAuthorName('Stephen King') ->create(); diff --git a/tests/Functional/ConferenceTest.php b/tests/Functional/ConferenceTest.php index a8b5451c..1b02aaa0 100644 --- a/tests/Functional/ConferenceTest.php +++ b/tests/Functional/ConferenceTest.php @@ -75,6 +75,16 @@ public function testBrowsingConferences(): void self::assertSelectorExists('tr.item:last-child [data-bs-title=Delete]'); } + public function testAddingConferenceContent(): void + { + $this->client->request('GET', '/admin/conferences/new'); + + // Test header + self::assertSelectorTextContains('[data-test-page-title]', 'New conference'); + self::assertSelectorExists('[data-test-icon="tabler:plus"]'); + self::assertSelectorTextContains('[data-test-subheader]', 'Managing your conferences'); + } + public function testAddingConference(): void { $this->client->request('GET', '/admin/conferences/new'); @@ -99,6 +109,20 @@ public function testAddingConference(): void self::assertSame('2024-11-13 18:00', $conference->getEndsAt()?->format('Y-m-d H:i')); } + public function testEditingConferenceContent(): void + { + $conference = ConferenceFactory::new() + ->withName('SyliusCon 2023') + ->create(); + + $this->client->request('GET', sprintf('/admin/conferences/%s/edit', $conference->getId())); + + // Test header + self::assertSelectorTextContains('[data-test-page-title]', 'Edit conference'); + self::assertSelectorExists('[data-test-icon="tabler:pencil"]'); + self::assertSelectorTextContains('[data-test-subheader]', 'Managing your conferences'); + } + public function testEditingConference(): void { $conference = ConferenceFactory::new() diff --git a/tests/Functional/LegacyBookTest.php b/tests/Functional/LegacyBookTest.php index e751d36a..21bb10ef 100644 --- a/tests/Functional/LegacyBookTest.php +++ b/tests/Functional/LegacyBookTest.php @@ -33,7 +33,7 @@ protected function setUp(): void public function testBrowsingBooks(): void { BookFactory::new() - ->withTitle('Shinning') + ->withTitle('The Shining') ->withAuthorName('Stephen King') ->create() ; @@ -59,7 +59,7 @@ public function testAddingBookContent(): void public function testEditingBookContent(): void { $book = BookFactory::new() - ->withTitle('Shinning') + ->withTitle('The Shining') ->withAuthorName('Stephen King') ->create(); diff --git a/tests/Translations/FrenchTranslatedUiTest.php b/tests/Translations/FrenchTranslatedUiTest.php index b8921ff7..8a84810c 100644 --- a/tests/Translations/FrenchTranslatedUiTest.php +++ b/tests/Translations/FrenchTranslatedUiTest.php @@ -6,6 +6,7 @@ use App\Entity\Book; use App\Factory\BookFactory; +use App\Factory\ConferenceFactory; use App\Factory\UserFactory; use Symfony\Bundle\FrameworkBundle\KernelBrowser; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -39,7 +40,7 @@ public function testShowItem(): void $this->markTestSkippedIfNecessary('fr'); $book = BookFactory::new() - ->withTitle('Shinning') + ->withTitle('The Shining') ->withAuthorName('Stephen King') ->create() ; @@ -57,7 +58,7 @@ public function testBrowsingItems(): void $this->markTestSkippedIfNecessary('fr'); BookFactory::new() - ->withTitle('Shinning') + ->withTitle('The Shining') ->withAuthorName('Stephen King') ->create() ; @@ -81,23 +82,34 @@ public function testBrowsingItems(): void self::assertSelectorTextContains('.sylius-table-column-actions', 'Actions'); } + public function testAddingNewItemContent(): void + { + $this->markTestSkippedIfNecessary('fr'); + + $this->client->request('GET', '/admin/conferences/new'); + + // Test title + self::assertSelectorTextContains('[data-test-page-title]', 'Nouvelle conférence'); + } + public function testAddingNewItem(): void { $this->markTestSkippedIfNecessary('fr'); - $this->client->request('GET', '/admin/books/new'); + $this->client->request('GET', '/admin/conferences/new'); $this->client->submitForm('Créer', [ - 'sylius_resource[title]' => 'Shinning', - 'sylius_resource[authorName]' => 'Stephen King', + 'conference[name]' => 'Sylius Con 2024', + 'conference[startsAt]' => '2024-11-13 10:00:00', + 'conference[endsAt]' => '2024-11-13 17:00:00', ]); self::assertResponseRedirects(expectedCode: Response::HTTP_FOUND); - $this->client->request('GET', '/admin/books'); + $this->client->request('GET', '/admin/conferences'); // Test flash message - self::assertSelectorTextContains('[data-test-sylius-flash-message]', 'Book a bien été créé.'); + self::assertSelectorTextContains('[data-test-sylius-flash-message]', 'La conférence a bien été créée.'); } public function testValidationErrorsWhenAddingNewItem(): void @@ -117,12 +129,25 @@ public function testValidationErrorsWhenAddingNewItem(): void self::assertSelectorTextContains('#sylius_resource_authorName + .invalid-feedback', 'Cette valeur ne doit pas être vide.'); } + public function testEditingItemContent(): void + { + $this->markTestSkippedIfNecessary('fr'); + + $conference = ConferenceFactory::createOne(); + + $this->client->request('GET', sprintf('/admin/conferences/%s/edit', $conference->getId())); + + // Test title + self::assertSelectorTextContains('[data-test-page-title]', 'Modifier la conférence'); + self::assertSelectorTextContains('[data-test-subheader]', 'Gérer vos conférences'); + } + public function testEditingItem(): void { $this->markTestSkippedIfNecessary('fr'); $book = BookFactory::new() - ->withTitle('Shinning') + ->withTitle('The Shining') ->withAuthorName('Stephen King') ->create(); @@ -152,7 +177,7 @@ public function testValidationErrorsWhenEditingItem(): void $this->markTestSkippedIfNecessary('fr'); $book = BookFactory::new() - ->withTitle('Shinning') + ->withTitle('The Shining') ->withAuthorName('Stephen King') ->create(); @@ -174,7 +199,7 @@ public function testRemovingItem(): void $this->markTestSkippedIfNecessary('fr'); BookFactory::new() - ->withTitle('Shinning') + ->withTitle('The Shining') ->withAuthorName('Stephen King') ->create(); diff --git a/translations/flashes.fr.yaml b/translations/flashes.fr.yaml new file mode 100644 index 00000000..dff84e76 --- /dev/null +++ b/translations/flashes.fr.yaml @@ -0,0 +1,3 @@ +app: + conference: + create: La conférence a bien été créée. diff --git a/translations/messages.en.yaml b/translations/messages.en.yaml index 223fef82..4070f6d4 100644 --- a/translations/messages.en.yaml +++ b/translations/messages.en.yaml @@ -12,12 +12,15 @@ app: conference: Conference conferences: Conferences configuration: Configuration + edit_conference: Edit conference ends_at: Ends at first_name: First name last_name: Last name library: Library + managing_your_conferences: Managing your conferences managing_your_speakers: Managing your speakers name: Name + new_conference: New conference past_event: Past event show_talks: Show talks speaker: Speaker diff --git a/translations/messages.fr.yaml b/translations/messages.fr.yaml index 5d610739..f74658d7 100644 --- a/translations/messages.fr.yaml +++ b/translations/messages.fr.yaml @@ -12,11 +12,15 @@ app: conference: Conférence conferences: Conférences configuration: Configuration + edit_conference: Modifier la conférence ends_at: Termine à first_name: Prénom last_name: Nom de famille library: Bibliothèque + managing_your_conferences: Gérer vos conférences + managing_your_speakers: Gérer vos conférencier-e-s name: Nom + new_conference: Nouvelle conférence past_event: Evènement passé show_talks: Affiche les talks speaker: Conférencier