MCPcopy Index your code
hub / github.com/Borber/Tran

github.com/Borber/Tran @v0.2.18

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.18 ↗ · + Follow
64 symbols 107 edges 27 files 20 documented · 31%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Tran

Simple, fast, translate selected words

CN_README Rust Tauri Windows MacOS Linux LICENSE Downloads Telegram Cloudflare

Keep it simple,stupid.

Hello

<a href="https://github.com/Borber/tran" target="_blank" alt="Tran">
    <img src="https://fastly.jsdelivr.net/gh/Borber/PublicPic1/tran/v1/tran.png">
</a>
  • No configuration required
  • Free forever
  • Google Translate Mirror

How to choose?

To \ Form ZH JA
ZH
EN
JA

Form as first language, non-first language will be translated into first language

To as the second language, the first language will be translated into the second language

Q: Why build them separately instead of one program supporting all languages?

Because for each additional language type, the built package will increase. If most languages ​​are supported, the program will increase to tens of meters, and this is for people who only need two languages ​​​​~~that’s me~~ not very friendly, and will also cause more time spent in identifying the language type. So tran will be built separately

If you are a Chinese user but need to read in English, you can choose the installation package of zh_en. Similarly, choose the installation package that suits you.

If you have needs in other languages, please raise an issue and I will add it to the build

How to use?

  • single translation
    • After selecting the text, quickly press the Shift key twice. You can make Tran lose focus and close automatically by clicking elsewhere.
  • Multiple translations
    • After a single translation, drag the translation panel to make Tran fixed
    • After pinning the panel, double-click a word or select long text Tran will be automatically translated
  • Double-click the translation result to save the translation to the clipboard

Recommend

It is recommended to install the following fonts:

Autostart

Contribution

Develop

Prepare

Tool Note
rust Rust development
pnpm Front-end package management
nodejs Front-end development

Notice

  1. If you want to add a new feature, please raise an issue first and discuss it to avoid ineffective work.
  2. Improvements to original functionality
  3. Cut down useless code or turn off useless `features'
  4. Use a lighter lib to implement functions
  5. Add tests and documentation
  6. Update dependencies will also be accepted

Active use

Theoretically, if more people use tran, the translation speed will remain very fast, because vercel cold start takes a long time. Frequent requests can keep it running. So you are encouraged to use tran frequently . Similarly, I also implore you to promote tran

Create mirror

More mirrors can support more people, so you are encouraged to create mirrors.

V2G

vercel proxy google translate

  • consumes Edge Requests

vercel

Because the default domain name of vercel cannot be directly accessed in China, if you do not have a domain name, you can raise an issue and I will provide a domain name for you to bind.

You can PR to MIRROR after deployment to contribute your strength

感谢

Extension points exported contracts — how you extend this code

IconProps (Interface)
(no doc)
src/icon.tsx
Resp (Interface)
(no doc)
src/model/resp.tsx
TransVO (Interface)
(no doc)
src/model/resp.tsx
Dict (Interface)
(no doc)
src/model/resp.tsx
Tran (Interface)
(no doc)
src/model/resp.tsx

Core symbols most depended-on inside this repo

now
called by 4
src-tauri/src/util.rs
save
called by 3
src-tauri/src/config.rs
set_key
called by 3
src-tauri/src/config.rs
init
called by 3
src-tauri/src/tray.rs
close
called by 2
src/App.tsx
copy
called by 2
src/App.tsx
load
called by 2
src-tauri/src/config.rs
set_mode
called by 2
src-tauri/src/config.rs

Shape

Function 49
Class 7
Interface 5
Method 3

Languages

Rust81%
TypeScript19%

Modules by API surface

src-tauri/src/config.rs13 symbols
src-tauri/src/main.rs7 symbols
src/App.tsx6 symbols
src-tauri/src/util.rs5 symbols
src-tauri/src/manager/api.rs5 symbols
src/model/resp.tsx4 symbols
src-tauri/src/tray.rs4 symbols
src-tauri/src/resp.rs4 symbols
src-tauri/src/manager/mirror.rs4 symbols
src-tauri/src/clip.rs3 symbols
src/icon.tsx2 symbols
src-tauri/src/shortcut.rs2 symbols

For agents

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

⬇ download graph artifact