errata-ai / Google

A Vale-compatible implementation of the Google Developer Documentation Style Guide.
MIT License
69 stars 23 forks source link

Updated rule for American Spelling #28

Closed kayx23 closed 1 year ago

kayx23 commented 1 year ago

Added rules to pick up words like centre, theatre, colour, labour etc.

Also, for the token that checks for -logue, I have questions. For example, I think both catalogue and catalog are acceptable for American English if I'm not mistaken? Or maybe if you can find any supporting evidence on catalog being preferred for American English to persuade me?? Lived in Canada and may be confused.

jdkato commented 1 year ago

I try not to make these judgement calls myself (and I'm certainly not interested in persuading you either way); the goal here is to simply be representative of the upstream guide.

It looks like there's now a callout addressing some of these cases:

Note: There are some spellings that some Americans tend to think of as British but that are common in the US. In particular, words with "-lling" and "-lled" endings (travelling, travelled) are acceptable American spellings according to MW11; likewise theatre, aesthetic, axe, catalogue, and others. More generally, there are lots of words that have multiple acceptable spellings.

And for other cases, they say:

When in doubt about the spelling of a word, first see the word list; if it's not covered there, then see Merriam-Webster's Collegiate Dictionary, Eleventh Edition (abbreviated as MW11).

So, it looks like "catalogue" should be removed and "theatre" shouldn't be added.

kayx23 commented 1 year ago

@jdkato Please see the updated. Removed -tre entirely and added a few words. Removed -our as well because of words such as flour.

jdkato commented 1 year ago

According to the guide (see here), there are only two cases:

  1. We favor the American spelling; or
  2. we do nothing.

There's no case in which we would alert about, for example, "center."

Additionally, we can't solely base the rule off of suffixes: "theatre" is OK but "centre" is not.

kayx23 commented 1 year ago

I mistyped center previously. It was centre that I wanted to check for and alert users. Please check again, thanks.

jdkato commented 1 year ago

Looks good, thanks.