From c1adcd1ac7f83dc4c92bbafdad5cf308778cd490 Mon Sep 17 00:00:00 2001 From: jhqwqmc <2110242767@qq.com> Date: Fri, 2 May 2025 16:34:07 +0800 Subject: [PATCH] =?UTF-8?q?refactor(core):=20=E4=BF=AE=E6=94=B9=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bukkit/loader/src/main/resources/translations/en.yml | 1 + bukkit/loader/src/main/resources/translations/zh_cn.yml | 1 + .../momirealms/craftengine/core/font/AbstractFontManager.java | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bukkit/loader/src/main/resources/translations/en.yml b/bukkit/loader/src/main/resources/translations/en.yml index 7b9afee86..06b1acd9f 100644 --- a/bukkit/loader/src/main/resources/translations/en.yml +++ b/bukkit/loader/src/main/resources/translations/en.yml @@ -80,6 +80,7 @@ warning.config.image.invalid_font_chars: "Issue found in file - warning.config.image.missing_char: "Issue found in file - The image '' is missing the required 'char' argument." warning.config.image.codepoint_conflict: "Issue found in file - The image '' is using a character '()' in font that has been used by another image ''." warning.config.image.invalid_codepoint_grid: "Issue found in file - Image '' has an invalid 'chars' codepoint grid." +warning.config.image.invalid_char: "Issue found in file - The image '' has a 'char' argument is invalid. Please do not write a character that contains two Unicode characters such as '⁉️'." warning.config.image.file_not_found: "Issue found in file - PNG file '' not found for image ''." warning.config.image.invalid_hex_value: "Issue found in file - The image '' is using a unicode character '' that is not a valid hexadecimal (radix 16) value." warning.config.recipe.duplicate: "Issue found in file - Duplicated recipe ''. Please check if there is the same configuration in other files." diff --git a/bukkit/loader/src/main/resources/translations/zh_cn.yml b/bukkit/loader/src/main/resources/translations/zh_cn.yml index 860a110af..c1d7f67a8 100644 --- a/bukkit/loader/src/main/resources/translations/zh_cn.yml +++ b/bukkit/loader/src/main/resources/translations/zh_cn.yml @@ -80,6 +80,7 @@ warning.config.image.invalid_font_chars: "在文件 发现问题 warning.config.image.missing_char: "在文件 发现问题 - 图片 '' 缺少必需的 'char' 参数" warning.config.image.codepoint_conflict: "在文件 发现问题 - 图片 '' 在字体 中使用的字符 '()' 已被其他图片 '' 占用" warning.config.image.invalid_codepoint_grid: "在文件 发现问题 - 图片 '' 的 'chars' 码位网格无效" +warning.config.image.invalid_char: "在文件 发现问题 - 图片 '' 的 'char' 参数无效 请不要写一个包含两个 Unicode 的字符例如 '⁉️'" warning.config.image.file_not_found: "在文件 发现问题 - 图片 '' 的 PNG 文件 '' 未找到" warning.config.image.invalid_hex_value: "在文件 发现问题 - 图片 '' 使用的 Unicode 字符 '' 不是有效的十六进制值" warning.config.recipe.duplicate: "在文件 发现问题 - 重复的配方 '' 请检查其他文件中是否存在相同配置" diff --git a/core/src/main/java/net/momirealms/craftengine/core/font/AbstractFontManager.java b/core/src/main/java/net/momirealms/craftengine/core/font/AbstractFontManager.java index 3277303cf..5dc6a1986 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/font/AbstractFontManager.java +++ b/core/src/main/java/net/momirealms/craftengine/core/font/AbstractFontManager.java @@ -482,7 +482,7 @@ public abstract class AbstractFontManager implements FontManager { } } if (codepoints.length == 0) { - throw new LocalizedResourceConfigException("warning.config.image.missing_char", path, id); + throw new LocalizedResourceConfigException("warning.config.image.invalid_char", path, id); } codepointGrid[i] = codepoints; if (size == -1) size = codepoints.length;