Pegasus is an desktop app for viewing and translating documents into multilingual .pgs Language Passport files.
Made for Lingo.dev Hackathon 3
You created a document, shared it with someone. Now you have to translate the document in another language because that person requested it. You are maintaining more than 1 instance of same file, just in different languages. Even a small change can create a load of work to be done. This becomes greater as the number of languages increase.
A single file containing all the required translations. A single app that manages this all.
- Open
DOCX,PDF, andTXTfiles - Translate into multiple languages in one run
- Save translations in
.pgsformat for fast reopen/switch - View
.pgscontent by language (including original) - Dark/light UI theme
- Localized UI via Lingo.dev Compiler
- Electron + React + TypeScript
- Tailwind CSS
- Lingo.dev Compiler (
@lingo.dev/compiler) - Lingo SDK runtime translation (
@lingo.dev/_sdk)
- User opens a source file (
DOCX,PDF,TXT) or existing.pgs - Main process extracts chunked text + structure metadata
- Selected languages are translated chunk-by-chunk
- Content is reconstructed and saved into a
.pgspackage - Renderer displays translated content by selected language
- Node.js 20+ (recommended)
- npm 10+
For UI translation (not needed until you made a change in UI) generation (LINGO_BUILD_MODE=translate), configure your Lingo compiler API key in environment variables as required by your Lingo.dev setup.
git clone https://github.com/ShivRaiGithub/pegasus.git
cd pegasusnpm install --legacy-peer-deps# Build main + preload + renderer (default cache-only localization build)
npm run build
# Preview built app
npm run startPegasus uses Lingo Compiler in the renderer build.
- Source locale:
en - Target locales:
fr,es,de,hi,ar,ja,zh,pt,it - Config:
lingo.config.ts
Build modes:
# Fast build using existing cache
npm run build
# Force translation generation and update public/translations/*.json (Do this if you did a UI change)
LINGO_BUILD_MODE=translate npm run buildWindows PowerShell:
$env:LINGO_BUILD_MODE="translate"; npm run buildWindows Command Prompt (cmd):
set LINGO_BUILD_MODE=translate && npm run buildNOTE: The app was built and tested mostly on WSL (Linux environment). It was tested on windows too up to an extent, but not on iOS.


