Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions draftlogs/6077_change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Display the version of plotly.js when hovering over the modebar [[#6077](https://github.com/plotly/plotly.js/pull/6077)]
2 changes: 1 addition & 1 deletion lib/locales/cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'Lasso Select': 'Vyběr lasem', // components/modebar/buttons.js:112
'Orbital rotation': 'Rotace (orbitální)', // components/modebar/buttons.js:279
'Pan': 'Posunovat', // components/modebar/buttons.js:94
'Produced with Plotly': 'Vytvořeno pomocí Plotly', // components/modebar/modebar.js:256
'Produced with Plotly.js': 'Vytvořeno pomocí Plotly.js', // components/modebar/modebar.js:256
'Reset': 'Obnovit nastavení', // components/modebar/buttons.js:432
'Reset axes': 'Obnovit nastavení os', // components/modebar/buttons.js:148
'Reset camera to default': 'Obnovit nastavení kamery na výchozí stav', // components/modebar/buttons.js:314
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'Lasso Select': 'Dewiswch â lasŵ', // components / modebar / buttons.js: 123
'Orbital rotation': 'Cylchdroi orbital', // components / modebar / buttons.js: 287
'Pan': 'Pan', // components / modebar / buttons.js: 105
'Produced with Plotly': 'Cynhyrchwyd gyda Plotly', // components / modebar / modebar.js: 272
'Produced with Plotly.js': 'Cynhyrchwyd gyda Plotly.js', // components / modebar / modebar.js: 272
'Reset': 'Ailosod', // components / modebar / buttons.js: 443
'Reset axes': 'Ailosod echelinau', // components / modebar / buttons.js: 159
'Reset camera to default': 'Ailosod camera i\'r rhagosodiad', // components / modebar / buttons.js: 325
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
'Lasso Select': 'Lassoauswahl', // components/modebar/buttons.js:112
'Orbital rotation': 'Orbitalrotation', // components/modebar/buttons.js:279
'Pan': 'Verschieben', // components/modebar/buttons.js:94
'Produced with Plotly': 'Erstellt mit Plotly', // components/modebar/modebar.js:256
'Produced with Plotly.js': 'Erstellt mit Plotly.js', // components/modebar/modebar.js:256
'Reset': 'Zurücksetzen', // components/modebar/buttons.js:432
'Reset axes': 'Achsen zurücksetzen', // components/modebar/buttons.js:148
'Reset camera to default': 'Kamera auf Standard zurücksetzen', // components/modebar/buttons.js:314
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'Lasso Select': 'Seleccionar con lazo', // components/modebar/buttons.js:112
'Orbital rotation': 'Rotación esférica', // components/modebar/buttons.js:279
'Pan': 'Modo Panorámica', // components/modebar/buttons.js:94
'Produced with Plotly': 'Hecho con Plotly', // components/modebar/modebar.js:256
'Produced with Plotly.js': 'Hecho con Plotly.js', // components/modebar/modebar.js:256
'Reset': 'Reiniciar', // components/modebar/buttons.js:431
'Reset axes': 'Reiniciar ejes', // components/modebar/buttons.js:148
'Reset camera to default': 'Restaurar cámara predeterminada', // components/modebar/buttons.js:313
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/fi.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'Lasso Select': 'Lassovalinta',
'Orbital rotation': 'Orbitaalikierto',
'Pan': 'Panorointi',
'Produced with Plotly': 'Tuotettu Plotlyllä',
'Produced with Plotly.js': 'Tuotettu Plotly.jsllä',
'Reset': 'Palauta oletusasetukset',
'Reset axes': 'Palauta akselien oletusasetukset',
'Reset camera to default': 'Palauta kameran oletusasetukset',
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'Lasso Select': 'Sélection lasso',
'Orbital rotation': 'Rotation orbitale',
'Pan': 'Translation',
'Produced with Plotly': 'Généré avec Plotly',
'Produced with Plotly.js': 'Généré avec Plotly.js',
'Reset': 'Réinitialiser',
'Reset axes': 'Réinitialiser les axes',
'Reset camera to default': 'Régler la caméra à sa valeur défaut',
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/it.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'Lasso Select': 'Selezione lazo', // components/modebar/buttons.js:112
'Orbital rotation': 'Rotazione orbitale', // components/modebar/buttons.js:279
'Pan': 'Sposta', // components/modebar/buttons.js:94
'Produced with Plotly': 'Creato con Plotly', // components/modebar/modebar.js:256
'Produced with Plotly.js': 'Creato con Plotly.js', // components/modebar/modebar.js:256
'Reset': 'Reset', // components/modebar/buttons.js:432
'Reset axes': 'Resetta gli assi', // components/modebar/buttons.js:148
'Reset camera to default': 'Reimposta la camera ai valori predefiniti', // components/modebar/buttons.js:314
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/ja.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
'Lasso Select': '投げ縄選択', // components/modebar/buttons.js:112
'Orbital rotation': '軌道回転', // components/modebar/buttons.js:279
'Pan': '拡大', // components/modebar/buttons.js:94
'Produced with Plotly': 'Plotlyにより作成', // components/modebar/modebar.js:256
'Produced with Plotly.js': 'Plotly.jsにより作成', // 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
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/ko.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'Lasso Select': '올가미 선택',
'Orbital rotation': '궤도 수정',
'Pan': '이동',
'Produced with Plotly': 'Plotly 제공',
'Produced with Plotly.js': 'Plotly.js 제공',
'Reset': '초기화',
'Reset axes': '축 초기화',
'Reset camera to default': 'camera를 기본값으로 초기화',
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/pt-br.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'Lasso Select': 'Seleção de laço',
'Orbital rotation': 'Rotação orbital',
'Pan': 'Mover',
'Produced with Plotly': 'Criado com o Plotly',
'Produced with Plotly.js': 'Criado com o Plotly.js',
'Reset': 'Restaurar',
'Reset axes': 'Restaurar eixos',
'Reset camera to default': 'Restaurar câmera para padrão',
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/pt-pt.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'Lasso Select': 'Seleção de laço',
'Orbital rotation': 'Rotação orbital',
'Pan': 'Mover',
'Produced with Plotly': 'Criado com Plotly',
'Produced with Plotly.js': 'Criado com Plotly.js',
'Reset': 'Restaurar',
'Reset axes': 'Restaurar eixos',
'Reset camera to default': 'Restaurar câmera para padrão',
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'Lasso Select': 'Лассо',
'Orbital rotation': 'Орбитальное движение',
'Pan': 'Сдвиг',
'Produced with Plotly': 'Создано с помощью Plotly',
'Produced with Plotly.js': 'Создано с помощью Plotly.js',
'Reset': 'Сбросить к значениям по умолчанию',
'Reset axes': 'Сбросить отображение осей к значениям по умолчанию',
'Reset camera to default': 'Сбросить параметры камеры к значениям по умолчанию',
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/sv.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'Lasso Select': 'Välj lasso', // components/modebar/buttons.js:121
'Orbital rotation': 'Orbital rotation', // components/modebar/buttons.js:281
'Pan': 'Panorera', // components/modebar/buttons.js:103
'Produced with Plotly': 'Skapad med Plotly', // components/modebar/modebar.js:304
'Produced with Plotly.js': 'Skapad med Plotly.js', // components/modebar/modebar.js:304
'Reset': 'Återställ', // components/modebar/buttons.js:433
'Reset axes': 'Återställ axlar', // components/modebar/buttons.js:157
'Reset camera to default': 'Återställ kamera till standard', // components/modebar/buttons.js:319
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'Lasso Select': 'Kuteua lasso',
'Orbital rotation': 'Mzunguko wa mazao',
'Pan': 'Tandaza',
'Produced with Plotly': 'Ilitengenezwa na Plotly',
'Produced with Plotly.js': 'Ilitengenezwa na Plotly.js',
'Reset': 'Weka upya',
'Reset axes': 'Weka upya axes',
'Reset camera to default': 'Rudisha kamera kwenye uhifadhi wa default',
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/uk.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'Lasso Select': 'Ласо',
'Orbital rotation': 'Рух по орбіті',
'Pan': 'Зсув',
'Produced with Plotly': 'Створено за допомогою Plotly',
'Produced with Plotly.js': 'Створено за допомогою Plotly.js',
'Reset': 'Встановити значення за замовчуванням',
'Reset axes': 'Встановити осям значення за замовчуванням',
'Reset camera to default': 'Встановити камері значення за замовчуванням',
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/zh-cn.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
'Lasso Select': '套索选择', // components/modebar/buttons.js:112
'Orbital rotation': '轨道旋转', // components/modebar/buttons.js:279
'Pan': '平移',
'Produced with Plotly': '由Plotly生成', // components/modebar/modebar.js:256
'Produced with Plotly.js': '由Plotly.js生成', // components/modebar/modebar.js:256
'Reset': '重置', // components/modebar/buttons.js:432
'Reset axes': '重置轴', // components/modebar/buttons.js:148
'Reset camera to default': '重置镜头视角为默认状态',
Expand Down
8 changes: 7 additions & 1 deletion src/components/modebar/modebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ var isNumeric = require('fast-isnumeric');

var Lib = require('../../lib');
var Icons = require('../../fonts/ploticon');
var version = require('../../version').version;

var Parser = new DOMParser();

/**
Expand Down Expand Up @@ -283,6 +285,10 @@ proto.hasButtons = function(buttons) {
return true;
};

function jsVersion(str) {
return str + ' (v' + version + ')';
}

/**
* @return {HTMLDivElement} The logo image wrapped in a group
*/
Expand All @@ -292,7 +298,7 @@ proto.getLogo = function() {

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

a.appendChild(this.createIcon(Icons.newplotlylogo));
Expand Down