Draft
Conversation
- Replace Redux state management with cache system for translate functionality - Add new CacheTranslating type to track translation state - Update TranslatePage to use cache hooks for input, output and state - Simplify translate function and improve error handling
…rence Move auto copy setting from redux store to preference system for better consistency
The translate slice actions and types have been migrated elsewhere, so they are removed from this file. The file is marked as deprecated.
Move auto detection method configuration from local state to preference store Remove unused auto detection types from renderer types Add zod schema for auto detection method validation
…ageLabel Move language label generation from individual TranslateLanguage objects to a centralized getLanguageLabel function in useTranslate hook. This improves maintainability by removing duplicate label logic and makes it easier to update language labels globally. - Remove label() method from TranslateLanguage type and all language objects - Add getLanguageLabel function in useTranslate that handles label generation - Update all components to use getLanguageLabel instead of label() - Add labelMap for common language codes to avoid unnecessary lookups
Refactor bidirectional translation logic to use cache for state management Simplify language pair handling by using language codes directly
…e management Move markdown toggle state to preferences system and remove direct database operations
Remove local state management for scroll sync and use preference system instead Clean up unused imports and props in translate components
Move source and target language state management from database to cache for better performance and consistency
…e handling - Introduce TargetLangs type to manage target and alter languages - Replace local state with preference-based language management - Simplify language selection logic in ActionTranslate component - Remove deprecated database storage for language pairs
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.
What this PR does
Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Breaking changes
If this PR introduces breaking changes, please describe the changes and the impact on users.
Special notes for your reviewer
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
Release note