Issue #3615148: Say "tariff class" where the code still says "group"

The audience a tariff is offered under is a tariff class in every field, label and description. The code reading it still said group, and in one place said tier for the tariff as well, a word #3615057 removed everywhere else.

What changed

  • SlotBookingForm::groupTiers() is now tariffsByClass(), matching the module's own tariffsByResource() and tariffsByGrade(). Its locals and its call site follow, and the docblock stops describing a resource as grouping its tariffs, which it cannot do now that a class belongs to the tenant.
  • The two test helpers follow the same nouns, and the three test methods say class where they said group.

Two stale docblocks the survey turned up

Neither was in the issue, and both are #3614386 leftovers rather than vocabulary:

  • BookingTariffClassInterface described "a group of a resource's tariffs" and documented getKey() as "unique within the resource". The class became tenant-level, so both were wrong, the second factually.
  • BookingResourceTariffInterface still said the bare yoyaku_tariff was "deliberately unused, held for a reusable definition". #3614386 filled it: it is the definition a preset holds.

Catalog

Three entries whose English source no longer exists are dropped: the removed resource field description, the old group wording of the class description, and a constraint-policy token line whose replacement is already translated. Each was checked against the code before removal, and msgfmt --check stays clean at 1409 messages.

The French label goes back to "Groupe de tarifs"

#3614386 changed it to "Classe tarifaire", reasoning from the English name. That was wrong, and this MR reverts it: in French "classe" is what a train calls 1st and 2nd class, so it reads as the place grade, which is the one axis this is not. "Catégorie tarifaire" fails identically, and "famille" is worse still, because "tarif famille" is a product a venue actually sells, so it would collide with a value of the field rather than with a neighbouring concept.

The word order is what makes the original safe: "groupe de tarifs" is a group of tariffs, where "tarif groupe" would be a group discount. The English identifier stays tariff_class, which is back-office only and never read by a booker.

Scope

Only group as a name for the tariff class is swept. The atomic booking group, Drupal's #group, condition groups, plugin group: keys and PHPUnit's @group are all left alone, as is "a party" translated as "groupe", which is correct French. The wider "rate" and "tier" prose in this same file belongs to a separate sweep and is untouched here.

No behavior changes and no stored data moves: the field name, the entity type and every string a booker or an operator reads were already correct. Verified by running SlotBookingFormTest plus every other class touching tariff_class or the panels, and the ApplyTariffPresetTest functional class.

Edited by Frank Mably

Merge request reports

Loading
Loading