-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47c83be
commit 3b98760
Showing
15 changed files
with
238 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"default": "zh-CN", | ||
"frozen": [], | ||
"require": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"title": "Lang Schema", | ||
"description": "Schema for lang file", | ||
"type": "object", | ||
"properties": { | ||
"interaction": { | ||
"title": "Interaction", | ||
"description": "Scope 'interaction' of lang item", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"wrong": { | ||
"title": "Wrong", | ||
"description": "Scope 'wrong' of lang item", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"query_bot": { | ||
"title": "query_bot", | ||
"description": "value of lang item type 'query_bot'", | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"warning": { | ||
"title": "Warning", | ||
"description": "Scope 'warning' of lang item", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"unverified": { | ||
"title": "unverified", | ||
"description": "value of lang item type 'unverified'", | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"error": { | ||
"title": "Error", | ||
"description": "Scope 'error' of lang item", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"MessageFormatError": { | ||
"title": "Messageformaterror", | ||
"description": "Scope 'MessageFormatError' of lang item", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"TETR.IO": { | ||
"title": "TETR.IO", | ||
"description": "value of lang item type 'TETR.IO'", | ||
"type": "string" | ||
}, | ||
"TOS": { | ||
"title": "TOS", | ||
"description": "value of lang item type 'TOS'", | ||
"type": "string" | ||
}, | ||
"TOP": { | ||
"title": "TOP", | ||
"description": "value of lang item type 'TOP'", | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$schema": ".template.schema.json", | ||
"scopes": [ | ||
{ | ||
"scope": "interaction", | ||
"types": [ | ||
{ "subtype": "wrong", "types": ["query_bot"] }, | ||
{ "subtype": "warning", "types": ["unverified"] } | ||
] | ||
}, | ||
{ | ||
"scope": "error", | ||
"types": [{ "subtype": "MessageFormatError", "types": ["TETR.IO", "TOS", "TOP"] }] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"title": "Template", | ||
"description": "Template for lang items to generate schema for lang files", | ||
"type": "object", | ||
"properties": { | ||
"scopes": { | ||
"title": "Scopes", | ||
"description": "All scopes of lang items", | ||
"type": "array", | ||
"uniqueItems": true, | ||
"items": { | ||
"title": "Scope", | ||
"description": "First level of all lang items", | ||
"type": "object", | ||
"properties": { | ||
"scope": { | ||
"type": "string", | ||
"description": "Scope name" | ||
}, | ||
"types": { | ||
"type": "array", | ||
"description": "All types of lang items", | ||
"uniqueItems": true, | ||
"items": { | ||
"oneOf": [ | ||
{ | ||
"type": "string", | ||
"description": "Value of lang item" | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"subtype": { | ||
"type": "string", | ||
"description": "Subtype name of lang item" | ||
}, | ||
"types": { | ||
"type": "array", | ||
"description": "All subtypes of lang items", | ||
"uniqueItems": true, | ||
"items": { | ||
"$ref": "#/properties/scopes/items/properties/types/items" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This file is @generated by tarina.lang CLI tool | ||
# It is not intended for manual editing. | ||
|
||
from pathlib import Path | ||
|
||
from tarina.lang import lang # type: ignore[import-untyped] | ||
|
||
lang.load(Path(__file__).parent) | ||
|
||
from .model import Lang # noqa: E402, F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$schema": ".lang.schema.json", | ||
"interaction": { | ||
"wrong": { "query_bot": "Can't query bot's information" }, | ||
"warning": { | ||
"unverified": "* Because I can't verify account linking information, I can't guarantee the info I found is yourself/themself." | ||
} | ||
}, | ||
"error": { | ||
"MessageFormatError": { | ||
"TETR.IO": "Username/ID is invalid", | ||
"TOS": "Username/ID is invalid", | ||
"TOP": "Username is invalid" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# 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] | ||
|
||
|
||
class InteractionWrong: | ||
query_bot: LangItem = LangItem('interaction', 'wrong.query_bot') | ||
|
||
|
||
class InteractionWarning: | ||
unverified: LangItem = LangItem('interaction', 'warning.unverified') | ||
|
||
|
||
class Interaction: | ||
wrong = InteractionWrong | ||
warning = InteractionWarning | ||
|
||
|
||
class ErrorMessageformaterror: | ||
TETR_IO: LangItem = LangItem('error', 'MessageFormatError.TETR.IO') | ||
TOS: LangItem = LangItem('error', 'MessageFormatError.TOS') | ||
TOP: LangItem = LangItem('error', 'MessageFormatError.TOP') | ||
|
||
|
||
class Error: | ||
MessageFormatError = ErrorMessageformaterror | ||
|
||
|
||
class Lang(LangModel): | ||
interaction = Interaction | ||
error = Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": ".lang.schema.json", | ||
"interaction": { | ||
"wrong": { "query_bot": "不能查询bot的信息" }, | ||
"warning": { "unverified": "* 由于无法验证绑定信息, 不能保证查询到的用户为本人" } | ||
}, | ||
"error": { | ||
"MessageFormatError": { | ||
"TETR.IO": "用户名/ID不合法", | ||
"TOS": "用户名/ID不合法", | ||
"TOP": "用户名不合法" | ||
} | ||
} | ||
} |