i18n: translation keys for stat-widget labels#893
Open
edwh wants to merge 1 commit into
Open
Conversation
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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:
participants,hours_volunteered,parties_thrown(new),waste_prevented— across therow/double-row/miniformats.participants.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 inadmin/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:checkexits 0GroupStatsTest+PartyStatsTestgreen (5 tests, 399 assertions) — the widgets still render🤖 Generated with Claude Code