-
Notifications
You must be signed in to change notification settings - Fork 178
Description
Problem
This MFE allows to select from all the supported languages.
This is not desired for some installations because it gives the learners the impression that the site supports 10+ languages where in reality it supports one language or two.
Affected deployments
@sambapete reported that @EDUlib needs only French and English for their learners.
@nelc needs only two languages Arabic and English. This is the same for most large Arabic deployments.
Possible solution
One way to support this configuration is to update the make pull_translations in this repository:
- Limit the languages being pulled with atlas via
atlas pull --filter=fr_CA,ar,en - Update the languages list file to only show the languages being pulled instead of the hard coded constant:
const siteLanguageList = [ { code: 'en', name: 'English', released: true, }, { code: 'ar', name: 'العربية', released: true, }, { code: 'ca', name: 'Català', released: false, }, { code: 'es-419', name: 'Español (Latinoamérica)', released: true,
This means that there's a centralized configuration e.g. via the DarkLang config. Of which the frontend-app-account can pull from an API: lms.edu/v1/dark-lang/available-languages
This way we don't have different configurations in multiple parts of the system.
Places in which languages are configured that ara supposed to be one place
- The edx-platform
settings.LANGUAGE_CODEandsettings.LANGUAGES - The account MFE list of languages
- The Dark Lang configuration in the admin panel of LMS
- The preview Dark Lang configuration in the same place above
- The atlas
--filteroption during the build time to pull the actual languages.
Other places in which have language configurations, but we haven't decided what to do with them
- The Transifex enabled languagues.
- Mobile apps are a totally different world 😅
- Aspects has it's own thing as well.
- Some pip packages like Django Countries, have it's own embedded po/mo files.
- Whatever non-standard/custom Micro-frontend or Dashboard you're building, but that's not a community-wide problem.
- Community provided XBlocks such as by @zeit-labs or @OpenCraft embed their own set of languages as hard-coded po/mo files