Patchlator
一个客户端侧的 Fabric 模组,可将 Wynncraft 对话实时翻译为你的语言——直接在自定义对话 HUD 中完成,完美保留原始布局。
- Minecraft 1.21.11 和 26.1.x(每个版本独立的 jar)· Fabric
加载器 ≥ 0.18.1 · Fabric API
- 支持 Google Translate(无需密钥)或 DeepL;目标语言默认跟随游戏语言
- 翻译对话正文和选项;本地表格中的精选条目可覆盖机器翻译
- 可选记录每一行原文(含 NPC 名称),用于构建该表格
- 切换键、长按显示原文键、游戏内设置界面
- 挂钩最终覆盖层接收端,因此与重写操作栏的模组(如 Wynntils)兼容
使用方法
-
将 jar 文件放入 .minecraft/mods,并与 Fabric API 一起使用。
-
加入 Wynncraft。打字机动画结束后,对话会自动翻译。
| 按键(可重新绑定) |
作用 |
| F8 |
打开设置界面 |
| F7 |
开启/关闭翻译 |
| G(按住) |
显示原文 |
-
按 F8 —— 或使用 ModMenu
配置按钮 —— 打开设置界面:
| 设置项 |
描述 |
| 翻译 |
主开关(与切换键相同) |
| 翻译器 |
Google Translate / DeepL |
| Google API 密钥 |
可选。为空 = 非官方免费接口,设置后 = 官方 Cloud Translation v2 |
| DeepL API 密钥 |
DeepL 必需。以 :fx 结尾的密钥使用免费主机 |
| 源语言 |
auto = 自动检测 |
| 目标语言 |
auto = 跟随游戏语言;标签会提示你语言的代码(例如 fr, ja, zh-CN) |
设置保存在 config/patchlator.json 中。
-
若要收集用于翻译表的句子,启动时加上
-Dpatchlator.log=true —— 原文对话(以及译文)随后会追加到 .minecraft/patchlator.log。玩家名称标准化为 <playername>,以便条目可复用:
time=… npc="Rusty Bartender" text="Would you like a Nemract Whiskey?" choice0="Yes." choice1="No, thank you."
time=… translated npc="Rusty Bartender" text="Yes." result="Oui."
-
若要手动编辑翻译,请将条目添加到
config/patchlator/translations.json —— 它们优先于机器翻译(保存设置界面时重新加载):
{
"Would you like a Nemract Whiskey?": "Tu veux un whiskey de Nemract ?",
"Greetings, <playername>!": "Salutations, <playername> !"
}
构建
需要 JDK 25 用于 Gradle JVM(源码针对 Java 21 / 25,具体取决于 Minecraft 版本)。
./gradlew build -PmcVer=1.21.11 # → build/libs/patchlator-<v>+1.21.11.jar
./gradlew build -PmcVer=26.1.2 # → build/libs/patchlator-<v>+26.1.2.jar
一个共享的代码库基于 Mojang 映射编写,同时支持两个版本:
对于 1.21.11,fabric-loom-remap 插件将 jar 重命名为中间名;26.1+ 未混淆,因此普通的 fabric-loom 插件直接构建它(一个 jar 无法在该边界两侧运行)。每版本的设置位于 versions/<ver>.properties,少数不同的 API 被隔离在 src/compat-remap / src/compat-modern(每个有一个 Compat 类)。支持未来版本只需添加一个属性文件,如果 API 发生变化,则添加一个兼容变体。
字体
翻译文本使用捆绑字体渲染(可通过 -Dpatchlator.replacementFont 替换):
- Pretendard — 拉丁文、韩文、西里尔字母、希腊文
- Noto Sans SC(Medium,
子集化至 CJK 范围)— 假名、汉字、CJK 标点符号
它们共同覆盖了模组 lang/ 文件中提供的所有语言。
许可证
MIT。捆绑字体的许可遵循 SIL Open Font License 1.1。
Patchlator
A client-side Fabric mod that live-translates Wynncraft dialogue into your
language — directly inside the custom dialogue HUD, preserving the original
layout pixel-perfectly.
- Minecraft 1.21.11 and 26.1.x (separate jar per version) · Fabric
Loader ≥ 0.18.1 · Fabric API
- Works with Google Translate (no key needed) or DeepL; the target language
follows your game language by default
- Translates the dialogue body and choice options; hand-curated entries
in a local table override machine translation
- Optional logging of every original line (with NPC name) for building that table
- Toggle key, hold-to-show-original key, in-game settings screen
- Hooks the final overlay sink, so it stays compatible with mods that rewrite
the actionbar (e.g. Wynntils)
How to use
-
Drop the jar into .minecraft/mods together with Fabric API.
-
Join Wynncraft. Dialogue is translated automatically once the typewriter
animation settles.
| Key (rebindable) |
Action |
| F8 |
Open the settings screen |
| F7 |
Toggle translation on/off |
| G (hold) |
Show the original text |
-
Press F8 — or use the ModMenu
config button — to open the settings screen:
| Setting |
Description |
| Translation |
Master on/off switch (same as the toggle key) |
| Translator |
Google Translate / DeepL |
| Google API Key |
Optional. Empty = unofficial free endpoint, set = official Cloud Translation v2 |
| DeepL API Key |
Required for DeepL. Keys ending in :fx use the free host |
| Source language |
auto = detect |
| Target language |
auto = follow the game language; the label hints the code for your language (e.g. fr, ja, zh-CN) |
Settings persist in config/patchlator.json.
-
To collect sentences for the translation table, launch with
-Dpatchlator.log=true — original dialogue (plus translations) is then
appended to .minecraft/patchlator.log. The player name is normalized to
<playername> so entries are reusable:
time=… npc="Rusty Bartender" text="Would you like a Nemract Whiskey?" choice0="Yes." choice1="No, thank you."
time=… translated npc="Rusty Bartender" text="Yes." result="Oui."
-
To curate translations by hand, add entries to
config/patchlator/translations.json — they take priority over machine
translation (reloaded when you save the settings screen):
{
"Would you like a Nemract Whiskey?": "Tu veux un whiskey de Nemract ?",
"Greetings, <playername>!": "Salutations, <playername> !"
}
Building
Requires JDK 25 for the Gradle JVM (sources target Java 21 / 25 per
Minecraft version).
./gradlew build -PmcVer=1.21.11 # → build/libs/patchlator-<v>+1.21.11.jar
./gradlew build -PmcVer=26.1.2 # → build/libs/patchlator-<v>+26.1.2.jar
One shared codebase written against Mojang mappings targets both versions:
for 1.21.11 the fabric-loom-remap plugin remaps the jar to intermediary
names; 26.1+ is unobfuscated, so the plain fabric-loom plugin builds it
directly (one jar cannot run on both sides of that boundary). Per-version
settings live in versions/<ver>.properties, and the few APIs that differ
are isolated in src/compat-remap / src/compat-modern (one Compat class
each). Supporting a future version is adding a properties file and, if APIs
moved, a compat variant.
Fonts
Translated text is rendered with bundled fonts (swappable via
-Dpatchlator.replacementFont):
- Pretendard — Latin, Hangul,
Cyrillic, Greek
- Noto Sans SC (Medium,
subset to CJK ranges) — kana, Han ideographs, CJK punctuation
Together they cover all languages shipped in the mod's lang/ files.
License
MIT. Bundled fonts are licensed under the SIL Open Font License 1.1.
评论 0
登录后参与评分
还没有评论,来抢沙发吧