Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Feature Request]: Remove dependency on intl-messageformat

未关闭
#4,150 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

@ernst-dev 已经在做这个了。

开始于 2026年7月22日。

  • #4758 来自 @ernst-dev —— 未关闭
  • #5022 来自 @TrevorBurnham —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
20/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
react, typescript

调研方向

Start with the linked pull request #4758 and the draft branch, which demonstrate replacing intl-messageformat and changing the I18n.Provider messages type. Read the “Supporting additional locales” example in the internationalization documentation to understand the current raw-string usage and migration path. Done means the dependency is removed and users have a documented way to provide compiled messages; work is already underway in the open pull request.

由索引模型根据 Issue 内容生成。

描述

enhancement
Description

Cloudscape brings in intl-messageformat, which adds ~40KB to the minified JS bundle. But the built-in internationalization functionality doesn't use it. The dependency is only needed if users provide raw ICU strings to the messages property in I18n.Provider, as in the "Supporting additional locales" example here: https://cloudscape.design/get-started/for-developers/internationalization/#supporting-additional-locales

Using that dependency at runtime is an anti-pattern: Even for folks who need to add messages for additional locales, they should be compiling those messages at build time (like Cloudscape does for its own built-in locales) rather than making the browser do it.

I've drafted a branch that shows how the intl-messageformat dependency could be replaced: https://github.com/TrevorBurnham/cloudscape-components/tree/streamline-i18n-parser On that branch I've changed the TypeScript type of I18n.provider's messages prop so that it no longer accepts raw strings. That means that folks using that functionality would get a build-time error instead of a run-time failure. Combine that with a straightforward migration path away from those raw strings, and you'd have a nice easy performance win.

Code of Conduct
主要语言
TypeScript
星标
2.7k
派生
248
平均合并
3 天 2 小时
30 天内合并 PR
81

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cloudscape-design/components 的其他 Issue

查看 cloudscape-design/components 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。