learningequality / learningequality/studio

CountryField: Hard codes languages used internally

Open
#3,175 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P2 - normal TAG: tech update / debt
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.