-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Localization #2195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Localization #2195
Changes from 12 commits
7e075f5
9a9de77
d859de5
7d057e5
8a5eeec
03dcb5d
bf2c6db
04ed6f0
0f8520e
5d6f267
97c0898
daf0884
4b48038
4b8f980
1275661
fc03cce
cb2f00c
97821e9
e80ec91
8b9e7d8
6029f94
9708b56
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Autoscale // components/modebar/buttons.js:139 | ||
Box Select // components/modebar/buttons.js:103 | ||
Click to enter Colorscale title // plots/plots.js:437 | ||
Click to enter Component A title // plots/ternary/ternary.js:386 | ||
Click to enter Component B title // plots/ternary/ternary.js:400 | ||
Click to enter Component C title // plots/ternary/ternary.js:411 | ||
Click to enter Plot title // plot_api/plot_api.js:579 | ||
Click to enter X axis title // plots/plots.js:435 | ||
Click to enter Y axis title // plots/plots.js:436 | ||
Close: // traces/ohlc/transform.js:139 | ||
Compare data on hover // components/modebar/buttons.js:167 | ||
Double click on legend to isolate individual trace // components/legend/handle_click.js:90 | ||
Double-click to zoom back out // plots/cartesian/dragbox.js:299 | ||
Download plot as a png // components/modebar/buttons.js:52 | ||
Edit in Chart Studio // components/modebar/buttons.js:76 | ||
High: // traces/ohlc/transform.js:137 | ||
IE only supports svg. Changing format to svg. // components/modebar/buttons.js:60 | ||
Incoming flow count: // traces/sankey/plot.js:142 | ||
Lasso Select // components/modebar/buttons.js:112 | ||
Low: // traces/ohlc/transform.js:138 | ||
Open: // traces/ohlc/transform.js:136 | ||
Orbital rotation // components/modebar/buttons.js:279 | ||
Outgoing flow count: // traces/sankey/plot.js:143 | ||
Pan // components/modebar/buttons.js:94 | ||
Produced with Plotly // components/modebar/modebar.js:256 | ||
Reset // components/modebar/buttons.js:432 | ||
Reset axes // components/modebar/buttons.js:148 | ||
Reset camera to default // components/modebar/buttons.js:314 | ||
Reset camera to last save // components/modebar/buttons.js:322 | ||
Reset view // components/modebar/buttons.js:583 | ||
Reset views // components/modebar/buttons.js:529 | ||
Show closest data on hover // components/modebar/buttons.js:157 | ||
Snapshot succeeded // components/modebar/buttons.js:66 | ||
Sorry there was a problem downloading your snapshot! // components/modebar/buttons.js:69 | ||
Source: // traces/sankey/plot.js:140 | ||
Taking snapshot - this may take a few seconds // components/modebar/buttons.js:57 | ||
Target: // traces/sankey/plot.js:141 | ||
Toggle Spike Lines // components/modebar/buttons.js:548 | ||
Toggle show closest data on hover // components/modebar/buttons.js:353 | ||
Turntable rotation // components/modebar/buttons.js:288 | ||
Zoom // components/modebar/buttons.js:85 | ||
Zoom in // components/modebar/buttons.js:121 | ||
Zoom out // components/modebar/buttons.js:130 | ||
kde: // traces/violin/calc.js:73 | ||
lat: // traces/scattergeo/calc.js:48 | ||
lon: // traces/scattergeo/calc.js:49 | ||
lower fence: // traces/box/calc.js:134 | ||
max: // traces/box/calc.js:132 | ||
mean ± σ: // traces/box/calc.js:133 | ||
mean: // traces/box/calc.js:133 | ||
median: // traces/box/calc.js:128 | ||
min: // traces/box/calc.js:129 | ||
q1: // traces/box/calc.js:130 | ||
q3: // traces/box/calc.js:131 | ||
trace // plots/plots.js:439 | ||
upper fence: // traces/box/calc.js:135 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,7 @@ Plotly.register([ | |
require('./pie') | ||
]); | ||
|
||
// locales | ||
Plotly.register(require('./locales.js')); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it would better to put these That would also mean moving locale modules to a new |
||
|
||
module.exports = Plotly; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Copyright 2012-2017, Plotly, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = { | ||
moduleType: 'locale', | ||
name: 'en-US', | ||
dictionary: { | ||
'Click to enter Colorscale title': 'Click to enter Colorscale title' | ||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Copyright 2012-2017, Plotly, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = { | ||
moduleType: 'locale', | ||
name: 'en', | ||
dictionary: { | ||
'Click to enter Colorscale title': 'Click to enter Colourscale title' | ||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* Copyright 2012-2017, Plotly, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting. I think registering only one local (en-US) in the dist bundles should suffice, but then again as only the spelling of colo(u)rscale differs between the two, including both en and en-US is fine by me 👌 |
||
require('./locale-en.js'), | ||
require('./locale-en-us.js') | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@etpinard @bpostlethwaite thoughts on this format, with the (first) source line for each key included for a translator to use for more context?
Also having all these strings together raises some questions about whether they're all actually what we want, or if any could be made more consistent:
':'
) are lowercase, but some (OHLC, sankey) are capitalized - is this what we want?"Click to enter <item> title"
ones to have<item>
capitalized (previously one or two of them were lowercase) - is that correct?Lib.notifier
items have no punctuation but some of them do. Should we standardize?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this format a lot. Nicely done 👌
I have no preference.
I'd vote for standardizing to lower case.
fine by me.
No preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made all the hover labels lower case, standardized on "Double-click" (when used as a verb, which is the only way we use it in plotly.js text), and tweaked a few other messages -> 97821e9