Skip to content

Meapri/EdgeTranslate-v3

EdgeTranslate-v3

EdgeTranslate-v3 is a Manifest V3 browser translation extension based on the original Edge Translate project. This fork keeps the familiar selection-translation workflow while modernizing the extension for current Chrome, Firefox, and Safari policies.

The 4.x line focuses on a refreshed Material-inspired UI, a heavily updated pdf.js viewer, dark mode, better translation panel ergonomics, and experimental Chrome on-device AI translation through Gemini Nano where the browser supports it.

Other Languages

Highlights

  • Selection translation in a side panel with copy, edit, pin, resize, and TTS actions.
  • Word assistance with translation, detailed meanings, definitions, and examples when the selected provider supports them.
  • Chrome built-in AI translation support for regular text and word translation flows.
  • Google and other practical engines remain available for full-page translation.
  • Built-in pdf.js viewer with selection translation inside PDFs.
  • Material-inspired PDF toolbar, menus, dialogs, page sidebar, and dark mode.
  • Dark mode support across the PDF viewer, translation panel, popup, and settings page.
  • Settings page cleanup with clearer provider names and less visual clutter.
  • Keyboard shortcuts, blacklist controls, and configurable translation button behavior.

Screenshots

Selection Translation

Floating translation panel

Pinned side translation panel

PDF Translation

Material-inspired PDF viewer

PDF selection translation

AI Translation Notes

Chrome's on-device Gemini Nano path is exposed as an AI translation provider where the browser makes the LanguageModel API available. It is useful for smaller selections and word-assistance tasks, but it is not used as a full-page translation engine in this fork.

Google AI Studio (Gemini 2.5 Flash Lite) is also available as a server-side AI translation provider with streamlined prompts optimized for minimal token usage.

On-device pipeline (v4.1):

  • Single-pass streaming translation — no redundant refinement passes.
  • Smart text chunking splits long inputs at paragraph, line, and sentence boundaries (800-character optimal window) to maintain quality and formatting.
  • System prompt enforces proper noun preservation and prevents literal Kanji→Hanja hallucinations.
  • Post-translation rules catch known false-friend errors as a final safety net.
  • Passthrough punctuation system preserves decorative symbols (※, →, ★, etc.) that models tend to drop during translation.

AI Studio pipeline (v4.1):

  • Concise prompts tuned for Gemini 2.5 Flash Lite with thinking disabled (thinkingBudget: 0) for maximum speed.
  • Script constraint rules ensure output uses the correct writing system.
  • Dictionary mode returns structured JSON with meanings, definitions, and examples for single-word queries.

Chrome's LanguageModel API and Gemini Nano availability depend on the user's Chrome version, device, feature flags, and model download state. When unavailable, the extension falls back to the configured provider path rather than treating AI translation as a required runtime dependency.

PDF Viewer

EdgeTranslate-v3 opens supported PDF links in its bundled pdf.js viewer so text selection and translation work inside documents. The 4.x viewer uses pdf.js 5.7.284 and includes many layout and interaction fixes.

PDF behavior:

  • Web PDF links can be redirected into the extension viewer for translation.
  • Local PDFs can be opened when Chrome's "Allow access to file URLs" setting is enabled for the extension.
  • Dragged PDF files and blob-backed viewer URLs are preloaded or repaired so pdf.js can load them reliably.
  • The viewer includes a native-viewer bypass action for users who want to open the current document outside EdgeTranslate.
  • The PDF detection fallback avoids probing unrelated non-PDF pages, preventing noisy CORS errors on pages such as Chrome Web Store developer console URLs.

Browser Support

Chrome

  • Selection translation
  • PDF viewer and PDF selection translation
  • Google full-page translation
  • Chrome built-in AI translation when the browser/device supports it
  • Offscreen document support for extension-context AI translation

Firefox

  • Selection translation
  • PDF viewer and PDF selection translation with browser-specific limitations
  • No Chrome built-in AI translation
  • No Chrome-only full-page translation behavior

Safari

  • Selection translation and PDF viewer support through the Safari extension build path
  • No Chrome built-in AI translation
  • Safari release requires the Xcode project and Apple credentials

Downloads

Release assets usually include:

  • edge_translate_chrome.zip
  • edge_translate_firefox.xpi

Development Setup

Use the repository root as the working directory.

npm ci

Run the unit test suite:

npm test

Run the EdgeTranslate workspace tests directly:

npm test -w edge_translate -- --runInBand

Build Commands

Build the default Chrome target:

npm run build:chrome

Build individual targets:

npm run build:chrome
npm run build:firefox
npm run build:safari

Create browser packages:

npm run pack:chrome -w edge_translate
npm run pack:firefox -w edge_translate

Validate the Firefox package:

npm run lint:firefox

Build outputs:

  • Chrome unpacked build: packages/EdgeTranslate/build/chrome/
  • Firefox unpacked build: packages/EdgeTranslate/build/firefox/
  • Chrome package: packages/EdgeTranslate/build/edge_translate_chrome.zip
  • Firefox package: packages/EdgeTranslate/build/edge_translate_firefox.xpi
  • Safari build output: packages/EdgeTranslate/build/safari/

Loading Local Builds

Chrome

  1. Open chrome://extensions.
  2. Enable Developer mode.
  3. Click "Load unpacked".
  4. Select packages/EdgeTranslate/build/chrome/.
  5. Enable "Allow access to file URLs" if you want local PDF/file translation.

Firefox

  1. Open about:debugging.
  2. Choose "This Firefox".
  3. Click "Load Temporary Add-on".
  4. Select any file inside packages/EdgeTranslate/build/firefox/, or use the generated edge_translate_firefox.xpi.

Safari

Safari builds live under packages/EdgeTranslate/safari-xcode/.

Useful commands:

npm run build:safari
npm run safari:sync -w edge_translate
npm run safari:release -w edge_translate

safari:release builds, syncs resources into the Xcode project, archives, exports, and uploads. It requires valid App Store credentials.

Permissions

The extension uses host access so selection translation, PDF detection, and content scripts can work on user pages. Chrome builds also request offscreen so Gemini Nano translation can run from an extension document context when page injection is not available, such as inside the extension PDF viewer.

Main permission categories:

  • activeTab, tabs, and scripting for selection translation and page interactions.
  • contextMenus and storage for commands and user settings.
  • webNavigation and webRequest for PDF detection and viewer routing.
  • offscreen on Chrome for extension-context AI translation.

Privacy

  • No analytics or telemetry collection is added by this fork.
  • Translation text is sent only to the provider selected/configured by the user.
  • Chrome on-device AI translation runs through Chrome's built-in local model path when available.
  • File URL access is optional and controlled by the browser extension settings.

Release Checklist

For a normal release:

  1. Update packages/EdgeTranslate/package.json.
  2. Update package-lock.json.
  3. Update packages/EdgeTranslate/src/manifest.json.
  4. Run tests and browser packaging.
  5. Create a release commit and tag, for example v4.0.1.
  6. Upload Chrome and Firefox package artifacts to GitHub Releases.

See RELEASE_CHECKLIST.md for the older project checklist.

Documentation

Legacy feature references from the original project are still useful for general behavior:

License

This project follows the same license structure as the original Edge Translate project.

Credits

Thanks to the original Edge Translate maintainers and contributors. EdgeTranslate-v3 keeps that foundation alive for Manifest V3 browsers while continuing to adapt the extension for modern browser APIs, PDF workflows, and AI-assisted translation.

About

A fork of a translation extension, ported to Manifest V3.

Resources

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.MIT
Unknown
LICENSE.NPL

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors