From e8d4de37e6d2baa89e58855ef063f3fbe49c8f68 Mon Sep 17 00:00:00 2001
From: Julia Radzhabova
Date: Wed, 12 May 2021 01:33:51 +0300
Subject: [PATCH 01/28] Add parameter for default interface language
---
apps/common/locale.js | 15 ++++++++-------
.../main/lib/controller/ExternalDiagramEditor.js | 2 +-
.../main/lib/controller/ExternalMergeEditor.js | 2 +-
apps/common/main/lib/controller/Themes.js | 2 ++
.../main/app/view/FileMenuPanels.js | 10 +++++-----
.../main/app/view/FileMenuPanels.js | 10 +++++-----
.../main/app/view/FileMenuPanels.js | 10 +++++-----
build/Gruntfile.js | 3 +++
8 files changed, 30 insertions(+), 24 deletions(-)
diff --git a/apps/common/locale.js b/apps/common/locale.js
index 7990b2c8d..bcd4270ba 100644
--- a/apps/common/locale.js
+++ b/apps/common/locale.js
@@ -39,7 +39,8 @@ Common.Locale = new(function() {
var l10n = null;
var loadcallback,
apply = false,
- currentLang = 'en';
+ defLang = '{{DEFAULT_LANG}}',
+ currentLang = defLang;
var _applyLocalization = function(callback) {
try {
@@ -83,7 +84,7 @@ Common.Locale = new(function() {
};
var _getCurrentLanguage = function() {
- return (currentLang || 'en');
+ return (currentLang || defLang);
};
var _getUrlParameterByName = function(name) {
@@ -94,21 +95,21 @@ Common.Locale = new(function() {
};
var _requireLang = function () {
- var lang = (_getUrlParameterByName('lang') || 'en').split(/[\-_]/)[0];
+ var lang = (_getUrlParameterByName('lang') || defLang).split(/[\-_]/)[0];
currentLang = lang;
fetch('locale/' + lang + '.json')
.then(function(response) {
if (!response.ok) {
- currentLang = 'en';
- if (lang != 'en')
+ currentLang = defLang;
+ if (lang != defLang)
/* load default lang if fetch failed */
- return fetch('locale/en.json');
+ return fetch('locale/' + defLang + '.json');
throw new Error('server error');
}
return response.json();
}).then(function(response) {
- if ( response.then )
+ if ( response.json )
return response.json();
else {
l10n = response;
diff --git a/apps/common/main/lib/controller/ExternalDiagramEditor.js b/apps/common/main/lib/controller/ExternalDiagramEditor.js
index 731df5d8d..f21868e2b 100644
--- a/apps/common/main/lib/controller/ExternalDiagramEditor.js
+++ b/apps/common/main/lib/controller/ExternalDiagramEditor.js
@@ -48,7 +48,7 @@ define([
'common/main/lib/view/ExternalDiagramEditor'
], function () { 'use strict';
Common.Controllers.ExternalDiagramEditor = Backbone.Controller.extend(_.extend((function() {
- var appLang = 'en',
+ var appLang = '{{DEFAULT_LANG}}',
customization = undefined,
targetApp = '',
externalEditor = null,
diff --git a/apps/common/main/lib/controller/ExternalMergeEditor.js b/apps/common/main/lib/controller/ExternalMergeEditor.js
index 69e659c22..89017051a 100644
--- a/apps/common/main/lib/controller/ExternalMergeEditor.js
+++ b/apps/common/main/lib/controller/ExternalMergeEditor.js
@@ -48,7 +48,7 @@ define([
'common/main/lib/view/ExternalMergeEditor'
], function () { 'use strict';
Common.Controllers.ExternalMergeEditor = Backbone.Controller.extend(_.extend((function() {
- var appLang = 'en',
+ var appLang = '{{DEFAULT_LANG}}',
customization = undefined,
targetApp = '',
externalEditor = null;
diff --git a/apps/common/main/lib/controller/Themes.js b/apps/common/main/lib/controller/Themes.js
index 0e952e05d..daedc3281 100644
--- a/apps/common/main/lib/controller/Themes.js
+++ b/apps/common/main/lib/controller/Themes.js
@@ -7,6 +7,8 @@ define([
], function () {
'use strict';
+ !Common.UI && (Common.UI = {});
+
Common.UI.Themes = new (function(locale) {
!locale && (locale = {});
var themes_map = {
diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js
index f097325a7..af8575b36 100644
--- a/apps/documenteditor/main/app/view/FileMenuPanels.js
+++ b/apps/documenteditor/main/app/view/FileMenuPanels.js
@@ -1520,7 +1520,7 @@ define([
Common.UI.BaseView.prototype.initialize.call(this,arguments);
this.menu = options.menu;
- this.urlPref = 'resources/help/en/';
+ this.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
this.openUrl = null;
this.en_data = [
@@ -1638,12 +1638,12 @@ define([
var config = {
dataType: 'json',
error: function () {
- if ( me.urlPref.indexOf('resources/help/en/')<0 ) {
- me.urlPref = 'resources/help/en/';
- store.url = 'resources/help/en/Contents.json';
+ if ( me.urlPref.indexOf('resources/help/{{DEFAULT_LANG}}/')<0 ) {
+ me.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
+ store.url = 'resources/help/{{DEFAULT_LANG}}/Contents.json';
store.fetch(config);
} else {
- me.urlPref = 'resources/help/en/';
+ me.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
store.reset(me.en_data);
}
},
diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js
index c775fee34..7759139d3 100644
--- a/apps/presentationeditor/main/app/view/FileMenuPanels.js
+++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js
@@ -1321,7 +1321,7 @@ define([
Common.UI.BaseView.prototype.initialize.call(this,arguments);
this.menu = options.menu;
- this.urlPref = 'resources/help/en/';
+ this.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
this.en_data = [
{"src": "ProgramInterface/ProgramInterface.htm", "name": "Introducing Presentation Editor user interface", "headername": "Program Interface"},
@@ -1421,12 +1421,12 @@ define([
var config = {
dataType: 'json',
error: function () {
- if ( me.urlPref.indexOf('resources/help/en/')<0 ) {
- me.urlPref = 'resources/help/en/';
- store.url = 'resources/help/en/Contents.json';
+ if ( me.urlPref.indexOf('resources/help/{{DEFAULT_LANG}}/')<0 ) {
+ me.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
+ store.url = 'resources/help/{{DEFAULT_LANG}}/Contents.json';
store.fetch(config);
} else {
- me.urlPref = 'resources/help/en/';
+ me.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
store.reset(me.en_data);
}
},
diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
index ded4333a6..ebdcf47a3 100644
--- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
+++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
@@ -2176,7 +2176,7 @@ define([
Common.UI.BaseView.prototype.initialize.call(this,arguments);
this.menu = options.menu;
- this.urlPref = 'resources/help/en/';
+ this.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
this.en_data = [
{"src": "ProgramInterface/ProgramInterface.htm", "name": "Introducing Spreadsheet Editor user interface", "headername": "Program Interface"},
@@ -2278,12 +2278,12 @@ define([
var config = {
dataType: 'json',
error: function () {
- if ( me.urlPref.indexOf('resources/help/en/')<0 ) {
- me.urlPref = 'resources/help/en/';
- store.url = 'resources/help/en/Contents.json';
+ if ( me.urlPref.indexOf('resources/help/{{DEFAULT_LANG}}/')<0 ) {
+ me.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
+ store.url = 'resources/help/{{DEFAULT_LANG}}/Contents.json';
store.fetch(config);
} else {
- me.urlPref = 'resources/help/en/';
+ me.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
store.reset(me.en_data);
}
},
diff --git a/build/Gruntfile.js b/build/Gruntfile.js
index 9715241cd..28d2101fa 100644
--- a/build/Gruntfile.js
+++ b/build/Gruntfile.js
@@ -66,6 +66,9 @@ module.exports = function(grunt) {
}, {
from: /\{\{HELP_URL\}\}/g,
to: _encode(process.env.HELP_URL) || 'https://helpcenter.onlyoffice.com'
+ }, {
+ from: /\{\{DEFAULT_LANG\}\}/g,
+ to: _encode(process.env.DEFAULT_LANG) || 'en'
}];
var helpreplacements = [
From 59bb490069b89221bbf6557cfafacdab8e79a553 Mon Sep 17 00:00:00 2001
From: Julia Radzhabova
Date: Wed, 12 May 2021 12:33:10 +0300
Subject: [PATCH 02/28] Show error if default lang isn't loaded
---
apps/common/locale.js | 17 +++++++++++++----
apps/common/main/lib/component/Window.js | 2 +-
apps/documenteditor/main/app/controller/Main.js | 17 +++++++++++++++--
.../mobile/app/controller/Main.js | 16 ++++++++++++++--
.../main/app/controller/Main.js | 17 +++++++++++++++--
.../mobile/app/controller/Main.js | 16 ++++++++++++++--
.../main/app/controller/Main.js | 17 +++++++++++++++--
.../mobile/app/controller/Main.js | 16 ++++++++++++++--
8 files changed, 101 insertions(+), 17 deletions(-)
diff --git a/apps/common/locale.js b/apps/common/locale.js
index bcd4270ba..abed04e94 100644
--- a/apps/common/locale.js
+++ b/apps/common/locale.js
@@ -84,7 +84,11 @@ Common.Locale = new(function() {
};
var _getCurrentLanguage = function() {
- return (currentLang || defLang);
+ return currentLang;
+ };
+
+ var _getLoadedLanguage = function() {
+ return loadedLang;
};
var _getUrlParameterByName = function(name) {
@@ -109,9 +113,12 @@ Common.Locale = new(function() {
}
return response.json();
}).then(function(response) {
- if ( response.json )
+ if ( response.json ) {
+ if (!response.ok)
+ throw new Error('server error');
+
return response.json();
- else {
+ } else {
l10n = response;
/* to break promises chain */
throw new Error('loaded');
@@ -123,8 +130,10 @@ Common.Locale = new(function() {
l10n = l10n || {};
apply && _applyLocalization();
if ( e.message == 'loaded' ) {
- } else
+ } else {
+ currentLang = null;
console.log('fetch error: ' + e);
+ }
});
};
diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js
index 661424bc2..95edd58b9 100644
--- a/apps/common/main/lib/component/Window.js
+++ b/apps/common/main/lib/component/Window.js
@@ -632,7 +632,7 @@ define([
this.$window = $('#' + this.initConfig.id);
- if (Common.Locale.getCurrentLanguage() !== 'en')
+ if (Common.Locale.getCurrentLanguage() && Common.Locale.getCurrentLanguage() !== 'en')
this.$window.attr('applang', Common.Locale.getCurrentLanguage());
this.binding.keydown = _.bind(_keydown,this);
diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js
index 183a3194a..b74fd5b0e 100644
--- a/apps/documenteditor/main/app/controller/Main.js
+++ b/apps/documenteditor/main/app/controller/Main.js
@@ -1250,7 +1250,7 @@ define([
if (Asc.c_oLicenseResult.ExpiredLimited === licType)
this._state.licenseType = licType;
- if ( this.onServerVersion(params.asc_getBuildVersion()) ) return;
+ if ( this.onServerVersion(params.asc_getBuildVersion()) || !this.onLanguageLoaded()) return;
this.permissions.review = (this.permissions.review === undefined) ? (this.permissions.edit !== false) : this.permissions.review;
@@ -2476,6 +2476,18 @@ define([
this._renameDialog.show(Common.Utils.innerWidth() - this._renameDialog.options.width - 15, 30);
},
+ onLanguageLoaded: function() {
+ if (!Common.Locale.getCurrentLanguage()) {
+ Common.UI.warning({
+ msg: this.errorLang,
+ callback: function() {
+ }
+ });
+ return false;
+ }
+ return true;
+ },
+
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.',
criticalErrorTitle: 'Error',
notcriticalErrorTitle: 'Warning',
@@ -2844,7 +2856,8 @@ define([
txtNoTableOfFigures: "No table of figures entries found.",
txtTableOfFigures: 'Table of figures',
txtStyle_endnote_text: 'Endnote Text',
- txtTOCHeading: 'TOC Heading'
+ txtTOCHeading: 'TOC Heading',
+ errorLang: 'The interface language is not loaded.
Please contact your Document Server administrator.'
}
})(), DE.Controllers.Main || {}))
});
\ No newline at end of file
diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js
index 66f8d59fc..9f6c281d5 100644
--- a/apps/documenteditor/mobile/app/controller/Main.js
+++ b/apps/documenteditor/mobile/app/controller/Main.js
@@ -783,7 +783,7 @@ define([
if (Asc.c_oLicenseResult.ExpiredLimited === licType)
me._state.licenseType = licType;
- if ( me.onServerVersion(params.asc_getBuildVersion()) ) return;
+ if ( me.onServerVersion(params.asc_getBuildVersion()) || !me.onLanguageLoaded()) return;
me.appOptions.permissionsLicense = licType;
me.permissions.review = (me.permissions.review === undefined) ? (me.permissions.edit !== false) : me.permissions.review;
@@ -1497,6 +1497,17 @@ define([
}
},
+ onLanguageLoaded: function() {
+ if (!Common.Locale.getCurrentLanguage()) {
+ uiApp.alert(
+ this.errorLang,
+ this.notcriticalErrorTitle
+ );
+ return false;
+ }
+ return true;
+ },
+
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
criticalErrorTitle: 'Error',
notcriticalErrorTitle: 'Warning',
@@ -1643,7 +1654,8 @@ define([
txtEvenPage: "Even Page",
txtOddPage: "Odd Page",
txtSameAsPrev: "Same as Previous",
- txtCurrentDocument: "Current Document"
+ txtCurrentDocument: "Current Document",
+ errorLang: 'The interface language is not loaded.
Please contact your Document Server administrator.'
}
})(), DE.Controllers.Main || {}))
});
\ No newline at end of file
diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js
index c2fcc6337..764938ed8 100644
--- a/apps/presentationeditor/main/app/controller/Main.js
+++ b/apps/presentationeditor/main/app/controller/Main.js
@@ -976,7 +976,7 @@ define([
if (Asc.c_oLicenseResult.ExpiredLimited === licType)
this._state.licenseType = licType;
- if ( this.onServerVersion(params.asc_getBuildVersion()) ) return;
+ if ( this.onServerVersion(params.asc_getBuildVersion()) || !this.onLanguageLoaded() ) return;
if (params.asc_getRights() !== Asc.c_oRights.Edit)
this.permissions.edit = false;
@@ -2107,6 +2107,18 @@ define([
this._renameDialog.show(Common.Utils.innerWidth() - this._renameDialog.options.width - 15, 30);
},
+ onLanguageLoaded: function() {
+ if (!Common.Locale.getCurrentLanguage()) {
+ Common.UI.warning({
+ msg: this.errorLang,
+ callback: function() {
+ }
+ });
+ return false;
+ }
+ return true;
+ },
+
// Translation
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.',
criticalErrorTitle: 'Error',
@@ -2469,7 +2481,8 @@ define([
textRenameLabel: 'Enter a name to be used for collaboration',
textRenameError: 'User name must not be empty.',
textLongName: 'Enter a name that is less than 128 characters.',
- textGuest: 'Guest'
+ textGuest: 'Guest',
+ errorLang: 'The interface language is not loaded.
Please contact your Document Server administrator.'
}
})(), PE.Controllers.Main || {}))
});
diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js
index 4c9c14894..2c66e159b 100644
--- a/apps/presentationeditor/mobile/app/controller/Main.js
+++ b/apps/presentationeditor/mobile/app/controller/Main.js
@@ -715,7 +715,7 @@ define([
if (Asc.c_oLicenseResult.ExpiredLimited === licType)
me._state.licenseType = licType;
- if ( me.onServerVersion(params.asc_getBuildVersion()) ) return;
+ if ( me.onServerVersion(params.asc_getBuildVersion()) || !me.onLanguageLoaded() ) return;
me.appOptions.permissionsLicense = licType;
me.permissions.review = (me.permissions.review === undefined) ? (me.permissions.edit !== false) : me.permissions.review;
@@ -1398,6 +1398,17 @@ define([
}
},
+ onLanguageLoaded: function() {
+ if (!Common.Locale.getCurrentLanguage()) {
+ uiApp.alert(
+ this.errorLang,
+ this.notcriticalErrorTitle
+ );
+ return false;
+ }
+ return true;
+ },
+
// Translation
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
criticalErrorTitle: 'Error',
@@ -1573,7 +1584,8 @@ define([
warnLicenseLimitedRenewed: 'License needs to be renewed.
You have a limited access to document editing functionality.
Please contact your administrator to get full access',
warnLicenseLimitedNoAccess: 'License expired.
You have no access to document editing functionality.
Please contact your administrator.',
textGuest: 'Guest',
- txtAddFirstSlide: 'Click to add first slide'
+ txtAddFirstSlide: 'Click to add first slide',
+ errorLang: 'The interface language is not loaded.
Please contact your Document Server administrator.'
}
})(), PE.Controllers.Main || {}))
});
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js
index d674000e4..3e34f052c 100644
--- a/apps/spreadsheeteditor/main/app/controller/Main.js
+++ b/apps/spreadsheeteditor/main/app/controller/Main.js
@@ -1049,7 +1049,7 @@ define([
if (Asc.c_oLicenseResult.ExpiredLimited === licType)
this._state.licenseType = licType;
- if ( this.onServerVersion(params.asc_getBuildVersion()) ) return;
+ if ( this.onServerVersion(params.asc_getBuildVersion()) || !this.onLanguageLoaded() ) return;
if (params.asc_getRights() !== Asc.c_oRights.Edit)
this.permissions.edit = false;
@@ -2452,6 +2452,18 @@ define([
this._renameDialog.show(Common.Utils.innerWidth() - this._renameDialog.options.width - 15, 30);
},
+ onLanguageLoaded: function() {
+ if (!Common.Locale.getCurrentLanguage()) {
+ Common.UI.warning({
+ msg: this.errorLang,
+ callback: function() {
+ }
+ });
+ return false;
+ }
+ return true;
+ },
+
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.',
criticalErrorTitle: 'Error',
notcriticalErrorTitle: 'Warning',
@@ -2849,7 +2861,8 @@ define([
errorPasteMultiSelect: 'This action cannot be done on a multiple range selection.
Select a single range and try again.',
errorPivotWithoutUnderlying: 'The Pivot Table report was saved without the underlying data.
Use the \'Refresh\' button to update the report.',
txtQuarter: 'Qtr',
- txtOr: '%1 or %2'
+ txtOr: '%1 or %2',
+ errorLang: 'The interface language is not loaded.
Please contact your Document Server administrator.'
}
})(), SSE.Controllers.Main || {}))
});
diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js
index 07f75cbf8..e73df8db7 100644
--- a/apps/spreadsheeteditor/mobile/app/controller/Main.js
+++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js
@@ -741,7 +741,7 @@ define([
if (Asc.c_oLicenseResult.ExpiredLimited === licType)
me._state.licenseType = licType;
- if ( me.onServerVersion(params.asc_getBuildVersion()) ) return;
+ if ( me.onServerVersion(params.asc_getBuildVersion()) || !me.onLanguageLoaded() ) return;
if (params.asc_getRights() !== Asc.c_oRights.Edit) {
me.permissions.edit = false;
@@ -1601,6 +1601,17 @@ define([
}
},
+ onLanguageLoaded: function() {
+ if (!Common.Locale.getCurrentLanguage()) {
+ uiApp.alert(
+ this.errorLang,
+ this.notcriticalErrorTitle
+ );
+ return false;
+ }
+ return true;
+ },
+
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
criticalErrorTitle: 'Error',
notcriticalErrorTitle: 'Warning',
@@ -1795,7 +1806,8 @@ define([
warnLicenseLimitedNoAccess: 'License expired.
You have no access to document editing functionality.
Please contact your administrator.',
textGuest: 'Guest',
errorDataValidate: 'The value you entered is not valid.
A user has restricted values that can be entered into this cell.',
- errorLockedCellPivot: 'You cannot change data inside a pivot table.'
+ errorLockedCellPivot: 'You cannot change data inside a pivot table.',
+ errorLang: 'The interface language is not loaded.
Please contact your Document Server administrator.'
}
})(), SSE.Controllers.Main || {}))
});
\ No newline at end of file
From df1015d8263ee4138fcf1a8bba3dda4d88e68436 Mon Sep 17 00:00:00 2001
From: Julia Radzhabova
Date: Wed, 12 May 2021 14:36:24 +0300
Subject: [PATCH 03/28] Refactoring
---
apps/documenteditor/main/app/controller/Main.js | 4 ++--
apps/documenteditor/mobile/app/controller/Main.js | 8 ++++----
apps/presentationeditor/main/app/controller/Main.js | 4 ++--
apps/presentationeditor/mobile/app/controller/Main.js | 8 ++++----
apps/spreadsheeteditor/main/app/controller/Main.js | 4 ++--
apps/spreadsheeteditor/mobile/app/controller/Main.js | 8 ++++----
6 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js
index b74fd5b0e..8c929dd01 100644
--- a/apps/documenteditor/main/app/controller/Main.js
+++ b/apps/documenteditor/main/app/controller/Main.js
@@ -2480,8 +2480,8 @@ define([
if (!Common.Locale.getCurrentLanguage()) {
Common.UI.warning({
msg: this.errorLang,
- callback: function() {
- }
+ buttons: [],
+ closable: false
});
return false;
}
diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js
index 9f6c281d5..b53ab6578 100644
--- a/apps/documenteditor/mobile/app/controller/Main.js
+++ b/apps/documenteditor/mobile/app/controller/Main.js
@@ -1499,10 +1499,10 @@ define([
onLanguageLoaded: function() {
if (!Common.Locale.getCurrentLanguage()) {
- uiApp.alert(
- this.errorLang,
- this.notcriticalErrorTitle
- );
+ uiApp.modal({
+ title : this.notcriticalErrorTitle,
+ text : this.errorLang
+ });
return false;
}
return true;
diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js
index 764938ed8..419c9a5eb 100644
--- a/apps/presentationeditor/main/app/controller/Main.js
+++ b/apps/presentationeditor/main/app/controller/Main.js
@@ -2111,8 +2111,8 @@ define([
if (!Common.Locale.getCurrentLanguage()) {
Common.UI.warning({
msg: this.errorLang,
- callback: function() {
- }
+ buttons: [],
+ closable: false
});
return false;
}
diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js
index 2c66e159b..012b4ce3d 100644
--- a/apps/presentationeditor/mobile/app/controller/Main.js
+++ b/apps/presentationeditor/mobile/app/controller/Main.js
@@ -1400,10 +1400,10 @@ define([
onLanguageLoaded: function() {
if (!Common.Locale.getCurrentLanguage()) {
- uiApp.alert(
- this.errorLang,
- this.notcriticalErrorTitle
- );
+ uiApp.modal({
+ title : this.notcriticalErrorTitle,
+ text : this.errorLang
+ });
return false;
}
return true;
diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js
index 3e34f052c..54d99bab3 100644
--- a/apps/spreadsheeteditor/main/app/controller/Main.js
+++ b/apps/spreadsheeteditor/main/app/controller/Main.js
@@ -2456,8 +2456,8 @@ define([
if (!Common.Locale.getCurrentLanguage()) {
Common.UI.warning({
msg: this.errorLang,
- callback: function() {
- }
+ buttons: [],
+ closable: false
});
return false;
}
diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js
index e73df8db7..71f96d868 100644
--- a/apps/spreadsheeteditor/mobile/app/controller/Main.js
+++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js
@@ -1603,10 +1603,10 @@ define([
onLanguageLoaded: function() {
if (!Common.Locale.getCurrentLanguage()) {
- uiApp.alert(
- this.errorLang,
- this.notcriticalErrorTitle
- );
+ uiApp.modal({
+ title : this.notcriticalErrorTitle,
+ text : this.errorLang
+ });
return false;
}
return true;
From 745231f3b79fc475961b700716dc1806010b2f06 Mon Sep 17 00:00:00 2001
From: Julia Radzhabova
Date: Mon, 17 May 2021 17:52:29 +0300
Subject: [PATCH 04/28] [SSE] Fix disabled buttons in statusbar
---
apps/common/main/resources/less/buttons.less | 2 +-
apps/spreadsheeteditor/main/resources/less/statusbar.less | 8 --------
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/apps/common/main/resources/less/buttons.less b/apps/common/main/resources/less/buttons.less
index bed7c4f18..7436891fc 100644
--- a/apps/common/main/resources/less/buttons.less
+++ b/apps/common/main/resources/less/buttons.less
@@ -332,7 +332,7 @@
.border-radius(1px);
background-color: transparent;
- .masked & {
+ .masked:not(.statusbar) & {
&:disabled {
opacity: 1;
}
diff --git a/apps/spreadsheeteditor/main/resources/less/statusbar.less b/apps/spreadsheeteditor/main/resources/less/statusbar.less
index 909cc3619..6874612ed 100644
--- a/apps/spreadsheeteditor/main/resources/less/statusbar.less
+++ b/apps/spreadsheeteditor/main/resources/less/statusbar.less
@@ -23,8 +23,6 @@
text-align: center;
&.disabled {
- color: @border-preview-select-ie;
- color: @border-preview-select;
cursor: default;
}
}
@@ -400,12 +398,6 @@
}
}
- &.masked #status-addtabs-box{
- button.disabled .btn-icon {
- background-position-x: 0px !important;
- }
- opacity: 0.4;
- }
}
.statusbar-mask {
From f49703ddf739549947de1c75e069a19271f2ee75 Mon Sep 17 00:00:00 2001
From: Julia Radzhabova
Date: Tue, 18 May 2021 13:38:59 +0300
Subject: [PATCH 05/28] Update help
---
.../resources/help/en/HelpfulHints/About.htm | 2 +-
.../help/en/HelpfulHints/SupportedFormats.htm | 10 +--
.../UsageInstructions/ChangeWrappingStyle.htm | 2 +-
.../help/en/UsageInstructions/CreateLists.htm | 2 +-
.../UsageInstructions/FontTypeSizeColor.htm | 4 +-
.../UsageInstructions/SavePrintDownload.htm | 2 +-
.../main/resources/help/en/search/indexes.js | 14 +--
.../resources/help/fr/HelpfulHints/About.htm | 2 +-
.../help/fr/HelpfulHints/SupportedFormats.htm | 10 +--
.../UsageInstructions/ChangeWrappingStyle.htm | 2 +-
.../help/fr/UsageInstructions/CreateLists.htm | 2 +-
.../UsageInstructions/FontTypeSizeColor.htm | 4 +-
.../UsageInstructions/SavePrintDownload.htm | 2 +-
.../main/resources/help/fr/search/indexes.js | 12 +--
.../resources/help/ru/HelpfulHints/About.htm | 2 +-
.../help/ru/HelpfulHints/SupportedFormats.htm | 9 +-
.../UsageInstructions/ChangeWrappingStyle.htm | 2 +-
.../help/ru/UsageInstructions/CreateLists.htm | 2 +-
.../UsageInstructions/FontTypeSizeColor.htm | 4 +-
.../UsageInstructions/SavePrintDownload.htm | 2 +-
.../main/resources/help/ru/search/indexes.js | 14 +--
.../resources/help/en/HelpfulHints/About.htm | 2 +-
.../help/en/UsageInstructions/InsertText.htm | 4 +-
.../main/resources/help/en/search/indexes.js | 4 +-
.../resources/help/fr/HelpfulHints/About.htm | 2 +-
.../help/fr/UsageInstructions/InsertText.htm | 4 +-
.../main/resources/help/fr/search/indexes.js | 4 +-
.../resources/help/ru/HelpfulHints/About.htm | 2 +-
.../help/ru/UsageInstructions/InsertText.htm | 4 +-
.../main/resources/help/ru/search/indexes.js | 6 +-
.../resources/help/en/Functions/xlookup.htm | 8 +-
.../resources/help/en/HelpfulHints/About.htm | 2 +-
.../help/en/UsageInstructions/AlignText.htm | 80 ++++++++++--------
.../help/en/UsageInstructions/PivotTables.htm | 6 ++
.../main/resources/help/en/search/indexes.js | 8 +-
.../resources/help/fr/Functions/xlookup.htm | 6 +-
.../resources/help/fr/HelpfulHints/About.htm | 2 +-
.../help/fr/UsageInstructions/AlignText.htm | 75 ++++++++--------
.../help/fr/UsageInstructions/PivotTables.htm | 14 ++-
.../main/resources/help/fr/images/xlookup.png | Bin 0 -> 30745 bytes
.../main/resources/help/fr/search/indexes.js | 8 +-
.../resources/help/ru/Functions/xlookup.htm | 8 +-
.../resources/help/ru/HelpfulHints/About.htm | 2 +-
.../help/ru/UsageInstructions/AlignText.htm | 22 +++--
.../help/ru/UsageInstructions/PivotTables.htm | 6 ++
.../main/resources/help/ru/search/indexes.js | 10 +--
46 files changed, 221 insertions(+), 173 deletions(-)
create mode 100644 apps/spreadsheeteditor/main/resources/help/fr/images/xlookup.png
diff --git a/apps/documenteditor/main/resources/help/en/HelpfulHints/About.htm b/apps/documenteditor/main/resources/help/en/HelpfulHints/About.htm
index c2391dbdd..add7415bd 100644
--- a/apps/documenteditor/main/resources/help/en/HelpfulHints/About.htm
+++ b/apps/documenteditor/main/resources/help/en/HelpfulHints/About.htm
@@ -18,7 +18,7 @@
and edit documents directly in your browser.
Using the Document Editor, you can perform various editing operations like in any desktop editor,
print the edited documents keeping all the formatting details or download them onto your computer hard disk drive of your computer as DOCX, PDF, ODT, TXT, DOTX, PDF/A, OTT, RTF, HTML, FB2, EPUB files.
- To view the current software version and licensor details in the online version, click the icon on the left sidebar. To view the current software version and licensor details in the desktop version, select the About menu item on the left sidebar of the main program window.
+ To view the current software version and licensor details in the online version, click the icon on the left sidebar. To view the current software version and licensor details in the desktop version for Windows, select the About menu item on the left sidebar of the main program window. In the desktop version for Mac OS, open the ONLYOFFICE menu at the top of the screen and select the About ONLYOFFICE menu item.