Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-fe
Commits
bde09892
Commit
bde09892
authored
Oct 24, 2024
by
tyyin lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: i18n增加类型提示
parent
7714821d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
14 deletions
+42
-14
index.ts
src/locales/index.ts
+1
-1
zh-cn.yaml
src/locales/langs/zh-cn.yaml
+7
-4
zh-hk.yaml
src/locales/langs/zh-hk.yaml
+7
-4
i18n.d.ts
types/i18n.d.ts
+13
-0
locales.d.ts
types/locales.d.ts
+9
-5
module.d.ts
types/module.d.ts
+5
-0
No files found.
src/locales/index.ts
View file @
bde09892
...
...
@@ -2,7 +2,7 @@ import { type App } from 'vue'
import
{
createI18n
}
from
'vue-i18n'
import
messages
from
'./messages'
const
i18n
=
createI18n
({
const
i18n
=
createI18n
<
[
I18n
.
Schema
],
I18n
.
LangType
>
({
legacy
:
false
,
locale
:
'zh-CN'
,
fallbackLocale
:
'zh-HK'
,
...
...
src/locales/langs/zh-cn.yaml
View file @
bde09892
home_module
:
agent_welcome_message
:
'
Hi,
歡迎使用SuperLink'
agent_description
:
'
在这里,你可以体验多个平台的模型和专属的智能体'
common_module
:
cancel_btn_text
:
'
取
消'
confirm_btn_text
:
'
确
认'
...
...
@@ -70,6 +66,13 @@ common_module:
total
:
'
共'
goto
:
'
跳转至'
login_module
:
app_welcome_words
:
'
欢迎使用萃想POC'
home_module
:
agent_welcome_message
:
'
Hi,
歡迎使用SuperLink'
agent_description
:
'
在这里,你可以体验多个平台的模型和专属的智能体'
router_title_module
:
login
:
'
登录'
server_error
:
'
服务器错误'
...
...
src/locales/langs/zh-hk.yaml
View file @
bde09892
home_module
:
agent_welcome_message
:
'
Hi,
歡迎使用SuperLink'
agent_description
:
'
在這裏,你可以體驗多個平臺的模型和專屬的智'
common_module
:
cancel_btn_text
:
'
取
消'
confirm_btn_text
:
'
確
認'
...
...
@@ -70,6 +66,13 @@ common_module:
total
:
'
共'
goto
:
'
跳轉至'
login_module
:
app_welcome_words
:
'
歡迎使用萃想POC'
home_module
:
agent_welcome_message
:
'
Hi,
歡迎使用SuperLink'
agent_description
:
'
在這裏,你可以體驗多個平臺的模型和專屬的智'
router_title_module
:
login
:
'
登錄'
server_error
:
'
服務器錯誤'
...
...
types/i18n.d.ts
0 → 100644
View file @
bde09892
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import
{
DefineLocaleMessage
,
DefineDateTimeFormat
,
DefineNumberFormat
}
from
'vue-i18n'
declare
module
'vue-i18n'
{
// define the locale messages schema
export
interface
DefineLocaleMessage
extends
I18n
.
Schema
{}
// define the datetime format schema
export
interface
DefineDateTimeFormat
{}
// define the number format schema
export
interface
DefineNumberFormat
{}
}
types/locales.d.ts
View file @
bde09892
...
...
@@ -2,11 +2,6 @@ declare namespace I18n {
type
LangType
=
'zh-HK'
|
'zh-CN'
type
Schema
=
{
home_module
:
{
agent_welcome_message
:
string
agent_description
:
string
}
common_module
:
{
cancel_btn_text
:
string
confirm_btn_text
:
string
...
...
@@ -76,6 +71,15 @@ declare namespace I18n {
}
}
login_module
:
{
app_welcome_words
:
string
}
home_module
:
{
agent_welcome_message
:
string
agent_description
:
string
}
router_title_module
:
{
login
:
string
server_error
:
string
...
...
types/module.d.ts
View file @
bde09892
declare
module
'*.yaml'
{
const
value
:
I18n
.
Schema
export
default
value
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment