Skip to content

feat(xtrackers): add French locale support and configuration for Xtrackers#36

Merged
yevklym merged 7 commits into
mainfrom
feat/xtrackers-fr
May 1, 2026
Merged

feat(xtrackers): add French locale support and configuration for Xtrackers#36
yevklym merged 7 commits into
mainfrom
feat/xtrackers-fr

Conversation

@yevklym
Copy link
Copy Markdown
Owner

@yevklym yevklym commented May 1, 2026

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:

  • Added a complete region configuration for the French locale in config.go, including mappings for asset classes, sectors, locations, and relevant UI texts for cookie and investor role consent.
  • Added sample French datatable and holdings JSON files for testing and development: datatable-fr-fr.json and holdings-fr-fr.json. [1] [2]
  • Implemented and thoroughly tested discovery of ETFs for the French locale in discovery_test.go, verifying parsing and mapping for multiple funds.

Regional Configuration Improvements:

  • Extended the regionConfig struct 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]
  • Updated the ETF discovery logic to use region-specific distribution terms for determining whether a fund is distributing.

Supported Locations:

  • Added new location constants: Hong Kong, New Zealand, Poland, and Portugal, and mapped them in the French locale configuration. [1] [2]

Testing and Test Data:

  • Embedded new French datatable and holdings JSON files into the test suite, and added usage in relevant test files. [1] [2]

@yevklym yevklym self-assigned this May 1, 2026
Copilot AI review requested due to automatic review settings May 1, 2026 10:53
@yevklym yevklym added the enhancement New feature or request label May 1, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 fr region 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 Location constants 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.

Comment thread internal/providers/xtrackers/config.go Outdated
Comment thread internal/providers/xtrackers/config.go Outdated
@yevklym yevklym merged commit 0ca8bf4 into main May 1, 2026
5 checks passed
@yevklym yevklym deleted the feat/xtrackers-fr branch May 1, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants