Skip to content

feat(mobile, desktop): add dictionary lookup feature (featuring English and Chinese offline dictionaries) - #767

Open
Decidetto wants to merge 3 commits into
codedogQBY:mainfrom
cha1latte:feat/upstream-offline-dictionaries
Open

feat(mobile, desktop): add dictionary lookup feature (featuring English and Chinese offline dictionaries)#767
Decidetto wants to merge 3 commits into
codedogQBY:mainfrom
cha1latte:feat/upstream-offline-dictionaries

Conversation

@Decidetto

@Decidetto Decidetto commented Sep 6, 2026

Copy link
Copy Markdown

Add selection-based offline definitions and dictionary management on mobile and desktop. Currently supports optional English WordNet and Chinese Wiktionary SQLite packs. Select text and choose Define to see definitions in a popup. Dictionary settings support installation, updates, repair, removal, and source attribution.

Share lookup, pack validation, recovery, and state management across platforms. Desktop downloads stream directly to disk in native code, with limited progress updates and a separate verification phase. Dictionary downloads, About, Sync, and chapter translation reuse a styled progress bar. Desktop settings and action icons match the existing app UI.

The binary packs are currently available in the dictionary-packs-v1 release: English WordNet pack and Chinese Wiktionary pack. Maintainers can migrate these assets and update the manifest URLs while retaining the verified hashes. Manifest updates target the official repository, with a bundled fallback. Source/build configuration supports EXPO_PUBLIC_DICTIONARY_MANIFEST_URL on mobile and VITE_DICTIONARY_MANIFEST_URL on desktop. Reproducible pack-building and conversion tools are included.

Planned follow-up: an explicit "Look up online" button when no offline definition is found, opening a language-appropriate dictionary in the browser. This remains outside this PR's scope.

Validation: 13 desktop dictionary tests, 115 mobile tests, 619 core tests, and 4 native dictionary tests passed, along with desktop/mobile typechecks and a local Windows desktop build. The earlier pack-tool validation passed 17 CLI tests and its typecheck. The desktop preview was manually tested and approved. A same-machine comparison reduced the English pack transfer from 13.7 seconds to 1.6 seconds; verification remained about 0.6 seconds, with matching checksums. Existing dependency versions are unchanged.

@Decidetto Decidetto changed the title feat(mobile): add offline English and Chinese dictionaries feat(mobile, desktop): add offline English and Chinese dictionaries Sep 6, 2026
@Decidetto Decidetto changed the title feat(mobile, desktop): add offline English and Chinese dictionaries feat(mobile, desktop): add dictionary lookup feature (featuring English and Chinese offline dictionaries) Sep 6, 2026
@Decidetto
Decidetto marked this pull request as ready for review September 6, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant