mirror of
https://github.com/d99kris/nmail.git
synced 2026-04-26 09:46:01 +03:00
[GH-ISSUE #143] Aspell En dictionary #116
Labels
No labels
bug
enhancement
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nmail#116
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Vainyards on GitHub (Sep 22, 2023).
Original GitHub issue: https://github.com/d99kris/nmail/issues/143
Originally assigned to: @d99kris on GitHub.
Description:
How do I tell aspell to include EN dictionary?
@d99kris commented on GitHub (Sep 22, 2023):
I believe you can use the
--langargument to specify which language you'd like to use. The following config parameter in~/.nmail/main.confworks for me:@Vainyards commented on GitHub (Sep 26, 2023):
Great I will test, and see.
Since im writing both in Swedish and English.
Used nmail for a year but totally missed this function! XD
@d99kris commented on GitHub (Oct 1, 2023):
Hi @Vainyards - I see, well I think with
aspell --lang=en -cthen aspell will only use English dictionary. So if you want it to sometimes check Swedish and sometime English you could perhaps create a simple wrapper script that first detects language of the text, and then calls aspell. Something like this:Then save this as a text, e.g.
anyspell.sh, chmod it:chmod +x anyspell.shAnd finally point nmail to use it in
~/.nmail/main.conf:I'll proceed to close this issue, but feel free to re-open it if you have any follow-up questions or related issues.
@Vainyards commented on GitHub (Oct 4, 2023):
yes, it works, but I think I have some miss configuration on my mac.
It only looks for Swedish no matter what I type. Any suggestions on how to configure EN?
@d99kris commented on GitHub (Oct 7, 2023):
Does
aspellwork standalone if you specify English, i.e. like this (assuming you have a text file named README.md):If yes, maybe there's something wrong in the script I shared - it was just a quick hack. I did some more testing now and have made some updates to the script to make it a little more robust:
I tested it on a text file containing the following Swedish text:
As well as on a text file containing the following English text:
Language is detected correctly for both, and aspell can spell check them.
@Vainyards commented on GitHub (Oct 17, 2023):
Thanks, that probably solved something BUT I noticed aswell that I probably used too few characters for the script to work properly, now it recognize language! So it probably defaulted to SE when under 20 and did not recognize EN.