Skip to content

Commit

Permalink
锁定react-typed-i18n依赖版本,增加cli/assets/config配置项支持国际化注释
Browse files Browse the repository at this point in the history
  • Loading branch information
piccaSun committed Sep 25, 2023
1 parent a4965f8 commit f4205e9
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"nodemailer": "6.9.4",
"qrcode": "1.5.3",
"speakeasy": "2.0.0",
"react-typed-i18n": "^2.3.0"
"react-typed-i18n": "2.3.0"
},
"devDependencies": {
"@types/asn1": "0.2.1",
Expand Down
10 changes: 10 additions & 0 deletions apps/cli/assets/config/apps/app1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,13 @@ web:
path: /login
formData:
password: "{{ PASSWORD }}"

# 配置HTML表单
# attributes:
# - type: text
# name: sbatchOptions
# # 此文本支持国际化
# label: 其他sbatch参数
# required: false
# # 此文本支持国际化
# placeholder: "比如:--gpus gres:2 --time 10"
20 changes: 20 additions & 0 deletions apps/cli/assets/config/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,23 @@ authType: ssh
# allowedCallbackHostnames:
# - localhost
# - another.com

# # 登录界面 slogan 配置
# # 可选配置,默认右侧无 slogan
# slogan:
# # 登录界面 slogan 文字颜色
# # 可选配置,默认为白色字体
# color: "white"
# # 登录界面 slogan title
# # 可选配置,默认无 slogan 标题
# # 此文本支持国际化
# title: "开源算力中心门户和管理平台"
# # 多条 slogan 文本
# # 可选配置,默认 slogan 为空数组
# # 此文本支持国际化
# texts:
# - "图形化界面,使用方便"
# - "功能丰富,管理简单"
# - "一体化部署,开箱即用"
# - "标准化平台,支持算力融合"
# - "开源中立,独立自主"
4 changes: 4 additions & 0 deletions apps/cli/assets/config/clusterTexts.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# 给默认租户以及未登录用户的集群说明
default:
# 此文本支持国际化
clusterComment: 集群说明
extras:
# 此文本支持国际化
- title: 其他内容1
# 此文本支持国际化
content: 其他内容1内容
- title: 其他内容2
content: 其他内容2内容

# tenant_1租户的用户的说明
tenant_1:
# 此文本支持国际化
clusterComment: tenant_1的内容
2 changes: 2 additions & 0 deletions apps/cli/assets/config/clusters/hpc01.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# 集群显示名称
# 此文本支持国际化
displayName: hpc01Name

# 指定slurm配置
loginNodes:
# 登录节点展示名称
# 此文本支持国际化
- name: login01
# 登录节点的IP或者域名
# 如果设置的是域名,请确认此节点的/etc/hosts中包含了域名到IP的解析信息
Expand Down
1 change: 1 addition & 0 deletions apps/cli/assets/config/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ passwordPattern:
regex: ^(?=.*\d)(?=.*[a-zA-Z])(?=.*[`~!@#\$%^&*()_+\-[\];',./{}|:"<>?]).{8,}$

# 出错时的消息。下面为默认值
# 此文本支持国际化
errorMessage: 必须包含字母、数字和符号,长度大于等于8位
2 changes: 2 additions & 0 deletions apps/cli/assets/config/mis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ predefinedChargingTypes:
# regex: ""

# 出错时的消息
# 此文本支持国际化
# errorMessage: ""

# 创建用户相关配置
Expand All @@ -45,6 +46,7 @@ predefinedChargingTypes:
# regex: ""

# 出错时的消息
# 此文本支持国际化
# errorMessage: ""

# 外置页面配置
Expand Down
6 changes: 6 additions & 0 deletions apps/cli/assets/config/portal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ apps: true
# 主页标题
homeTitle:
# 默认文本
# 此文本支持国际化
defaultText: "Super Computing on Web"
# 从不同域名访问,显示的不同的文本
# hostnameMap:
Expand All @@ -29,11 +30,16 @@ homeTitle:
# 主页文本
homeText:
# 默认文本
# 此文本支持国际化
defaultText: "SCOW"
# 从不同域名访问,显示的不同的文本
# hostnameMap:
# a.com: "a.com's SCOW"

# 提交作业命令框中的提示语,可选配置
# 此文本支持国际化
# submitJobPromptText: "#此处参数设置的优先级高于页面其它地方,两者冲突时以此处为准"

# 是否启用终端功能
shell: true

Expand Down
2 changes: 1 addition & 1 deletion apps/mis-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"tslib": "2.6.2",
"typescript": "5.1.6",
"@ant-design/cssinjs": "1.16.2",
"react-typed-i18n": "^2.3.0"
"react-typed-i18n": "2.3.0"
},
"devDependencies": {
"@ddadaal/next-typed-api-routes-cli": "0.9.1",
Expand Down
2 changes: 1 addition & 1 deletion apps/portal-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"ws": "8.13.0",
"xterm": "5.2.1",
"xterm-addon-fit": "0.7.0",
"react-typed-i18n": "^2.3.0"
"react-typed-i18n": "2.3.0"
},
"devDependencies": {
"@ddadaal/next-typed-api-routes-cli": "0.9.1",
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f4205e9

Please sign in to comment.