wm3 icon indicating copy to clipboard operation
wm3 copied to clipboard

Writemonkey for french

Open h-u-g-u-e-s opened this issue 5 years ago • 3 comments

Hello, I use Writemonkey to write mostly in French. Is it possible to add custom autocorrect strings to taylor the application for this language?

E.g.:

  • "" --> « »
  • ? -->  ?
  • '+E --> É
  • ' --> (curly version, not strictly french-specific)
  • etc.

h-u-g-u-e-s avatar Feb 03 '20 11:02 h-u-g-u-e-s

Hi, you can use Autoreplace plugin (https://github.com/writemonkey/wm3/wiki/Documentation#auto-replace) for those. Note that replacements are made after space is pressed. Also, quotes will cause problem because of smart characters (https://github.com/writemonkey/wm3/wiki/Documentation#smart-characters). Those can be reconfigured, though. i.

writemonkey avatar Feb 03 '20 19:02 writemonkey

Thank you. I used Autoreplace and disabled Smart Characters.

  1. Is it possible to enter a non-breaking space in Autoreplace's package.json?   does not work.
  2. Is it possible to replace similar items with some code? E.g.: ' plus A E I O U output À È Ì Ò Ù (instead of writing each in a single line:)
{"t": "'A", "À": "", "moveCursor": 0, "keepSpace": false},
{"t": "'E", "È": "", "moveCursor": 0, "keepSpace": false},
etc.

I'll be happy to post my workaround for other french users.

h-u-g-u-e-s avatar Feb 04 '20 08:02 h-u-g-u-e-s

So, I've prepend:

{ "t": "'E", "r": "É", "moveCursor": 0, "keepSpace": false },
{ "t": "`A", "r": "À", "moveCursor": 0, "keepSpace": false },
{ "t": "`E", "r": "È", "moveCursor": 0, "keepSpace": false },
{ "t": "`U", "r": "Ù", "moveCursor": 0, "keepSpace": false },
{ "t": ",C", "r": "Ç", "moveCursor": 0, "keepSpace": false },
{ "t": "OE", "r": "Œ", "moveCursor": 0, "keepSpace": false },
{ "t": "oe", "r": "œ", "moveCursor": 0, "keepSpace": false },
{ "t": "AE", "r": "Æ", "moveCursor": 0, "keepSpace": false },
{ "t": "ae", "r": "æ", "moveCursor": 0, "keepSpace": false },

and these should normally do for anyone with an AZERTY keyboard for diacritics and ligatures.

I am still helpless though concerning typography, and specially spaces. One way of going about it would be to leave the input screen unchanged and have only the output/preview modified: e.g. Écoutez-vous: "Für Elise"? or Écoutez-vous : "Für Elise" ? in WM would output:

  • Écoutez-vousnbsp: «nbspFür Elisenbsp»nbsp?

But I don't know where to start. I also don't understand how to get Smartypants to work.

h-u-g-u-e-s avatar Feb 26 '20 09:02 h-u-g-u-e-s