diff --git a/src/i18n/locale/en.js b/src/i18n/locale/en.js index 962b5424b..972acbe14 100644 --- a/src/i18n/locale/en.js +++ b/src/i18n/locale/en.js @@ -23,5 +23,19 @@ export default { mobileLandscape: 'Mobile Landscape', mobilePortrait: 'Mobile Portrait' } + }, + panels: { + buttons: { + titles: { + preview: 'Preview', + fullscreen: 'Fullscreen', + 'sw-visibility': 'View components', + 'export-template': 'View code', + 'open-sm': 'Open Style Manager', + 'open-tm': 'Settings', + 'open-layers': 'Open Layer Manager', + 'open-blocks': 'Open Blocks' + } + } } }; diff --git a/src/i18n/locale/tr.js b/src/i18n/locale/tr.js index f83a1ed2c..d1393aaea 100644 --- a/src/i18n/locale/tr.js +++ b/src/i18n/locale/tr.js @@ -13,6 +13,20 @@ export default { mobilePortrait: 'Mobil Dikey' } }, + panels: { + buttons: { + titles: { + preview: 'Önizleme', + fullscreen: 'Tam Ekran', + 'sw-visibility': 'Bileşenleri Göster', + 'export-template': 'Kodu Göster', + 'open-sm': 'Stil Düzenleyiciyi Aç', + 'open-tm': 'Ayarlar', + 'open-layers': 'Katmanlar', + 'open-blocks': 'Bloklar' + } + } + }, styleManager: { noEl: 'Stilini düzenlemek istediğiniz öğeyi seçiniz', selectedLabel: 'Seçili', @@ -157,15 +171,5 @@ export default { clear: 'Renk Seçimini Temizle', noColor: 'Renk Seçilmedi' } - }, - buttons: { - preview: 'Önizleme', - 'sw-visibility': 'Bileşenleri Göster', - fullscreen: 'Tam Ekran', - 'export-template': 'Kodu Göster', - 'open-sm': 'Stil Düzenleyiciyi Aç', - 'open-tm': 'Ayarlar', - 'open-layers': 'Katmanlar', - 'open-blocks': 'Bloklar' } }; diff --git a/src/panels/config/config.js b/src/panels/config/config.js index 11b0e475e..b24a24315 100644 --- a/src/panels/config/config.js +++ b/src/panels/config/config.js @@ -1,11 +1,11 @@ -var swv = 'sw-visibility'; -var expt = 'export-template'; -var osm = 'open-sm'; -var otm = 'open-tm'; -var ola = 'open-layers'; -var obl = 'open-blocks'; -var ful = 'fullscreen'; -var prv = 'preview'; +const swv = 'sw-visibility'; +const expt = 'export-template'; +const osm = 'open-sm'; +const otm = 'open-tm'; +const ola = 'open-layers'; +const obl = 'open-blocks'; +const ful = 'fullscreen'; +const prv = 'preview'; export default { stylePrefix: 'pn-', diff --git a/src/panels/view/ButtonView.js b/src/panels/view/ButtonView.js index fb4063322..f450ddcf3 100644 --- a/src/panels/view/ButtonView.js +++ b/src/panels/view/ButtonView.js @@ -55,7 +55,12 @@ export default Backbone.View.extend({ * @return void * */ updateAttributes() { - this.$el.attr(this.model.get('attributes')); + const { em, model, $el } = this; + const attr = model.get('attributes') || {}; + const title = em && em.t(`panels.buttons.titles.${model.id}`); + $el.attr(attr); + title && $el.attr({ title }); + this.updateClassName(); },