diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index cdd4a681b..b3e145424 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -105,6 +105,7 @@ define([ var me = this; this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseWarning: false}; + this.translationTable = []; if (!Common.Utils.isBrowserSupported()){ Common.Utils.showBrowserRestriction(); @@ -129,16 +130,16 @@ define([ 'Your text here': this.txtArt }; styleNames.forEach(function(item){ - translate[item] = me['txtStyle_' + item.replace(/ /g, '_')] || item; + translate[item] = me.translationTable[item] = me['txtStyle_' + item.replace(/ /g, '_')] || item; }); - translate['Currency [0]'] = me.txtStyle_Currency + ' [0]'; - translate['Comma [0]'] = me.txtStyle_Comma + ' [0]'; + translate['Currency [0]'] = me.translationTable['Currency [0]'] = me.txtStyle_Currency + ' [0]'; + translate['Comma [0]'] = me.translationTable['Comma [0]'] = me.txtStyle_Comma + ' [0]'; for (var i=1; i<7; i++) { - translate['Accent'+i] = me.txtAccent + i; - translate['20% - Accent'+i] = '20% - ' + me.txtAccent + i; - translate['40% - Accent'+i] = '40% - ' + me.txtAccent + i; - translate['60% - Accent'+i] = '60% - ' + me.txtAccent + i; + translate['Accent'+i] = me.translationTable['Accent'+i] = me.txtAccent + i; + translate['20% - Accent'+i] = me.translationTable['20% - Accent'+i] = '20% - ' + me.txtAccent + i; + translate['40% - Accent'+i] = me.translationTable['40% - Accent'+i] = '40% - ' + me.txtAccent + i; + translate['60% - Accent'+i] = me.translationTable['60% - Accent'+i] = '60% - ' + me.txtAccent + i; } this.api = new Asc.spreadsheet_api({ diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index a3e3e4713..77b6e7ba0 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -1538,11 +1538,13 @@ define([ listStyles.menuPicker.store.reset([]); // remove all + var mainController = this.getApplication().getController('Main'); var merged_array = styles.asc_getDefaultStyles().concat(styles.asc_getDocStyles()); _.each(merged_array, function(style){ listStyles.menuPicker.store.add({ imageUrl: style.asc_getImage(), name : style.asc_getName(), + tip : mainController.translationTable[style.get_Name()] || style.get_Name(), uid : Common.UI.getId() }); }); diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 145977b16..e4202652e 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -727,7 +727,6 @@ define([ enableKeyEvents : true, itemWidth : 112, itemHeight : 38, - hint : this.tipCellStyle, menuMaxHeight : 226, lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth], beforeOpenHandler: function(e) {