Skip to content

Commit d971001

Browse files
authored
Merge pull request #6077 from plotly/show-plotlyjs-version
Display the version of plotly.js when hovering over the modebar
2 parents 237b421 + 2990114 commit d971001

File tree

18 files changed

+24
-17
lines changed

18 files changed

+24
-17
lines changed

draftlogs/6077_change.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Display the version of plotly.js when hovering over the modebar [[#6077](https://github.com/plotly/plotly.js/pull/6077)]

lib/locales/cs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'Lasso Select': 'Vyběr lasem', // components/modebar/buttons.js:112
2525
'Orbital rotation': 'Rotace (orbitální)', // components/modebar/buttons.js:279
2626
'Pan': 'Posunovat', // components/modebar/buttons.js:94
27-
'Produced with Plotly': 'Vytvořeno pomocí Plotly', // components/modebar/modebar.js:256
27+
'Produced with Plotly.js': 'Vytvořeno pomocí Plotly.js', // components/modebar/modebar.js:256
2828
'Reset': 'Obnovit nastavení', // components/modebar/buttons.js:432
2929
'Reset axes': 'Obnovit nastavení os', // components/modebar/buttons.js:148
3030
'Reset camera to default': 'Obnovit nastavení kamery na výchozí stav', // components/modebar/buttons.js:314

lib/locales/cy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'Lasso Select': 'Dewiswch â lasŵ', // components / modebar / buttons.js: 123
2525
'Orbital rotation': 'Cylchdroi orbital', // components / modebar / buttons.js: 287
2626
'Pan': 'Pan', // components / modebar / buttons.js: 105
27-
'Produced with Plotly': 'Cynhyrchwyd gyda Plotly', // components / modebar / modebar.js: 272
27+
'Produced with Plotly.js': 'Cynhyrchwyd gyda Plotly.js', // components / modebar / modebar.js: 272
2828
'Reset': 'Ailosod', // components / modebar / buttons.js: 443
2929
'Reset axes': 'Ailosod echelinau', // components / modebar / buttons.js: 159
3030
'Reset camera to default': 'Ailosod camera i\'r rhagosodiad', // components / modebar / buttons.js: 325

lib/locales/de.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
'Lasso Select': 'Lassoauswahl', // components/modebar/buttons.js:112
2424
'Orbital rotation': 'Orbitalrotation', // components/modebar/buttons.js:279
2525
'Pan': 'Verschieben', // components/modebar/buttons.js:94
26-
'Produced with Plotly': 'Erstellt mit Plotly', // components/modebar/modebar.js:256
26+
'Produced with Plotly.js': 'Erstellt mit Plotly.js', // components/modebar/modebar.js:256
2727
'Reset': 'Zurücksetzen', // components/modebar/buttons.js:432
2828
'Reset axes': 'Achsen zurücksetzen', // components/modebar/buttons.js:148
2929
'Reset camera to default': 'Kamera auf Standard zurücksetzen', // components/modebar/buttons.js:314

lib/locales/es.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'Lasso Select': 'Seleccionar con lazo', // components/modebar/buttons.js:112
2525
'Orbital rotation': 'Rotación esférica', // components/modebar/buttons.js:279
2626
'Pan': 'Modo Panorámica', // components/modebar/buttons.js:94
27-
'Produced with Plotly': 'Hecho con Plotly', // components/modebar/modebar.js:256
27+
'Produced with Plotly.js': 'Hecho con Plotly.js', // components/modebar/modebar.js:256
2828
'Reset': 'Reiniciar', // components/modebar/buttons.js:431
2929
'Reset axes': 'Reiniciar ejes', // components/modebar/buttons.js:148
3030
'Reset camera to default': 'Restaurar cámara predeterminada', // components/modebar/buttons.js:313

lib/locales/fi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'Lasso Select': 'Lassovalinta',
2525
'Orbital rotation': 'Orbitaalikierto',
2626
'Pan': 'Panorointi',
27-
'Produced with Plotly': 'Tuotettu Plotlyllä',
27+
'Produced with Plotly.js': 'Tuotettu Plotly.jsllä',
2828
'Reset': 'Palauta oletusasetukset',
2929
'Reset axes': 'Palauta akselien oletusasetukset',
3030
'Reset camera to default': 'Palauta kameran oletusasetukset',

lib/locales/fr.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'Lasso Select': 'Sélection lasso',
2525
'Orbital rotation': 'Rotation orbitale',
2626
'Pan': 'Translation',
27-
'Produced with Plotly': 'Généré avec Plotly',
27+
'Produced with Plotly.js': 'Généré avec Plotly.js',
2828
'Reset': 'Réinitialiser',
2929
'Reset axes': 'Réinitialiser les axes',
3030
'Reset camera to default': 'Régler la caméra à sa valeur défaut',

lib/locales/it.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'Lasso Select': 'Selezione lazo', // components/modebar/buttons.js:112
2525
'Orbital rotation': 'Rotazione orbitale', // components/modebar/buttons.js:279
2626
'Pan': 'Sposta', // components/modebar/buttons.js:94
27-
'Produced with Plotly': 'Creato con Plotly', // components/modebar/modebar.js:256
27+
'Produced with Plotly.js': 'Creato con Plotly.js', // components/modebar/modebar.js:256
2828
'Reset': 'Reset', // components/modebar/buttons.js:432
2929
'Reset axes': 'Resetta gli assi', // components/modebar/buttons.js:148
3030
'Reset camera to default': 'Reimposta la camera ai valori predefiniti', // components/modebar/buttons.js:314

lib/locales/ja.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
'Lasso Select': '投げ縄選択', // components/modebar/buttons.js:112
2424
'Orbital rotation': '軌道回転', // components/modebar/buttons.js:279
2525
'Pan': '拡大', // components/modebar/buttons.js:94
26-
'Produced with Plotly': 'Plotlyにより作成', // components/modebar/modebar.js:256
26+
'Produced with Plotly.js': 'Plotly.jsにより作成', // components/modebar/modebar.js:256
2727
'Reset': 'リセット', // components/modebar/buttons.js:432
2828
'Reset axes': '軸をリセット', // components/modebar/buttons.js:148
2929
'Reset camera to default': 'カメラをデフォルトに戻す', // components/modebar/buttons.js:314

lib/locales/ko.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'Lasso Select': '올가미 선택',
2525
'Orbital rotation': '궤도 수정',
2626
'Pan': '이동',
27-
'Produced with Plotly': 'Plotly 제공',
27+
'Produced with Plotly.js': 'Plotly.js 제공',
2828
'Reset': '초기화',
2929
'Reset axes': '축 초기화',
3030
'Reset camera to default': 'camera를 기본값으로 초기화',

lib/locales/pt-br.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'Lasso Select': 'Seleção de laço',
2525
'Orbital rotation': 'Rotação orbital',
2626
'Pan': 'Mover',
27-
'Produced with Plotly': 'Criado com o Plotly',
27+
'Produced with Plotly.js': 'Criado com o Plotly.js',
2828
'Reset': 'Restaurar',
2929
'Reset axes': 'Restaurar eixos',
3030
'Reset camera to default': 'Restaurar câmera para padrão',

lib/locales/pt-pt.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'Lasso Select': 'Seleção de laço',
2525
'Orbital rotation': 'Rotação orbital',
2626
'Pan': 'Mover',
27-
'Produced with Plotly': 'Criado com Plotly',
27+
'Produced with Plotly.js': 'Criado com Plotly.js',
2828
'Reset': 'Restaurar',
2929
'Reset axes': 'Restaurar eixos',
3030
'Reset camera to default': 'Restaurar câmera para padrão',

lib/locales/ru.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'Lasso Select': 'Лассо',
2525
'Orbital rotation': 'Орбитальное движение',
2626
'Pan': 'Сдвиг',
27-
'Produced with Plotly': 'Создано с помощью Plotly',
27+
'Produced with Plotly.js': 'Создано с помощью Plotly.js',
2828
'Reset': 'Сбросить к значениям по умолчанию',
2929
'Reset axes': 'Сбросить отображение осей к значениям по умолчанию',
3030
'Reset camera to default': 'Сбросить параметры камеры к значениям по умолчанию',

lib/locales/sv.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'Lasso Select': 'Välj lasso', // components/modebar/buttons.js:121
2525
'Orbital rotation': 'Orbital rotation', // components/modebar/buttons.js:281
2626
'Pan': 'Panorera', // components/modebar/buttons.js:103
27-
'Produced with Plotly': 'Skapad med Plotly', // components/modebar/modebar.js:304
27+
'Produced with Plotly.js': 'Skapad med Plotly.js', // components/modebar/modebar.js:304
2828
'Reset': 'Återställ', // components/modebar/buttons.js:433
2929
'Reset axes': 'Återställ axlar', // components/modebar/buttons.js:157
3030
'Reset camera to default': 'Återställ kamera till standard', // components/modebar/buttons.js:319

lib/locales/sw.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'Lasso Select': 'Kuteua lasso',
2525
'Orbital rotation': 'Mzunguko wa mazao',
2626
'Pan': 'Tandaza',
27-
'Produced with Plotly': 'Ilitengenezwa na Plotly',
27+
'Produced with Plotly.js': 'Ilitengenezwa na Plotly.js',
2828
'Reset': 'Weka upya',
2929
'Reset axes': 'Weka upya axes',
3030
'Reset camera to default': 'Rudisha kamera kwenye uhifadhi wa default',

lib/locales/uk.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'Lasso Select': 'Ласо',
2525
'Orbital rotation': 'Рух по орбіті',
2626
'Pan': 'Зсув',
27-
'Produced with Plotly': 'Створено за допомогою Plotly',
27+
'Produced with Plotly.js': 'Створено за допомогою Plotly.js',
2828
'Reset': 'Встановити значення за замовчуванням',
2929
'Reset axes': 'Встановити осям значення за замовчуванням',
3030
'Reset camera to default': 'Встановити камері значення за замовчуванням',

lib/locales/zh-cn.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
'Lasso Select': '套索选择', // components/modebar/buttons.js:112
2424
'Orbital rotation': '轨道旋转', // components/modebar/buttons.js:279
2525
'Pan': '平移',
26-
'Produced with Plotly': '由Plotly生成', // components/modebar/modebar.js:256
26+
'Produced with Plotly.js': '由Plotly.js生成', // components/modebar/modebar.js:256
2727
'Reset': '重置', // components/modebar/buttons.js:432
2828
'Reset axes': '重置轴', // components/modebar/buttons.js:148
2929
'Reset camera to default': '重置镜头视角为默认状态',

src/components/modebar/modebar.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ var isNumeric = require('fast-isnumeric');
55

66
var Lib = require('../../lib');
77
var Icons = require('../../fonts/ploticon');
8+
var version = require('../../version').version;
9+
810
var Parser = new DOMParser();
911

1012
/**
@@ -283,6 +285,10 @@ proto.hasButtons = function(buttons) {
283285
return true;
284286
};
285287

288+
function jsVersion(str) {
289+
return str + ' (v' + version + ')';
290+
}
291+
286292
/**
287293
* @return {HTMLDivElement} The logo image wrapped in a group
288294
*/
@@ -292,7 +298,7 @@ proto.getLogo = function() {
292298

293299
a.href = 'https://plotly.com/';
294300
a.target = '_blank';
295-
a.setAttribute('data-title', Lib._(this.graphInfo, 'Produced with Plotly'));
301+
a.setAttribute('data-title', jsVersion(Lib._(this.graphInfo, 'Produced with Plotly.js')));
296302
a.className = 'modebar-btn plotlyjsicon modebar-btn--logo';
297303

298304
a.appendChild(this.createIcon(Icons.newplotlylogo));

0 commit comments

Comments
 (0)