forked from L1Z0/NoN-Translations
db706191700b1458313e0140f0227d31f4b7c5e5
NoN 中文翻译工作区(和多版本翻译整合工具)
目前我们开了三个翻译版本:
zh_cn_sfw
这是准备交付到 mod jar 层的内容,不应包含任何色情词汇。
- todo:就“中庭锁”、“性压抑”等词语,寻找更加SFW的版本。
zh_cn_nsfw
这是准备交付到 NoN default pack 默认动画包中内嵌的版本,其应该覆盖掉 zh_cn_sfw 中那些不色情的词汇
- todo:就“性压抑”等词语寻找更准确的翻译。
zh_cn_nsfw_meme
这是对 LongCha 翻译的保留,将单独打成 zh_cn_meme 的空动画包(应用此包将覆盖 zh_cn_nsfw 的部分进度描述以提高节目效果)
- 为什么不使用资源包?由于 mod 的逻辑,动画包优先级高于资源包,导致资源包不可能覆盖动画包的内容。
翻译工具
make.ts 将多个跨版本的 lang json 文件合并为一个,并且按照顺序排列好,使得相同的字串排列在相邻的位置。
- 还能找出相同的字符串并删掉覆盖层的内容,从而减少额外的行。
- 同时,还会自动排序为官方 lang 文件顺序。
使用方法
- 打开
make.ts,编辑targetLangFilesand theworkFile两项 - 执行
make.ts(或者是ts-node make.ts/deno make.ts),合并的语言文件会被输出到workFile变量的位置。 - 编辑输出的合并版文件
- 再次执行,脚本会根据时间戳决定改为将文件拆回去
- 如果你不想覆盖某个特定的文件,给对应项加上
ro: true - 如果你不想自动合并重复行,加上环境变量
KEEP_SAME_OVERRIDE_LINES
Translation Utility
make.ts merges multiple language files into one for easy editing, then splits them back into separate files. This tool lets you:
- find the original text without searching another file
- automatically remove duplicate text to save space
- sort your i18n files according to the official order
Usage
- Open
make.tsand edit thetargetLangFilesand theworkFilefields, changezh_cnto your language. please notice that Thesuffixandfilevalues must be unique. - Run
./make.ts(orts-node make.ts/deno make.ts). The language files will be merged into theworkFilelocation (e.g.zh_cn.json). - Edit the output file.
- Run
./make.tsagain. If the workfile is newer than the other files, the script will write the changes back to the language files (at the locations specified bytargetLangFiles). - If you don't want a language to be written back, add
ro: trueto its entry intargetLangFiles. - use env
KEEP_SAME_OVERRIDE_LINESto avoid remove same line in override layer.
Releases
1
2026.9.23 - 92bccf96
Latest