Bug 132300 - Abbreviations :XX: for autocorrection do not work in French
Summary: Abbreviations :XX: for autocorrection do not work in French
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
6.3.5.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: AutoCorrect-Complete
  Show dependency treegraph
 
Reported: 2020-04-21 14:28 UTC by Silvain Dupertuis
Modified: 2021-02-25 11:45 UTC (History)
3 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 Silvain Dupertuis 2020-04-21 14:28:39 UTC
Description:
In French, typography rules add a non-breaking space before so-called double-punctuation signs (!?:;). Consequently, autocorrection abbreviations like 
:1/2: to produce ½ do not work, because the space is inserted before the treatment of the abbreviation.
Work around: I replaced these abbreviation using a comma as the ending character in the DocumentList.xml file within the archive file acor_fr-CH.dat in the configuration folder, autocorr subfolder - for me, it is
/home/<my-user-name>/.config/libreoffice/4/user/autocorr/

Steps to Reproduce:
1. Open Writer, document using French and autocorrection on
2. Type :1/2:<spaceY


Actual Results:
3. It produces :1/2<non-breaking-space>: )

Expected Results:
It should procude a ½ character


Reproducible: Always


User Profile Reset: No



Additional Info:
This is just a collision between the choice of a system of abbreviations in autocorrection and the rules of French typography.
Comment 1 Julien Nabet 2020-04-22 08:26:06 UTC
You can also remove the unbreakable space after having typed the second ":" then if you type enter, the replace will be made.
Comment 2 Mike Kaganski 2020-04-22 11:16:00 UTC
So the problem seems to be the order of the replacements? I feel it would be logical to do them in the opposite order - would it break something?
Comment 3 Buovjaga 2020-08-23 15:46:50 UTC
(In reply to Mike Kaganski from comment #2)
> So the problem seems to be the order of the replacements? I feel it would be
> logical to do them in the opposite order - would it break something?

Silvain, Julien: can you reflect on this question?
Comment 4 Julien Nabet 2020-08-23 21:39:15 UTC
(In reply to Buovjaga from comment #3)
> (In reply to Mike Kaganski from comment #2)
> > So the problem seems to be the order of the replacements? I feel it would be
> > logical to do them in the opposite order - would it break something?
> 
> Silvain, Julien: can you reflect on this question?

I don't know if there may be some cons, I mean perhaps there may also be some situations where this opposite order might be wrong.
Comment 5 Silvain Dupertuis 2020-08-24 06:08:25 UTC
As far as I understand, I do not see that using these autocorrection replacements before the typographic rules would break anything.
Comment 6 Buovjaga 2020-08-24 06:35:23 UTC
Ok, I guess a possibility is to come up with the change and merge it very early on in pre-alpha stage. Then the French community could test the heck out of it. If it causes other problems, it will be reverted.
Comment 7 Julien Nabet 2021-01-17 19:48:38 UTC
It seems the function to modify may be SvxAutoCorrect::DoAutoCorrect (see https://opengrok.libreoffice.org/xref/core/editeng/source/misc/svxacorr.cxx?r=ae56dc05#1302).
However, I don't measure the impact of changing the order of blocks and it seems it may impact other languages than French so too risky. If someone likes the risk, good luck! :-)
=> uncc myself.