From 4b70e94c85ebf63899f1d03aa3bb56ae99c0743e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 19 Sep 2019 13:31:23 +0300 Subject: [PATCH] [SSE] Add translation for table styles --- .../main/app/controller/Toolbar.js | 16 +++++++++++++--- apps/spreadsheeteditor/main/locale/en.json | 3 +++ apps/spreadsheeteditor/main/locale/ru.json | 3 +++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 17c508467..ad8d5848d 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -1633,10 +1633,18 @@ define([ }, onApiInitTableTemplates: function(images) { + var me = this; var store = this.getCollection('TableTemplates'); if (store) { var templates = []; _.each(images, function(item) { + var tip = item.asc_getDisplayName(); + if (item.asc_getType()==0) { + var arr = tip.split(' '), + last = arr.pop(); + arr = 'txtTable_' + arr.join(''); + tip = me[arr] ? me[arr] + ' ' + last : tip; + } templates.push({ name : item.asc_getName(), caption : item.asc_getDisplayName(), @@ -1644,13 +1652,12 @@ define([ imageUrl : item.asc_getImage(), allowSelected : true, selected : false, - tip : item.asc_getDisplayName() + tip : tip }); }); store.reset(templates); } - this.fillTableTemplates(); }, @@ -3789,7 +3796,10 @@ define([ txtInvalidRange: 'ERROR! Invalid cells range', errorMaxRows: 'ERROR! The maximum number of data series per chart is 255.', errorStockChart: 'Incorrect row order. To build a stock chart place the data on the sheet in the following order:
opening price, max price, min price, closing price.', - textPivot: 'Pivot Table' + textPivot: 'Pivot Table', + txtTable_TableStyleMedium: 'Table Style Medium', + txtTable_TableStyleDark: 'Table Style Dark', + txtTable_TableStyleLight: 'Table Style Light' }, SSE.Controllers.Toolbar || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 0766eea69..b3e7fafea 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -1088,6 +1088,9 @@ "SSE.Controllers.Toolbar.txtSymbol_zeta": "Zeta", "SSE.Controllers.Toolbar.warnLongOperation": "The operation you are about to perform might take rather much time to complete.
Are you sure you want to continue?", "SSE.Controllers.Toolbar.warnMergeLostData": "Only the data from the upper-left cell will remain in the merged cell.
Are you sure you want to continue?", + "SSE.Controllers.Toolbar.txtTable_TableStyleMedium": "Table Style Medium", + "SSE.Controllers.Toolbar.txtTable_TableStyleDark": "Table Style Dark", + "SSE.Controllers.Toolbar.txtTable_TableStyleLight": "Table Style Light", "SSE.Controllers.Viewport.textFreezePanes": "Freeze Panes", "SSE.Controllers.Viewport.textHideFBar": "Hide Formula Bar", "SSE.Controllers.Viewport.textHideGridlines": "Hide Gridlines", diff --git a/apps/spreadsheeteditor/main/locale/ru.json b/apps/spreadsheeteditor/main/locale/ru.json index a603284c4..d3dbaf4f2 100644 --- a/apps/spreadsheeteditor/main/locale/ru.json +++ b/apps/spreadsheeteditor/main/locale/ru.json @@ -1087,6 +1087,9 @@ "SSE.Controllers.Toolbar.txtSymbol_zeta": "Дзета", "SSE.Controllers.Toolbar.warnLongOperation": "Для завершения операции, которую вы собираетесь выполнить, может потребоваться довольно много времени.
Вы действительно хотите продолжить?", "SSE.Controllers.Toolbar.warnMergeLostData": "В объединенной ячейке останутся только данные из левой верхней ячейки.
Вы действительно хотите продолжить?", + "SSE.Controllers.Toolbar.txtTable_TableStyleMedium": "Стиль таблицы: средний", + "SSE.Controllers.Toolbar.txtTable_TableStyleDark": "Стиль таблицы: темный", + "SSE.Controllers.Toolbar.txtTable_TableStyleLight": "Стиль таблицы: светлый", "SSE.Controllers.Viewport.textFreezePanes": "Закрепить области", "SSE.Controllers.Viewport.textHideFBar": "Скрыть строку формул", "SSE.Controllers.Viewport.textHideGridlines": "Скрыть линии сетки",