feat(xtrackers): add French locale support and configuration for Xtrackers#36
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds French (fr-fr) locale support to the Xtrackers provider by introducing a new regional configuration, localized mapping tables, and embedded test fixtures, while also generalizing some region-specific behaviors (entry-gate UI text matching and distribution detection).
Changes:
- Add
frregion configuration for Xtrackers, including mappings (asset class/sector/location), entry-gate UI texts, and distribution terms. - Generalize distribution detection and entry-gate bypass logic to be driven by per-region configuration.
- Add FR discovery/holdings test fixtures and extend unit tests; add new
Locationconstants and update README supported regions.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/providers/xtrackers/config.go | Adds fr region config and new per-region fields (cookie/role texts, distribution terms); updates discovery request body. |
| internal/providers/xtrackers/http.go | Uses regionConfig-provided cookie/role texts when bypassing the entry gate in the headless browser flow. |
| internal/providers/xtrackers/mapping.go | Generalizes distributing detection to use region-specific terms. |
| internal/providers/xtrackers/discovery.go | Wires region-specific distribution terms into fund conversion. |
| internal/providers/xtrackers/discovery_test.go | Adds FR discovery coverage using embedded FR datatable fixture. |
| internal/providers/xtrackers/holdings_test.go | Adds FR holdings coverage and URL test case using embedded FR holdings fixture. |
| internal/providers/xtrackers/data/datatable-fr-fr.json | Adds FR sample datatable response fixture for tests/dev. |
| internal/providers/xtrackers/data/holdings-fr-fr.json | Adds FR sample holdings response fixture for tests/dev. |
| enums.go | Adds new Location constants (Hong Kong, New Zealand, Poland, Portugal). |
| README.md | Updates supported regions list for Xtrackers to include fr. |
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.
This pull request adds support for the French locale ("fr-fr") to the Xtrackers ETF provider, including configuration, data files, and tests. It also introduces improvements to regional configuration flexibility and updates the set of supported locations. The following are the most important changes:
French Locale Support:
config.go, including mappings for asset classes, sectors, locations, and relevant UI texts for cookie and investor role consent.datatable-fr-fr.jsonandholdings-fr-fr.json. [1] [2]discovery_test.go, verifying parsing and mapping for multiple funds.Regional Configuration Improvements:
regionConfigstruct to support customizable cookie consent texts, investor role texts, and distribution terms, and updated German and UK region configs to use these fields. [1] [2] [3]Supported Locations:
Testing and Test Data: