-
Notifications
You must be signed in to change notification settings - Fork 124
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
fix: Correction to the language code for Português, Italian and German #903
Conversation
Thanks for the pull request, @heldersepu! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
@openedx/cla-problems I completed the Contributor License Agreement form (twice) it said I should expect to see an email from DocuSign with 1 business day, but no email from DocuSign |
Hi @heldersepu! I will look into this for you. |
Thanks @mphilbrick211 I received the email from DocuSing, I signed it and now waiting for the requirement to clear |
Hi @heldersepu! My colleague sent you the CLA this afternoon for your review / signature. Could you please confirm if you received it? |
Great! Once you rebase it should turn green. It can take 24 hours to go through. If you're still having any issues, please let me know! |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #903 +/- ##
==========================================
+ Coverage 46.44% 46.51% +0.06%
==========================================
Files 116 117 +1
Lines 2405 2408 +3
Branches 640 640
==========================================
+ Hits 1117 1120 +3
Misses 1214 1214
Partials 74 74
☔ View full report in Codecov by Sentry. |
Hi, we need to have a valid Contributor License Agreement (CLA) in place for all contributions. See the welcome message above for the details about how to enroll. The process is different depending upon whether you are making this contribution as an individual or on behalf of your employer. |
Hello @e0d I believe that requirement has been satisfied: |
Looks good |
@e0d ... I still see the review is required |
I've updated the status to ensure that the reviewing team sees this is ready. |
@OmarIthawi would you be able to review this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @heldersepu for spotting the bug.
I've checked the list of supported languages and it aligns with this pull request.
However, looking at the French Candian locale which I'm assuming is correct, I see the codes need to be all lower case.
frontend-app-account/src/account-settings/site-language/constants.js
Lines 97 to 101 in 98083b1
{ | |
code: 'fr-ca', | |
name: 'French (CA)', | |
released: true, | |
}, |
Please update it as suggested and it should be good to go.
Thanks @e0d for the ping :)
@OmarIthawi thanks for the review... I just tested and it looks like the codes are case insensitive, but I like your suggestion to keep them all the same (lowercase) |
Great @heldersepu! The tests are failing due to commit messages. Please squash them and it should be ready to merge. |
fix: Correction to the language code for Português, Italian and German lowercase code for DE lowercase code for IT Co-Authored-By: Omar Al-Ithawi <[email protected]>
@OmarIthawi I squashed the commits... I think it now requires an approval |
I can't approve though. But @mphilbrick211 should be able to. Would you mind helping? |
I remember having conversations in the Translations working group about use of specific ( I know we had issues with browser language not being supported when using the specific codes (for example, someone in Austria with a browser reporting My concern is that this PR would break the intended behavior (allowing fallbacks to the generic language code when the country code doesn't match). |
@brian-smith-tcril the counter example to what you describe is spanish:
there is no In my tests the language is only shown correctly when the user selects it in the account preferences an alternative ... |
@brian-smith-tcril I presumed that we maintain a canonical list of the languages in the following list of supported languages. It be wrong, if that table is incorrect then we should fix it and probably move it into For the fallback mechanism, I'm afraid I don't have a good answer on that! I've added this language and later removed it in Transifex after finding out that it's not what Translators would use. The Transifex bot don't delete stale resoruces, so we should probably do that ourselves. Anyway, this isn't to say which one is right. I don't know to be honest. |
I don't have a quick answer for that. We should consult the wider Open edX Transifex Working Group. |
@brian-smith-tcril you make the claim:
I do not see in the code where the @brian-smith-tcril maybe I'm missing something... Where in the code is the siteLanguageList used for that behavior? |
@heldersepu you touched on my concern when you mentioned
I see the problem this PR is addressing (the
I want to make sure that we don't want to address this via 2 or 3 before merging 1. |
Sorry @brian-smith-tcril I really don't understand what you mean in 2
The language codes are in the siteLanguageList, I think both of those options are the same I tested changing the language in my browser to see what will be the impact for a new user French (Swiz)French (Canadian)Spanish (Argentinian)I tested a few other languages (clearing cache in between) and same pattern As far as I can see the |
@brian-smith-tcril I was doing some debugging to see what happens the first time a user with a valid language like First time we can see no cookie (as expected) and it gets the lang from But on following calls we do have a cookie and it has been set to Now I see your point ... let's see if I can untangle this |
I'm sorry I wasn't more clear in my previous message. To clarify what I meant I'll use German as an example. For 1 (update the siteLanguageList) this would just mean doing what this PR does. The siteLanguageList would have For 2 (update the language codes) this would mean ensuring all the proper German translations live in However, after bringing this up in the I believe I also see why you're getting back
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I believe the best solution to this would be to use generic language codes in transifex instead of country specific ones, this PR addresses the immediate issue effectively.
This brings the language codes in the dropdown in line with the language codes in the supported languages table, and will address the worst of the issues.
Without this change it would be impossible for someone to use the dropdown to override undesired browser behavior.
Before this PR
- User has browser set to
de_AT
, sees English because we don't havede_AT
orde
translations. - User tries to change language using dropdown, selects German (
de
), sees English because we don't havede
translations.
After this PR
- User has browser set to
de_AT
, sees English because we don't havede_AT
orde
translations. - User tries to change language using dropdown, selects German (
de_DE
), sees German because we havede_DE
(German - Germany) translations.
@brian-smith-tcril I see all the checks are green thank you! ... about the fallback mechanism (or generic language) looks like the spanish (es_419.json) was coded to be the fallback in the registration page: We should probably do that for all that do not have a proper translation, that can be a next PR I could work on, I will raise it up in the wider Open edX Transifex Working Group as suggested by @OmarIthawi |
@OmarIthawi I do not have access to the slack Open edX Transifex Working Group if you can invite me I can run point on that, if not just raise the questions yourself see what they have to say ... things that need answers :
|
@heldersepu get a invite via this link: https://openedx.org/slack
I can't answer those questions here, let's discuss them with the group. |
@heldersepu 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
Started researching into this issues because of this issue:
openedx/wg-build-test-release#267
For a few languages we have multiple files:
missing translation:
proper translation:
This PR adds the correct one in the options