Skip to content

智能网页翻译插件是一款轻量、私密、强大的翻译助手,让你在浏览网页与观看视频时,获得“所见即所译”的无缝体验。它支持一键全页翻译、划词即译、视频字幕的实时翻译与位置微调等核心能力; 并接入 OpenAI、Claude、Gemini、DeepSeek 等多家 AI 模型,带来更自然、更准确、更贴合上下文的翻译结果。

License

Notifications You must be signed in to change notification settings

jackom/Smart-Page-Translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Page Translator - Web

Chinese README

Tech Stack

  • React 18 + TypeScript 5.7 + Vite 6
  • Tailwind CSS 3 + shadcn/ui (Radix UI-based)
  • React Router DOM 6
  • Zustand (state management)
  • i18next (i18n)
  • Browser Extension: Manifest V3 (content script + background service worker)

Quick Start

  1. Install dependencies
npm install
# or
bun install
  1. Start dev server
npm run dev
# or
bun run dev

Local: http://localhost:3000

  1. Production build
npm run build
# or
bun run build

Outputs to dist/

  1. Browser extension build
  • Production
npm run build:extension:prod

Outputs to extension-dist/

  • Test
npm run build:extension:test
  1. Clean build outputs and caches (safe)
npm run clean

Removes dist/, extension-dist/, release/, and .vite caches (including node_modules/.vite). These are generated artifacts and can be safely deleted; run the corresponding build commands again to regenerate them.

  1. Local test page & one-click E2E (test only)
  • Serve test page
npm run serve:test

Open http://localhost:8080/test-extension.html

  • One‑click E2E smoke
npm run test:e2e

The script will:

  • build the test extension
  • start the local test page
  • auto open http://localhost:8080/test-extension.html?auto=1 Then load the unpacked extension in chrome://extensions from extension-dist/chrome to see PASS/FAIL. Automation runs only on the test page and is not shipped in production.
  1. Thorough clean (includes node_modules)
npm run clean:all

Removes everything in clean plus node_modules/. Run npm install afterwards.

  1. Lint
npm run lint

Development

  • React + TypeScript + Vite; path alias: @/* (see tsconfig.json)
  • Styling: Tailwind CSS; UI: shadcn/ui; forms: react-hook-form + zod
  • Routing: react-router-dom@6; State: zustand; i18n: i18next
  • Extension (MV3): public/contentScript.js, public/background.js, public/manifest.json
  • Before commit: run npm run lint; follow Conventional Commits

Screenshots

Below are a few key UI screenshots (English). All images are referenced from the snapshot/ folder.

Main Page Main Tabs Mini Window Full Window Supported Providers Video Translation

About

智能网页翻译插件是一款轻量、私密、强大的翻译助手,让你在浏览网页与观看视频时,获得“所见即所译”的无缝体验。它支持一键全页翻译、划词即译、视频字幕的实时翻译与位置微调等核心能力; 并接入 OpenAI、Claude、Gemini、DeepSeek 等多家 AI 模型,带来更自然、更准确、更贴合上下文的翻译结果。

Resources

License

Stars

Watchers

Forks

Packages

No packages published