[DE mobile] Localization EditTable.

This commit is contained in:
Alexander Yuzhin 2016-11-21 11:19:56 +03:00 committed by Maxim Kadushkin
parent 235c476513
commit 932d5b3d10
4 changed files with 96 additions and 44 deletions

View file

@ -46,7 +46,7 @@ define([
], function (core) { ], function (core) {
'use strict'; 'use strict';
DE.Controllers.EditTable = Backbone.Controller.extend((function() { DE.Controllers.EditTable = Backbone.Controller.extend(_.extend((function() {
// Private // Private
var _stack = [], var _stack = [],
_metricText = Common.Utils.Metric.getCurrentMetricName(), _metricText = Common.Utils.Metric.getCurrentMetricName(),
@ -646,5 +646,5 @@ define([
} }
} }
} }
})()); })(), DE.Controllers.EditTable || {}))
}); });

View file

@ -26,12 +26,12 @@
</li> </li>
<li> <li>
<% if (!android) { %> <% if (!android) { %>
<a id="table-remove-all" class="item-link list-button" style="text-align: center; color: #f00">Remove Table</a> <a id="table-remove-all" class="item-link list-button" style="text-align: center; color: #f00"><%= scope.textRemoveTable %></a>
<% } %> <% } %>
</li> </li>
</ul> </ul>
<% if (android) { %> <% if (android) { %>
<a id="table-remove-all" class="button button-raised button-fill" style="margin: 20px 16px; background-color: #f44336;">Remove Table</a> <a id="table-remove-all" class="button button-raised button-fill" style="margin: 20px 16px; background-color: #f44336;"><%= scope.textRemoveTable %></a>
<% } %> <% } %>
</div> </div>
<div class="list-block"> <div class="list-block">
@ -40,7 +40,7 @@
<a id="table-options" class="item-link"> <a id="table-options" class="item-link">
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Table Options</div> <div class="item-title"><%= scope.textTableOptions %></div>
</div> </div>
</div> </div>
</a> </a>
@ -49,7 +49,7 @@
<a id="table-style" class="item-link"> <a id="table-style" class="item-link">
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Style</div> <div class="item-title"><%= scope.textStyle %></div>
</div> </div>
</div> </div>
</a> </a>
@ -58,7 +58,7 @@
<a id="table-wrap" class="item-link"> <a id="table-wrap" class="item-link">
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Wrap</div> <div class="item-title"><%= scope.textWrap %></div>
</div> </div>
</div> </div>
</a> </a>
@ -71,8 +71,8 @@
<div id="edit-table-wrap"> <div id="edit-table-wrap">
<div class="navbar"> <div class="navbar">
<div class="navbar-inner"> <div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span>Back</span><% } %></a></div> <div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding">Wrap</div> <div class="center sliding"><%= scope.textWrap %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div> <div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div> </div>
</div> </div>
@ -89,7 +89,7 @@
<div class="item-media"><i class="icon icon-search"></i></div> <div class="item-media"><i class="icon icon-search"></i></div>
<% } %> <% } %>
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Inline</div> <div class="item-title"><%= scope.textInline %></div>
</div> </div>
</label> </label>
</li> </li>
@ -102,7 +102,7 @@
<div class="item-media"><i class="icon icon-search"></i></div> <div class="item-media"><i class="icon icon-search"></i></div>
<% } %> <% } %>
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Flow</div> <div class="item-title"><%= scope.textFlow %></div>
</div> </div>
</label> </label>
</li> </li>
@ -113,7 +113,7 @@
<li id="table-move-text"> <li id="table-move-text">
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Move with Text</div> <div class="item-title"><%= scope.textWithText %></div>
<div class="item-after"> <div class="item-after">
<label class="label-switch"> <label class="label-switch">
<input type="checkbox"> <input type="checkbox">
@ -125,7 +125,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<div class="content-block-title flow">Distance from text</div> <div class="content-block-title flow"><%= scope.textFromText %></div>
<div class="list-block flow" style="margin-bottom: 40px;"> <div class="list-block flow" style="margin-bottom: 40px;">
<ul> <ul>
<li id="table-distance"> <li id="table-distance">
@ -142,7 +142,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<div class="content-block-title inline">Align</div> <div class="content-block-title inline"><%= scope.textAlign %></div>
<div class="list-block inline" style="margin-bottom: 40px;"> <div class="list-block inline" style="margin-bottom: 40px;">
<ul> <ul>
<li id="table-align"> <li id="table-align">
@ -166,8 +166,8 @@
<div id="edit-table-options"> <div id="edit-table-options">
<div class="navbar"> <div class="navbar">
<div class="navbar-inner"> <div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span>Back</span><% } %></a></div> <div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding">Options</div> <div class="center sliding"><%= scope.textOptions %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div> <div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div> </div>
</div> </div>
@ -178,7 +178,7 @@
<li id="table-option-repeatasheader"> <li id="table-option-repeatasheader">
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Repeat as Header Row</div> <div class="item-title"><%= scope.textRepeatHeader %></div>
<div class="item-after"> <div class="item-after">
<label class="label-switch"> <label class="label-switch">
<input type="checkbox"> <input type="checkbox">
@ -191,7 +191,7 @@
<li id="table-option-resizetofit"> <li id="table-option-resizetofit">
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Resize to Fit Content</div> <div class="item-title"><%= scope.textResizeFit %></div>
<div class="item-after"> <div class="item-after">
<label class="label-switch"> <label class="label-switch">
<input type="checkbox"> <input type="checkbox">
@ -203,7 +203,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<div class="content-block-title">Cell margins</div> <div class="content-block-title"><%= scope.textCellMargins %></div>
<div class="list-block" style="margin-bottom: 40px;"> <div class="list-block" style="margin-bottom: 40px;">
<ul> <ul>
<li id="table-options-margins"> <li id="table-options-margins">
@ -228,21 +228,21 @@
<div id="edit-table-style"> <div id="edit-table-style">
<div class="navbar"> <div class="navbar">
<div class="navbar-inner edit-table-style" data-page="edit-table-style"> <div class="navbar-inner edit-table-style" data-page="edit-table-style">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span>Back</span><% } %></a></div> <div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding categories"> <div class="center sliding categories">
<% if (android) { %> <% if (android) { %>
<div class="toolbar tabbar"> <div class="toolbar tabbar">
<div data-page="index" class="toolbar-inner"> <div data-page="index" class="toolbar-inner">
<a href="#tab-table-style" data-type="style" class="tab-link active">Style</a> <a href="#tab-table-style" data-type="style" class="tab-link active"><%= scope.textStyle %></a>
<a href="#tab-table-fill" data-type="fill" class="tab-link">Fill</a> <a href="#tab-table-fill" data-type="fill" class="tab-link"><%= scope.textFill %></a>
<a href="#tab-table-border" data-type="border" class="tab-link">Border</a> <a href="#tab-table-border" data-type="border" class="tab-link"><%= scope.textBorder %></a>
</div> </div>
</div> </div>
<% } else { %> <% } else { %>
<div class="buttons-row"> <div class="buttons-row">
<a href="#tab-table-style" data-type="style" class="tab-link button active">Style</a> <a href="#tab-table-style" data-type="style" class="tab-link button active"><%= scope.textStyle %></a>
<a href="#tab-table-fill" data-type="fill" class="tab-link button">Fill</a> <a href="#tab-table-fill" data-type="fill" class="tab-link button"><%= scope.textFill %></a>
<a href="#tab-table-border" data-type="border" class="tab-link button">Border</a> <a href="#tab-table-border" data-type="border" class="tab-link button"><%= scope.textBorder %></a>
</div> </div>
<% } %> <% } %>
</div> </div>
@ -268,7 +268,7 @@
<a id="edit-table-style-options" class="item-link"> <a id="edit-table-style-options" class="item-link">
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Style Options</div> <div class="item-title"><%= scope.textStyleOptions %></div>
</div> </div>
</div> </div>
</a> </a>
@ -283,7 +283,7 @@
<div class="list-block"> <div class="list-block">
<ul> <ul>
<li id="edit-table-bordersize"> <li id="edit-table-bordersize">
<div style="padding: 15px 0 0 15px;">Size</div> <div style="padding: 15px 0 0 15px;"><%= scope.textSize %></div>
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-input"> <div class="item-input">
@ -299,7 +299,7 @@
<a id="edit-table-bordercolor" class="item-link"> <a id="edit-table-bordercolor" class="item-link">
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Color</div> <div class="item-title"><%= scope.textColor %></div>
<div class="item-after"><div class="color-preview"></div></div> <div class="item-after"><div class="color-preview"></div></div>
</div> </div>
</div> </div>
@ -339,8 +339,8 @@
<div id="edit-table-style-options-view"> <div id="edit-table-style-options-view">
<div class="navbar"> <div class="navbar">
<div class="navbar-inner" data-page="edit-table-style-options"> <div class="navbar-inner" data-page="edit-table-style-options">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span>Back</span><% } %></a></div> <div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding">Options</div> <div class="center sliding"><%= scope.textOptions %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div> <div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div> </div>
</div> </div>
@ -351,7 +351,7 @@
<li id="table-options-header-row"> <li id="table-options-header-row">
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Header Row</div> <div class="item-title"><%= scope.textHeaderRow %></div>
<div class="item-after"> <div class="item-after">
<label class="label-switch"> <label class="label-switch">
<input type="checkbox"> <input type="checkbox">
@ -364,7 +364,7 @@
<li id="table-options-total-row"> <li id="table-options-total-row">
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Total Row</div> <div class="item-title"><%= scope.textTotalRow %></div>
<div class="item-after"> <div class="item-after">
<label class="label-switch"> <label class="label-switch">
<input type="checkbox"> <input type="checkbox">
@ -377,7 +377,7 @@
<li id="table-options-banded-row"> <li id="table-options-banded-row">
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Banded Row</div> <div class="item-title"><%= scope.textBandedRow %></div>
<div class="item-after"> <div class="item-after">
<label class="label-switch"> <label class="label-switch">
<input type="checkbox"> <input type="checkbox">
@ -394,7 +394,7 @@
<li id="table-options-first-column"> <li id="table-options-first-column">
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title">First Column</div> <div class="item-title"><%= scope.textFirstColumn %></div>
<div class="item-after"> <div class="item-after">
<label class="label-switch"> <label class="label-switch">
<input type="checkbox"> <input type="checkbox">
@ -407,7 +407,7 @@
<li id="table-options-last-column"> <li id="table-options-last-column">
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Last Column</div> <div class="item-title"><%= scope.textLastColumn %></div>
<div class="item-after"> <div class="item-after">
<label class="label-switch"> <label class="label-switch">
<input type="checkbox"> <input type="checkbox">
@ -420,7 +420,7 @@
<li id="table-options-banded-column"> <li id="table-options-banded-column">
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Banded Column</div> <div class="item-title"><%= scope.textBandedColumn %></div>
<div class="item-after"> <div class="item-after">
<label class="label-switch"> <label class="label-switch">
<input type="checkbox"> <input type="checkbox">
@ -440,8 +440,8 @@
<div id="edit-table-border-color-view"> <div id="edit-table-border-color-view">
<div class="navbar"> <div class="navbar">
<div class="navbar-inner" data-page="edit-table-border-color"> <div class="navbar-inner" data-page="edit-table-border-color">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span>Back</span><% } %></a></div> <div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding">Color</div> <div class="center sliding"><%= scope.textColor %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div> <div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div> </div>
</div> </div>

View file

@ -49,7 +49,7 @@ define([
], function (editTemplate, $, _, Backbone) { ], function (editTemplate, $, _, Backbone) {
'use strict'; 'use strict';
DE.Views.EditTable = Backbone.View.extend((function() { DE.Views.EditTable = Backbone.View.extend(_.extend((function() {
// private // private
var _styles = []; var _styles = [];
@ -87,7 +87,8 @@ define([
render: function () { render: function () {
this.layout = $('<div/>').append(this.template({ this.layout = $('<div/>').append(this.template({
android : Common.SharedSettings.get('android'), android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone') phone : Common.SharedSettings.get('phone'),
scope : this
})); }));
return this; return this;
@ -213,8 +214,33 @@ define([
showTableStyleOptions: function () { showTableStyleOptions: function () {
this.showPage('#edit-table-style-options-view'); this.showPage('#edit-table-style-options-view');
} },
textRemoveTable: 'Remove Table',
textTableOptions: 'Table Options',
textStyle: 'Style',
textWrap: 'Wrap',
textBack: 'Back',
textInline: 'Inline',
textFlow: 'Flow',
textWithText: 'Move with Text',
textFromText: 'Distance from Text',
textAlign: 'Align',
textOptions: 'Options',
textRepeatHeader: 'Repeat as Header Row',
textResizeFit: 'Resize to Fit Content',
textCellMargins: 'Cell Margins',
textFill: 'Fill',
textBorder: 'Border',
textStyleOptions: 'Style Options',
textSize: 'Size',
textColor: 'Color',
textHeaderRow: 'Header Row',
textTotalRow: 'Total Row',
textBandedRow: 'Banded Row',
textFirstColumn: 'First Column',
textLastColumn: 'Last Column',
textBandedColumn: 'Banded Column'
} }
})()); })(), DE.Views.EditTable || {}))
}); });

View file

@ -293,5 +293,31 @@
"DE.Views.EditShape.textEffects": "Effects", "DE.Views.EditShape.textEffects": "Effects",
"DE.Views.EditShape.textSize": "Size", "DE.Views.EditShape.textSize": "Size",
"DE.Views.EditShape.textColor": "Color", "DE.Views.EditShape.textColor": "Color",
"DE.Views.EditShape.textOpacity": "Opacity" "DE.Views.EditShape.textOpacity": "Opacity",
"DE.Views.EditTabletextRemoveTable": "Remove Table",
"DE.Views.EditTabletextTableOptions": "Table Options",
"DE.Views.EditTabletextStyle": "Style",
"DE.Views.EditTabletextWrap": "Wrap",
"DE.Views.EditTabletextBack": "Back",
"DE.Views.EditTabletextInline": "Inline",
"DE.Views.EditTabletextFlow": "Flow",
"DE.Views.EditTabletextWithText": "Move with Text",
"DE.Views.EditTabletextFromText": "Distance from Text",
"DE.Views.EditTabletextAlign": "Align",
"DE.Views.EditTabletextOptions": "Options",
"DE.Views.EditTabletextRepeatHeader": "Repeat as Header Row",
"DE.Views.EditTabletextResizeFit": "Resize to Fit Content",
"DE.Views.EditTabletextCellMargins": "Cell Margins",
"DE.Views.EditTabletextFill": "Fill",
"DE.Views.EditTabletextBorder": "Border",
"DE.Views.EditTabletextStyleOptions": "Style Options",
"DE.Views.EditTabletextSize": "Size",
"DE.Views.EditTabletextColor": "Color",
"DE.Views.EditTabletextHeaderRow": "Header Row",
"DE.Views.EditTabletextTotalRow": "Total Row",
"DE.Views.EditTabletextBandedRow": "Banded Row",
"DE.Views.EditTabletextFirstColumn": "First Column",
"DE.Views.EditTabletextLastColumn": "Last Column",
"DE.Views.EditTabletextBandedColumn": "Banded Column"
} }