Merge pull request #2130 from ONLYOFFICE/fix/bugfix

[DE] Fix protection tooltips
This commit is contained in:
Julia Radzhabova 2022-12-14 13:33:20 +03:00 committed by GitHub
commit 90717e1077
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 22 deletions

View file

@ -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 || {}));
});

View file

@ -142,12 +142,7 @@ define([
txtDocProtectedForms: 'Document is protected.<br>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 || {}));
});

View file

@ -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",

View file

@ -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": "Параметры буквицы",