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

💻 Language switcher text #5309

Merged
merged 5 commits into from
Apr 1, 2024
Merged

💻 Language switcher text #5309

merged 5 commits into from
Apr 1, 2024

Conversation

Annelein
Copy link
Contributor

Fixes #4835

Babel only lists language codes in Latin alphabet. I did some searching and I think it would be quite difficult to find the non Latin language codes. So for the non Latin languages, I thought the best solution would be to just state the non Latin language in the switcher instead of the non Latin language code.

How to test

  1. Select a non latin language in your profile
  2. Go to Hedy
  3. Check if there is a language in the switcher (and it's not None)
  4. Switch between English and the (non Latin) language
Screen.Recording.2024-03-25.at.15.23.18.mov

@Annelein Annelein changed the title 💻 Language text 💻 Language switcher text Mar 25, 2024
@Annelein Annelein requested a review from Felienne March 25, 2024 14:32
@@ -414,6 +415,9 @@ def setup_language():
# front-end is fixed based on this value
g.dir = static_babel_content.TEXT_DIRECTIONS.get(g.lang, 'ltr')

# True if it is a Latin alphabet, False if not
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this comment! This is exactly the type of thing that is very easy to understand/explain and superhard to get from the code!

Copy link
Contributor

mergify bot commented Apr 1, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 59f6474 into main Apr 1, 2024
12 checks passed
@mergify mergify bot deleted the language-text branch April 1, 2024 06:01
Copy link
Contributor

mergify bot commented Apr 1, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

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

Successfully merging this pull request may close these issues.

[UI idea] change fa language icon into the used language
2 participants