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

Only enable languages that are also enabled on Common Voice #534

Closed
2 tasks done
MichaelKohler opened this issue Nov 12, 2021 · 4 comments
Closed
2 tasks done

Only enable languages that are also enabled on Common Voice #534

MichaelKohler opened this issue Nov 12, 2021 · 4 comments
Assignees
Labels
Milestone

Comments

@MichaelKohler
Copy link
Member

MichaelKohler commented Nov 12, 2021

As per #531 we should only enable languages that are also enabled in Common Voice.

After #526 we will have the initial infrastructure for this already in place.

  • List of languages in profile should directly be taken from all.json (we then can remove it from the redux store, get rid of all requests, get rid of the backend part, and then use a hook to get the data)
  • Native names for the dropdown should be taken from native-names.json
@MichaelKohler
Copy link
Member Author

List of languages in profile should directly be taken from all.json

I think this needs a bit more exploration. This would mean that a language would not get enabled on Sentence Collector until the next automatic export and Sentence Collector release. I feel we should make this dynamic and directly query Pontoon (with a cache on the SC backend). This would make this accessible way earlier than the all.json approach.

Native names for the dropdown should be taken from native-names.json

.. with a fallback to English only in case it has not been translated on Pontoon yet. Here again we'd have the issue of having to wait for an automatic export and Sentence Collector release. However for this one I'm not sure how straightforward the query would be. Needs to be explored.

I feel if we enable it dynamically but potentially without the native name it would still be better than having to wait longer for it to be enabled. So that might be a good compromise if there is no non-complex solution for the native names.

@MichaelKohler
Copy link
Member Author

We can fetch the locales directly from Pontoon. For the native names, we can offer the fallback of only displaying the localized name. Once the native-names.json file in the CV repo gets updated and we release a new version, it would then also show the native name. I think this is a doable compromise.

@MichaelKohler
Copy link
Member Author

To provide a bit more context here: we can't really fetch the native name from pontoon for every language dynamically, as that requires us to fetch translations for every single language. This is simply not feasible for not much gain.

@MichaelKohler MichaelKohler self-assigned this Nov 19, 2021
MichaelKohler pushed a commit that referenced this issue 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 issue has been resolved 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
Projects
None yet
Development

No branches or pull requests

1 participant