Translate like Taking Notes
English |
简体中文 |
Deutsch |
Español |
Français |
日本語 |
한국어 |
Русский
Placing context-aware translations directly below the original text, just like subtitles in a movie or annotations in a book.
The core philosophy is simple: Do not disturb. Keep the user in the "flow state" of reading while providing high-quality, LLM-powered translations when needed.
This repository hosts the Community Edition of TapWord Translator. It is fully open-source, privacy-focused, and designed to work with your own API Keys (OpenAI, DeepSeek, or any OpenAI-compatible provider).
Translations appear as subtitles directly under the text. No popups, no jumping. It feels like taking notes on the page, keeping your reading flow uninterrupted.
Powered by advanced AI (LLMs), it understands the full context of sentences, delivering translations that are far more accurate and nuanced than traditional tools.
Select part of a word, and the extension automatically expands to the complete word. No need for precise selection—just highlight any portion, and get the full word translated.
The official version is free to use.
If you prefer the Bring Your Own Key model, you can build it yourself:
-
Clone the repository
git clone https://github.com/hongyuan007/tapword-translator.git cd tapword-translator -
Install dependencies
npm install
-
Build the project
npm run build:community
-
Load into Chrome
- Open Chrome and navigate to
chrome://extensions/. - Enable Developer mode (top right toggle).
- Click Load unpacked.
- Select the
distfolder generated in step 3.
- Open Chrome and navigate to
Start using the extension in 30 seconds:
- Click the extension icon in your browser toolbar to open the Popup.
- Click the Settings (gear icon) to open the Options page.
- Locate "Custom API" (In Community Edition, this is mandatory).
- Enter your API configuration:
- API Key:
sk-....... - Model:
gpt-3.5-turbo,gpt-4o, or other compatible models. - API Base URL: Defaults to
https://api.openai.com/v1, but you can change this to use proxies or other providers (e.g., DeepSeek, Moonshot).
- API Key:
- Save and enjoy!
We use a modern stack: TypeScript, Vite, and pure HTML/CSS.
src/
├── 1_content/ # Scripts injected into web pages (The UI you see on pages)
├── 2_background/ # Service workers (API calls, context menu)
├── 3_popup/ # Extension popup UI
├── 5_backend/ # Shared API services
├── 6_translate/ # Translation business logic
└── 8_generate/ # LLM prompt engineering & response parsing
| Command | Description |
|---|---|
npm run dev:community |
Start development server in watch mode (Community Config) |
npm run build:community |
Build for production (Community Config) |
npm type-check |
Run TypeScript type checking |
npm test |
Run unit tests with Vitest |
We use compile-time environment variables to separate the Community and Official logic.
- Community Build:
VITE_APP_EDITION=community. Disables proprietary cloud logic, enforces custom API usage, and strips out TTS code. - Official Build: (Private) Includes proprietary server logic.
We are a community of language learners and avid readers. If you have fresh ideas, UI suggestions, or bug fixes, we'd love your contributions, Pull requests are warmly welcome!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the AGPL-3.0 License. See LICENSE.txt for more information.
Made with ❤️ for readers around the world.
