mapbox / retext-mapbox-standard

Enforce Mapbox rules about language.
Other
139 stars 15 forks source link

implement simple words swap module #2

Closed tmcw closed 8 years ago

tmcw commented 8 years ago

https://github.com/katydecorah/copy-cop/blob/gh-pages/_data/swap.yml

Implement this as another retext transformer.

wooorm commented 8 years ago

Cool, is it okay if I publish this as a retext plug-in?

wooorm commented 8 years ago

Also maybe useful:

wooorm commented 8 years ago

This should do it: retext-simplify. I pulled several lists down, and combined them. It took some time because I externalised several functionality (which was inside retext-equality).

The phrases can be found here.

Also, probably also of interest in nlcst-search, which does the core of this project (and soon, retext-equality), as it finds patterns in the retext tree.

wooorm commented 8 years ago

Forgot to reference GH-1, which mentions phrase support.

tmcw commented 8 years ago

Awesome! Still unfortunately there's quite a bit of technical language which isn't the same as the simple form:

  191:5-191:11   warning  Replace “Delete” with “cut”, “drop”  delete
  200:14-200:21  warning  Replace “request” with “ask”         request
  218:14-218:21  warning  Replace “request” with “ask”         request
  224:6-224:16   warning  Replace “Parameters” with “limits”   parameters
  234:14-234:21  warning  Replace “request” with “ask”         request
  244:14-244:21  warning  Replace “request” with “ask”         request
  250:5-250:12   warning  Replace “request” with “ask”         request
  258:5-258:11   warning  Replace “Delete” with “cut”, “drop”  delete
  271:14-271:21  warning  Replace “request” with “ask”         request
 52:34-52:38      warning  Remove “type”                                               type
  52:53-52:60      warning  Replace “request” with “ask”                                request
  97:7-97:14       warning  Replace “maximum” with “greatest”, “largest”, “most”        maximum
  101:114-101:119  warning  Remove “it is”                                              it is
  36:26-36:35    warning  Replace “currently” with “now”, or remove it                  currently
  39:56-39:63    warning  Replace “forward” with “send”                                 forward

So false-positives for us are: forward, currently, request, maximum, delete, parameters, type - I don't think we have a simpler version of any of these to use instead.

wooorm commented 8 years ago

Thanks for the feedback! I can definitely relate to these, in fact, false positives can really hurt the pleasure of working with a product so I'd like to make this better.

  1. Foremost, these phrases were plucked off of the Internet, some cases are pretty rare but very frustrating, so it would be better to remove them;
  2. Some are pretty standard language in programming, these cases should be enabled or disabled per project (for example, I can imagine Mapbox having a list of “allowed” terms;
  3. Last, some cases should be ignored inline. I'm thinking of creating a project to disable warnings on a per plugin (such as retext-simplify) and per phrase (such as "request") basis, something like <!--simplify ignore request--> to silence warnings in the next paragraph.

If those three measures exist, which phrases would you have for what point (I’m most interest in 1.)? And, will these three measures be enough? Or, might there be a better solution?

wooorm commented 8 years ago

Fixed some typos. Gah. :anguished:

wooorm commented 8 years ago

retext-equality can now ignore certain warnings through options. Plus, there’s now a way to control which messages are ignored from inside markdown: remark-message-control, it’s used inside alex so check it’s source code out if you’d want to implement it :)

wooorm commented 8 years ago

Gah, again, wrong issue, meant for GH-4.

tmcw commented 8 years ago

:+1: retext-simplify is awesome :)