-
Notifications
You must be signed in to change notification settings - Fork 2
fix: add zh locale support for algolia search #39
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
Conversation
🦋 Changeset detectedLatest commit: 420ebcb The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThe changes introduce Chinese (zh) locale support for Algolia search by updating the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Search
participant useLang
participant AlgoliaSearch
User->>Search: Render Search component
Search->>useLang: Get current language
Search->>Search: Memoize Algolia props with language filter
Search->>AlgoliaSearch: Render with dynamic props (including zh locale)
Possibly related PRs
Suggested labels
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🧰 Additional context used🧬 Code Graph Analysis (1)src/theme.tsx (1)
🪛 ESLintsrc/theme.tsx[error] 1-1: Unable to resolve path to module '@rspress/core/runtime'. (import-x/no-unresolved) [error] 2-2: Unable to resolve path to module '@rspress/core/theme'. (import-x/no-unresolved) [error] 6-6: Unable to resolve path to module '@rspress/plugin-algolia/runtime'. (import-x/no-unresolved) [error] 7-7: Unable to resolve path to module 'react'. (import-x/no-unresolved) 🔇 Additional comments (5)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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.
Pull Request Overview
This PR adds support for the Chinese (zh) locale to the Algolia search functionality. Key changes include:
- Passing the new ZH_LOCALES constant to the AlgoliaSearch component.
- Using the useLang hook and memoizing search parameters to filter results by language.
- Updating the FALSY_VALUES set to include undefined.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/theme.tsx | Updated AlgoliaSearch component to include zh locale support and language filtering |
| src/shared/constants.ts | Added "undefined" to the FALSY_VALUES set for improved value consistency |
commit: |
cc98abd to
420ebcb
Compare
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Chores