Skip to content

Commit 871169a

Browse files
committed
Set the all-smart-answer-questions answer as an example
This uses the new text_for & govspeak_for helpers and drops the .govspeak extension from the filename.
1 parent c5d8f5d commit 871169a

18 files changed

+80
-80
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
<% render_content_for :meta_description do %>
1+
<% text_for :meta_description do %>
22
Do SEO magic here.
33
<% end %>
44

5-
<% render_content_for :title do %>
5+
<% text_for :title do %>
66
All Smart Answer questions
77
<% end %>
88

9-
<% render_content_for :body do %>
9+
<% govspeak_for :body do %>
1010
This flow shows all the different question types for Smart Answers.
1111
You can [peek at the results](/all-smart-answer-questions/y/mithrandir,olorin,tharkun/mordor/2019-01-01/1900-01-01/2020-02-29/0000-12-25/9999999.0/four/yes/WC2B%206NH/500000.0-month/world/0/0.5) and access all the different question types individually via changing the previous answers.
1212
<% end %>
1313

14-
<% render_content_for :post_body do %>
14+
<% govspeak_for :post_body do %>
1515
Enjoy!
1616
<% end %>
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<% render_content_for :title do %>
1+
<% text_for :title do %>
22
Congratulations
33
<% end %>
44

5-
<% render_content_for :body do %>
5+
<% govspeak_for :body do %>
66
You managed to get through all the questions.
77
<% end %>
88

9-
<% render_content_for :next_steps do %>
9+
<% govspeak_for :next_steps do %>
1010
Now you can close the browser. Or not.
1111
<% end %>
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
<% render_content_for :title do %>
1+
<% text_for :title do %>
22
Money question: How much does the world cost?
33
<% end %>
44

5-
<% render_content_for :body do %>
5+
<% govspeak_for :body do %>
66
Body can contain further explanations.
77
<% end %>
88

9-
<% render_content_for :suffix_label do %>
9+
<% text_for :suffix_label do %>
1010
this year
1111
<% end %>
1212

13-
<% render_content_for :error_message do %>
13+
<% text_for :error_message do %>
1414
It's gotta be more than that!
1515
<% end %>
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
<% render_content_for :title do %>
1+
<% text_for :title do %>
22
Salary question: What would you like your salary to be?
33
<% end %>
44

5-
<% render_content_for :body do %>
5+
<% govspeak_for :body do %>
66
Body can contain further explanations.
77

88
- and govspeak
99
<% end %>
1010

11-
<% render_content_for :hint do %>
11+
<% text_for :hint do %>
1212
This is a hint
1313
<% end %>
1414

15-
<% render_content_for :error_message do %>
15+
<% text_for :error_message do %>
1616
Really, not more?
1717
<% end %>
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<% render_content_for :title do %>
1+
<% text_for :title do %>
22
Multiple choice (yes/no): Would you like to see the other questions?
33
<% end %>
44

5-
<% render_content_for :body do %>
5+
<% govspeak_for :body do %>
66
Body can contain further explanations.
77

88
- and govspeak
99
<% end %>
1010

11-
<% render_content_for :hint do %>
11+
<% text_for :hint do %>
1212
This is a hint
1313
<% end %>
1414

@@ -17,6 +17,6 @@
1717
"no": "No"
1818
) %>
1919

20-
<% render_content_for :error_message do %>
20+
<% text_for :error_message do %>
2121
Of course you would!
2222
<% end %>
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
<% render_content_for :title do %>
1+
<% text_for :title do %>
22
Checkbox question: What are other names for Gandalf?
33
<% end %>
44

5-
<% render_content_for :body do %>
5+
<% govspeak_for :body do %>
66
Body can contain further explanations.
77

88
- also formatting in a govspeak style
99
- like this
1010
<% end %>
1111

12-
<% render_content_for :post_body do %>
12+
<% govspeak_for :post_body do %>
1313
Post body can contain less important information.
1414
<% end %>
1515

@@ -21,10 +21,10 @@
2121
"elrohir": "Elrohir"
2222
) %>
2323

24-
<% render_content_for :hint do %>
24+
<% text_for :hint do %>
2525
This is a hint
2626
<% end %>
2727

28-
<% render_content_for :error_message do %>
28+
<% text_for :error_message do %>
2929
It's neither Elrohir nor Radagast.
3030
<% end %>
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<% render_content_for :title do %>
1+
<% text_for :title do %>
22
Multiple choice: Which of these numbers is not a prime number?
33
<% end %>
44

5-
<% render_content_for :body do %>
5+
<% govspeak_for :body do %>
66
Body can contain further explanations.
77

88
- and govspeak
99
<% end %>
1010

11-
<% render_content_for :hint do %>
11+
<% text_for :hint do %>
1212
This is a hint
1313
<% end %>
1414

@@ -19,6 +19,6 @@
1919
"four": "Four"
2020
) %>
2121

22-
<% render_content_for :error_message do %>
22+
<% text_for :error_message do %>
2323
4 is divisible by 2.
2424
<% end %>
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<% render_content_for :title do %>
1+
<% text_for :title do %>
22
Country select: Where are you now?
33
<% end %>
44

5-
<% render_content_for :body do %>
5+
<% govspeak_for :body do %>
66
Body can contain further explanations.
77

88
- and also govspeak
99
<% end %>
1010

11-
<% render_content_for :error_message do %>
11+
<% text_for :error_message do %>
1212
You are currently in a fictional country?
1313
<% end %>
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<% render_content_for :title do %>
1+
<% text_for :title do %>
22
Date question: What date is tomorrow?
33
<% end %>
44

5-
<% render_content_for :body do %>
5+
<% govspeak_for :body do %>
66
Body can contain further explanations.
77

88
- and maybe govspeak
99
<% end %>
1010

11-
<% render_content_for :error_message do %>
11+
<% text_for :error_message do %>
1212
That's not tomorrow.
1313
<% end %>
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<% render_content_for :title do %>
1+
<% text_for :title do %>
22
Date question: What is your date of birth?
33
<% end %>
44

5-
<% render_content_for :body do %>
5+
<% govspeak_for :body do %>
66
Body can contain further explanations.
77

88
- and govspeak
99
<% end %>
1010

11-
<% render_content_for :error_message do %>
11+
<% text_for :error_message do %>
1212
You haven't been born yet.
1313
<% end %>
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<% render_content_for :title do %>
1+
<% text_for :title do %>
22
Date question: When is Christmas this year?
33
<% end %>
44

5-
<% render_content_for :body do %>
5+
<% govspeak_for :body do %>
66
Body can contain further explanations.
77

88
- and govspeak
99
<% end %>
1010

11-
<% render_content_for :error_message do %>
11+
<% text_for :error_message do %>
1212
That's not Christmas.
1313
<% end %>
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<% render_content_for :title do %>
1+
<% text_for :title do %>
22
Date question: When will be the next 29 February?
33
<% end %>
44

5-
<% render_content_for :body do %>
5+
<% govspeak_for :body do %>
66
Body can contain further explanations.
77

88
- and govspeak
99
<% end %>
1010

11-
<% render_content_for :error_message do %>
11+
<% text_for :error_message do %>
1212
That's not a leap year.
1313
<% end %>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<% text_for :title do %>
2+
Value/float question: What is 1/2?
3+
<% end %>
4+
5+
<% govspeak_for :body do %>
6+
Body can contain further explanations.
7+
<% end %>
8+
9+
<% text_for :label do %>
10+
Number
11+
<% end %>
12+
13+
<% text_for :error_message do %>
14+
0.5
15+
<% end %>

lib/smart_answer_flows/all-smart-answer-questions/questions/which_float.govspeak.erb

Lines changed: 0 additions & 15 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<% render_content_for :title do %>
1+
<% text_for :title do %>
22
Value/integer question: How many software engineers does it take to change a light bulb?
33
<% end %>
44

5-
<% render_content_for :body do %>
5+
<% govspeak_for :body do %>
66
Body can contain further explanations.
77
<% end %>
88

9-
<% render_content_for :error_message do %>
9+
<% text_for :error_message do %>
1010
None. That's a hardware problem. Or: The light bulb works fine on the system in my office. Or: Darkness is working as intended.
1111
<% end %>
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
<% render_content_for :title do %>
1+
<% text_for :title do %>
22
Postcode question: Where is Aviation House?
33
<% end %>
44

5-
<% render_content_for :body do %>
5+
<% govspeak_for :body do %>
66
Body can contain further explanations.
77
<% end %>
88

9-
<% render_content_for :hint do %>
9+
<% text_for :hint do %>
1010
This is a hint
1111
<% end %>
1212

13-
<% render_content_for :error_message do %>
13+
<% text_for :error_message do %>
1414
It's WC2B 6NH.
1515
<% end %>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<% text_for :title do %>
2+
Value question: "Hello ..."?
3+
<% end %>
4+
5+
<% govspeak_for :body do %>
6+
Body can contain further explanations.
7+
<% end %>
8+
9+
<% text_for :suffix_label do %>
10+
!
11+
<% end %>
12+
13+
<% text_for :error_message do %>
14+
"world"
15+
<% end %>

lib/smart_answer_flows/all-smart-answer-questions/questions/which_value.govspeak.erb

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)