Conversation
…s 16 conventions - Extract getAuthOptions to shared lib/auth/auth-options.ts (Dependency Inversion) - Convert book detail/edit [id] pages to Server Components with async params (Next.js 16) - Extract useBookMutation hook from BookForm (Single Responsibility) - Memoize LanguageContext and SidebarContext values with useMemo/useCallback - Fix LanguageContext setState-in-effect lint error with lazy state initializer - Add loading.tsx and error.tsx boundaries for book route segment - Fix hardcoded TailAdmin branding in not-found.tsx - Stabilize useGoBack hook with useCallback - Improve copilot-instructions.md with deeper codebase conventions Co-authored-by: Copilot <[email protected]>
- Replaced hardcoded English validation messages in `bookSchema` with translation keys. - Updated `BookForm` and `book/error.tsx` to dynamically translate error messages using the `useLanguage` hook. - Added new translation keys for validation errors, demographics description, and generic error states across English, Arabic, and Persian locale files (`en.json`, `ar.json`, `fa.json`). - Applied a minor formatting adjustment to `AppSidebar.tsx`.
…t hydration - Integrated the `useLanguage` hook into `NotificationDropdown` to replace hardcoded text with localized string keys. - Added corresponding translation keys (`notification`, `requests_permission_to_change`, `project`, `min_ago`, `hr_ago`, `view_all_notifications`, etc.) to English, Arabic, and Persian locale files. - Resolved a Next.js SSR hydration mismatch in `LanguageContext` by initializing state with the default locale and retrieving the saved locale from `localStorage` within a `useEffect` hook.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4253182477
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Introduce multi-language localization and refine error handling - Added Persian (`fa`) and Arabic (`ar`) resource files for `BookErrors` in the Domain layer. - Configured request localization middleware in the API project (`Program.cs`) to support English, Persian, and Arabic cultures. - Converted static readonly fields in `BookErrors.cs` to expression-bodied properties to allow dynamic evaluation of localized resources per request. - Updated the frontend fetch utility (`orval-fetch.ts`) to automatically inject the `Accept-Language` header based on the user's active locale. - Enhanced the frontend error handler (`error-handler.ts`) to attempt JSON parsing for `ProblemDetails` when API errors are returned as raw strings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.