alphagov/smart-answers — pull request #1088 by dsingleton (2014-08-22 17:07:00+00:00)
Title: Proposal: Could we remove hint, and replace it with body?

In ruby/YML Smart Answer questions there is mixed use of `body` and `hint` as explanatory text. The majority of which only use one of these fields.

Visually they're treated more or less the same, and the kind of content used in each is almost identical. Where only one field is present and usage is identical we should standardise on one of those fields - this should be `body` as `hint` is semantically different (IMO).

There are some Smart Answers questions that do use both fields, which make standardising usage harder. This PR adds a couple of rake tasks to programatically detect how common usage of both is. From there we can decide if it's possible to reword the two fields in to one, or if there is a distinct need for a semantically different `hint` field.

Both tasks take a different approach to parsing the question data to detect mixed usage and both miss some cases but combined should cover all questions.

**Flow questions with mixed usage of hint and body**
* [am-i-getting-minimum-wage.how_often_do_you_get_paid?](https://github.com/alphagov/smart-answers/blob/master/lib/smart_answer_flows/locales/en/am-i-getting-minimum-wage.yml)
* [am-i-getting-minimum-wage.how_often_did_you_get_paid?](https://github.com/alphagov/smart-answers/blob/master/lib/smart_answer_flows/locales/en/am-i-getting-minimum-wage.yml)
[calculate-married-couples-allowance.how_much_expected_contributions_before_tax?](https://github.com/alphagov/smart-* answers/blob/master/lib/smart_answer_flows/locales/en/calculate-married-couples-allowance.yml)
* [calculate-state-pension.years_of_benefit?](https://github.com/alphagov/smart-answers/blob/master/lib/smart_answer_flows/locales/en/calculate-state-pension.yml)
* [calculate-state-pension.years_of_caring?](https://github.com/alphagov/smart-answers/blob/master/lib/smart_answer_flows/locales/en/calculate-state-pension.yml)
* [calculate-your-child-maintenance.gets_benefits?](https://github.com/alphagov/smart-answers/blob/master/lib/smart_answer_flows/locales/en/calculate-your-child-maintenance.yml)
[energy-grants-calculator.what_are_your_circumstances_without_bills_help?](https://github.com/alphagov/smart-* answers/blob/master/lib/smart_answer_flows/locales/en/energy-grants-calculator.yml)
[minimum-wage-calculator-employers.how_often_do_you_get_paid?](https://github.com/alphagov/smart-* answers/blob/master/lib/smart_answer_flows/locales/en/minimum-wage-calculator-employers.yml)
[minimum-wage-calculator-employers.how_often_did_you_get_paid?](https://github.com/alphagov/smart-* answers/blob/master/lib/smart_answer_flows/locales/en/minimum-wage-calculator-employers.yml)