From bd4da87e7441e19ee317f78bdb27dcc330850ae8 Mon Sep 17 00:00:00 2001 From: Alexander Yuzhin Date: Thu, 17 Nov 2016 15:24:27 +0300 Subject: [PATCH] [DE mobile] Localization Main and DocumentHolder controllers. --- .../mobile/app/controller/DocumentHolder.js | 28 ++++-- .../mobile/app/controller/Main.js | 29 +++--- apps/documenteditor/mobile/locale/en.json | 93 +++++++++++++++++++ 3 files changed, 122 insertions(+), 28 deletions(-) create mode 100644 apps/documenteditor/mobile/locale/en.json diff --git a/apps/documenteditor/mobile/app/controller/DocumentHolder.js b/apps/documenteditor/mobile/app/controller/DocumentHolder.js index 3123bb0e1..381618c9b 100644 --- a/apps/documenteditor/mobile/app/controller/DocumentHolder.js +++ b/apps/documenteditor/mobile/app/controller/DocumentHolder.js @@ -47,7 +47,7 @@ define([ ], function (core) { 'use strict'; - DE.Controllers.DocumentHolder = Backbone.Controller.extend((function() { + DE.Controllers.DocumentHolder = Backbone.Controller.extend(_.extend((function() { // private var _stack, _isEdit = false; @@ -160,7 +160,7 @@ define([ if (canCopy) { menuItems.push({ - caption: 'Copy', + caption: me.menuCopy, event: 'copy' }); } @@ -205,11 +205,11 @@ define([ if (!objectLocked && _isEdit) { menuItems.push({ - caption: 'Cut', + caption: me.menuCut, event: 'cut' }); menuItems.push({ - caption: 'Paste', + caption: me.menuPaste, event: 'paste' }); @@ -217,12 +217,12 @@ define([ swapItems(menuItems, 0, 1); menuItems.push({ - caption: 'Delete', + caption: me.menuDelete, event: 'delete' }); menuItems.push({ - caption: 'Edit', + caption: me.menuEdit, event: 'edit' }); } @@ -231,7 +231,7 @@ define([ if (!_.isEmpty(text)) { menuItems.push({ - caption: 'Add Link', + caption: me.menuAddLink, event: 'addlink' }); } @@ -243,13 +243,21 @@ define([ if (isLink) { menuItems.push({ - caption: 'Open Link', + caption: me.menuOpenLink, event: 'openlink' }); } return menuItems; - } + }, + + menuCut: 'Cut', + menuCopy: 'Copy', + menuPaste: 'Paste', + menuEdit: 'Edit', + menuDelete: 'Delete', + menuAddLink: 'Add Link', + menuOpenLink: 'Open Link' } - })()); + })(), DE.Controllers.DocumentHolder || {})) }); \ 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 d8fc19ecf..5a46fc0f4 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -981,7 +981,7 @@ define([ me.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument); modal = uiApp.modal({ - title: "Choose TXT options", + title: me.advTxtOptions, text: '', afterText: '
' + @@ -1027,9 +1027,9 @@ define([ } else if (type == Asc.c_oAscAdvancedOptionsID.DRM) { modal = uiApp.modal({ - title: 'Protected File', - text: 'You password please:', - afterText: '
', + title: me.advDRMOptions, + text: me.advDRMEnterPassword, + afterText: '
', buttons: [ { text: 'OK', @@ -1107,7 +1107,7 @@ define([ } }, - 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.', + 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.', defaultTitleText: 'ONLYOFFICE Document Editor', criticalErrorTitle: 'Error', notcriticalErrorTitle: 'Warning', @@ -1136,7 +1136,6 @@ define([ uploadImageSizeMessage: 'Maximium image size limit exceeded.', uploadImageExtMessage: 'Unknown image format.', uploadImageFileCountMessage: 'No images uploaded.', - reloadButtonText: 'Reload Page', unknownErrorText: 'Unknown error.', convertationTimeoutText: 'Convertation timeout exceeded.', downloadErrorText: 'Download failed.', @@ -1144,12 +1143,7 @@ define([ splitMaxRowsErrorText: 'The number of rows must be less than %1', splitMaxColsErrorText: 'The number of columns must be less than %1', splitDividerErrorText: 'The number of rows must be a divisor of %1', - requestEditFailedTitleText: 'Access denied', - requestEditFailedMessageText: 'Someone is editing this document right now. Please try again later.', - txtNeedSynchronize: 'You have an updates', textLoadingDocument: 'Loading document', - warnBrowserZoom: 'Your browser\'s current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.', - warnBrowserIE9: 'The application has low capabilities on IE9. Use IE10 or higher', applyChangesTitleText: 'Loading Data', applyChangesTextText: 'Loading data...', errorKeyEncrypt: 'Unknown key descriptor', @@ -1163,8 +1157,6 @@ define([ loadingDocumentTextText: 'Loading document...', warnProcessRightsChange: 'You have been denied the right to edit the file.', errorProcessSaveResult: 'Saving is failed.', - textCloseTip: '\nClick to close the tip.', - textShape: 'Shape', 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.', errorDataRange: 'Incorrect data range.', errorDatabaseConnection: 'External error.
Database connection error. Please, contact support.', @@ -1184,11 +1176,8 @@ define([ sendMergeTitle: 'Sending Merge', sendMergeText: 'Sending Merge...', txtArt: 'Your text here', - errorConnectToServer: ' The document could not be saved. Please check connection settings or contact your administrator.
When you click the \'OK\' button, you will be prompted to download the document.

' + - 'Find more information about connecting Document Server here', + errorConnectToServer: ' The document could not be saved. Please check connection settings or contact your administrator.
When you click the \'OK\' button, you will be prompted to download the document.

Find more information about connecting Document Server here', textTryUndoRedo: 'The Undo/Redo functions are disabled for the Fast co-editing mode.', - textStrict: 'Strict mode', - txtErrorLoadHistory: 'Loading history failed', textBuyNow: 'Visit website', textNoLicenseTitle: 'ONLYOFFICE open source version', warnNoLicense: 'You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).
If you need more please consider purchasing a commercial license.', @@ -1197,7 +1186,11 @@ define([ warnLicenseExp: 'Your license has expired.
Please update your license and refresh the page.', titleLicenseExp: 'License expired', openErrorText: 'An error has occurred while opening the file', - saveErrorText: 'An error has occurred while saving the file' + saveErrorText: 'An error has occurred while saving the file', + advTxtOptions: 'Choose TXT Options', + advDRMOptions: 'Protected File', + advDRMEnterPassword: 'You password please:', + advDRMPassword: 'Password' } })(), DE.Controllers.Main || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json new file mode 100644 index 000000000..bd0692388 --- /dev/null +++ b/apps/documenteditor/mobile/locale/en.json @@ -0,0 +1,93 @@ +{ + "DE.Controllers.Main.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.", + "DE.Controllers.Main.defaultTitleText": "ONLYOFFICE Document Editor", + "DE.Controllers.Main.criticalErrorTitle": "Error", + "DE.Controllers.Main.notcriticalErrorTitle": "Warning", + "DE.Controllers.Main.errorDefaultMessage": "Error code: %1", + "DE.Controllers.Main.criticalErrorExtText": "Press 'OK' to back to document list.", + "DE.Controllers.Main.openTitleText": "Opening Document", + "DE.Controllers.Main.openTextText": "Opening document...", + "DE.Controllers.Main.saveTitleText": "Saving Document", + "DE.Controllers.Main.saveTextText": "Saving document...", + "DE.Controllers.Main.loadFontsTitleText": "Loading Data", + "DE.Controllers.Main.loadFontsTextText": "Loading data...", + "DE.Controllers.Main.loadImagesTitleText": "Loading Images", + "DE.Controllers.Main.loadImagesTextText": "Loading images...", + "DE.Controllers.Main.loadFontTitleText": "Loading Data", + "DE.Controllers.Main.loadFontTextText": "Loading data...", + "DE.Controllers.Main.loadImageTitleText": "Loading Image", + "DE.Controllers.Main.loadImageTextText": "Loading image...", + "DE.Controllers.Main.downloadTitleText": "Downloading Document", + "DE.Controllers.Main.downloadTextText": "Downloading document...", + "DE.Controllers.Main.printTitleText": "Printing Document", + "DE.Controllers.Main.printTextText": "Printing document...", + "DE.Controllers.Main.uploadImageTitleText": "Uploading Image", + "DE.Controllers.Main.uploadImageTextText": "Uploading image...", + "DE.Controllers.Main.savePreparingText": "Preparing to save", + "DE.Controllers.Main.savePreparingTitle": "Preparing to save. Please wait...", + "DE.Controllers.Main.uploadImageSizeMessage": "Maximium image size limit exceeded.", + "DE.Controllers.Main.uploadImageExtMessage": "Unknown image format.", + "DE.Controllers.Main.uploadImageFileCountMessage": "No images uploaded.", + "DE.Controllers.Main.unknownErrorText": "Unknown error.", + "DE.Controllers.Main.convertationTimeoutText": "Convertation timeout exceeded.", + "DE.Controllers.Main.downloadErrorText": "Download failed.", + "DE.Controllers.Main.unsupportedBrowserErrorText": "Your browser is not supported.", + "DE.Controllers.Main.splitMaxRowsErrorText": "The number of rows must be less than %1", + "DE.Controllers.Main.splitMaxColsErrorText": "The number of columns must be less than %1", + "DE.Controllers.Main.splitDividerErrorText": "The number of rows must be a divisor of %1", + "DE.Controllers.Main.textLoadingDocument": "Loading document", + "DE.Controllers.Main.applyChangesTitleText": "Loading Data", + "DE.Controllers.Main.applyChangesTextText": "Loading data...", + "DE.Controllers.Main.errorKeyEncrypt": "Unknown key descriptor", + "DE.Controllers.Main.errorKeyExpire": "Key descriptor expired", + "DE.Controllers.Main.errorUsersExceed": "Count of users was exceed", + "DE.Controllers.Main.errorCoAuthoringDisconnect": "Server connection lost. You can't edit anymore.", + "DE.Controllers.Main.errorFilePassProtect": "The document is password protected.", + "DE.Controllers.Main.txtEditingMode": "Set editing mode...", + "DE.Controllers.Main.textAnonymous": "Anonymous", + "DE.Controllers.Main.loadingDocumentTitleText": "Loading document", + "DE.Controllers.Main.loadingDocumentTextText": "Loading document...", + "DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", + "DE.Controllers.Main.errorProcessSaveResult": "Saving is failed.", + "DE.Controllers.Main.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.", + "DE.Controllers.Main.errorDataRange": "Incorrect data range.", + "DE.Controllers.Main.errorDatabaseConnection": "External error.
Database connection error. Please, contact support.", + "DE.Controllers.Main.titleUpdateVersion": "Version changed", + "DE.Controllers.Main.errorUpdateVersion": "The file version has been changed. The page will be reloaded.", + "DE.Controllers.Main.errorUserDrop": "The file cannot be accessed right now.", + "DE.Controllers.Main.txtDiagramTitle": "Chart Title", + "DE.Controllers.Main.txtXAxis": "X Axis", + "DE.Controllers.Main.txtYAxis": "Y Axis", + "DE.Controllers.Main.txtSeries": "Seria", + "DE.Controllers.Main.errorMailMergeLoadFile": "Loading failed", + "DE.Controllers.Main.mailMergeLoadFileText": "Loading Data Source...", + "DE.Controllers.Main.mailMergeLoadFileTitle": "Loading Data Source", + "DE.Controllers.Main.errorMailMergeSaveFile": "Merge failed.", + "DE.Controllers.Main.downloadMergeText": "Downloading...", + "DE.Controllers.Main.downloadMergeTitle": "Downloading", + "DE.Controllers.Main.sendMergeTitle": "Sending Merge", + "DE.Controllers.Main.sendMergeText": "Sending Merge...", + "DE.Controllers.Main.txtArt": "Your text here", + "DE.Controllers.Main.errorConnectToServer": " The document could not be saved. Please check connection settings or contact your administrator.
When you click the 'OK' button, you will be prompted to download the document.

Find more information about connecting Document Server here", + "DE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.", + "DE.Controllers.Main.textBuyNow": "Visit website", + "DE.Controllers.Main.textNoLicenseTitle": "ONLYOFFICE open source version", + "DE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).
If you need more please consider purchasing a commercial license.", + "DE.Controllers.Main.textContactUs": "Contact sales", + "DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,
but will not be able to download until the connection is restored.", + "DE.Controllers.Main.warnLicenseExp": "Your license has expired.
Please update your license and refresh the page.", + "DE.Controllers.Main.titleLicenseExp": "License expired", + "DE.Controllers.Main.openErrorText": "An error has occurred while opening the file", + "DE.Controllers.Main.saveErrorText": "An error has occurred while saving the file", + "DE.Controllers.Main.advTxtOptions": "Choose TXT Options", + "DE.Controllers.Main.advDRMOptions": "Protected File", + "DE.Controllers.Main.advDRMEnterPassword": "You password please:", + "DE.Controllers.Main.advDRMPassword": "Password", + "DE.Controllers.DocumentHolder.menuCut": "Cut", + "DE.Controllers.DocumentHolder.menuCopy": "Copy", + "DE.Controllers.DocumentHolder.menuPaste": "Paste", + "DE.Controllers.DocumentHolder.menuEdit": "Edit", + "DE.Controllers.DocumentHolder.menuDelete": "Delete", + "DE.Controllers.DocumentHolder.menuAddLink": "Add Link", + "DE.Controllers.DocumentHolder.menuOpenLink": "Open Link" +} \ No newline at end of file