Set translations for chars and textarts using api config.
This commit is contained in:
parent
b455ba0a12
commit
443620cdb3
|
@ -123,7 +123,14 @@ define([
|
||||||
|
|
||||||
window["flat_desine"] = true;
|
window["flat_desine"] = true;
|
||||||
this.api = new Asc.asc_docs_api({
|
this.api = new Asc.asc_docs_api({
|
||||||
'id-view' : 'editor_sdk'
|
'id-view' : 'editor_sdk',
|
||||||
|
'translate': {
|
||||||
|
'Series': this.txtSeries,
|
||||||
|
'Diagram Title': this.txtDiagramTitle,
|
||||||
|
'X Axis': this.txtXAxis,
|
||||||
|
'Y Axis': this.txtYAxis,
|
||||||
|
'Your text here': this.txtArt
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.api){
|
if (this.api){
|
||||||
|
@ -1046,19 +1053,6 @@ define([
|
||||||
|
|
||||||
this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this));
|
this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this));
|
||||||
this.api.asc_registerCallback('asc_onDownloadUrl', _.bind(this.onDownloadUrl, this));
|
this.api.asc_registerCallback('asc_onDownloadUrl', _.bind(this.onDownloadUrl, this));
|
||||||
|
|
||||||
if (this.api) {
|
|
||||||
var translateChart = new Asc.asc_CChartTranslate();
|
|
||||||
translateChart.asc_setTitle(this.txtDiagramTitle);
|
|
||||||
translateChart.asc_setXAxis(this.txtXAxis);
|
|
||||||
translateChart.asc_setYAxis(this.txtYAxis);
|
|
||||||
translateChart.asc_setSeries(this.txtSeries);
|
|
||||||
this.api.asc_setChartTranslate(translateChart);
|
|
||||||
|
|
||||||
var translateArt = new Asc.asc_TextArtTranslate();
|
|
||||||
translateArt.asc_setDefaultText(this.txtArt);
|
|
||||||
this.api.asc_setTextArtTranslate(translateArt);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
applyModeEditorElements: function() {
|
applyModeEditorElements: function() {
|
||||||
|
|
|
@ -103,7 +103,14 @@ define([
|
||||||
|
|
||||||
me.api = new Asc.asc_docs_api({
|
me.api = new Asc.asc_docs_api({
|
||||||
'id-view' : 'editor_sdk',
|
'id-view' : 'editor_sdk',
|
||||||
'mobile' : true
|
'mobile' : true,
|
||||||
|
'translate': {
|
||||||
|
'Series': me.txtSeries,
|
||||||
|
'Diagram Title': me.txtDiagramTitle,
|
||||||
|
'X Axis': me.txtXAxis,
|
||||||
|
'Y Axis': me.txtYAxis,
|
||||||
|
'Your text here': me.txtArt
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Localization uiApp params
|
// Localization uiApp params
|
||||||
|
@ -644,17 +651,6 @@ define([
|
||||||
if (me.api) {
|
if (me.api) {
|
||||||
me.api.asc_registerCallback('asc_onSendThemeColors', _.bind(me.onSendThemeColors, me));
|
me.api.asc_registerCallback('asc_onSendThemeColors', _.bind(me.onSendThemeColors, me));
|
||||||
me.api.asc_registerCallback('asc_onDownloadUrl', _.bind(me.onDownloadUrl, me));
|
me.api.asc_registerCallback('asc_onDownloadUrl', _.bind(me.onDownloadUrl, me));
|
||||||
|
|
||||||
var translateChart = new Asc.asc_CChartTranslate();
|
|
||||||
translateChart.asc_setTitle(me.txtDiagramTitle);
|
|
||||||
translateChart.asc_setXAxis(me.txtXAxis);
|
|
||||||
translateChart.asc_setYAxis(me.txtYAxis);
|
|
||||||
translateChart.asc_setSeries(me.txtSeries);
|
|
||||||
me.api.asc_setChartTranslate(translateChart);
|
|
||||||
|
|
||||||
var translateArt = new Asc.asc_TextArtTranslate();
|
|
||||||
translateArt.asc_setDefaultText(me.txtArt);
|
|
||||||
me.api.asc_setTextArtTranslate(translateArt);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,14 @@ define([
|
||||||
|
|
||||||
window["flat_desine"] = true;
|
window["flat_desine"] = true;
|
||||||
this.api = new Asc.asc_docs_api({
|
this.api = new Asc.asc_docs_api({
|
||||||
'id-view' : 'editor_sdk'
|
'id-view' : 'editor_sdk',
|
||||||
|
'translate': {
|
||||||
|
'Series': this.txtSeries,
|
||||||
|
'Diagram Title': this.txtDiagramTitle,
|
||||||
|
'X Axis': this.txtXAxis,
|
||||||
|
'Y Axis': this.txtYAxis,
|
||||||
|
'Your text here': this.txtArt
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.api){
|
if (this.api){
|
||||||
|
@ -804,19 +811,6 @@ define([
|
||||||
|
|
||||||
this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this));
|
this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this));
|
||||||
this.api.asc_registerCallback('asc_onDownloadUrl', _.bind(this.onDownloadUrl, this));
|
this.api.asc_registerCallback('asc_onDownloadUrl', _.bind(this.onDownloadUrl, this));
|
||||||
|
|
||||||
if (this.api) {
|
|
||||||
var translateChart = new Asc.asc_CChartTranslate();
|
|
||||||
translateChart.asc_setTitle(this.txtDiagramTitle);
|
|
||||||
translateChart.asc_setXAxis(this.txtXAxis);
|
|
||||||
translateChart.asc_setYAxis(this.txtYAxis);
|
|
||||||
translateChart.asc_setSeries(this.txtSeries);
|
|
||||||
this.api.asc_setChartTranslate(translateChart);
|
|
||||||
|
|
||||||
var translateArt = new Asc.asc_TextArtTranslate();
|
|
||||||
translateArt.asc_setDefaultText(this.txtArt);
|
|
||||||
this.api.asc_setTextArtTranslate(translateArt);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
applyModeEditorElements: function(prevmode) {
|
applyModeEditorElements: function(prevmode) {
|
||||||
|
|
|
@ -98,7 +98,14 @@ define([
|
||||||
|
|
||||||
me.api = new Asc.asc_docs_api({
|
me.api = new Asc.asc_docs_api({
|
||||||
'id-view' : 'editor_sdk',
|
'id-view' : 'editor_sdk',
|
||||||
'mobile' : true
|
'mobile' : true,
|
||||||
|
'translate': {
|
||||||
|
'Series': me.txtSeries,
|
||||||
|
'Diagram Title': me.txtDiagramTitle,
|
||||||
|
'X Axis': me.txtXAxis,
|
||||||
|
'Y Axis': me.txtYAxis,
|
||||||
|
'Your text here': me.txtArt
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Localization uiApp params
|
// Localization uiApp params
|
||||||
|
@ -603,17 +610,6 @@ define([
|
||||||
if (me.api) {
|
if (me.api) {
|
||||||
me.api.asc_registerCallback('asc_onSendThemeColors', _.bind(me.onSendThemeColors, me));
|
me.api.asc_registerCallback('asc_onSendThemeColors', _.bind(me.onSendThemeColors, me));
|
||||||
me.api.asc_registerCallback('asc_onDownloadUrl', _.bind(me.onDownloadUrl, me));
|
me.api.asc_registerCallback('asc_onDownloadUrl', _.bind(me.onDownloadUrl, me));
|
||||||
|
|
||||||
var translateChart = new Asc.asc_CChartTranslate();
|
|
||||||
translateChart.asc_setTitle(me.txtDiagramTitle);
|
|
||||||
translateChart.asc_setXAxis(me.txtXAxis);
|
|
||||||
translateChart.asc_setYAxis(me.txtYAxis);
|
|
||||||
translateChart.asc_setSeries(me.txtSeries);
|
|
||||||
me.api.asc_setChartTranslate(translateChart);
|
|
||||||
|
|
||||||
var translateArt = new Asc.asc_TextArtTranslate();
|
|
||||||
translateArt.asc_setDefaultText(me.txtArt);
|
|
||||||
me.api.asc_setTextArtTranslate(translateArt);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,14 @@ define([
|
||||||
// Initialize api
|
// Initialize api
|
||||||
this.api = new Asc.spreadsheet_api({
|
this.api = new Asc.spreadsheet_api({
|
||||||
'id-view' : 'editor_sdk',
|
'id-view' : 'editor_sdk',
|
||||||
'id-input' : 'ce-cell-content'
|
'id-input' : 'ce-cell-content',
|
||||||
|
'translate': {
|
||||||
|
'Series': this.txtSeries,
|
||||||
|
'Diagram Title': this.txtDiagramTitle,
|
||||||
|
'X Axis': this.txtXAxis,
|
||||||
|
'Y Axis': this.txtYAxis,
|
||||||
|
'Your text here': this.txtArt
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.api.asc_setFontRenderingMode(parseInt(value));
|
this.api.asc_setFontRenderingMode(parseInt(value));
|
||||||
|
|
||||||
|
@ -851,19 +858,6 @@ define([
|
||||||
},this));
|
},this));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.api) {
|
|
||||||
var translateChart = new Asc.asc_CChartTranslate();
|
|
||||||
translateChart.asc_setTitle(this.txtDiagramTitle);
|
|
||||||
translateChart.asc_setXAxis(this.txtXAxis);
|
|
||||||
translateChart.asc_setYAxis(this.txtYAxis);
|
|
||||||
translateChart.asc_setSeries(this.txtSeries);
|
|
||||||
this.api.asc_setChartTranslate(translateChart);
|
|
||||||
|
|
||||||
var translateArt = new Asc.asc_TextArtTranslate();
|
|
||||||
translateArt.asc_setDefaultText(this.txtArt);
|
|
||||||
this.api.asc_setTextArtTranslate(translateArt);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.appOptions.isEditMailMerge && !this.appOptions.isEditDiagram) {
|
if (!this.appOptions.isEditMailMerge && !this.appOptions.isEditDiagram) {
|
||||||
this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this));
|
this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this));
|
||||||
this.api.asc_registerCallback('asc_onDownloadUrl', _.bind(this.onDownloadUrl, this));
|
this.api.asc_registerCallback('asc_onDownloadUrl', _.bind(this.onDownloadUrl, this));
|
||||||
|
|
|
@ -99,7 +99,14 @@ define([
|
||||||
me.api = new Asc.spreadsheet_api({
|
me.api = new Asc.spreadsheet_api({
|
||||||
'id-view' : 'editor_sdk',
|
'id-view' : 'editor_sdk',
|
||||||
'id-input' : 'ce-cell-content'
|
'id-input' : 'ce-cell-content'
|
||||||
,'mobile' : true
|
,'mobile' : true,
|
||||||
|
'translate': {
|
||||||
|
'Series': me.txtSeries,
|
||||||
|
'Diagram Title': me.txtDiagramTitle,
|
||||||
|
'X Axis': me.txtXAxis,
|
||||||
|
'Y Axis': me.txtYAxis,
|
||||||
|
'Your text here': me.txtArt
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Localization uiApp params
|
// Localization uiApp params
|
||||||
|
@ -618,19 +625,6 @@ define([
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (me.api) {
|
|
||||||
var translateChart = new Asc.asc_CChartTranslate();
|
|
||||||
translateChart.asc_setTitle(me.txtDiagramTitle);
|
|
||||||
translateChart.asc_setXAxis(me.txtXAxis);
|
|
||||||
translateChart.asc_setYAxis(me.txtYAxis);
|
|
||||||
translateChart.asc_setSeries(me.txtSeries);
|
|
||||||
me.api.asc_setChartTranslate(translateChart);
|
|
||||||
|
|
||||||
var translateArt = new Asc.asc_TextArtTranslate();
|
|
||||||
translateArt.asc_setDefaultText(me.txtArt);
|
|
||||||
me.api.asc_setTextArtTranslate(translateArt);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!me.appOptions.isEditMailMerge && !me.appOptions.isEditDiagram) {
|
if (!me.appOptions.isEditMailMerge && !me.appOptions.isEditDiagram) {
|
||||||
me.api.asc_registerCallback('asc_onSendThemeColors', _.bind(me.onSendThemeColors, me));
|
me.api.asc_registerCallback('asc_onSendThemeColors', _.bind(me.onSendThemeColors, me));
|
||||||
me.api.asc_registerCallback('asc_onDownloadUrl', _.bind(me.onDownloadUrl, me));
|
me.api.asc_registerCallback('asc_onDownloadUrl', _.bind(me.onDownloadUrl, me));
|
||||||
|
|
|
@ -67,13 +67,6 @@ define([
|
||||||
|
|
||||||
setApi: function (api) {
|
setApi: function (api) {
|
||||||
this.api = api;
|
this.api = api;
|
||||||
|
|
||||||
var translateChart = new Asc.asc_CChartTranslate();
|
|
||||||
translateChart.asc_setTitle (this.txtDiagramTitle);
|
|
||||||
translateChart.asc_setXAxis (this.txtXAxis);
|
|
||||||
translateChart.asc_setYAxis (this.txtYAxis);
|
|
||||||
translateChart.asc_setSeries(this.txtSeries);
|
|
||||||
this.api.asc_setChartTranslate(translateChart);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onLaunch: function () {
|
onLaunch: function () {
|
||||||
|
|
Loading…
Reference in a new issue