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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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. 🎉