plotly / plotly/plotly.js

Locale Partially Effective: Dictionary Errors in pt-BR, pt-PT, and ko

オープン
#6,256 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug P2
主要言語
JavaScript
スター
18.3k
フォーク
2k
平均マージ
2日 12時間
マージ済み PR(30日)
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.

image

From this CodePen, It should look like this:

image

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

pt-BR、pt-PT、ko.js の locale dictionary を調査し、まず median のようにコロン付きでレンダリングされる dictionary key を検索します。該当するエントリを英語版および記載されている例と比較します。3 つすべての locale で、コロンを含むラベルが報告された tooltip とラベルに正しくレンダリングされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
localization
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。