Issue #3614034: Complete the French translation, document the cart and the pricing seam, check the ticket libraries, and refresh the metrics page

Bundles the shipping-metadata findings of a full audit of 1.0.0-alpha1..1.x, so the alpha2 tag can be cut from one merge. None of it is a code-correctness defect: CI is green per job on the release candidate, the queue holds no open bugs, and the tree carries no stray todo markers.

Translations

The French translation had fallen 54 strings behind: 18 from code, 36 from YAML, the latter down to 61% coverage because four submodules arrived with untranslated names, descriptions and permission labels (the Cancel booking orders permission among them). All 54 are translated, following the terminology already established in the file (Billet, Panier, Autorisation de gestion, En jauge, reglement).

While there, msgfmt --check-format surfaced five pre-existing duplicate msgids. Four were harmless repeats; Booker carried two different translations, so which one the importer applied was arbitrary. The duplicate block is removed, keeping Reservant, the form all 18 compound terms already use. msgfmt is now clean and extraction reports 0 missing strings on both the code and YAML sides.

Documentation

  • New docs/cart.md plus its nav entry. yoyaku_cart is a user-facing module every booking surface routes through, and it appeared in no module table, no page and no nav entry. The page covers the pointer-not-container design, the private-tempstore session scoping, the held_cookie projection, and the CartCheckoutEvent seam.
  • The README module table was missing yoyaku_cart and yoyaku_placement; the architecture module map was missing yoyaku_cart, yoyaku_placement and yoyaku_ticket. Both are resynced, with the sub-modules named in their parent's row.
  • docs/metrics.md regenerated with the bundled generator. It claimed 385 files and 29,345 lines of code, measured 78 commits earlier; the tree holds 683 files and 72,118. Every chart and ratio on a page whose whole value is that the numbers are real was wrong.

API documentation

hook_yoyaku_summary_alter() is the seam that fills every ticket price and the order total, so it is what any pricing or payment integration needs. It was implemented, invoked from TransactionSummary::build() and covered by a test, but absent from yoyaku.api.php, which documented its two lesser siblings. It is now documented with its array shape, the tier_key/resource_id pricing keys, the formatted-string currency contract, and the rule that a free ticket keeps a NULL price rather than a printed zero.

Ticket library requirements

yoyaku_ticket needs dompdf/dompdf and endroid/qr-code, declared under suggest because requiring them in the single root composer.json would pull a PDF stack onto every Yoyaku site. Both call sites already guarded correctly, but the module had no requirements check of any kind, so a site could install it, configure ticketing, and discover the gap only when a customer's confirmation mail tried to attach a ticket.

  • YoyakuTicketRequirements (install): error without the QR library, since a ticket nobody can scan is not a ticket; warning without Dompdf, since the renderer is a plugin type and a site may ship its own, which cannot be discovered before install.
  • TicketRequirements (runtime): names the renderers actually usable on the status report via the existing availableOptions(), erroring when none can run.
  • TicketRequirementsTest covers both, and proves the hook class wires up. This needed one typed service alias for PdfRendererManager, matching the alias every other service in the file already has.

Verification

  • phpcs --warning-severity=1 clean on every file touched, and on the whole module bar one pre-existing yoyaku_node.install warning CI already tolerates.
  • phpstan with the CI ruleset: only pre-existing new.static, the rule drupal.org CI ignores.
  • cspell introduces no new words.
  • msgfmt --check-format clean.
  • Kernel: 8/8 yoyaku_ticket classes green, the new class at 2 tests / 6 assertions with zero deprecations.

Merge request reports

Loading
Loading