afch-rewrite icon indicating copy to clipboard operation
afch-rewrite copied to clipboard

Use proper grammar for decline reasons in edit summaries

Open perryprog opened this issue 3 years ago • 6 comments

(Related: #103)

Currently the built edit summary for a decline is simply made up from content of the options in select#declineReason for the decline template. This can lead to oddly worded edit summaries like

Declining submission: v - Submission is improperly sourced and nn - Submission is about a topic not yet shown to meet general notability guidelines (be more specific if possible)

Ideally, this would be worded closer to something like

Declining submission: improperly sourced and topic is not yet shown to meet the [[WP:GNG|general notability guidelines]].

While this is a pretty darn minor issue, I think it's worth being addressed. One way to go about this might be to extract the list of decline reasons to a JS object (or JSON—using JSON5 here for demonstration purposes) which could look something like:

{
  // [...]
  groups: [
    {
      label: "Notability",
      options: [
        {
          value: "neo",
          reviewerText: "neo – submission is about a neologisim not yet shown to meet notability guidelines",
          editSummaryText: "neologisim not yet shown to meet notability guidelines"
        },
      ]
    }
  ]
}

I'm not totally in love with this because it's ridiculously over-verbose, so there's probably a better solution, ideally one that doesn't violate DRY as much as the proposed JSON(5) would.

(Also, open en dashes—not em dashes, which I normally favor—look much better in both the list and edit summary ;).)

Referenced code

https://github.com/WPAFC/afch-rewrite/blob/9002cd4e91bb37b4e4bf62bec4858736015c986b/src/modules/submissions.js#L2271-L2296 https://github.com/WPAFC/afch-rewrite/blob/9002cd4e91bb37b4e4bf62bec4858736015c986b/src/templates/tpl-submissions.html#L201-L249

perryprog avatar Jan 16 '21 21:01 perryprog