Greasy Fork

MWI Chat Translator C→E

This userscript auto-translates Chinese chat messages to English in MilkyWay Idle.

作者
AlwaysStargazing
日安装量
0
总安装量
1
评分
0 0 0
版本
0.1
创建于
2025-04-25
更新于
2025-04-25
大小
65.2 KB
许可证
MIT
适用于

MWI Chat Translator C→E

A userscript for MilkyWay Idle that automatically translates Chinese chat messages into English.
Works in both browser and Steam versions using Google Translate.

Features

  • Inline translation: Translates Chinese chat messages and inserts them below the original.
  • Tooltip mode: Hover over Chinese messages to view translations.
  • Toggle modes with F7 or via Tampermonkey menu.
  • Recognizes and replaces known in-game item names.
  • Caches translations to reduce duplicate lookups.

Compatibility

  • Tampermonkey
  • Steam version (CEF wrapper)

Steam users:
Also install this compatibility script:
https://raw.githubusercontent.com/YangLeda/Userscripts-For-MilkyWayIdle/refs/heads/main/MWITools%20addon%20for%20Steam%20version.js

Hotkeys

Key Action
F6 Clear translation cache
F7 Toggle between inline/tooltip

Modes

  • Inline mode: Scans new and existing messages, inserting translations inline.
  • Tooltip mode: Shows translation on hover for Chinese messages only.

Notes

  • Uses Google Translate (no API key required).
  • No messages are stored or logged externally.
  • Translations are cached locally per session.

  • This extension was written in part with the help of LLMs.

  • It is not planned to have perfect translations of slang.

License (MIT)

Copyright (c) 2025

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.