Issue #3614689: Rename the occupancy axis from free to available, because in a ticketing module free already means zero-price
Renames the occupancy axis from free to available, so free is left to mean one thing in this module: zero-price.
Scope is larger than the issue body says
The issue estimated 27 references over 9 files. The real figure is ~120 over 49 files, because that estimate came from a hand-written list of identifiers rather than a sweep. The list missed poolFree(), hasFreePlaces() in the root BookingManager, the 'free' array keys, and seven test method names. The issue body will be corrected to match.
Renamed
PlaceAvailability::freeCandidates()toavailableCandidates()(9),hasFreePlace()tohasAvailablePlace()(7),poolFree()topoolAvailable()(5).VenueAvailabilityBound::freeFor()toavailableFor()(4),VenuePlacementProvider::freePools()toavailablePools()(2),VenueMapBuilder::freeLabel()toavailableLabel()(3).BookingManager::hasFreePlaces()tohasAvailablePlaces(), whose caller already read$query->minAvailable, so that one was inconsistent with its own neighbour.FreePlaceReadCountTesttoAvailablePlaceReadCountTest, file included, plus seven test method names on the axis.- The map payload keys
freeandfreeLabeltoavailableandavailableLabel, with every reader injs/venue-map.js, theysm-pool-freeCSS class, and the four places the FunctionalJavascript test selects that class.
No plugin id moved. Renaming a ConstraintPolicy id silently disarms stored attachments, so place_bookable keeps its id and only its label changed.
User-facing strings, and the French
Six strings moved, and the four with translations were updated in translations/yoyaku.fr.po in the same commit: the two relocate messages in the picker, the pool shortfall message (whose @free placeholder becomes @available), the venue schedule empty text, the place_bookable label, and @n free to @n available in the tariff occupancy cell.
The French needed no rewording. It already said libre, never gratuite, in every one of them. Only the msgids moved. That is the clearest evidence that the ambiguity was in the English alone.
Kept as-is, deliberately
free still means money in yoyaku_payment and the transaction layer, which is the entire point: testCollectNoneIsFree(), testTariffZeroPriceIsFree(), "a free order". Also untouched: "free seating or standing" (unreserved-seating jargon, not vacancy), "the label is free text", free-form, padding-free, collision-free, freeze, and the root module's "frees capacity" verbs, which are a different part of speech and would have widened this into unrelated prose.
Two tests asserted on a renamed string, one of them silently
OverviewPagesTest and ResourceSlotsTabTest assert on the rendered @n free label. CI would have failed both. But OverviewPagesTest also carried pageTextNotContains('3 free'), which after the rename passes for free, because the page no longer contains the word at all. A rename is exactly what turns an absence assertion vacuous, and grepping the old identifier is what finds it.
That negative assertion is now deleted rather than renamed: pageTextContains('2 available') already proves the figure, since the bug it guards (subtracting only confirmed and held) would print 3. The two assertNotContains pairs in ConfigurationTest are likewise replaced by one positive assertion on the exact available set, which proves the open place is in it and the closed section and closed subsection are out of it, and cannot pass by returning nothing.
Incidental fix
fr.po carried a stale msgid, @area: take one place at @rate, @free left, while the code says @left. That string has therefore been untranslated in French for as long as the two have differed. The entry is corrected to the current msgid. Pre-existing, unrelated to this rename, but in a file this commit already edits.
Verified
phpcs clean over the whole module with --warning-severity=1 (the rename pushed 39 comment lines past 80 characters; those are reflowed, five short descriptions shortened to one line). phpstan on the CI ruleset clean apart from the pre-existing new.static. eslint and stylelint clean. cspell clean. Whole yoyaku kernel suite green: 114 of 114 classes in 570s. The Functional and FunctionalJavascript lanes, which cover the renamed CSS class and the renamed page text, are left to CI here.