ONLYOFFICE / DesktopEditors

An office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents
https://www.onlyoffice.com
Other
2.65k stars 312 forks source link

Ability to edit language exceptional behavior ([french]unbreakable spaces before puntuation, etc.) #1387

Open Bakaba opened 8 months ago

Bakaba commented 8 months ago

This issue is unique.

Your idea.

When you type some characters, it automatically adds a space. I want the possibility to disable that and also set the behavior manually if possible.

Edit: That is due to the document language, as some language have different formatting. The thing is: It depends on my current keyboard layout while "Spelling language detection" is enabled. I've disabled it for a temporarily fix until custom parameters can be set for each language. (Or a overwriting parameter)

Bakaba commented 8 months ago

The workaround mentioned in #1370 temporarily fixes this, as this is linked to document language. I still expect a custom behavior while keeping the language (for spellchecking by example).

ElenaMaaya commented 8 months ago

Hello @Bakaba! Thank you for report! Please If you have a specific example give it. Thank you!

Bakaba commented 8 months ago

Thanks for your answer!

By example, in the menu "AutoCorrect" in "Advanced Setting", there is the "Autoformat as you type" tab in which you can check some replace behaviors. https://puu.sh/JThcz/8a8a54d57b.png Instead of having only a checklist, you can make it more like the "Math Autocorrect" tab, with a language selection menu (+ a special entry that applies whatever in it regardless of language and takes priority over the rest: an "All languages" selection) with all the replaced characters for that language. https://puu.sh/JThcD/2b2825b178.png https://puu.sh/JThcZ/a2882c4ed5.png

LibreOffice has this for instance: https://puu.sh/JTheT/74407e157b.png

As for language exceptions (such as the space before some special character), they can be put below the replacing menu for a quick shortcut. LibreOffice way: https://puu.sh/JThfP/dc6a827941.png https://puu.sh/JThfS/a42f33ecf5.png

ElenaMaaya commented 8 months ago

@Bakaba, we are very grateful for your help! We are glad that our product is generating interest among the community! I will test the problem and give you the information as a result.

ElenaMaaya commented 8 months ago

@Bakaba, thanks for your help! You gave great ideas! You suggested four new options:

  1. Add French to "Exceptions for the language".
    1. Add the option: [M]: Replace while modifying existing text /[T]: AutoCorrect while typing.
    2. Add the option "Add non-breaking space before specific punctuation marks in French text".
    3. Add option: enter and save custom text autocorrect. But, there are four issues. If you're able to process them, it would be fantastic.

But I'll go back to where we started our conversation now :)

The title issue is "Ability to disable spaces before a ":" when typing it". A problem is indicated by this name. I’m sorry, that problem is not repeated on Windows 11, version 7.5.0. But you go on to write: "The thing is: It depends on my current keyboard layout while "Spelling language detection" is enabled."

Can you tell me the name of the current keyboard layout? Thanks!

Bakaba commented 8 months ago

The 4 issues you decomposed from my post is in reality only one big feature: Language exception. And since each language has its exceptions, I've choose to take one example which is "Removing the space before ':' character". I'll edit the title to reflect this.

Of course, a lot of people from different language will expect to be able to edit their own language exceptions, it would be weird to add only french ones. That said, I have 2 keyboard layouts: "日本語(Japanese)" and "French(France)". The issue occurs when I have the french keyboard layout and with "Spelling Language Detection" enabled, which switch the language document to "Français (France)" each time I use the layout.

And with that document language, it'll begin to add unbreakable spaces, etc, as the typical french typing behavior. But I'm using my french layout to write english too (since I own an AZERTY leyboard) and/or I want to save space in a document while writing french.

I hope you have enough info, I'll edit the name to a more general feature request. Thank you!

ElenaMaaya commented 8 months ago

Hello, @Bakaba. Thank you for the enhancement. I created ticket as issue 65065 in our issues tracker. This issue actual in Document Server.

Rita-Bubnova commented 8 months ago

Moving this issue to DocumentServer, because it is our main repository.