mirror of
https://github.com/A-Minos/nonebot-plugin-tetris-stats.git
synced 2026-03-05 05:36:54 +08:00
🌐 添加模板语言的映射
This commit is contained in:
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
{
|
{
|
||||||
"scope": "error",
|
"scope": "error",
|
||||||
"types": [{ "subtype": "MessageFormatError", "types": ["TETR.IO", "TOS", "TOP"] }]
|
"types": [{ "subtype": "MessageFormatError", "types": ["TETR.IO", "TOS", "TOP"] }]
|
||||||
}
|
},
|
||||||
|
{ "scope": "template", "types": ["template_language"] }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,5 +12,8 @@
|
|||||||
"TOS": "Username/ID is invalid",
|
"TOS": "Username/ID is invalid",
|
||||||
"TOP": "Username is invalid"
|
"TOP": "Username is invalid"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"template": {
|
||||||
|
"template_language": "en-US"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# This file is @generated by tarina.lang CLI tool
|
# This file is @generated by tarina.lang CLI tool
|
||||||
# It is not intended for manual editing.
|
# 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:
|
class InteractionWrong:
|
||||||
@@ -27,6 +27,11 @@ class Error:
|
|||||||
MessageFormatError = ErrorMessageformaterror
|
MessageFormatError = ErrorMessageformaterror
|
||||||
|
|
||||||
|
|
||||||
|
class Template:
|
||||||
|
template_language: LangItem = LangItem('template', 'template_language')
|
||||||
|
|
||||||
|
|
||||||
class Lang(LangModel):
|
class Lang(LangModel):
|
||||||
interaction = Interaction
|
interaction = Interaction
|
||||||
error = Error
|
error = Error
|
||||||
|
template = Template
|
||||||
|
|||||||
@@ -10,5 +10,8 @@
|
|||||||
"TOS": "用户名/ID不合法",
|
"TOS": "用户名/ID不合法",
|
||||||
"TOP": "用户名不合法"
|
"TOP": "用户名不合法"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"template": {
|
||||||
|
"template_language": "zh-CN"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user