MCPcopy Index your code
hub / github.com/Cookee24/PairTranslate

github.com/Cookee24/PairTranslate @v2.5.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.5.1 ↗ · + Follow
1,022 symbols 2,542 edges 224 files 13 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<img src="https://github.com/Cookee24/PairTranslate/raw/v2.5.1/assets/icon.png" alt="Pair Translate" width="128" height="128"/>
<h1>Pair Translate</h1>

A browser extension to translate text on web pages, append the translated text to the original text, allowing users to see both versions side by side.

Supports major translation platforms and LLMs, including Google Translate, Bing, DeepL, ChatGPT, Claude, Gemini, etc.

Architecture Overview (DeepWiki)

Installation

Browser Store
Chrome Chrome Web Store
Firefox Firefox Add-ons
Edge Microsoft Edge Add-ons

Demonstration

https://github.com/user-attachments/assets/4a77db72-e420-4826-81a2-3feeee54f6c8

https://github.com/user-attachments/assets/814596ca-2913-4e09-9f23-15a1333859e9

Development

  1. Install Bun.
  2. Clone this repository.
  3. Run the following commands:
bun i
bun run dev

Privacy

This extension is fully open-source. No data is collected and all of it is processed locally. All translation requests are sent directly from your browser to the translation service provider.

License

GPL-3.0 License

Extension points exported contracts — how you extend this code

PromptContext (Interface)
* Template variable replacement context
utils/prompt/parser.ts
DrawerProps (Interface)
(no doc)
components/Drawer.tsx
ModalProps (Interface)
(no doc)
components/Modal.tsx
ButtonProps (Interface)
(no doc)
components/Button.tsx
TooltipProps (Interface)
(no doc)
components/Tooltip.tsx
AlertProps (Interface)
(no doc)
components/Alert.tsx
MonacoEditorProps (Interface)
(no doc)
components/Monaco.tsx
AvatarProps (Interface)
(no doc)
components/Avatar.tsx

Core symbols most depended-on inside this repo

templateToTokens
called by 103
utils/prompt/parser.ts
tokensToString
called by 84
utils/prompt/parser.ts
cn
called by 82
utils/cn.ts
useSettings
called by 40
hooks/settings.tsx
get
called by 37
entrypoints/background/storage.ts
set
called by 26
entrypoints/background/storage.ts
delete
called by 26
entrypoints/background/storage.ts
createComponent
called by 24
components/MD/Native.tsx

Shape

Function 831
Interface 139
Method 38
Class 8
Enum 6

Languages

TypeScript100%

Modules by API surface

utils/prompt/parser.ts35 symbols
entrypoints/options/pages/Prompt.tsx33 symbols
entrypoints/background/services/translate.ts28 symbols
hooks/animation.ts26 symbols
utils/rpc/core.ts24 symbols
entrypoints/content/components/Popup.tsx22 symbols
utils/rpc.ts20 symbols
hooks/translation.ts20 symbols
utils/parser/base.ts19 symbols
utils/task/queue.ts17 symbols
utils/rpc/iframe.ts16 symbols
utils/llm/types.ts16 symbols

For agents

$ claude mcp add PairTranslate \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page