bartosz-antosik / vscode-spellright

Multilingual, Offline and Lightweight Spellchecker for Visual Studio Code
Other
359 stars 36 forks source link

Contractions with straight apostrophes in French #568

Open kysko opened 9 months ago

kysko commented 9 months ago

Hello, and firstly thanks for this VS Code extension.

The TLDR for this issue is this: contracted articles or adjectives or pronouns with straight apostrophes in French disappear upon correction.


For example, when writing in French (or French-Canadian locale in my case), the extension will correctly see l'etang as an error, but will correct it with étang, rather than l'étang: the l' disappear.

However:

Now, the correct (or most correct) typography in French is the curly apostrophe in these cases, which usually will be automatic in word processors (Word, LO Write, etc), but not so much in plain text editors like VS Code where the straight apostrophe will be inserted. In my case, a tool like pandoc will transform those straight apostrophes into curly ones. (And frankly, I prefer it that way.)

If that can help, affected contracted forms to be split from can be:

c', d', j', l', m', n', qu', s', t'

and also puisqu', lorsqu', jusqu', quelqu'

followed by a word to check.

(A weird form like aujourd'hui is already correctly recognized as a word in the dictionary, so nothing to do with this.)

Another example: puisq'alors will (correctly) be seen as a mistake, and (correctly) corrected to puisqu'alors, without curly apostrophe: so it does recognize straight apostrophes. However, the error puisqu'alor will only propose alors for a correction, and would forget the puisqu' prefix.

Maybe it's just a question of proper splitting, like in the English possessive cases; I hope it's that simple, and not too deep into the OS's backend spell checker.

OS: Windows 10
locale: French (Canada)
Document: markdown

(Straight apostrophes can occur even in French texts from France. See here for example, so this is not only a french-canadian keyboard/locale situation.)