-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
feature(documentation-website): add language switch on footer (#702) #874
feature(documentation-website): add language switch on footer (#702) #874
Conversation
…h-api-bench#702) add language switch as a html select inside the footer Closes idrinth-api-bench#702
WalkthroughThe incorporation of enhancements into the documentation-website focuses on bolstering multilingual capabilities. A new component, Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Thank you for contributing!
Please make sure the actions pass. Once your pull request has been merged, you will automatically be added to the contributor's list on the website.
If you want to be shouted out on Linkedin, have a look for the shoutout issue of the specific version.
You can also find us on slack at idrinth-api-bench.
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.
Hey @marikadeveloper - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 5 issues found
- 🟢 Security: all looks good
- 🟡 Testing: 3 issues found
- 🟢 Complexity: all looks good
- 🟢 Docstrings: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
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.
Actionable comments posted: 3
Out of diff range and nitpick comments (2)
documentation-website/src/components/window.ts (1)
2-4
: Ensure thereload
method is appropriately documented.CodeRabbit suggests adding comments to explain the purpose and usage of the
reload
method in theWindow
interface to aid other developers.documentation-website/src/components/language-switch.tsx (1)
18-22
: Ensure proper error handling inchangeLanguage
function.CodeRabbit advises adding error handling in the
changeLanguage
function to gracefully handle potential failures in localStorage operations or page reloads.
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.
Looks very good!
Add new localization section inside en.yml, in specific languages.en and languages.fr; Refactor LanguageSwitch component adding Lang component as translation mean for the option values. Refactor of t.ts file improving readability of language variable assignment Fix idrinth-api-bench#702
?? that?.Navigator?.language | ||
?? 'en' | ||
).replace(/-.*$/u, '',);*/ | ||
let language = ( |
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.
the above looks better, just replace the replace with split :)
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.
Fixed in my latest commit (I don't really know how to fix the "conflibot / conflibot (pull_request)" failed test though 😅
Add less verbose declaration of the locale function inside t.ts file Fix idrinth-api-bench#702
Quality Gate failedFailed conditions |
When this is merged I have to update the languages.x keys in the en.yml and it.yml to match the other pull request that adds Italian language (#878 ) |
add language switch as a html select inside the footer
Closes #702
The Pull Request is ready
Overview
This pull request introduces a html select in the footer of the website, created inside the LanguageSwitch component, that lets the user change language, selecting form the available languages. The default language is the language of the client's browser
Review points
Documentation-Website