strangerstudios / paid-memberships-pro

WordPress membership plugin to restrict access to content and charge recurring subscriptions using Stripe, PayPal, and more. Fully open source. 100% GPL.
https://www.paidmembershipspro.com
Other
465 stars 358 forks source link

How do you spell cancelled? #773

Open ideadude opened 6 years ago

ideadude commented 6 years ago

We spell it with 2 l's usually. Here is the one case where we don't:

https://github.com/strangerstudios/paid-memberships-pro/blob/991993479b6df3217b4b80d2fb63f1fee970e300/services/ipnhandler.php#L323

Many of the included libraries use one l in their code and strings.

https://www.grammarly.com/blog/canceled-vs-cancelled/

We are US based and should probably favor what's more common here: one L. Per this post: https://www.grammarly.com/blog/canceled-vs-cancelled/ Also, I feel like US versions of words are beating out UK versions on the world stage when things like this come up. However, in this case it seems like the US vs the rest of the world and the US isn't super consistent on its use anyway.

I probably went with 2 l's initially because it has more Google results (145m vs 101m at this time). Probably not an accurate way to make these judgements.

I also consider not just the current state of popularity for a spelling but the direction things seem to be moving in.

The article linked to above seems to believe the one l will rule in US and two l's in the UK. This article (https://grammarist.com/spelling/cancel/) says "American English has only recently adopted the one-l spellings of canceled, canceling, etc., and the change is not fully engrained in the American language."

It also goes on to say "In web searches of American publications covering the last couple of years, cancelled and cancelling still appear about once for every five instances of canceled and canceling. Outside the U.S., meanwhile, the one-l spellings appear only very rarely. This is true even in Canada, which is usually friendlier to American spelling idiosyncrasies than is the rest of the English-speaking world."

Another link of grammar peeps talking about this: https://english.stackexchange.com/questions/176957/cancellation-canceled-canceling-us-usage

This issue is a bit pedantic, but could lead us to make decisions around what kinds of spellings we use. With localization, we can use one l in the base translation (US English) and leave the translating to 2 ls to the translations. However, these words are used a lot in the code as well. When writing a function name or variable, which spelling should we use? US English? Or the more common world wide spelling?

eighty20results commented 6 years ago

When writing a function name or variable, which spelling should we use? US English? Or the more common world wide spelling?

IMO, it depends on how inclusive you want to be when developing. I.e. how interested you are in getting more collaborators onboard vs hiring people to develop for you.

If you want this to be a OSS project, you'd go with international (more people, more opportunity, less adaptation needed).

If you want it to be a Stranger Studios, LLC owned and developed project, you do whatever works for you.

ideadude commented 6 years ago

I agree RE the motivation to use international spellings to be more inclusive, but it seems like US English has become standard for many OSS projects and so using the US English as is expected may actually be easier and more consistent.

https://softwareengineering.stackexchange.com/questions/191982/choosing-between-words-with-different-spellings-for-function-names

And, e.g., the Stripe and Braintree APIs use the one l variant. (Although I see a two l that snuck into a comment in the Stripe API).

Another thing I should mention is that since we are already using the 2 l version in this point, it's a bigger deal to change to 1 l. It will break all translations with that string. Also our status, which is stored in the DB and checked by other add-ons and third party plugins is spelled cancelled and so in this case, I'm heavily inclined to stick to 2 ls.