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

feat(ui): Improve language dropdown and translation #338

Merged
merged 6 commits into from
Nov 12, 2024

Conversation

YummyBacon5
Copy link
Contributor

This PR:

  • Prevents a layout shift from happening when switching languages
  • Adds more translation keys to missed aria-labels
  • Updates the document's lang attribute to the current language
  • In the language dropdown, it shows the language's translated name along with its original name

@YummyBacon5 YummyBacon5 changed the title Improve language dropdown and translation feat(ui): Improve language dropdown and translation Nov 12, 2024
Copy link

github-actions bot commented Nov 12, 2024

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
enclosed ✅ Ready (View Log) Visit Preview 6b844d8
enclosed-docs ✅ Ready (View Log) Visit Preview 6b844d8

Copy link

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
enclosed-docs 🔨 Building (View Log) 0c373cf

Copy link
Owner

@CorentinTh CorentinTh left a comment

Choose a reason for hiding this comment

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

Nice work on this PR! 🙏
Lots of meaningful updates here. Thanks for covering all the missing ARIA label translations, and the fallback to other locales is a solid idea.

Just a couple of small things, mainly around the dropdown translation and a few nitpicks, but overall, this is looking good for production 🚀

Co-authored-by: Corentin THOMASSET <corentin.thomasset74@gmail.com>
@YummyBacon5
Copy link
Contributor Author

I've added a new test to make sure the languages in locales are sorted by their native language name, like the comment says

Copy link
Owner

@CorentinTh CorentinTh left a comment

Choose a reason for hiding this comment

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

Lgtm, thanks for the updates 🙏

@CorentinTh CorentinTh merged commit 428ab39 into CorentinTh:main Nov 12, 2024
11 checks passed
@CorentinTh CorentinTh mentioned this pull request Nov 17, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants