Issue #3618349: The venue name a booker reads on the booking page and on the ticket cannot be translated

Makes the venue name translatable, and reads it in the right language at the four surfaces a booker sees it on.

Storage. yoyaku_venue gains yoyaku_venue_field_data and translatable: TRUE, and the Name base field becomes translatable. Nothing else does: VenueLabelTranslationTest::testOnlyTheNameVariesByLanguage() asserts the translatable set is exactly label plus core's own langcode and default_langcode, so the artwork, the sprite names and the two default records stay one value copied into every language row.

Reads. SlotBookingController and PlaceBookingController gain the entity repository and resolve the name from context; VenueMapBuilder::inventory() resolves it too, and its document is already keyed by langcode both in the cache id and in the map URL's v query, so the two languages are separate documents. TicketPlacementHooks resolves it the way it already resolves the section beneath it, which puts it under the language the order notifier switched to.

The slot booking page's fallback for a resource that runs nowhere in particular is resolved as well, since the resource label has been translatable since [#3616524] and that read was still raw.

Wiring is automatic. TranslationHooks::entityTypeAlter() gives every translatable yoyaku type with an edit form its canonical link and its four translation link templates, so the Translate tab appears with no new code. config/optional/language.content_settings.yoyaku_venue.yoyaku_venue.yml joins the ten [#3618305] ships, with untranslatable_fields_hide, so the screen asks for the name alone.

One query scoped. PinningAccessControlHandler filters venues by default_pinning; it takes the default_langcode condition the sibling resource queries already carry. It is the only entity query in the module that filters or sorts venues, and nothing anywhere writes raw SQL against yoyaku_venue, which is why this type was the cheap one to move.

Verification. VenueLabelTranslationTest (new) covers the round trip, the translatable set and the shared defaults. VenueMapLanguageTest gains the venue name following the content language across a there-and-back language switch, proving the two do not share a cache entry, plus the sprites staying shared. TranslationOutOfTheBoxTest gains yoyaku_venue to its list. All three were run against unpatched code and seen to fail, then pass.

Also run: 21 placement and engine classes covering the query budgets, the map payloads, the venue record screens and the pinning access path. phpcs as CI runs it: 0. DrupalPractice: 0. phpstan: 0. cspell: 0 unknown words after the project dictionary.

Reinstall-only, as everything before 1.0 is: the storage layout moves and the module ships no update hooks.

Merge request reports

Loading
Loading