Bug 90862 - French: apply same non-breaking space auto-correction as " to « and »
Summary: French: apply same non-breaking space auto-correction as " to « and »
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.3.2 release
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: AutoCorrect-Complete
  Show dependency treegraph
 
Reported: 2015-04-25 14:12 UTC by yvan
Modified: 2019-12-29 17:12 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yvan 2015-04-25 14:12:02 UTC
Hi,

If you type a french document, " symbols will be replaced by « or », and a non-breaking space will be added («_foo_»): this is really helpfull, especially because « and » symbols are not available on the usual french keyboard layout.

The problem is when you use the "bépo" keyboard layout (rarely used but optimized for french language, "dvorak" equivalent): you can directly type « or » symbols, but the non-breakable spaces are not added.

This means that if you just replace " by « or » when you type (which is the most instinctive), it will not auto-correct anything and you and up with «foo» instead of «_foo_».

So currently, you have two solutions using the "bépo" layout:
 - manually type the non-breakable spaces (with Shift+Space)
 - continue to use the " key (which is easily available on the "bépo" layout)

I think it would make sense:
 - if « is typed, to add a non-breakable space after
 - if » is typed, to add a non-breakable space before

Regards,
Yvan
Comment 1 Jean-Baptiste Faure 2015-04-26 06:39:12 UTC
Did you try to add these auto-correction in your own LO user profile? It should work. Please could you confirm that it does?

A workaround: you can install the grammar checker for French Grammalecte, it has a text formatter which does such kind of change on an existing document.
http://extensions.libreoffice.org/extension-center/grammalecte

Setting status to NEEDINFO, please set it back to UNCONFIRMED once you have provided requested informations.

Best regards. JBF
Comment 2 yvan 2015-04-26 08:52:44 UTC
Thanks for the fast answer.

I did not try to add this to the auto-correction feature: I never thought about it, sorry.

I did not mamage to do it, probably because I do not understand very well how this woks. I added two rules which work individually but not together:
 - "«.*" -> "«_"
 - ".*»" -> "_»"

If there is a working rule (I would be glad to help finding it out), I think it should be set up automatically:
 - I am not a beginner, but I already spent 20 minutes for a non-working solution
 - I do not imagine any situation where someone would be annoyed by this

What is your opinion about this ?
Comment 3 Jean-Baptiste Faure 2015-04-27 04:18:13 UTC
What do you mean by "... which work individually but not together" ?
You need to define 2 auto-correction rules, one for « and one for », it is how auto-correction works.

Best regards. JBF
Comment 4 Joel Madero 2015-04-27 06:37:25 UTC
Setting as NOTABUG - seems like the solution is just to use auto correct.

@Yvan - I suggest asking on the user list if you continue having problems. If after asking other users you still think this is a bug, please come back and set the bug to UNCONFIRMED with a comment with your findings. Thanks!
Comment 5 yvan 2015-04-28 18:33:46 UTC
@(In reply to Jean-Baptiste Faure from comment #3)
> What do you mean by "... which work individually but not together" ?
> You need to define 2 auto-correction rules, one for « and one for », it is
> how auto-correction works.
> 
> Best regards. JBF

Thanks for trying to help: Indeed, I wrote 2 auto-correction rules, which are as I said:
 - "«.*" should be auto-correct by "«_"
 - ".*»" should be auto-correct by "_»"
If I set only one of these, the one which is set works. But if the two rules are set, it auto-correct like this :
 «foo» -> «_foo»


But yes Joel you are right: this is not the point of this bug report.

Whatever these rules are, I think they should be added to the default configuration. Indeed, it IS a bug (very small I agree), if this is not auto-corrected. If not, then this means that LibreOffice does not respect French quoting style.
And that is a pity, because this can only occur if you have a keyboard layout created specifically for french (and if you have one it means that you want to follow french rules).

Moreover, as I said, I suppose this is a minor change, not difficult to implement and which can not cause troubles.

I set again this bug to unconfirmed. If you still think this is not a bug, you can close it.

Regards,
Yvan
Comment 6 Jean-Baptiste Faure 2015-04-29 04:58:19 UTC
(In reply to yvan.masson from comment #5)
[...]
> If I set only one of these, the one which is set works. But if the two rules
> are set, it auto-correct like this :
>  «foo» -> «_foo»

How did you proceed to test that? Did you type each character of «foo» or did copy&paste the whole string? Did you type a space after the » ?

Best regards. JBF
Comment 7 yvan 2015-04-29 14:16:50 UTC
(In reply to Jean-Baptiste Faure from comment #6)
> (In reply to yvan.masson from comment #5)
> [...]
> > If I set only one of these, the one which is set works. But if the two rules
> > are set, it auto-correct like this :
> >  «foo» -> «_foo»
> 
> How did you proceed to test that? Did you type each character of «foo» or
> did copy&paste the whole string? Did you type a space after the » ?
> 
> Best regards. JBF

As Joel Madero said, this might not be the right place to discuss about this workaround. But yes, that I typed every characters («foo»), and when I type a space after, it corrects it to «_foo». You can reproduce it without a "bépo" layout, by adding the special characters "«" and "»".

Again, the point of this bug report is to say that a default LibreOffice installation should, for french text, apply the same rules for "«" and "»" than for double quotes (").

Regards,
Yvan
Comment 8 Gordo 2015-05-28 14:58:48 UTC
I am able to autocorrect double quotes (with replace double quotes off) to «_ and _».  I also did it with two letters--ww.

.*" → _»
".* → «_

I see no reason why it shouldn't work with .*» and «.*  Remember, you have to click the New button each time before you OK.

Version: 4.4.3.2
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16

4.3.6.2

Changed to enhancement as the rule for the double quote is not part of the replace list but exists somewhere else.  Using the default guillemet with French locale, except Switzerland, should have a non-breaking space added as well.