From 12c58f69b36e0dd4934645fc79cb3fcd4e9c4a64 Mon Sep 17 00:00:00 2001 From: Helvetica Volubi Date: Sat, 25 Jul 2026 02:13:14 +0800 Subject: [PATCH] [ci skip]docs: add localized comment support instructions for configuration entries --- docs/CONTRIBUTING.md | 10 ++++++++++ docs/CONTRIBUTING_EN.md | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 55735ae..7e3f9ec 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -88,3 +88,13 @@ Lophine 使用和 Folia 一样的补丁系统,并为了针对不同部分的 4. 运行 Gradle 任务 `fixupPaperApiFilePatches` 来修改已被修改的在lophine新建文件的补丁(注意不要提交); 5. 运行 Gradle 任务 `rebuildAllServerPatches` 来修改已被修改的补丁; 6. 将修改后的补丁 PR 发回储存库。 + +## 为配置项提供本地化的注释支持 + +1. 在 `lophine-server/src/main/resources/assets/lophine/lang` 目录下创建或修改相应的语言文件,添加本地化的注释; + - 文件的名字应当符合 `https://minecraft.wiki/w/Language` 页面下的格式,如 `en_us` `zh_cn` `zh_hk` `zh_tw`,文件以 `json` 为格式类型; +2. 运行 Gradle 任务 `sortLangKeys` 来对你的语言文件内容进行重排序; +3. 使用 `git commit -m <提交信息>` 进行提交; +4. 将你生成的补丁文件进行推送。 + +这样做以后,你就可以将你的补丁文件进行 PR 提交。 diff --git a/docs/CONTRIBUTING_EN.md b/docs/CONTRIBUTING_EN.md index f95644a..8bae0a1 100644 --- a/docs/CONTRIBUTING_EN.md +++ b/docs/CONTRIBUTING_EN.md @@ -91,3 +91,13 @@ You can modify an existing patch by following the steps below: 4. Run Gradle's task `fixupPaperApiFilePatches` to regenerate lophine-created files to patches (PS: do not commit again before you run this task) 5. Run Gradle's task `rebuildAllServerPatches` to modify existing patches 6. Push and PR again + +## Providing localized comment support for configuration entries + +1. Create or modify the corresponding language file under the `lophine-server/src/main/resources/assets/lophine/lang` directory to add localized comments; + - The file name should follow the format listed on the `https://minecraft.wiki/w/Language` page, such as `en_us`, `zh_cn`, `zh_hk`, `zh_tw`. The file format is `json`; +2. Run the Gradle task `sortLangKeys` to re-sort the keys in your language file; +3. Commit your changes using `git commit -m `; +4. Push your generated patch files to your repository. + +After pushing, you can open a PR to submit your patches.