Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend allowed language codes #1123

Open
RonanFR opened this issue Sep 20, 2024 · 3 comments
Open

Extend allowed language codes #1123

RonanFR opened this issue Sep 20, 2024 · 3 comments

Comments

@RonanFR
Copy link

RonanFR commented Sep 20, 2024

Is your feature request related to a problem? Please describe.
Problem described here: https://discuss.openedx.org/t/translations-issue-in-redwood-tutor-18/13953/3
Currently most of the French translations need a review on transifex and that's why almost nothing is translated to French when setting the language code to fr.
@OmarIthawi suggested to use French Canadian (which is fully reviewed) until French get reviewed. However, when answering fr_CA or fr-ca or fr_ca to the question The default language code for the platform [en] in the interactive platform configuration (tutor local launch) I get the error:
Error: 'fr-ca' is not one of 'en', 'am', 'ar', 'az', 'bg-bg', 'bn-bd', 'bn-in', 'bs', 'ca', 'ca@valencia', 'cs', 'cy', 'da', 'de-de', 'el', 'en-uk', 'en@lolcat', 'en@pirate', 'es-419', 'es-ar', 'es-ec', 'es-es', 'es-mx', 'es-pe', 'et-ee', 'eu-es', 'fa', 'fa-ir', 'fi-fi', 'fil', 'fr', 'gl', 'gu', 'he', 'hi', 'hr', 'hu', 'hy-am', 'id', 'it-it', 'ja-jp', 'kk-kz', 'km-kh', 'kn', 'ko-kr', 'lt-lt', 'ml', 'mn', 'mr', 'ms', 'nb', 'ne', 'nl-nl', 'or', 'pl', 'pt-br', 'pt-pt', 'ro', 'ru', 'si', 'sk', 'sl', 'sq', 'sr', 'sv', 'sw-ke', 'ta', 'te', 'th', 'tr-tr', 'uk', 'ur', 'vi', 'uz', 'zh-cn', 'zh-hk', 'zh-tw'.

Describe the solution you'd like
Would it be possible to extend the list of available language codes ? (using all those available on transifex)
I have identified that the list is defined here:

"The default language code for the platform",

However, I haven't tried to manually set the variable LANGUAGE_CODE to fr_CA in the config.yml file to see if it works (it is not clear to me yet where and how the variable is used to pull translations from atlas). So I don't know if additional modifications are needed (or if adding fr_CA to the above list is sufficient).

@regisb
Copy link
Contributor

regisb commented Sep 20, 2024

A related issue was discussed here, about Latvian: https://discuss.openedx.org/t/open-edx-localization/13832

  1. As a temporary fix, you may run tutor config save --set LANGUAGE_CODE=fr_CA. But you won't be able to run tutor local launch in interactive mode anymore.
  2. As a slightly less temporary fix, we can add "fr_CA" to the list of accepted language codes.
  3. As a more acceptable fix, we should make the list of language code extensible by any plugin developers. To do that, we should create and use a tutor.hooks.Filters.OPENEDX_LANGUAGE_CODES filter.
  4. As a definitely-most-betst fix, edx-platform should accept all languages in LANGUAGES. It makes zero sense to keep overriding that setting like we do in edx-platform. See the discussion that I linked to above.
  5. As a complementary, very important fix, the language strings for "fr" should be reviewed ASAP. Obviously I'm biased but come on: we hosted the Olympics, we won two Football world cups, surely we deserve to have one reviewed locale, right? (In all seriousness I find it very disturbing that Redwood was released without the "fr" locale)

@RonanFR
Copy link
Author

RonanFR commented Sep 20, 2024

@regisb Thanks for your quick reply !

To your 5th point: Haha yes I was also surprised !
I asked to be a translator on transifex to contribute to the reviews (request pending).

@OmarIthawi
Copy link
Contributor

On a related note, Open edX makes it hard to configure the languages. We have many places for the same setting.

I imagine a centralized place to configure the following:

  • Default platform language LANGUAGE_CODE
  • List of available languages LANGUAGES for Python, DarkLang configuration in /admin as well as the Account Settings language list in the Account MFE.
  • Beta languages in the DarkLang configuration in /admin

In Tutor, we can only easily change LANGUAGE_CODE, LANGUAGES and Account Settings language list cannot be changed.

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

No branches or pull requests

3 participants