reactjs / reactjs/react.dev

"This Page Is Not Yet Translated"

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

还没有人认领这个 Issue。

localization
主要语言
JavaScript
星标
11.8k
派生
7.9k
平均合并
1 天 11 小时
30 天内合并 PR
11

描述

Courtesy of @smikitky

It would be cool to have a "This Page Is Not Yet Translated" component that we can stick on pages in the translation forks that haven't had a translation yet. Even though the Spanish translation is "done", some sections like the blog aren't translated, and it would be nice to give a warning like MDN does:
MDN article with a warning in Portuguese

This would involve something like:

  • A TranslationWarning component with a message on how a page isn't translated yet.
  • A translated property on front matter that should be set when a page is translated
  • Logic to show the translation warning if translated isn't set (and the language isn't English).

This would require a code mod for all the pages that have been already translated in the various languages, but I could probably do that with a codemod by referencing their progress list.

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先定位提议的 TranslationWarning 组件、已翻译的 front-matter 属性,以及 issue 中描述的基于语言的显示逻辑。在规划 codemod 之前,检查现有的已翻译页面和语言进度列表;完成的标准是未翻译的非英语页面显示警告,而已翻译页面和英语页面不显示警告。

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

评估

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

把新 issue 发到你的邮箱

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