[SSE] Add translation for conditional formats

This commit is contained in:
Julia Radzhabova 2021-01-28 21:38:00 +03:00
parent 30ebb561e6
commit cb608f56f7
4 changed files with 231 additions and 167 deletions

View file

@ -496,4 +496,58 @@ define(function(){ 'use strict';
}
}
})(), Common.define.chartData || {});
Common.define.conditionalData = _.extend( new(function() {
return {
textDate: 'Date',
textYesterday: 'Yesterday',
textToday: 'Today',
textTomorrow: 'Tomorrow',
textLast7days: 'In the last 7 days',
textLastWeek: 'Last week',
textThisWeek: 'This week',
textNextWeek: 'Next week',
textLastMonth: 'Last month',
textThisMonth: 'This month',
textNextMonth: 'Next month',
textText: 'Text',
textContains: 'Contains',
textNotContains: 'Does not contain',
textBegins: 'Begins with',
textEnds: 'Ends with',
textAverage: 'Average',
textAbove: 'Above',
textBelow: 'Below',
textEqAbove: 'Equal to or above',
textEqBelow: 'Equal to or below',
text1Above: '1 std dev above',
text1Below: '1 std dev below',
text2Above: '2 std dev above',
text2Below: '2 std dev below',
text3Above: '3 std dev above',
text3Below: '3 std dev below',
textGreater: 'Greater than',
textGreaterEq: 'Greater than or equal to',
textLess: 'Less than',
textLessEq: 'Less than or equal to',
textEqual: 'Equal to',
textNotEqual: 'Not equal to',
textBetween: 'Between',
textNotBetween: 'Not between',
textTop: 'Top',
textBottom: 'Bottom',
textBlank: 'Blank',
textError: 'Error',
textBlanks: 'Contains blanks',
textNotBlanks: 'Does not contain blanks',
textErrors: 'Contains errors',
textNotErrors: 'Does not contain errors',
textDuplicate: 'Duplicate',
textUnique: 'Unique',
textDataBar: 'Data bar',
textIconSets: 'Icon sets',
textFormula: 'Formula',
exampleText: 'AaBbCcYyZz'
}
})(), Common.define.conditionalData || {});
});

View file

@ -223,104 +223,104 @@ define([
name: this.textValue,
type: Asc.c_oAscCFType.cellIs,
rules: [
{ name: this.textGreater, subtype: Asc.c_oAscCFOperator.greaterThan},
{ name: this.textGreaterEq, subtype: Asc.c_oAscCFOperator.greaterThanOrEqual},
{ name: this.textLess, subtype: Asc.c_oAscCFOperator.lessThan},
{ name: this.textLessEq, subtype: Asc.c_oAscCFOperator.lessThanOrEqual},
{ name: this.textEqual, subtype: Asc.c_oAscCFOperator.equal},
{ name: this.textNotEqual, subtype: Asc.c_oAscCFOperator.notEqual},
{ name: this.textBetween, subtype: Asc.c_oAscCFOperator.between},
{ name: this.textNotBetween, subtype: Asc.c_oAscCFOperator.notBetween}
{ name: Common.define.conditionalData.textGreater, subtype: Asc.c_oAscCFOperator.greaterThan},
{ name: Common.define.conditionalData.textGreaterEq, subtype: Asc.c_oAscCFOperator.greaterThanOrEqual},
{ name: Common.define.conditionalData.textLess, subtype: Asc.c_oAscCFOperator.lessThan},
{ name: Common.define.conditionalData.textLessEq, subtype: Asc.c_oAscCFOperator.lessThanOrEqual},
{ name: Common.define.conditionalData.textEqual, subtype: Asc.c_oAscCFOperator.equal},
{ name: Common.define.conditionalData.textNotEqual, subtype: Asc.c_oAscCFOperator.notEqual},
{ name: Common.define.conditionalData.textBetween, subtype: Asc.c_oAscCFOperator.between},
{ name: Common.define.conditionalData.textNotBetween, subtype: Asc.c_oAscCFOperator.notBetween}
]
},
{
name: this.textRanked,
type: Asc.c_oAscCFType.top10,
rules: [
{ name: this.textTop, subtype: 0},
{ name: this.textBottom, subtype: 1}
{ name: Common.define.conditionalData.textTop, subtype: 0},
{ name: Common.define.conditionalData.textBottom, subtype: 1}
]
},
{
name: 'Average',
name: Common.define.conditionalData.textAverage,
type: Asc.c_oAscCFType.aboveAverage,
rules: [
{ name: 'Above', subtype: 0},
{ name: 'Below', subtype: 1},
{ name: 'Equal to or above', subtype: 2},
{ name: 'Equal to or below', subtype: 3},
{ name: '1 std dev above', subtype: 4},
{ name: '1 std dev below', subtype: 5},
{ name: '2 std dev above', subtype: 6},
{ name: '2 std dev below', subtype: 7},
{ name: '3 std dev above', subtype: 8},
{ name: '3 std dev below', subtype: 9}
{ name: Common.define.conditionalData.textAbove, subtype: 0},
{ name: Common.define.conditionalData.textBelow, subtype: 1},
{ name: Common.define.conditionalData.textEqAbove, subtype: 2},
{ name: Common.define.conditionalData.textEqBelow, subtype: 3},
{ name: Common.define.conditionalData.text1Above, subtype: 4},
{ name: Common.define.conditionalData.text1Below, subtype: 5},
{ name: Common.define.conditionalData.text2Above, subtype: 6},
{ name: Common.define.conditionalData.text2Below, subtype: 7},
{ name: Common.define.conditionalData.text3Above, subtype: 8},
{ name: Common.define.conditionalData.text3Below, subtype: 9}
]
},
{
name: 'Text',
name: Common.define.conditionalData.textText,
type: Asc.c_oAscCFType.containsText,
rules: [
{ name: 'Contains', type: Asc.c_oAscCFType.containsText },
{ name: 'Does not contain', type: Asc.c_oAscCFType.notContainsText },
{ name: 'Begins with', type: Asc.c_oAscCFType.beginsWith },
{ name: 'Ends with', type: Asc.c_oAscCFType.endsWith }
{ name: Common.define.conditionalData.textContains, type: Asc.c_oAscCFType.containsText },
{ name: Common.define.conditionalData.textNotContains, type: Asc.c_oAscCFType.notContainsText },
{ name: Common.define.conditionalData.textBegins, type: Asc.c_oAscCFType.beginsWith },
{ name: Common.define.conditionalData.textEnds, type: Asc.c_oAscCFType.endsWith }
]
},
{
name: 'Date',
name: Common.define.conditionalData.textDate,
type: Asc.c_oAscCFType.timePeriod,
rules: [
{ name: 'Yesterday', subtype: Asc.c_oAscTimePeriod.yesterday},
{ name: 'Today', subtype: Asc.c_oAscTimePeriod.today},
{ name: 'Tomorrow', subtype: Asc.c_oAscTimePeriod.tomorrow},
{ name: 'In the last 7 days', subtype: Asc.c_oAscTimePeriod.last7Days},
{ name: 'Last week', subtype: Asc.c_oAscTimePeriod.lastWeek},
{ name: 'This week', subtype: Asc.c_oAscTimePeriod.thisWeek},
{ name: 'Next week', subtype: Asc.c_oAscTimePeriod.nextWeek},
{ name: 'Last month', subtype: Asc.c_oAscTimePeriod.lastMonth},
{ name: 'This month', subtype: Asc.c_oAscTimePeriod.thisMonth},
{ name: 'Next month', subtype: Asc.c_oAscTimePeriod.nextMonth}
{ name: Common.define.conditionalData.textYesterday, subtype: Asc.c_oAscTimePeriod.yesterday},
{ name: Common.define.conditionalData.textToday, subtype: Asc.c_oAscTimePeriod.today},
{ name: Common.define.conditionalData.textTomorrow, subtype: Asc.c_oAscTimePeriod.tomorrow},
{ name: Common.define.conditionalData.textLast7days, subtype: Asc.c_oAscTimePeriod.last7Days},
{ name: Common.define.conditionalData.textLastWeek, subtype: Asc.c_oAscTimePeriod.lastWeek},
{ name: Common.define.conditionalData.textThisWeek, subtype: Asc.c_oAscTimePeriod.thisWeek},
{ name: Common.define.conditionalData.textNextWeek, subtype: Asc.c_oAscTimePeriod.nextWeek},
{ name: Common.define.conditionalData.textLastMonth, subtype: Asc.c_oAscTimePeriod.lastMonth},
{ name: Common.define.conditionalData.textThisMonth, subtype: Asc.c_oAscTimePeriod.thisMonth},
{ name: Common.define.conditionalData.textNextMonth, subtype: Asc.c_oAscTimePeriod.nextMonth}
]
},
{
name: 'Blank/Error',
name: Common.define.conditionalData.textBlank + '/' + Common.define.conditionalData.textError,
type: Asc.c_oAscCFType.containsBlanks,
rules: [
{ name: 'Contains blanks', type: Asc.c_oAscCFType.containsBlanks },
{ name: 'Does not contain blanks', type: Asc.c_oAscCFType.notContainsBlanks },
{ name: 'Contains errors', type: Asc.c_oAscCFType.containsErrors },
{ name: 'Does not contain errors', type: Asc.c_oAscCFType.notContainsErrors }
{ name: Common.define.conditionalData.textBlanks, type: Asc.c_oAscCFType.containsBlanks },
{ name: Common.define.conditionalData.textNotBlanks, type: Asc.c_oAscCFType.notContainsBlanks },
{ name: Common.define.conditionalData.textErrors, type: Asc.c_oAscCFType.containsErrors },
{ name: Common.define.conditionalData.textNotErrors, type: Asc.c_oAscCFType.notContainsErrors }
]
},
{
name: 'Duplicate/Unique',
name: Common.define.conditionalData.textDuplicate + '/' + Common.define.conditionalData.textUnique,
type: Asc.c_oAscCFType.duplicateValues,
rules: [
{ name: 'Duplicate', type: Asc.c_oAscCFType.duplicateValues },
{ name: 'Unique', type: Asc.c_oAscCFType.uniqueValues }
{ name: Common.define.conditionalData.textDuplicate, type: Asc.c_oAscCFType.duplicateValues },
{ name: Common.define.conditionalData.textUnique, type: Asc.c_oAscCFType.uniqueValues }
]
},
{
name: '2 Color scale',
name: this.text2Scales,
type: Asc.c_oAscCFType.colorScale,
num: 2
},
{
name: '3 Color scale',
name: this.text3Scales,
type: Asc.c_oAscCFType.colorScale,
num: 3
},
{
name: 'Data bar',
name: Common.define.conditionalData.textDataBar,
type: Asc.c_oAscCFType.dataBar
},
{
name: 'Icon sets',
name: Common.define.conditionalData.textIconSets,
type: Asc.c_oAscCFType.iconSet
},
{
name: 'Formula',
name: Common.define.conditionalData.textFormula,
type: Asc.c_oAscCFType.expression
}
];
@ -773,10 +773,10 @@ define([
this.lblMidScale = this.$window.find('#format-rules-edit-lbl-scale-2');
var data = [
{value: Asc.c_oAscCfvoType.Number, displayValue: 'Number'},
{value: Asc.c_oAscCfvoType.Percent, displayValue: 'Percentage'},
{value: Asc.c_oAscCfvoType.Formula, displayValue: 'Formula'},
{value: Asc.c_oAscCfvoType.Percentile, displayValue: 'Percentile'}
{value: Asc.c_oAscCfvoType.Number, displayValue: this.txtNumber},
{value: Asc.c_oAscCfvoType.Percent, displayValue: this.textPercent},
{value: Asc.c_oAscCfvoType.Formula, displayValue: this.textFormula},
{value: Asc.c_oAscCfvoType.Percentile, displayValue: this.textPercentile}
];
for (var i=0; i<3; i++) {
var arr = data;
@ -826,10 +826,10 @@ define([
var arr = data;
if (i==0) {
arr = [{value: Asc.c_oAscCfvoType.Minimum, displayValue: this.textMinimum}].concat(arr);
arr.push({value: Asc.c_oAscCfvoType.AutoMin, displayValue: 'Automatic'});
arr.push({value: Asc.c_oAscCfvoType.AutoMin, displayValue: this.textAutomatic});
} else {
arr = [{value: Asc.c_oAscCfvoType.Maximum, displayValue: this.textMaximum}].concat(arr);
arr.push({value: Asc.c_oAscCfvoType.AutoMax, displayValue: 'Automatic'});
arr.push({value: Asc.c_oAscCfvoType.AutoMax, displayValue: this.textAutomatic});
}
var combo = new Common.UI.ComboBox({
el : $('#format-rules-edit-combo-bar-' + (i+1)),
@ -867,8 +867,8 @@ define([
editable : false,
cls : 'input-group-nr',
data : [
{value: false, displayValue: 'Solid'},
{value: true, displayValue: 'Gradient'}
{value: false, displayValue: this.textSolid},
{value: true, displayValue: this.textGradient}
]
}).on('selected', function(combo, record) {
});
@ -904,8 +904,8 @@ define([
editable : false,
cls : 'input-group-nr',
data : [
{value: false, displayValue: 'Solid'},
{value: true, displayValue: 'None'}
{value: false, displayValue: this.textSolid},
{value: true, displayValue: this.textNone}
]
}).on('selected', function(combo, record) {
me.btnPosBorder.setDisabled(record.value);
@ -944,9 +944,9 @@ define([
editable : false,
cls : 'input-group-nr',
data : [
{value: Asc.c_oAscDataBarDirection.context, displayValue: 'Context'},
{value: Asc.c_oAscDataBarDirection.leftToRight, displayValue: 'Left to right'},
{value: Asc.c_oAscDataBarDirection.rightToLeft, displayValue: 'Right to left'}
{value: Asc.c_oAscDataBarDirection.context, displayValue: this.textContext},
{value: Asc.c_oAscDataBarDirection.leftToRight, displayValue: this.textLeft2Right},
{value: Asc.c_oAscDataBarDirection.rightToLeft, displayValue: this.textRight2Left}
]
}).on('selected', function(combo, record) {
});
@ -965,9 +965,9 @@ define([
editable : false,
cls : 'input-group-nr',
data : [
{value: Asc.c_oAscDataBarAxisPosition.automatic, displayValue: 'Automatic'},
{value: Asc.c_oAscDataBarAxisPosition.middle, displayValue: 'Cell midpoint'},
{value: Asc.c_oAscDataBarAxisPosition.none, displayValue: 'None'}
{value: Asc.c_oAscDataBarAxisPosition.automatic, displayValue: this.textAutomatic},
{value: Asc.c_oAscDataBarAxisPosition.middle, displayValue: this.textCellMidpoint},
{value: Asc.c_oAscDataBarAxisPosition.none, displayValue: this.textNone}
]
}).on('selected', function(combo, record) {
me.btnAxisColor.setDisabled(record.value == Asc.c_oAscDataBarAxisPosition.none);
@ -1188,7 +1188,7 @@ define([
var val = xfs.asc_getNumFormatInfo();
val && this.cmbNumberFormat.setValue(val.asc_getType(), this.textCustom);
}
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, this.exampleText);
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, Common.define.conditionalData.exampleText);
},
getSettings: function() {
@ -1366,21 +1366,21 @@ define([
onBoldClick: function() {
this.xfsFormat.asc_setFontBold(this.btnBold.isActive());
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, this.exampleText);
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, Common.define.conditionalData.exampleText);
},
onItalicClick: function() {
this.xfsFormat.asc_setFontItalic(this.btnItalic.isActive());
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, this.exampleText);
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, Common.define.conditionalData.exampleText);
},
onUnderlineClick: function() {
this.xfsFormat.asc_setFontUnderline(this.btnUnderline.isActive());
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, this.exampleText);
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, Common.define.conditionalData.exampleText);
},
onStrikeoutClick: function() {
this.xfsFormat.asc_setFontStrikeout(this.btnStrikeout.isActive());
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, this.exampleText);
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, Common.define.conditionalData.exampleText);
},
onBordersWidth: function(menu, item, state) {
@ -1445,7 +1445,7 @@ define([
}
this.xfsFormat.asc_setFontStrikeout(this.btnStrikeout.isActive());
this.xfsFormat.asc_setBorder(new_borders);
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, this.exampleText);
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, Common.define.conditionalData.exampleText);
}
},
@ -1456,7 +1456,7 @@ define([
picker.currentColor = color;
this.xfsFormat.asc_setFontColor(Common.Utils.ThemeColor.getRgbColor(this.mnuTextColorPicker.currentColor));
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, this.exampleText);
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, Common.define.conditionalData.exampleText);
},
onFormatTextColor: function(btn, e) {
@ -1470,7 +1470,7 @@ define([
picker.currentColor = color;
this.xfsFormat.asc_setFillColor(this.mnuFillColorPicker.currentColor == 'transparent' ? null : Common.Utils.ThemeColor.getRgbColor(this.mnuFillColorPicker.currentColor));
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, this.exampleText);
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, Common.define.conditionalData.exampleText);
},
onFormatFillColor: function(picker, btn, e) {
@ -1479,7 +1479,7 @@ define([
onNumberFormatSelect: function(combo, record) {
this.xfsFormat.asc_setNumFormatInfo(record.format);
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, this.exampleText);
this.api.asc_getPreviewCF('format-rules-edit-preview-format', this.xfsFormat, Common.define.conditionalData.exampleText);
},
updateThemeColors: function() {
@ -1552,24 +1552,7 @@ define([
notcriticalErrorTitle: 'Warning',
textFormat: 'Format',
textValue: 'Value is',
textGreater: 'Greater than',
textGreaterEq: 'Greater than or equal to',
textLess: 'Less than',
textLessEq: 'Less than or equal to',
textEqual: 'Equal to',
textNotEqual: 'Not equal to',
textBetween: 'Between',
textNotBetween: 'Not between',
textRanked: 'Ranked',
textTop: 'Top',
textBottom: 'Bottom',
textText: 'Text',
textDate: 'Date',
textBlank: 'Blank',
textDuplicate: 'Duplicate',
textDataBars: 'Data Bars',
textColorScales: 'Color Scales',
textIconSets: 'Icon Sets',
textCustom: 'Custom',
textBold: 'Bold',
textItalic: 'Italic',
@ -1613,7 +1596,19 @@ define([
textNewColor: 'Add New Custom Color',
tipNumFormat: 'Number Format',
textPreview: 'Preview',
exampleText: 'AaBbCcYyZz'
text2Scales: '2 Color scale',
text3Scales: '3 Color scale',
textPercent: 'Percent',
textFormula: 'Formula',
textPercentile: 'Percentile',
textAutomatic: 'Automatic',
textContext: 'Context',
textLeft2Right: 'Left to right',
textRight2Left: 'Right to left',
textNone: 'None',
textSolid: 'Solid',
textCellMidpoint: 'Cell midpoint',
textGradient: 'Gradient'
}, SSE.Views.FormatRulesEditDlg || {}));
});

View file

@ -271,7 +271,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesManagerDlg.templa
var name = '';
switch (rule.asc_getType()) {
case Asc.c_oAscCFType.aboveAverage:
name = 'Above average';
name = this.textAbove;
var above = rule.asc_getAboveAverage(),
eq = rule.asc_getEqualAverage(),
stddev = rule.asc_getStdDev();
@ -283,42 +283,42 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesManagerDlg.templa
}
switch (subtype) {
case 0:
name = 'Above average';
name = this.textAbove;
break;
case 1:
name = 'Below average';
name = this.textBelow;
break;
case 2:
name = 'Equal to or above average';
name = this.textEqAbove;
break;
case 3:
name = 'Equal to or below average';
name = this.textEqBelow;
break;
case 4:
name = '1 std dev above average';
name = this.text1Above;
break;
case 5:
name = '1 std dev below average';
name = this.text1Below;
break;
case 6:
name = '2 std dev above average';
name = this.text2Above;
break;
case 7:
name = '2 std dev below average';
name = this.text2Below;
break;
case 8:
name = '3 std dev above average';
name = this.text3Above;
break;
case 9:
name = '3 std dev below average';
name = this.text3Below;
break;
}
break;
case Asc.c_oAscCFType.beginsWith:
name = 'Cell value begins with ' + (rule.asc_getContainsText() || '');
name = this.textBeginsWith + ' ' + (rule.asc_getContainsText() || '');
break;
case Asc.c_oAscCFType.cellIs:
name = 'Cell value';
name = this.textCellValue;
var subtype = rule.asc_getOperator(),
op;
switch (subtype) {
@ -347,90 +347,90 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesManagerDlg.templa
name = name + ' ' + op + ' ' + (rule.asc_getValue1() || '');
break;
case Asc.c_oAscCFOperator.between:
name = name + ' ' + Common.Utils.String.format('is between {0} and {1}', (rule.asc_getValue1() || ''), (rule.asc_getValue2() || ''));
name = name + ' ' + Common.Utils.String.format(this.textBetween, (rule.asc_getValue1() || ''), (rule.asc_getValue2() || ''));
break;
case Asc.c_oAscCFOperator.notBetween:
name = name + ' ' + Common.Utils.String.format('is not between {0} and {1}', (rule.asc_getValue1() || ''), (rule.asc_getValue2() || ''));
name = name + ' ' + Common.Utils.String.format(this.textNotBetween, (rule.asc_getValue1() || ''), (rule.asc_getValue2() || ''));
break;
}
break;
case Asc.c_oAscCFType.colorScale:
name = 'Graded color scale';
name = this.textColorScale;
break;
case Asc.c_oAscCFType.containsBlanks:
name = 'Cell contains a blank value';
name = this.textContainsBlank;
break;
case Asc.c_oAscCFType.containsErrors:
name = 'Cell contains an error';
name = this.textContainsError;
break;
case Asc.c_oAscCFType.containsText:
name = 'Cell value contains ' + (rule.asc_getContainsText() || '');
name = this.textContains + ' ' + (rule.asc_getContainsText() || '');
break;
case Asc.c_oAscCFType.dataBar:
name = 'Column';
name = Common.define.conditionalData.textDataBar;
break;
case Asc.c_oAscCFType.duplicateValues:
name = 'Duplicate values';
name = this.textDuplicate;
break;
case Asc.c_oAscCFType.expression:
name = 'Formula: ' + (rule.asc_getValue1() || '');
name = Common.define.conditionalData.textFormula + ': ' + (rule.asc_getValue1() || '');
break;
case Asc.c_oAscCFType.iconSet:
name = 'Icon set';
name = this.textIconSet;
break;
case Asc.c_oAscCFType.notContainsBlanks:
name = 'Cell does not contain a blank value';
name = this.textNotContainsBlank;
break;
case Asc.c_oAscCFType.notContainsErrors:
name = 'Cell does not contain an error';
name = this.textNotContainsError;
break;
case Asc.c_oAscCFType.notContainsText:
name = 'Cell value does not contain ' + (rule.asc_getContainsText() || '');
name = this.textNotContains + ' ' + (rule.asc_getContainsText() || '');
break;
case Asc.c_oAscCFType.timePeriod:
var subtype = rule.asc_getTimePeriod();
switch (subtype) {
case Asc.c_oAscTimePeriod.yesterday:
name = 'Yesterday';
name = Common.define.conditionalData.textYesterday;
break;
case Asc.c_oAscTimePeriod.today:
name = 'Today';
name = Common.define.conditionalData.textToday;
break;
case Asc.c_oAscTimePeriod.tomorrow:
name = 'Tomorrow';
name = Common.define.conditionalData.textTomorrow;
break;
case Asc.c_oAscTimePeriod.last7Days:
name = 'In the last 7 days';
name = Common.define.conditionalData.textLast7days;
break;
case Asc.c_oAscTimePeriod.lastWeek:
name = 'Last week';
name = Common.define.conditionalData.textLastWeek;
break;
case Asc.c_oAscTimePeriod.thisWeek:
name = 'This week';
name = Common.define.conditionalData.textThisWeek;
break;
case Asc.c_oAscTimePeriod.nextWeek:
name = 'Next week';
name = Common.define.conditionalData.textNextWeek;
break;
case Asc.c_oAscTimePeriod.lastMonth:
name = 'Last month';
name = Common.define.conditionalData.textLastMonth;
break;
case Asc.c_oAscTimePeriod.thisMonth:
name = 'This month';
name = Common.define.conditionalData.textThisMonth;
break;
case Asc.c_oAscTimePeriod.nextMonth:
name = 'Next month';
name = Common.define.conditionalData.textNextMonth;
break;
}
break;
case Asc.c_oAscCFType.top10:
name = rule.asc_getBottom() ? 'Bottom' : 'Top';
name = rule.asc_getBottom() ? Common.define.conditionalData.textBottom : Common.define.conditionalData.textTop;
name = name + ' ' + (rule.asc_getRank()) + (rule.asc_getPercent() ? '%' : '');
break;
case Asc.c_oAscCFType.uniqueValues:
name = 'Unique values';
name = this.textUnique;
break;
case Asc.c_oAscCFType.endsWith:
name = 'Cell value ends with ' + (rule.asc_getContainsText() || '');
name = this.textEnds + ' ' + (rule.asc_getContainsText() || '');
break;
}
return name;
@ -473,7 +473,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesManagerDlg.templa
if (type == Asc.c_oAscCFType.containsText || type == Asc.c_oAscCFType.notContainsText || type == Asc.c_oAscCFType.beginsWith ||
type == Asc.c_oAscCFType.endsWith || type == Asc.c_oAscCFType.timePeriod || type == Asc.c_oAscCFType.aboveAverage ||
type == Asc.c_oAscCFType.top10 || type == Asc.c_oAscCFType.cellIs || type == Asc.c_oAscCFType.expression) {
this.api.asc_getPreviewCF(this.rules[rule.get('ruleIndex')].previewDiv, props.asc_getDxf(), this.exampleText);
this.api.asc_getPreviewCF(this.rules[rule.get('ruleIndex')].previewDiv, props.asc_getDxf(), Common.define.conditionalData.exampleText);
}
},
@ -656,7 +656,31 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesManagerDlg.templa
textApply: 'Apply to',
textFormat: 'Format',
textSelectData: 'Select data',
exampleText: 'AaBbCcYyZz'
textAbove: 'Above average',
textBelow: 'Below average',
textEqAbove: 'Equal to or above average',
textEqBelow: 'Equal to or below average',
text1Above: '1 std dev above average',
text1Below: '1 std dev below average',
text2Above: '2 std dev above average',
text2Below: '2 std dev below average',
text3Above: '3 std dev above average',
text3Below: '3 std dev below average',
textBeginsWith: 'Cell value begins with',
textCellValue: 'Cell value',
textBetween: 'is between {0} and {1}',
textNotBetween: 'is not between {0} and {1}',
textColorScale: 'Graded color scale',
textContainsBlank: 'Cell contains a blank value',
textContainsError: 'Cell contains an error',
textContains: 'Cell value contains',
textNotContains: 'Cell value does not contain',
textNotContainsError: 'Cell does not contain an error',
textNotContainsBlank: 'Cell does not contain a blank value',
textEnds: 'Cell value ends with',
textIconSet: 'Icon set',
textDuplicate: 'Duplicate values',
textUnique: 'Unique values'
}, SSE.Views.FormatRulesManagerDlg || {}));
});

View file

@ -1903,23 +1903,23 @@ define([
this.btnCondFormat.setMenu( new Common.UI.Menu({
items: [
{
caption : this.textGreater,
caption : Common.define.conditionalData.textGreater,
type : Asc.c_oAscCFType.cellIs,
value : Asc.c_oAscCFOperator.greaterThan
},
{
caption : this.textLess,
caption : Common.define.conditionalData.textLess,
type : Asc.c_oAscCFType.cellIs,
value : Asc.c_oAscCFOperator.lessThan
},
{
caption : this.textEqual,
caption : Common.define.conditionalData.textEqual,
type : Asc.c_oAscCFType.cellIs,
value : Asc.c_oAscCFOperator.equal
},
{caption: '--'},
{
caption : this.textBetween,
caption : Common.define.conditionalData.textBetween,
type : Asc.c_oAscCFType.cellIs,
value : Asc.c_oAscCFOperator.between
},
@ -1930,43 +1930,43 @@ define([
},
{caption: '--'},
{
caption : this.textText,
caption : Common.define.conditionalData.textText,
menu : new Common.UI.Menu({
menuAlign : 'tl-tr',
items: [
{ caption: 'Contains', type: Asc.c_oAscCFType.containsText },
{ caption: 'Does not contain', type: Asc.c_oAscCFType.notContainsText },
{ caption: 'Begins with', type: Asc.c_oAscCFType.beginsWith },
{ caption: 'Ends with', type: Asc.c_oAscCFType.endsWith }
{ caption: Common.define.conditionalData.textContains, type: Asc.c_oAscCFType.containsText },
{ caption: Common.define.conditionalData.textNotContains, type: Asc.c_oAscCFType.notContainsText },
{ caption: Common.define.conditionalData.textBegins, type: Asc.c_oAscCFType.beginsWith },
{ caption: Common.define.conditionalData.textEnds, type: Asc.c_oAscCFType.endsWith }
]
})
},
{caption: '--'},
{
caption : this.textDate,
caption : Common.define.conditionalData.textDate,
menu : new Common.UI.Menu({
menuAlign : 'tl-tr',
items: [
{ caption: 'Yesterday', type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.yesterday },
{ caption: 'Today', type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.today},
{ caption: 'Tomorrow', type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.tomorrow},
{ caption: 'In the last 7 days', type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.last7Days},
{ caption: 'Last week', type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.lastWeek},
{ caption: 'This week', type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.thisWeek},
{ caption: 'Next week', type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.nextWeek},
{ caption: 'Last month', type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.lastMonth},
{ caption: 'This month', type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.thisMonth},
{ caption: 'Next month', type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.nextMonth}
{ caption: Common.define.conditionalData.textYesterday, type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.yesterday },
{ caption: Common.define.conditionalData.textToday, type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.today},
{ caption: Common.define.conditionalData.textTomorrow, type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.tomorrow},
{ caption: Common.define.conditionalData.textLast7days, type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.last7Days},
{ caption: Common.define.conditionalData.textLastWeek, type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.lastWeek},
{ caption: Common.define.conditionalData.textThisWeek, type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.thisWeek},
{ caption: Common.define.conditionalData.textNextWeek, type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.nextWeek},
{ caption: Common.define.conditionalData.textLastMonth, type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.lastMonth},
{ caption: Common.define.conditionalData.textThisMonth, type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.thisMonth},
{ caption: Common.define.conditionalData.textNextMonth, type: Asc.c_oAscCFType.timePeriod, value: Asc.c_oAscTimePeriod.nextMonth}
]
})
},
{caption: '--'},
{
caption : this.textBlank,
caption : Common.define.conditionalData.textBlank,
type : Asc.c_oAscCFType.containsBlanks
},
{
caption : this.textDuplicate,
caption : Common.define.conditionalData.textDuplicate,
type : Asc.c_oAscCFType.duplicateValues
},
{caption: '--'},
@ -1987,7 +1987,7 @@ define([
})
},
{
caption : this.textIconSets,
caption : Common.define.conditionalData.textIconSets,
type : Asc.c_oAscCFType.iconSet,
menu : new Common.UI.Menu({
menuAlign : 'tl-tr',
@ -1996,7 +1996,7 @@ define([
},
{caption: '--'},
{
caption : 'Formula',
caption : Common.define.conditionalData.textFormula,
type : Asc.c_oAscCFType.expression
},
{caption: '--'},
@ -2558,18 +2558,9 @@ define([
tipPrintTitles: 'Print titles',
capBtnColorSchemas: 'Color Scheme',
tipCondFormat: 'Conditional formatting',
textGreater: 'Greater Than',
textLess: 'Less Than',
textEqual: 'Equal To',
textBetween: 'Between',
textTop10: 'Top 10',
textText: 'Text',
textDate: 'Date',
textBlank: 'Blank',
textDuplicate: 'Duplicate',
textDataBars: 'Data Bars',
textColorScales: 'Color Scales',
textIconSets: 'Icon Sets',
textNewRule: 'New Rule',
textClearRule: 'Clear Rules',
textSelection: 'From current selection',