From f90be2ef9c259db4fa29e3fb5c9958b3e88fc465 Mon Sep 17 00:00:00 2001 From: shoucandanghehe Date: Tue, 15 Apr 2025 03:11:30 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20=E6=B7=BB=E5=8A=A0=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E8=AF=AD=E8=A8=80=E7=9A=84=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i18n/.lang.schema.json | 15 ++++++++++++++- nonebot_plugin_tetris_stats/i18n/.template.json | 3 ++- nonebot_plugin_tetris_stats/i18n/en-US.json | 3 +++ nonebot_plugin_tetris_stats/i18n/model.py | 7 ++++++- nonebot_plugin_tetris_stats/i18n/zh-CN.json | 3 +++ 5 files changed, 28 insertions(+), 3 deletions(-) diff --git a/nonebot_plugin_tetris_stats/i18n/.lang.schema.json b/nonebot_plugin_tetris_stats/i18n/.lang.schema.json index 00d543d..c3cfff8 100644 --- a/nonebot_plugin_tetris_stats/i18n/.lang.schema.json +++ b/nonebot_plugin_tetris_stats/i18n/.lang.schema.json @@ -67,6 +67,19 @@ } } } + }, + "template": { + "title": "Template", + "description": "Scope 'template' of lang item", + "type": "object", + "additionalProperties": false, + "properties": { + "template_language": { + "title": "template_language", + "description": "value of lang item type 'template_language'", + "type": "string" + } + } } } -} +} \ No newline at end of file diff --git a/nonebot_plugin_tetris_stats/i18n/.template.json b/nonebot_plugin_tetris_stats/i18n/.template.json index d2730a1..29d96d4 100644 --- a/nonebot_plugin_tetris_stats/i18n/.template.json +++ b/nonebot_plugin_tetris_stats/i18n/.template.json @@ -11,6 +11,7 @@ { "scope": "error", "types": [{ "subtype": "MessageFormatError", "types": ["TETR.IO", "TOS", "TOP"] }] - } + }, + { "scope": "template", "types": ["template_language"] } ] } diff --git a/nonebot_plugin_tetris_stats/i18n/en-US.json b/nonebot_plugin_tetris_stats/i18n/en-US.json index e9b203b..ee79967 100644 --- a/nonebot_plugin_tetris_stats/i18n/en-US.json +++ b/nonebot_plugin_tetris_stats/i18n/en-US.json @@ -12,5 +12,8 @@ "TOS": "Username/ID is invalid", "TOP": "Username is invalid" } + }, + "template": { + "template_language": "en-US" } } diff --git a/nonebot_plugin_tetris_stats/i18n/model.py b/nonebot_plugin_tetris_stats/i18n/model.py index a32480b..449efdb 100644 --- a/nonebot_plugin_tetris_stats/i18n/model.py +++ b/nonebot_plugin_tetris_stats/i18n/model.py @@ -1,7 +1,7 @@ # This file is @generated by tarina.lang CLI tool # It is not intended for manual editing. -from tarina.lang.model import LangItem, LangModel # type: ignore[import-untyped] +from tarina.lang.model import LangItem, LangModel class InteractionWrong: @@ -27,6 +27,11 @@ class Error: MessageFormatError = ErrorMessageformaterror +class Template: + template_language: LangItem = LangItem('template', 'template_language') + + class Lang(LangModel): interaction = Interaction error = Error + template = Template diff --git a/nonebot_plugin_tetris_stats/i18n/zh-CN.json b/nonebot_plugin_tetris_stats/i18n/zh-CN.json index b16724e..45c3165 100644 --- a/nonebot_plugin_tetris_stats/i18n/zh-CN.json +++ b/nonebot_plugin_tetris_stats/i18n/zh-CN.json @@ -10,5 +10,8 @@ "TOS": "用户名/ID不合法", "TOP": "用户名不合法" } + }, + "template": { + "template_language": "zh-CN" } }