ArchiveP-20Desktop App

POLARIS — DESKTOP TRANSLATOR

Polaris2026

Polaris is an Electron desktop translator built for quick reading and comprehension workflows, especially when switching between apps. It combines global shortcut translation, clipboard monitoring, and direct text input in a single lightweight window. Users can translate highlighted text from any application, paste or type manually, review session history, hear speech playback, and see compact floating results—without leaving their current workflow.

Role

Creator & Developer

Year

2026

Category

Desktop / Productivity

Tech Stack

Electron
Node.js
JavaScript
HTML
CSS
IPC
contextBridge
MyMemory API
LibreTranslate API
electron-builder

The problem

Note · 01

Desktop translation tools often interrupt focus: copy-paste hops, browser tabs, or heavy apps that do not integrate with system-wide selection and clipboard behavior. The challenge was to deliver fast, reliable translation from three input paths (selection, clipboard, typed text) while keeping the renderer sandboxed, IPC contracts explicit, and translation resilient when a free API provider is down or rate-limited.

The approach

Note · 02

I structured Polaris across Electron layers: the main process handles lifecycle, tray, global shortcuts, clipboard polling, and IPC; preload exposes a minimal `window.polaris` API with `contextIsolation` enabled; the renderer drives tabs, history, and speech actions; and a dedicated translation service normalizes languages, chunks long text, caches results, and falls back from MyMemory to LibreTranslate. A floating bubble surfaces selected-text results without forcing the main window open, and settings keep utility controls separate from the primary translate flow.

How it was built

Milestones from concept through delivery.

Scoped Polaris as a cross

platform desktop translator focused on selection, clipboard, and manual input — not a browser wrapper.

Implemented main

process orchestration

windows, system tray, global shortcuts, and clipboard monitoring with IPC handlers.

Built preload bridge with explicit, minimal APIs exposed to the renderer under strict context isolation.

Designed renderer UX with Translate, History, and Settings tabs plus Ctrl+Enter submission for manual input.

Integrated translation service with auto

detect, language swap, chunking, caching, and MyMemory → LibreTranslate fallback.

Added floating translation bubble for selected

text results and session history for recent lookups.

Documented macOS Accessibility requirements for simulated copy

based selection capture and tray quit behavior.

Added `npm run verify` and electron

builder targets for macOS, Windows, and Linux packaging under `dist/`.

Impact

System-wide selected-text translation via configurable global shortcut (default Ctrl/Cmd + Shift + T)
On-demand clipboard translation and optional auto-translate for copied Japanese text
Resilient free-provider pipeline with caching and automatic fallback between APIs
Sandboxed renderer with privileged operations routed through stable IPC channels
Cross-platform desktop builds for macOS, Windows, and Linux

Visuals

Translate workspace

Main window with language selectors, provider hints, and manual input—optimized for quick paste-and-translate flows.

Settings & shortcuts

Global shortcut configuration, clipboard monitoring toggle, and platform notes for macOS Accessibility permissions.