diff --git a/package.json b/package.json index 76e5a33..7926b5d 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "test:watch": "mocha --watch", "mocks": "yarn run wiremock --port 8030 --root-dir test/mocks", "test:browser": "wait-on tcp:8030 tcp:5030 && cucumber-js --config test/browser/cucumber.js", - "test:browser:ci": "npm-run-all -p -r start:ci mocks test:browser" + "test:browser:ci": "npm-run-all -p -r start:ci mocks test:browser", + "check-translation": "node node_modules/di-ipv-cri-common-express/scripts/checkTranslations.js" }, "repository": { "type": "git", @@ -70,12 +71,12 @@ "cfenv": "1.2.4", "connect-dynamodb": "^2.0.5", "copyfiles": "2.4.1", - "di-ipv-cri-common-express": "alphagov/di-ipv-cri-common-express.git#v0.0.38", + "di-ipv-cri-common-express": "alphagov/di-ipv-cri-common-express.git#v0.0.39", "dotenv": "^16.0.1", "express": "4.18.1", "express-async-errors": "^3.1.1", "express-session": "^1.17.3", - "govuk-frontend": "4.2.0", + "govuk-frontend": "4.5.0", "hmpo-app": "2.4.0", "hmpo-components": "5.7.0", "hmpo-config": "2.2.1", diff --git a/src/assets/scss/application.scss b/src/assets/scss/application.scss index fc659c6..68cd1d7 100644 --- a/src/assets/scss/application.scss +++ b/src/assets/scss/application.scss @@ -12,6 +12,11 @@ $govuk-assets-path: "/public/"; background-color: $govuk-error-colour; } +// remove the resize option on the driving licence number character count +// To match both the DVLA and DVA forms this selector looks for any textarea +// that contains the string 'LicenceNumber' anywhere in the class name +textarea[name*="LicenceNumber"] {resize: none;} + //// Task list pattern // //.app-task-list { diff --git a/src/locales/cy/default.yml b/src/locales/cy/default.yml index c222e53..17b09c6 100644 --- a/src/locales/cy/default.yml +++ b/src/locales/cy/default.yml @@ -31,7 +31,7 @@ govuk: paragraph2: unrhyw bryd. buttonAcceptText: Derbyn cwcis dadansoddi buttonRejectText: Gwrthod cwcis dadansoddi - linkViewCookies: Gweld cwcis + linkViewCookiesText: Gweld cwcis cookieBannerHideLink: Cuddio'r neges yma footerNavItems: meta: @@ -66,6 +66,11 @@ drivingLicence: retryMessageList2: rydych wedi rhoi eich rhif trwydded yrru yn gywir retryMessageList3: bod dyddiau a misoedd yn y drefn gywir yn eich dyddiad geni, dyddiad cyhoeddi a dyddiad dilys tan retryMessageList4: you’ve left the middle names section blank if you do not have any middle names + charactersUnderLimitTextOther: Mae gennych %{count} nod ar ôl + charactersUnderLimitTextOne: Mae gennych %{count} nod ar ôl + charactersAtLimitText: Mae gennych 0 nod ar ôl + charactersOverLimitTextOne: Mae gennych %{count} nod yn ormod + charactersOverLimitTextOther: Mae gennych %{count} nod yn ormod prove-another-way: title: Profi pwy ydych chi mewn ffordd arall diff --git a/src/locales/cy/fields.yml b/src/locales/cy/fields.yml index f811473..a80487a 100644 --- a/src/locales/cy/fields.yml +++ b/src/locales/cy/fields.yml @@ -1,6 +1,7 @@ drivingLicenceNumber: label: Rhif trwydded hint: "Dyma'r rhif hir yn adran 5 ar eich trwydded er enghraifft HARRI559146MJ931" + maxlength: false validation: default: "Rhowch y rhif yn union fel mae’n ymddangos ar eich trwydded yrru" exactlength: "Dylai rhif eich trwydded fod yn 16 nod o hyd" @@ -8,6 +9,7 @@ drivingLicenceNumber: limit: "Driving licence numbers do not start with 16 – enter the number as it appears on your driving licence" dvlaChecker: "Rhowch y rhif yn union fel mae’n ymddangos ar eich trwydded yrru" regexSpecialCharacters: "Ni ddylai rhif eich trwydded gynnwys unrhyw symbolau neu ofodau" + dvaLicenceNumber: label: Rhif trwydded hint: "Dyma'r rhif hir yn adran 5 ar eich trwydded" @@ -15,6 +17,8 @@ dvaLicenceNumber: default: "Rhowch y rhif yn union fel mae’n ymddangos ar eich trwydded yrru" exactlength: "Dylai rhif eich trwydded fod yn 8 nod o hyd" numeric: "Ni ddylai rhif eich trwydded gynnwys unrhyw symbolau neu ofodau" + regexSpecialCharacters: "Ni ddylai rhif eich trwydded gynnwys unrhyw symbolau neu ofodau" + issueNumber: label: Rhif cyhoeddi hint: "Dyma'r rhif 2 ddigid ar ôl y gofod yn adran 5 o'ch trwydded" @@ -22,6 +26,7 @@ issueNumber: default: "Rhowch y rhif cyhoeddi fel y mae'n ymddangos ar eich trwydded yrru" exactlength: "Dylai eich rhif cyhoeddi fod yn 2 rif o hyd" numeric: "Ni ddylai eich rhif cyhoeddi gynnwys unrhyw symbolau neu ofodau" + regexSpecialCharacters: "Ni ddylai rhif eich trwydded gynnwys unrhyw symbolau neu ofodau" surname: label: Enw olaf @@ -54,6 +59,7 @@ dateOfBirth: default: "Rhowch eich dyddiad geni fel y mae'n ymddangos ar eich trwydded yrru" before: "Rhaid i'ch dyddiad geni fod yn y gorffennol" dvlaChecker: "Gwiriwch eich bod wedi rhoi eich dyddiad geni yn gywir" + dvaDateOfBirth: legend: Dyddiad geni hint: "Er enghraifft, 5 9 1973" diff --git a/src/locales/en/default.yml b/src/locales/en/default.yml index 369393c..0f9ab6d 100644 --- a/src/locales/en/default.yml +++ b/src/locales/en/default.yml @@ -66,6 +66,11 @@ drivingLicence: retryMessageList2: you’ve entered your driving licence number correctly retryMessageList3: days and months are in the right order in your date of birth, issue date and valid to date retryMessageList4: you’ve left the middle names section blank if you do not have any middle names + charactersUnderLimitTextOther: You have %{count} characters remaining + charactersUnderLimitTextOne: You have %{count} character remaining + charactersAtLimitText: You have 0 characters remaining + charactersOverLimitTextOne: You have %{count} character too many + charactersOverLimitTextOther: You have %{count} characters too many prove-another-way: title: Prove your identity another way diff --git a/src/locales/en/fields.yml b/src/locales/en/fields.yml index 3ff3d6d..e692fef 100644 --- a/src/locales/en/fields.yml +++ b/src/locales/en/fields.yml @@ -1,6 +1,7 @@ drivingLicenceNumber: label: Licence number hint: "This is the long number in section 5 on your licence for example HARRI559146MJ931" + maxlength: false validation: default: "Enter the number exactly as it appears on your driving licence" exactlength: "Your licence number should be 16 characters long" @@ -8,6 +9,7 @@ drivingLicenceNumber: limit: "Driving licence numbers do not start with 16 – Enter the number exactly as it appears on your driving licence" dvlaChecker: "Enter the number exactly as it appears on your driving licence" regexSpecialCharacters: "Your licence number should not include any symbols or spaces" + dvaLicenceNumber: label: Licence number hint: "This is the long number in section 5 on your licence" @@ -16,6 +18,7 @@ dvaLicenceNumber: exactlength: "Your licence number should be 8 characters long" regexSpecialCharacters: "Your licence number should not include any symbols or spaces" numeric: "Enter the number exactly as it appears on your driving licence" + issueNumber: label: Issue number hint: "This is the 2 digit number after the space in section 5 of your licence" @@ -23,6 +26,7 @@ issueNumber: default: "Enter the issue number as it appears on your driving licence" exactlength: "Your issue number should be 2 numbers long" regexSpecialCharacters: "Your issue number should not include any symbols or spaces" + numeric: "Enter the number exactly as it appears on your driving licence" surname: label: Last name diff --git a/src/views/drivingLicence/details.html b/src/views/drivingLicence/details.html index 642da10..f31997c 100644 --- a/src/views/drivingLicence/details.html +++ b/src/views/drivingLicence/details.html @@ -8,6 +8,7 @@ {% from "govuk/components/inset-text/macro.njk" import govukInsetText %} {% from "hmpo-text/macro.njk" import hmpoText %} +{% from "./hmpoCountText.njk" import hmpoCountText %} {% from "hmpo-form/macro.njk" import hmpoForm %} {% from "hmpo-date/macro.njk" import hmpoDate %} @@ -23,7 +24,7 @@
{{ translate("drivingLicence.checkDetailsContextDVA") }}
+{{ translate("drivingLicence.checkDetailsContextDVA") }}
{% else %} -{{ translate("drivingLicence.checkDetailsContext") }}
+{{ translate("drivingLicence.checkDetailsContext") }}
{% endif %} {% endif %} @@ -68,7 +69,7 @@