From 4ddb7ecf3f5a68039a68626264ec5eed410d3a91 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 14 Dec 2022 13:26:08 +0300 Subject: [PATCH] [DE] Fix protection tooltips --- .../main/app/controller/DocProtection.js | 18 ++++++++++++------ .../main/app/view/DocProtection.js | 7 +------ apps/documenteditor/main/locale/en.json | 15 ++++++++++----- apps/documenteditor/main/locale/ru.json | 10 +++++----- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/apps/documenteditor/main/app/controller/DocProtection.js b/apps/documenteditor/main/app/controller/DocProtection.js index ab8488fc0..bd5be8645 100644 --- a/apps/documenteditor/main/app/controller/DocProtection.js +++ b/apps/documenteditor/main/app/controller/DocProtection.js @@ -209,19 +209,19 @@ define([ if (userId && this.userCollection) { var recUser = this.userCollection.findOriginalUser(userId); if (recUser && (recUser.get('idOriginal') !== this.currentUserId)) { - var str = this.view.txtWasUnprotected; + var str = this.txtWasUnprotected; switch (this._state.docProtection.type) { case Asc.c_oAscEDocProtect.ReadOnly: - str = this.view.txtWasProtectedView; + str = this.txtWasProtectedView; break; case Asc.c_oAscEDocProtect.Comments: - str = this.view.txtWasProtectedComment; + str = this.txtWasProtectedComment; break; case Asc.c_oAscEDocProtect.Forms: - str = this.view.txtWasProtectedForms; + str = this.txtWasProtectedForms; break; case Asc.c_oAscEDocProtect.TrackedChanges: - str = this.view.txtWasProtectedTrack; + str = this.txtWasProtectedTrack; break; } str && Common.NotificationCenter.trigger('showmessage', {msg: str}, {timeout: 5000, hideCloseTip: true}); @@ -269,7 +269,13 @@ define([ if (this._docProtectDlg && this._docProtectDlg.isVisible()) this._docProtectDlg.SetDisabled(state || this._state.docProtection && (this._state.docProtection.isReadOnly || this._state.docProtection.isFormsOnly || this._state.docProtection.isCommentsOnly || this._state.docProtection.isReviewOnly)); - } + }, + + txtWasProtectedView: 'Document has been protected by another user.\nYou may only view this document.', + txtWasProtectedTrack: 'Document has been protected by another user.\nYou may edit this document, but all changes will be tracked.', + txtWasProtectedComment: 'Document has been protected by another user.\nYou may only insert comments to this document.', + txtWasProtectedForms: 'Document has been protected by another user.\nYou may only fill in forms in this document.', + txtWasUnprotected: 'Document has been unprotected.' }, DE.Controllers.DocProtection || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/app/view/DocProtection.js b/apps/documenteditor/main/app/view/DocProtection.js index 24151040c..81bf01e1f 100644 --- a/apps/documenteditor/main/app/view/DocProtection.js +++ b/apps/documenteditor/main/app/view/DocProtection.js @@ -142,12 +142,7 @@ define([ txtDocProtectedForms: 'Document is protected.
You may only fill in forms in this document.', hintProtectDoc: 'Protect document', txtDocUnlockDescription: 'Enter a password to unprotect document', - txtUnlockTitle: 'Unprotect Document', - txtWasProtectedView: 'Document has been protected by another user.\nYou may only view this document.', - txtWasProtectedTrack: 'Document has been protected by another user.\nYou may edit this document, but all changes will be tracked.', - txtWasProtectedComment: 'Document has been protected by another user.\nYou may only insert comments to this document.', - txtWasProtectedForms: 'Document has been protected by another user.\nYou may only fill in forms in this document.', - txtWasUnprotected: 'Document has been unprotected.' + txtUnlockTitle: 'Unprotect Document' } }()), DE.Views.DocProtection || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 37c8592b4..8bd663e4f 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1634,11 +1634,16 @@ "DE.Views.DocProtection.txtDocUnlockDescription": "Enter a password to unprotect document", "DE.Views.DocProtection.txtProtectDoc": "Protect Document", "DE.Views.DocProtection.txtUnlockTitle": "Unprotect Document", - "DE.Views.DocProtection.txtWasProtectedComment": "Document has been protected by another user.\nYou may only insert comments to this document.", - "DE.Views.DocProtection.txtWasProtectedForms": "Document has been protected by another user.\nYou may only fill in forms in this document.", - "DE.Views.DocProtection.txtWasProtectedTrack": "Document has been protected by another user.\nYou may edit this document, but all changes will be tracked.", - "DE.Views.DocProtection.txtWasProtectedView": "Document has been protected by another user.\nYou may only view this document.", - "DE.Views.DocProtection.txtWasUnprotected": "Document has been unprotected.", + "del_DE.Views.DocProtection.txtWasProtectedComment": "Document has been protected by another user.\nYou may only insert comments to this document.", + "del_DE.Views.DocProtection.txtWasProtectedForms": "Document has been protected by another user.\nYou may only fill in forms in this document.", + "del_DE.Views.DocProtection.txtWasProtectedTrack": "Document has been protected by another user.\nYou may edit this document, but all changes will be tracked.", + "del_DE.Views.DocProtection.txtWasProtectedView": "Document has been protected by another user.\nYou may only view this document.", + "del_DE.Views.DocProtection.txtWasUnprotected": "Document has been unprotected.", + "DE.Controllers.DocProtection.txtWasProtectedComment": "Document has been protected by another user.\nYou may only insert comments to this document.", + "DE.Controllers.DocProtection.txtWasProtectedForms": "Document has been protected by another user.\nYou may only fill in forms in this document.", + "DE.Controllers.DocProtection.txtWasProtectedTrack": "Document has been protected by another user.\nYou may edit this document, but all changes will be tracked.", + "DE.Controllers.DocProtection.txtWasProtectedView": "Document has been protected by another user.\nYou may only view this document.", + "DE.Controllers.DocProtection.txtWasUnprotected": "Document has been unprotected.", "DE.Views.DocumentHolder.aboveText": "Above", "DE.Views.DocumentHolder.addCommentText": "Add comment", "DE.Views.DocumentHolder.advancedDropCapText": "Drop Cap Settings", diff --git a/apps/documenteditor/main/locale/ru.json b/apps/documenteditor/main/locale/ru.json index 8d456eddd..527126ad4 100644 --- a/apps/documenteditor/main/locale/ru.json +++ b/apps/documenteditor/main/locale/ru.json @@ -1634,11 +1634,11 @@ "DE.Views.DocProtection.txtDocUnlockDescription": "Введите пароль, чтобы снять защиту документа", "DE.Views.DocProtection.txtProtectDoc": "Защитить документ", "DE.Views.DocProtection.txtUnlockTitle": "Снять защиту документа", - "DE.Views.DocProtection.txtWasProtectedComment": "Документ защищен другим пользователем.\nВы можете только добавлять комментарии к этому документу.", - "DE.Views.DocProtection.txtWasProtectedForms": "Документ защищен другим пользователем.\nВы можете только заполнять формы в этом документе.", - "DE.Views.DocProtection.txtWasProtectedTrack": "Документ защищен другим пользователем.\nВы можете редактировать этот документ, но все изменения будут отслеживаться.", - "DE.Views.DocProtection.txtWasProtectedView": "Документ защищен другим пользователем.\nВы можете только просматривать этот документ.", - "DE.Views.DocProtection.txtWasUnprotected": "Защита документа снята.", + "DE.Controllers.DocProtection.txtWasProtectedComment": "Документ защищен другим пользователем.\nВы можете только добавлять комментарии к этому документу.", + "DE.Controllers.DocProtection.txtWasProtectedForms": "Документ защищен другим пользователем.\nВы можете только заполнять формы в этом документе.", + "DE.Controllers.DocProtection.txtWasProtectedTrack": "Документ защищен другим пользователем.\nВы можете редактировать этот документ, но все изменения будут отслеживаться.", + "DE.Controllers.DocProtection.txtWasProtectedView": "Документ защищен другим пользователем.\nВы можете только просматривать этот документ.", + "DE.Controllers.DocProtection.txtWasUnprotected": "Защита документа снята.", "DE.Views.DocumentHolder.aboveText": "Выше", "DE.Views.DocumentHolder.addCommentText": "Добавить комментарий", "DE.Views.DocumentHolder.advancedDropCapText": "Параметры буквицы",