-
Notifications
You must be signed in to change notification settings - Fork 2
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
e5f9076
commit e10b140
Showing
11 changed files
with
262 additions
and
88 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 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,8 @@ | ||
from pathlib import Path | ||
|
||
from tarina.lang import lang | ||
|
||
|
||
lang.load(Path(__file__).parent) | ||
|
||
from .model import Lang as Lang |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"$schema": "./.lang.schema.json", | ||
"lang": { | ||
"scope_error": "'{target}' is not a valid language scope", | ||
"type_error": "'{target}' is not a valid type in '{scope}'", | ||
"name_error": "'{target}' is not a valid name in '{scope}:{type}'", | ||
"miss_require_type": "lang file '{scope}' missed require type '{target}'", | ||
"miss_require_name": "'{type}' missed require name {target} in '{scope}'" | ||
"locale_error": "'{target}' is not a valid language locale", | ||
"scope_error": "'{target}' is not a valid scope in '{locale}'", | ||
"type_error": "'{target}' is not a valid type in '{locale}:{scope}'", | ||
"miss_require_scope": "lang file '{locale}' missed require scope '{target}'", | ||
"miss_require_type": "'{scope}' missed require type {target} in lang file '{locale}'" | ||
} | ||
} |
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 @@ | ||
from tarina.lang.model import LangModel, LangItem | ||
|
||
|
||
class Lang_: | ||
locale_error: LangItem = LangItem("lang", "locale_error") | ||
scope_error: LangItem = LangItem("lang", "scope_error") | ||
type_error: LangItem = LangItem("lang", "type_error") | ||
miss_require_scope: LangItem = LangItem("lang", "miss_require_scope") | ||
miss_require_type: LangItem = LangItem("lang", "miss_require_type") | ||
|
||
|
||
class Lang(LangModel): | ||
lang = Lang_ | ||
|
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"$schema": "./.lang.schema.json", | ||
"lang": { | ||
"scope_error": "'{target}' 不是合法的语种", | ||
"type_error": "'{target}' 在 '{scope}' 中不是合法的类型", | ||
"name_error": "'{target}' 在 '{scope}:{type}' 不是合法的名称", | ||
"miss_require_type": "语言文件 '{scope}' 缺少需求的类型 '{target}'", | ||
"miss_require_name": "'{scope}' 的 '{type}' 缺少需求的内容 {target}" | ||
"locale_error": "'{target}' 不是合法的语种", | ||
"scope_error": "'{target}' 在 '{locale}' 中不是合法的域名", | ||
"type_error": "'{target}' 在 '{locale}:{scope}' 不是合法的类型", | ||
"miss_require_scope": "语言文件 '{locale}' 缺少需求的域名 '{target}'", | ||
"miss_require_type": "语言文件 '{locale}' 的 '{scope}' 缺少需求的内容 {target}" | ||
} | ||
} |
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
Oops, something went wrong.