Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Only enable languages also enabled on Pontoon #558

Merged
merged 7 commits into from
Nov 20, 2021

Conversation

MichaelKohler
Copy link
Member

This PR contains multiple parts to improve our language handling compared to Common Voice.

Relying on Pontoon for enabled languages

Until now we've had our own language list in Sentence Collector. This included languages that are not yet enabled on Common Voice, as we enabled the full ISO 639-1 list. This also meant that every time somebody requests a new locale we had to explicitly add it to Sentence Collector as well. With the changes here we are now fetching the enabled locales from Pontoon.

This means:

  • Languages will be enabled on Sentence Collector at most 30 minutes after it has been added to Pontoon
  • The Native Name for a language might not show up until it's translated on Pontoon and a new deployment of Sentence Collector has been done. This is not ideal, but fetching the native name dynamically would mean fetching all the translations, which currently is not feasible.
  • For local development (EN) you might see language codes as fallback, where in production it would show the localized language name. If you want to test something related to that, download the translations from Pontoon (see README) and use another UI language instead of English.

This implements all the changes from #534.

Only returning valid languages for profile

As we disable a few languages previously enabled and contributed to with the change above, we now also only return valid languages for the profile. This fixes the first part of #532. The second part of that will be handled with #474.

Cleanup of language data structure

We are now always passing the same language structure to the client from the backend, leading to quite some code cleanup in the client code. 🎉

@MichaelKohler MichaelKohler merged commit 0da87d0 into main Nov 20, 2021
@MichaelKohler MichaelKohler deleted the feature/language-improvements branch November 20, 2021 14:08
MichaelKohler pushed a commit that referenced this pull request Nov 25, 2021
# [2.14.0](v2.13.1...v2.14.0) (2021-11-25)

### Bug Fixes

* add note for addition process to language addition section (fixes [#474](#474)) ([#561](#561)) ([3ab0cf1](3ab0cf1))
* do not persist allLanguages, languages, router and review sentences from store (fixes [#550](#550)) ([#559](#559)) ([97e5217](97e5217))

### Features

* add UI language selector to profile (fixes [#533](#533)) ([#563](#563)) ([de59b70](de59b70))
* only enable languages also enabled on Pontoon ([#558](#558)) ([0da87d0](0da87d0)), closes [#534](#534)
@MichaelKohler
Copy link
Member Author

🎉 This PR is included in version 2.14.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant