diff --git a/draftlogs/6077_change.md b/draftlogs/6077_change.md new file mode 100644 index 00000000000..c5198b77c9e --- /dev/null +++ b/draftlogs/6077_change.md @@ -0,0 +1 @@ + - Display the version of plotly.js when hovering over the modebar [[#6077](https://github.com/plotly/plotly.js/pull/6077)] diff --git a/lib/locales/cs.js b/lib/locales/cs.js index 990ab912524..93e6467020f 100644 --- a/lib/locales/cs.js +++ b/lib/locales/cs.js @@ -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 diff --git a/lib/locales/cy.js b/lib/locales/cy.js index 4c791456754..fa703ebcb3b 100644 --- a/lib/locales/cy.js +++ b/lib/locales/cy.js @@ -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 diff --git a/lib/locales/de.js b/lib/locales/de.js index f5763b7d17d..471f3f4042a 100644 --- a/lib/locales/de.js +++ b/lib/locales/de.js @@ -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 diff --git a/lib/locales/es.js b/lib/locales/es.js index 0d8104a6335..ba523466fdd 100644 --- a/lib/locales/es.js +++ b/lib/locales/es.js @@ -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 diff --git a/lib/locales/fi.js b/lib/locales/fi.js index 0cbd9ba807c..2317d9b4c3d 100644 --- a/lib/locales/fi.js +++ b/lib/locales/fi.js @@ -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', diff --git a/lib/locales/fr.js b/lib/locales/fr.js index 818867ad4cc..aa5945d5a1c 100644 --- a/lib/locales/fr.js +++ b/lib/locales/fr.js @@ -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', diff --git a/lib/locales/it.js b/lib/locales/it.js index e4e44092d6b..73171b63647 100644 --- a/lib/locales/it.js +++ b/lib/locales/it.js @@ -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 diff --git a/lib/locales/ja.js b/lib/locales/ja.js index 0a682671ded..f8a20b547e9 100644 --- a/lib/locales/ja.js +++ b/lib/locales/ja.js @@ -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 diff --git a/lib/locales/ko.js b/lib/locales/ko.js index cee633b617d..999ed3ab0fd 100644 --- a/lib/locales/ko.js +++ b/lib/locales/ko.js @@ -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를 기본값으로 초기화', diff --git a/lib/locales/pt-br.js b/lib/locales/pt-br.js index 5829130a190..d6349098e78 100644 --- a/lib/locales/pt-br.js +++ b/lib/locales/pt-br.js @@ -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', diff --git a/lib/locales/pt-pt.js b/lib/locales/pt-pt.js index 205109db849..a65928f3fa7 100644 --- a/lib/locales/pt-pt.js +++ b/lib/locales/pt-pt.js @@ -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', diff --git a/lib/locales/ru.js b/lib/locales/ru.js index 3d9a9b50a40..c7cd7fab6b8 100644 --- a/lib/locales/ru.js +++ b/lib/locales/ru.js @@ -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': 'Сбросить параметры камеры к значениям по умолчанию', diff --git a/lib/locales/sv.js b/lib/locales/sv.js index 571b8e8b0bd..14c545522a4 100644 --- a/lib/locales/sv.js +++ b/lib/locales/sv.js @@ -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 diff --git a/lib/locales/sw.js b/lib/locales/sw.js index 9478bf5ad93..2ce9e2a7603 100644 --- a/lib/locales/sw.js +++ b/lib/locales/sw.js @@ -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', diff --git a/lib/locales/uk.js b/lib/locales/uk.js index 6d5f6eb06c7..aa98ada6fc9 100644 --- a/lib/locales/uk.js +++ b/lib/locales/uk.js @@ -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': 'Встановити камері значення за замовчуванням', diff --git a/lib/locales/zh-cn.js b/lib/locales/zh-cn.js index 09b5adc9b44..82b9bbdf9a4 100644 --- a/lib/locales/zh-cn.js +++ b/lib/locales/zh-cn.js @@ -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': '重置镜头视角为默认状态', diff --git a/src/components/modebar/modebar.js b/src/components/modebar/modebar.js index 143c3406668..35eec9fc6a6 100644 --- a/src/components/modebar/modebar.js +++ b/src/components/modebar/modebar.js @@ -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(); /** @@ -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 */ @@ -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.js'))); a.className = 'modebar-btn plotlyjsicon modebar-btn--logo'; a.appendChild(this.createIcon(Icons.newplotlylogo));