Nothing checks the message catalogs, or catches new hard-coded text
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- eslint, javascript, json, typescript
调研方向
Start by reviewing the catalog setup and local ESLint plugin introduced in issue #620, then inspect src/messages/*.json, SHIPPED, and the pnpm test and lint configuration. Add fixture coverage for missing keys, ICU syntax, placeholders, unused keys, JSX text, and text bearing props; done means the listed lint, typecheck, knip, and test commands pass. This is step 0.4 of the owner's plan and depends on #620.
由索引模型根据 Issue 内容生成。
描述
Needs your OK: this adds checks on the translation catalogs and lint rules against hard-coded text. Nothing anyone sees changes. Swap pipeline:proposed for pipeline:ready to have it built.
What happens
Once text lives in src/messages/*.json (#620), nothing stops a translation from missing keys, breaking ICU syntax or dropping a {name}. Nothing stops new English being typed straight into a component either.
Fix, in outline
- A catalog check that
pnpm testruns (a unit test oversrc/messages/, so CI covers it with no workflow change). It checks that:- every catalog's completeness is known per namespace against
en.json, and each language inSHIPPEDis complete for its audience (participant:participant,email,common; organizer:organizer,auth,common; site:site,common); - every message compiles with
icu-minify, which uses the same ICU parser as use-intl's full formatter; - placeholders and tags match the English source;
- no key is unused.
- every catalog's completeness is known per namespace against
- Keys are literal, so the unused-key check can see them. Map enum values to keys through a typed table (
const STATUS_KEY = { open: 'status.open', … } as const), nevert(`status.${s}`). - Lint for hard-coded text:
react/jsx-no-literalswithnoStrings: true, ignoreProps: truefor JSX text;- a small custom rule, in the local ESLint plugin from #620, that reports a string literal on text-bearing props:
aria-label,aria-description,title,placeholder,altandlabel. - Both are turned on per directory as each area moves to the catalog, starting with none.
Watch for
noAttributeStringsdoesn't work here. It flags everyclassNameandhref, and eslint-plugin-react 7.37.5 (what the lockfile resolves) has no per-attribute option.- Pin
icu-minifyas a devDependency at the exact version next-intl resolves, so the check runs the parser production runs.
Order
After #620, because the catalogs, SHIPPED and the local ESLint plugin come from it.
Done when
- The check fails on a missing key, broken ICU, a dropped placeholder and an unused key (tests with fixture catalogs).
- The lint rules fail on a fixture with JSX text and one with
aria-label="…". pnpm lint && pnpm typecheck && pnpm knip && pnpm testpass.
Planned with the owner in https://claude.ai/code/session_01EFKmj716ZY3b3SwR8TV8Y2 and checked against the code on main at 35288fa. The full plan is private to the owner's account: https://claude.ai/artifact/VgQH6U2s2EVx3LX991fJi8 (a Claude session on that account can open it with the Artifact tool's read action). This is step 0.4 there.
- 主要语言
- TypeScript
- 星标
- 19
- 派生
- 4
- 平均合并
- 19 小时 34 分钟
- 30 天内合并 PR
- 165
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
richshaw/OpenSignup 的其他 Issue
-
enhancement pipeline:proposed pipeline:ux
难度 2/5 1-3 小时 新手友好度 72/100
richshaw/OpenSignup#654 ·
维护者通常 1 天内回复
-
The help pages never say "pause", so organizers looking for it miss Close or reopen a signup可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭enhancement pipeline:proposed pipeline:ux
难度 2/5 1-3 小时 新手友好度 82/100
richshaw/OpenSignup#653 ·
维护者通常 1 天内回复
-
enhancement pipeline:proposed pipeline:ux
难度 2/5 1-3 小时 新手友好度 78/100
richshaw/OpenSignup#652 ·
维护者通常 1 天内回复
-
SMTP timeout notes in smtp.ts and the changelog describe nodemailer 10.0, not 10.1可能已有人在做 @agammann 于 1 天前认领。 未关闭enhancement good first issue pipeline:ready
难度 2/5 1-3 小时 新手友好度 82/100
richshaw/OpenSignup#645 ·
维护者通常 1 天内回复
-
A signup page's first Tab skips the header and lands on the next tab可能已有人在做 @richshaw 于 1 天前认领。 未关闭bug good first issue pipeline:building pipeline:ux
难度 2/5 1-3 小时 新手友好度 88/100
richshaw/OpenSignup#644 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 richshaw/OpenSignup 的全部 Issue
相似的 Issue
-
category::task code priority::normal
难度 2/5 1-3 小时 新手友好度 78/100
e0ipso/strikethroo#145 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 85/100
cocos/cocos-docs#3333 ·
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
RevenueCat/react-native-purchases#2079 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
RevenueCat/purchases-hybrid-common#2039 ·
维护者通常 1 天内回复
-
agent-reported area/react bug
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复