Merge pull request #1489 from ONLYOFFICE/fix/bug-52613

[DE] Fix Bug 52613
This commit is contained in:
Julia Radzhabova 2022-01-18 12:42:45 +03:00 committed by GitHub
commit 6e699abdae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 10 deletions

View file

@ -66,17 +66,18 @@
<div class="padding-small">
<label class="header"><%= scope.textReplaceText %></label>
</div>
<div class="padding-large">
<div class="padding-small">
<div class="padding-small" id="id-autocorrect-dialog-chk-quotes"></div>
<div class="padding-small" id="id-autocorrect-dialog-chk-hyphens"></div>
<div id="id-autocorrect-dialog-chk-hyperlink"></div>
<div class="padding-small" id="id-autocorrect-dialog-chk-hyperlink"></div>
<div class="padding-small" id="id-autocorrect-dialog-chk-double-space"></div>
</div>
<div class="padding-small">
<label class="header"><%= scope.textApplyText %></label>
</div>
<div class="padding-large">
<div class="padding-small">
<div class="padding-small" id="id-autocorrect-dialog-chk-bulleted"></div>
<div id="id-autocorrect-dialog-chk-numbered"></div>
<div class="padding-small" id="id-autocorrect-dialog-chk-numbered"></div>
</div>
</div>
</div>
@ -85,14 +86,14 @@
<div class="padding-small">
<label class="header"><%= scope.textReplaceText %></label>
</div>
<div class="padding-large">
<div id="id-autocorrect-dialog-chk-hyperlink"></div>
<div class="padding-small">
<div class="padding-small" id="id-autocorrect-dialog-chk-hyperlink"></div>
</div>
<div class="padding-small">
<label class="header"><%= scope.textApplyAsWork %></label>
</div>
<div class="padding-large">
<div id="id-autocorrect-dialog-chk-new-rows"></div>
<div class="padding-small">
<div class="padding-small" id="id-autocorrect-dialog-chk-new-rows"></div>
</div>
</div>
</div>
@ -101,7 +102,7 @@
<div class="padding-small">
<div id="id-autocorrect-dialog-chk-fl-sentence"></div>
</div>
<div class="padding-large">
<div class="padding-small">
<div id="id-autocorrect-dialog-chk-fl-cells"></div>
</div>
</div>

View file

@ -325,6 +325,17 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-numbered", checked);
me.api.asc_SetAutomaticNumberedLists(checked);
});
this.chDoubleSpaces = new Common.UI.CheckBox({
el: panelAutoFormat.find('#id-autocorrect-dialog-chk-double-space'),
labelText: this.textDoubleSpaces,
value: Common.Utils.InternalSettings.get(this.appPrefix + "settings-autoformat-double-space")
}).on('change', function(field, newValue, oldValue, eOpts){
var checked = (field.getValue()==='checked');
Common.localStorage.setBool(me.appPrefix + "settings-autoformat-double-space", checked);
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-double-space", checked);
me.api.asc_SetAutoCorrectDoubleSpaceWithPeriod(checked);
});
this.chDoubleSpaces.setVisible(this.appPrefix=='de-');
// AutoCorrect
this.chFLSentence = new Common.UI.CheckBox({
el: $window.find('#id-autocorrect-dialog-chk-fl-sentence'),
@ -841,7 +852,8 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
textAutoCorrect: 'AutoCorrect',
textFLSentence: 'Capitalize first letter of sentences',
textHyperlink: 'Internet and network paths with hyperlinks',
textFLCells: 'Capitalize first letter of table cells'
textFLCells: 'Capitalize first letter of table cells',
textDoubleSpaces: 'Add period with double-space'
}, Common.Views.AutoCorrectDialog || {}))
});

View file

@ -2663,6 +2663,10 @@ define([
value = Common.localStorage.getBool("de-settings-autoformat-fl-cells", true);
Common.Utils.InternalSettings.set("de-settings-autoformat-fl-cells", value);
me.api.asc_SetAutoCorrectFirstLetterOfCells(value);
value = Common.localStorage.getBool("de-settings-autoformat-double-space", Common.Utils.isMac); // add period with double-space in MacOs by default
Common.Utils.InternalSettings.set("de-settings-autoformat-double-space", value);
me.api.asc_SetAutoCorrectDoubleSpaceWithPeriod(value);
},
showRenameUserDialog: function() {

View file

@ -234,6 +234,7 @@
"Common.Views.AutoCorrectDialog.warnReplace": "The autocorrect entry for %1 already exists. Do you want to replace it?",
"Common.Views.AutoCorrectDialog.warnReset": "Any autocorrect you added will be removed and the changed ones will be restored to their original values. Do you want to continue?",
"Common.Views.AutoCorrectDialog.warnRestore": "The autocorrect entry for %1 will be reset to its original value. Do you want to continue?",
"Common.Views.AutoCorrectDialog.textDoubleSpaces": "Add period with double-space",
"Common.Views.Chat.textSend": "Send",
"Common.Views.Comments.mniAuthorAsc": "Author A to Z",
"Common.Views.Comments.mniAuthorDesc": "Author Z to A",