Skip to content

i18n: translation keys for stat-widget labels#893

Open
edwh wants to merge 1 commit into
developfrom
chore/i18n-stat-widgets
Open

i18n: translation keys for stat-widget labels#893
edwh wants to merge 1 commit into
developfrom
chore/i18n-stat-widgets

Conversation

@edwh

@edwh edwh commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

The group / party / admin stat widgets (server-rendered iframes embedded on external sites — deliberately kept as Blade for embed performance, not migrated to Vue) had hardcoded English labels. This localises the clear standalone labels via translation keys:

  • group/stats: participants, hours_volunteered, parties_thrown (new), waste_prevented — across the row / double-row / mini formats.
  • party/stats: participants.
  • admin/stats: "Most Repaired Devices" → existing groups.most_repaired_devices.

Only one new key (groups.parties_thrown) was added, to en + fr + fr-BE only per the project's fr/fr-BE translation policy (fr/fr-BE: "événements organisés"). Everything else reuses existing keys.

Deliberately left as-is

The CO₂/waste value lines (which mix <sub> formatting with units) and the interpolated impact-sentences in admin/stats (e.g. "X participants aided by Y hours … worked on Z devices", "Equal to driving …") are not touched — they need placeholder-based (:count) restructuring to translate correctly, which is a larger careful pass out of scope here.

Test plan

  • php artisan translations:check exits 0
  • GroupStatsTest + PartyStatsTest green (5 tests, 399 assertions) — the widgets still render
  • CircleCI green

🤖 Generated with Claude Code

The group/party/admin stat widgets (server-rendered iframes embedded on external
sites) had hardcoded English labels. Replace the clear standalone labels with
translation keys so the embeds localise:

- group/stats: participants, hours_volunteered, parties_thrown (new key),
  waste_prevented — all across the row/double-row/mini formats.
- party/stats: participants.
- admin/stats: "Most Repaired Devices" -> existing groups.most_repaired_devices.

Added the one new key (groups.parties_thrown) to en + fr + fr-BE only, per the
project's fr/fr-BE-only translation policy; every other label reuses an existing
key. The CO2/waste value lines (which mix <sub> formatting and units) and the
interpolated impact-sentences in admin/stats are left as-is — they need
placeholder-based restructuring and are deferred.

translations:check passes; GroupStats + PartyStats feature tests still green.
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant