refactor(data): migrate translate data to v2 cache/preference/dataapi architecture#13264
Draft
refactor(data): migrate translate data to v2 cache/preference/dataapi architecture#13264
Conversation
Add SQLite schema for custom translate languages with unique langCode constraint. Include migration logic to transfer data from Dexie export to new table.
- Remove translate state from renderer persist cache - Update translate preference types to use TranslateBidirectionalPair - Regenerate preference schemas and mappings with new classification - Update translate auto copy target key to feature.translate.page.auto_copy
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
Before this PR:
Translate-related data (page state, preferences, history) was stored in Redux (v1 data layer) with no v2 equivalents defined.
After this PR:
Translate data is fully classified and migrated to the v2 data architecture:
cacheSchemas.tspreferenceSchemas.tstranslate_historySQLite table with Drizzle ORM schema and migrationWhy we need it and why it was done in this way
This is part of the ongoing v2 data layer migration (Redux → Cache/Preference/DataApi). Translate data was one of the remaining pieces that needed to be classified and migrated.
The following tradeoffs were made:
The following alternatives were considered:
N/A — this follows the established v2 data classification pattern.
Breaking changes
None. This PR only adds new schemas and types; no existing functionality is modified.
Special notes for your reviewer
classification.jsonandtarget-key-definitions.jsonupdates reflect the data classification tooling output.PreferencesMappings.tsis updated to support translate preference migration from v1.src/renderer/src/store/translate.ts.Checklist
/gh-pr-review,gh pr diff, or GitHub UI) before requesting review from othersRelease note