Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Schema.dict 的表格形式支持 i18n 的 $value #1362

Open
idranme opened this issue Feb 15, 2024 · 4 comments
Open

Feature: Schema.dict 的表格形式支持 i18n 的 $value #1362

idranme opened this issue Feb 15, 2024 · 4 comments

Comments

@idranme
Copy link

idranme commented Feb 15, 2024

Describe the problem related to the feature request

i18n 的 $value 在 Schema.dict 的表格形式不生效

Schema.object({
    delay: Schema.dict(Schema.natural().role('ms').default(0.1 * Time.second)).role('table')
})
delay:
  $description: 发送间隔 (默认 100 毫秒)
  $value: 平台名

image
显示的是「键」,而不是「平台名」

Describe the solution you'd like

使 Schema.dict 的表格形式支持 i18n 的 $value

Describe alternatives you've considered

No response

Additional context

No response

@idranme idranme added the feature 新特性 label Feb 15, 2024
@shigma
Copy link
Member

shigma commented Feb 15, 2024

不用 table 显示成啥样?

@idranme
Copy link
Author

idranme commented Feb 15, 2024

不用 table 显示成啥样?

image

@shigma
Copy link
Member

shigma commented Feb 15, 2024

你稍微有一点理解偏差,不过不影响这个 issue。

显示在配置项 key 下方的文本是这个配置项的描述,所以 delay[xxx] 下方的文本应该是「发送间隔」而不是「平台名」。如果我修复这个问题,在表格中应该对应「值」这一列。

相应地,或许我可以再加一个 $key 之类的用于描述这个键。

@idranme
Copy link
Author

idranme commented Feb 16, 2024

你稍微有一点理解偏差,不过不影响这个 issue。

显示在配置项 key 下方的文本是这个配置项的描述,所以 delay[xxx] 下方的文本应该是「发送间隔」而不是「平台名」。如果我修复这个问题,在表格中应该对应「值」这一列。

相应地,或许我可以再加一个 $key 之类的用于描述这个键。

嗯呐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants