Locale Partially Effective: Dictionary Errors in pt-BR, pt-PT, and ko
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 18.3k
- 派生
- 2k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 28
描述
I tried to find an open or closed issue that addresses this and didn't find one. I've been around GitHub, but whether this should be a discussion, pull request, or something else...I'm not all that knowledgeable about where this belongs.
This was brought to my attention through an SO question for the R version, but it's also an issue in Plotly JS. The question is here. The person that asked that question added it to a current issue for that version of Plotly. You can see that here. I realized what was wrong when I compared the language pt-BR to other languages that rendered correctly (de or es, for example).
Wherever dictionary words are rendered with a colon, it is incorrect both in English and the locale language. For example, median: "mediana". This should be "median:":"mediana:" for this to work.
If I've caught them all, these are the English versions that are documented incorrectly (set up for a copy, paste, and regex):
'close',0'high','incoming flow count','kde', 'lat', 'lon','low','lower fence': 'limite inferior','max','mean ± σ','mean','median','min','new text','open','outgoing flow count','q1','q3','source','target','upper fence'
It looks like pt-br, pt-pt, and ko.js have this issue. I just did a find-grep for ',median:'.
This example, using pt-BR (and an example on the Plotly JS site), appears to render correctly, but that's because none of the errors in the JS are shown.
If you look at the tooltips or label with a colon in this CodePen, you'll see the issue.

From this CodePen, It should look like this:

贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
检查 pt-BR、pt-PT 和 ko.js 的 locale dictionary,首先搜索使用冒号渲染的 dictionary key,例如 median。将受影响的条目与英文版本及列出的示例进行比较。对于这三个 locale,报告的 tooltip 和 label 中带冒号的标签都能正确渲染,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- localization
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100