learningequality / learningequality/studio
CountryField: Hard codes languages used internally
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 191
- Forks
- 307
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 10
Description
Observed behavior
The CountryField component hard codes the languages it supports for countries internally, this led to an issue when adding a new language https://github.com/learningequality/studio/issues/3167 whereby countries were not properly listed after the language was added without making specific reference to the new language in CountryField.
Expected behavior
We should refer to a single source of truth about which languages we are supporting, and use that to determine which ones are imported.
As a bonus, it would be good to do code splitting to avoid loading language assets for languages not being used by the user at any one time.
User-facing consequences
Breakage when we add a new language.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the CountryField component and trace how its supported languages and language assets are currently selected. Use the language source of truth described in the issue, and consider the optional code-splitting goal separately. Done means adding a supported language no longer requires a CountryField-specific language update and countries remain correctly listed.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100