-
Notifications
You must be signed in to change notification settings - Fork 8
Testing language style #128
Comments
What about "shouldn't" and "hasn't"?
Sounds reasonable. However, I think that "simple" may appear in some descriptions for valid reasons, e.g. at https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/API/Simple_Push_API.
Agree. (Note that the style guide itself uses "we" at some places.)
Yes! Also other expressions like "HTML" instead of "html" for example.
Good point. We may need to add a whitelist for words where capitalization is allowed or needed, though, like for "JavaScript", "Web" (looks like there's no conclusion on that), "Firefox", etc.
Clear thing. Maybe we should also check other points of the style guide. Here are some more of them:
Sebastian |
CC'ing more people. @teoli2003, @wbamberg, @chrisdavidmills, @a2sheppy, @jmswisher, @markgif. I would appreciate thoughts on whether things that are mentioned above make sense to be tested as part of this add-on, so that our writing style is enforced more when doing reviews. |
Since you asked...I agree with all your points in the original comment except the first (I think disallowing contractions can result in much more stilted language). But with the exception of things are almost always actual errors (in your list "Javascript" is the only one I can see, and maybe he/she) I don't like the idea of baking these checks into a tool, since there are many exceptions and subtleties here. I'm arrogant enough about this to think that I'm more likely to be right than the tool, and I would be less likely to use the tool if it constantly nagged me about "problems" that I didn't see as problems. (More generally, although I'm quite opinionated about style, I try not to impose my opinions on other people too much. I think a pedantic adherence to an overly-prescriptive style guide leads to a bland homogeneity of writing.) |
I want to add that almost all of the points above only apply to English articles, so those tests should only be executed there and not shown in other languages. Sebastian |
I agree that disallowing contractions is a mistake. I encourage their From: wbamberg
|
I also disagree with disallowing "we". I think it's a good pronoun to use in tutorials, where you want the reader to feel as if they're on a guided tour "with MDN" as if it were a person. It's also difficult to write authorlessly when writing tutorials, and "I" is indeed to be avoided as it implies a certain "I know something you don't attitude." However, detecting "I" as a pronoun can be tricky, as it could in theory be a variable name or a Roman numeral. Neither of those should be true, but they could be... I suggest having a "style guide" checker, which looks for stuff specific to our style guide, then perhaps a separate grammar checker which uses an online grammar checking tool or a library to offer grammar suggestions (but not errors; grammar checkers are iffy if not used wisely). |
Hi Elchi3!! I mostly agree with you except I don't mind a few contractions (don't etc.). But I suppose it could be that non-native English speakers find contractions more difficult than fully spelling out the words. Just a guess. I kind of agree with sheppy on "we", in that limited use. |
Well, at least in Germany we learn the contractions at school together with their full-spelled equivalent. I don't know how it is in other countries, but I assume most of them should be known.
Then the question is, whether we want to accept false positives or not. Sebastian |
I agree with sheppy about "we" and contractions.
I agree with Florian's other points. |
Yes. This is something I am pretty picky about. It is surprising how many people use "tag" and "element" interchangeably. |
Thanks everyone! Great and fruitful discussion :) Here is my summary or "intent to implement" for a first iteration: If you check against an en-US article, let the test suite emit...
We will likely identify more things regarding language style (and discuss them), but I think these points are a good start. If there is no disagreement, we can open issues for the above list. |
We may open several issues for the points above, though I believe they should all be implemented under one test named Language style. If we agree on that, we'll need to fix issue #52 first, though. Sebastian |
I wonder if it would be worth investigating a way to use a mechanism for From: Florian Scholz
-- Sheppy |
Requesting these tests from a server might be an improvement in the future. Though, requesting the tests externally also implies some security risk and is slower. Furthermore I expect those tests to change relatively seldomly once they are implemented. Or is the writing style guide changing that frequently? Sebastian |
You're right, the tests shouldn't change often. But while the style Probably not worth the effort, but I needed time to work that out. :) From: Sebastian Zartner
-- Sheppy |
Perhaps a later iteration could allow for custom rules. For example, non-native speakers might want to be warned about certain problematic usages, while native speakers might not want to be bothered, as they trust themselves to know better than a tool about such things. |
Agreed; we can contemplate customizations later on. Focusing for now on From: Janet Swisher
-- Sheppy |
Re-filed as mdn/doc-linter-rules#19 |
Let me know if this is too opinionated, but I have some thoughts regarding writing style in documentation and I think it would help me to get some of this tested automatically when reviewing.
I think these things should be warnings, as you still have to look at the context and then judge them.
There is likely more, but this is a start. Would like to hear opinions if it makes sense to add these things (or a subset) as tests.
The text was updated successfully, but these errors were encountered: