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: h.i18n() 支持 named template #1212

Open
Seidko opened this issue Oct 3, 2023 · 3 comments
Open

Feature: h.i18n() 支持 named template #1212

Seidko opened this issue Oct 3, 2023 · 3 comments

Comments

@Seidko
Copy link
Member

Seidko commented Oct 3, 2023

Describe the problem related to the feature request

h.i18n()session.text() 一样支持传入一个对象以支持具名模板。

Describe the solution you'd like

更改 h.i18n() 的类型(?)以支持具名模板。

Describe alternatives you've considered

No response

Additional context

No response

@Seidko Seidko added the feature 新特性 label Oct 3, 2023
@shigma
Copy link
Member

shigma commented Nov 13, 2023

类型本身很好修改,主要的问题在于 API 需要有对应的 XML 表达。目前 Satori Element 并没有规范化如何书写 named slot。

@Hieuzest
Copy link

我认为这应该是实现侧细节,不需要经由Satori规范吧

【一个在i18n里写近百行js来构造输出的围观群众

@shigma
Copy link
Member

shigma commented Nov 13, 2023

我认为这应该是实现侧细节,不需要经由 Satori 规范吧

h.i18n() 是 satori 导出的工具函数。我认为 API 与 JSX / XML 用法有必要进行对齐。

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

3 participants