nsis icon indicating copy to clipboard operation
nsis copied to clipboard

Fix typos found by codespell

Open DimitriPapadopoulos opened this issue 2 years ago • 10 comments

Some typos are in user-visible strings and documentation, others are in code comments.

In the long term, I recommend fixing all typos, including those in code comments, because tools like codespell do not make a difference between code comments and documentation and user-visible strings.

I have left out typos in Contrib, they should be fixed upstream.

DimitriPapadopoulos avatar Dec 30 '21 19:12 DimitriPapadopoulos

Not sure about _miscrosoft_docs_are_wrong_microsoft_docs_are_wrong.

I believe it's OK because it's a private variable.

DimitriPapadopoulos avatar Dec 30 '21 20:12 DimitriPapadopoulos

I have left out typos in Contrib, they should be fixed upstream

We own most of Contrib. If there is anything upstream I'll deal with it.

sredna avatar Dec 30 '21 23:12 sredna

Fixed typos in Contrib too.

DimitriPapadopoulos avatar Dec 31 '21 00:12 DimitriPapadopoulos

I have left out Language files by the way.

There may be a few starting comments in English to fix, for example appropiateappropriate: https://github.com/kichik/nsis/blob/268379229b0c1ef00603779890a28d0345ab0240/Contrib/Language%20files/Romanian.nsh#L8

Should I fix these comments?

Edit: That's actually the only typo in there; I have fixed it.

DimitriPapadopoulos avatar Dec 31 '21 07:12 DimitriPapadopoulos

And I just noticed part of the initial fixes, under Docs/src/halibut, must actually be fixed upstream.

Edit: I've sent a mail to the upstream maintainer. Edit: Ongoing discussion with the upstream maintainer: are both bulletted and bulleted (as in the Oxford dictionary) correct in UK English?

DimitriPapadopoulos avatar Dec 31 '21 08:12 DimitriPapadopoulos

are both bulletted and bulleted (as in the Oxford dictionary) correct in UK English?

Bulletted only has 35k hits on Google vs millions for Bulleted. I'll take the fix.

sredna avatar Dec 31 '21 15:12 sredna

I see you have merged this change into the Subversion trunk. Thanks! Would it be worth adding a configuration file .codespellrc to silence false positives and simplify future maintenance?

DimitriPapadopoulos avatar Jan 10 '22 07:01 DimitriPapadopoulos

I suppose that depends on how many false-positives you had to deal with and what the maintenance overhead is...

sredna avatar Jan 10 '22 12:01 sredna

I am afraid nsis has many false positives:

$ codespell | wc -l
954
$ 

Most of them are in translation files that should be skipped. A .codespellrc file could drastically reduce that number by skipping these files. For example:

$ codespell --skip 'Language files' | wc -l
226
$ 

The can further reduce that number by ignoring some words:

$ codespell --skip 'Language files' --ignore-words-list parms | wc -l
133
$ 

The benefit of a .codespllrc is that developers get consistent results when running codespell locally.

DimitriPapadopoulos avatar Jan 10 '22 16:01 DimitriPapadopoulos

All fixes have been merged, thank you. I have added a .codespellrc file and fixed the last typos. Do you think it's worth merging?

DimitriPapadopoulos avatar Jan 19 '22 20:01 DimitriPapadopoulos