Skip to content

Commit

Permalink
New town/county work location question for the NISRA employment secti…
Browse files Browse the repository at this point in the history
…on (#113)
  • Loading branch information
berroar authored Jul 3, 2020
1 parent 8172b6d commit 50d8b59
Show file tree
Hide file tree
Showing 6 changed files with 264 additions and 2 deletions.
2 changes: 2 additions & 0 deletions source/jsonnet/northern-ireland/census_household.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ local main_job_type = import 'individual/blocks/employment/main_job_type.jsonnet
local place_of_work = import 'individual/blocks/employment/place_of_work.jsonnet';
local place_of_work_elsewhere = import 'individual/blocks/employment/place_of_work_elsewhere.jsonnet';
local supervise = import 'individual/blocks/employment/supervise.jsonnet';
local town_and_county = import 'individual/blocks/employment/town_and_county.jsonnet';
local work_location = import 'individual/blocks/employment/work_location.jsonnet';
local work_location_type = import 'individual/blocks/employment/work_location_type.jsonnet';
local work_travel = import 'individual/blocks/employment/work_travel.jsonnet';
Expand Down Expand Up @@ -400,6 +401,7 @@ function(region_code) {
work_location_type,
place_of_work,
place_of_work_elsewhere,
town_and_county,
work_location,
work_travel,
],
Expand Down
2 changes: 2 additions & 0 deletions source/jsonnet/northern-ireland/census_individual.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ local main_job_type = import 'individual/blocks/employment/main_job_type.jsonnet
local place_of_work = import 'individual/blocks/employment/place_of_work.jsonnet';
local place_of_work_elsewhere = import 'individual/blocks/employment/place_of_work_elsewhere.jsonnet';
local supervise = import 'individual/blocks/employment/supervise.jsonnet';
local town_and_county = import 'individual/blocks/employment/town_and_county.jsonnet';
local work_location = import 'individual/blocks/employment/work_location.jsonnet';
local work_location_type = import 'individual/blocks/employment/work_location_type.jsonnet';
local work_travel = import 'individual/blocks/employment/work_travel.jsonnet';
Expand Down Expand Up @@ -205,6 +206,7 @@ function(region_code) {
work_location_type,
place_of_work,
place_of_work_elsewhere,
town_and_county,
work_location,
work_travel,
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,58 @@ local pastProxyTitle = {
},
],
routing_rules: [
{
goto: {
block: 'work-town-and-county',
when: [
{
id: 'place-of-work-elsewhere-answer',
condition: 'equals any',
values: [
'Carlow',
'Cavan',
'Clare',
'Connaught',
'Cork',
'Donegal',
'Dublin',
'Eire',
'Galway',
'Ireland',
'Ireland (Republic)',
'Ireland (Southern)',
'Irish Free State',
'Irish Republic',
'Kerry',
'Kildare',
'Kilkenny',
'Laois',
'Leinster',
'Leitrim',
'Limerick',
'Longford',
'Louth',
'Mayo',
'Meath',
'Monaghan',
'Munster',
'Offaly',
'Republic of Ireland',
'RoI',
'Roscommon',
'Sligo',
'Southern Ireland',
'Tipperary',
'Waterford',
'Westmeath',
'Wexford',
'Wicklow',
'South of Ireland',
],
},
],
},
},
{
goto: {
block: 'work-travel',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
local placeholders = import '../../../lib/placeholders.libsonnet';
local rules = import 'rules.libsonnet';

local question(title) = {
id: 'work-town-and-county-question',
title: title,
type: 'General',
answers: [
{
id: 'work-town-and-county-answer-town',
label: 'Town or city',
mandatory: false,
max_length: 100,
type: 'TextField',
},
{
id: 'work-town-and-county-answer-county',
label: 'County',
mandatory: false,
max_length: 100,
type: 'TextField',
},
],
};

local nonProxyTitle = 'In which town and county is your main place of work?';
local proxyTitle = {
text: 'In which town and county is <em>{person_name_possessive}</em> main place of work?',
placeholders: [
placeholders.personNamePossessive,
],
};

local pastNonProxyTitle = 'In which town and county was your main place of work?';
local pastProxyTitle = {
text: 'In which town and county was <em>{person_name_possessive}</em> main place of work?',
placeholders: [
placeholders.personNamePossessive,
],
};

{
type: 'Question',
id: 'work-town-and-county',
question_variants: [
{
question: question(nonProxyTitle),
when: [rules.isNotProxy, rules.mainJob],
},
{
question: question(proxyTitle),
when: [rules.isProxy, rules.mainJob],
},
{
question: question(pastNonProxyTitle),
when: [rules.isNotProxy],
},
{
question: question(pastProxyTitle),
when: [rules.isProxy],
},
],
routing_rules: [
{
goto: {
block: 'work-travel',
},
},
],
}
70 changes: 69 additions & 1 deletion translations/census_household_gb_nir.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-06-30 15:59+0100\n"
"POT-Creation-Date: 2020-07-02 10:15+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -1182,6 +1182,26 @@ msgstr ""
msgid "In which country was <em>{person_name_possessive}</em> main place of work?"
msgstr ""

#. Question text
msgid "In which town and county is your main place of work?"
msgstr ""

#. Question text
msgid ""
"In which town and county is <em>{person_name_possessive}</em> main place "
"of work?"
msgstr ""

#. Question text
msgid "In which town and county was your main place of work?"
msgstr ""

#. Question text
msgid ""
"In which town and county was <em>{person_name_possessive}</em> main place"
" of work?"
msgstr ""

#. Question text
msgid "What is the address of your main place of work?"
msgstr ""
Expand Down Expand Up @@ -2584,6 +2604,54 @@ msgctxt "In which country was <em>{person_name_possessive}</em> main place of wo
msgid "Current name of country"
msgstr ""

#. Answer
msgctxt "In which town and county is your main place of work?"
msgid "Town or city"
msgstr ""

#. Answer
msgctxt "In which town and county is your main place of work?"
msgid "County"
msgstr ""

#. Answer
msgctxt ""
"In which town and county is <em>{person_name_possessive}</em> main place "
"of work?"
msgid "Town or city"
msgstr ""

#. Answer
msgctxt ""
"In which town and county is <em>{person_name_possessive}</em> main place "
"of work?"
msgid "County"
msgstr ""

#. Answer
msgctxt "In which town and county was your main place of work?"
msgid "Town or city"
msgstr ""

#. Answer
msgctxt "In which town and county was your main place of work?"
msgid "County"
msgstr ""

#. Answer
msgctxt ""
"In which town and county was <em>{person_name_possessive}</em> main place"
" of work?"
msgid "Town or city"
msgstr ""

#. Answer
msgctxt ""
"In which town and county was <em>{person_name_possessive}</em> main place"
" of work?"
msgid "County"
msgstr ""

#. Answer
msgctxt "What is the address of your main place of work?"
msgid "Address line 1"
Expand Down
70 changes: 69 additions & 1 deletion translations/census_individual_gb_nir.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-06-30 15:59+0100\n"
"POT-Creation-Date: 2020-07-02 10:15+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -836,6 +836,26 @@ msgstr ""
msgid "In which country was <em>{person_name_possessive}</em> main place of work?"
msgstr ""

#. Question text
msgid "In which town and county is your main place of work?"
msgstr ""

#. Question text
msgid ""
"In which town and county is <em>{person_name_possessive}</em> main place "
"of work?"
msgstr ""

#. Question text
msgid "In which town and county was your main place of work?"
msgstr ""

#. Question text
msgid ""
"In which town and county was <em>{person_name_possessive}</em> main place"
" of work?"
msgstr ""

#. Question text
msgid "What is the address of your main place of work?"
msgstr ""
Expand Down Expand Up @@ -1800,6 +1820,54 @@ msgctxt "In which country was <em>{person_name_possessive}</em> main place of wo
msgid "Current name of country"
msgstr ""

#. Answer
msgctxt "In which town and county is your main place of work?"
msgid "Town or city"
msgstr ""

#. Answer
msgctxt "In which town and county is your main place of work?"
msgid "County"
msgstr ""

#. Answer
msgctxt ""
"In which town and county is <em>{person_name_possessive}</em> main place "
"of work?"
msgid "Town or city"
msgstr ""

#. Answer
msgctxt ""
"In which town and county is <em>{person_name_possessive}</em> main place "
"of work?"
msgid "County"
msgstr ""

#. Answer
msgctxt "In which town and county was your main place of work?"
msgid "Town or city"
msgstr ""

#. Answer
msgctxt "In which town and county was your main place of work?"
msgid "County"
msgstr ""

#. Answer
msgctxt ""
"In which town and county was <em>{person_name_possessive}</em> main place"
" of work?"
msgid "Town or city"
msgstr ""

#. Answer
msgctxt ""
"In which town and county was <em>{person_name_possessive}</em> main place"
" of work?"
msgid "County"
msgstr ""

#. Answer
msgctxt "What is the address of your main place of work?"
msgid "Address line 1"
Expand Down

0 comments on commit 50d8b59

Please sign in to comment.