feat(api): enhance audience export with i18n, theme colors and richer breakdowns#10
Merged
Conversation
… breakdowns - Add fr/en i18n messages and a minimal t() helper for export labels - Use the user's session lang to localize sheet/column/row labels - Fetch site theme from simple-directory and apply its palette to headers and variation cells; fall back to default colors on failure - Track file downloads by user class in the origins aggregation and add the corresponding columns/sheets - Add a user-class definitions block adapted to user vs organization accounts
- Set explicit font name/size on styled cells so Excel does not fall back to a different default font, which produced mixed fonts between styled and unstyled cells - Drop the C:E merge on the user-class-definitions title row so the title can overflow visually like the breakdown title above it - Use the theme's secondary/on-secondary palette for column B row labels and keep the primary palette for header rows - Thin out the bottom border of the column-header row on non-global sheets so it no longer reads as a heavy separator - Remove the redundant parenthetical from the owner-API-key definition
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
Changes
api/i18n/messages/{fr,en}.jsonand a smallt()helper inapi/i18n/utils.ts(lang fallback +{{var}}interpolation). The export now uses the session language./simple-directory/api/sites/_publicto readtheme.colorsand passes them togenerate(). Failure is non-fatal and falls back to defaults.getOriginaggregation now groups onoperationTracktoo, exposingnbRequests*(readDataAPI) andnbFiles*(readDataFiles) per user class (anonymous, owner, user, external, ownerAPIKey, externalAPIKey).export.tsfor consistent typography, alignment and overflow handling; clearer wording for external user / API key labels.