From 6eb5df484ed5ad98beb7df61f49dea2dc943085a Mon Sep 17 00:00:00 2001 From: "Daniel P. Doyle" <3020488+TheDanielDoyle@users.noreply.github.com> Date: Fri, 15 Sep 2023 08:50:27 +0100 Subject: [PATCH] ECL-276-ECL-561: Added Welsh translations for returns emails and corrected url (#1095) --- app/preview/TemplateParams.scala | 21 +++++ .../templates/ecl/EclTemplates.scala | 18 ++++ .../ecl/eclNilReturnSubmitted_cy.scala.html | 64 +++++++++++++ .../ecl/eclNilReturnSubmitted_cy.scala.txt | 22 +++++ .../ecl/eclReturnSubmitted.scala.html | 4 +- .../ecl/eclReturnSubmitted_cy.scala.html | 89 +++++++++++++++++++ .../ecl/eclReturnSubmitted_cy.scala.txt | 36 ++++++++ .../templates/TemplateLocatorSpec.scala | 4 +- .../templates/ecl/EclTemplatesSpec.scala | 31 +++++++ 9 files changed, 286 insertions(+), 3 deletions(-) create mode 100644 app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclNilReturnSubmitted_cy.scala.html create mode 100644 app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclNilReturnSubmitted_cy.scala.txt create mode 100644 app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclReturnSubmitted_cy.scala.html create mode 100644 app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclReturnSubmitted_cy.scala.txt diff --git a/app/preview/TemplateParams.scala b/app/preview/TemplateParams.scala index 1e40d3f8d..2c13e8ebc 100644 --- a/app/preview/TemplateParams.scala +++ b/app/preview/TemplateParams.scala @@ -3557,6 +3557,18 @@ object TemplateParams3 { "amountDue" -> "£10,000", "privateBetaEnabled" -> "true" ), + "ecl_return_submitted_cy" -> Map( + "name" -> "John Doe", + "dateSubmitted" -> "1 Medi 2023", + "periodStartDate" -> "1 Ebrill 2022", + "periodEndDate" -> "31 Mawrth 2023", + "chargeReference" -> "XY007000075424", + "fyStartYear" -> "2022", + "fyEndYear" -> "2023", + "datePaymentDue" -> "30 Medi 2023", + "amountDue" -> "£10,000", + "privateBetaEnabled" -> "true" + ), "ecl_nil_return_submitted" -> Map( "name" -> "John Doe", "dateSubmitted" -> "1 September 2023", @@ -3566,6 +3578,15 @@ object TemplateParams3 { "fyEndYear" -> "2023", "amountDue" -> "£0" ), + "ecl_nil_return_submitted_cy" -> Map( + "name" -> "John Doe", + "dateSubmitted" -> "1 Medi 2023", + "periodStartDate" -> "1 Ebrill 2022", + "periodEndDate" -> "31 Mawrth 2023", + "fyStartYear" -> "2022", + "fyEndYear" -> "2023", + "amountDue" -> "£0" + ), "ecl_amend_return_submitted" -> Map( "name" -> "John Doe", "dateSubmitted" -> "1 September 2023", diff --git a/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/EclTemplates.scala b/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/EclTemplates.scala index 97953ee9e..badc63cbd 100644 --- a/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/EclTemplates.scala +++ b/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/EclTemplates.scala @@ -68,6 +68,15 @@ object EclTemplates { htmlTemplate = html.eclReturnSubmitted.f, priority = Some(MessagePriority.Urgent) ), + MessageTemplate.create( + templateId = "ecl_return_submitted_cy", + fromAddress = FromAddress.noReply("Ardoll Troseddau Economaidd"), + service = EconomicCrimeLevy, + subject = "Rydych wedi cyflwyno datganiad ar gyfer yr Ardoll Troseddau Economaidd", + plainTemplate = txt.eclReturnSubmitted_cy.f, + htmlTemplate = html.eclReturnSubmitted_cy.f, + priority = Some(MessagePriority.Urgent) + ), MessageTemplate.create( templateId = "ecl_amend_return_submitted_cy", fromAddress = FromAddress.noReply("Economic Crime Levy"), @@ -86,6 +95,15 @@ object EclTemplates { htmlTemplate = html.eclNilReturnSubmitted.f, priority = Some(MessagePriority.Urgent) ), + MessageTemplate.create( + templateId = "ecl_nil_return_submitted_cy", + fromAddress = FromAddress.noReply("Ardoll Troseddau Economaidd"), + service = EconomicCrimeLevy, + subject = "Rydych wedi cyflwyno datganiad ar gyfer yr Ardoll Troseddau Economaidd", + plainTemplate = txt.eclNilReturnSubmitted_cy.f, + htmlTemplate = html.eclNilReturnSubmitted_cy.f, + priority = Some(MessagePriority.Urgent) + ), MessageTemplate.create( templateId = "ecl_amend_return_submitted", fromAddress = FromAddress.noReply("Economic Crime Levy"), diff --git a/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclNilReturnSubmitted_cy.scala.html b/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclNilReturnSubmitted_cy.scala.html new file mode 100644 index 000000000..a2c57b348 --- /dev/null +++ b/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclNilReturnSubmitted_cy.scala.html @@ -0,0 +1,64 @@ +@* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *@ + +@(params: Map[String, Any]) + +@uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "Rydych wedi cyflwyno datganiad ar gyfer yr Ardoll Troseddau Economaidd", isWelsh=true) { + +
+

Annwyl @params("name")

+ +

+ Rydych wedi cyflwyno datganiad ar gyfer yr Ardoll Troseddau Economaidd (ECL). Nid oes angen i chi dalu’r ardoll ar gyfer y flwyddyn ariannol hon. +

+ + + + + + + + + + + + + + + + + + + + +
Dyddiad cyflwyno datganiad ECL@params("dateSubmitted")
Blwyddyn ariannol@params("periodStartDate") i @params("periodEndDate")
Y swm sydd angen i chi ei dalu@params("amountDue")
+ +

+ Mae gwybodaeth am eich datganiad ar gael yn eich cyfrif ECL. +

+ +

Pam cawsoch yr e-bost hwn

+ +

Hwn yw’r cyfeiriad e-bost a roddwyd gennych pan wnaethoch gyflwyno’ch datganiad.

+ +

Peidiwch ag ymateb i’r e-bost hwn.

+ +

Oddi wrth y Tîm Ardoll Troseddau Economaidd

+
+ +} \ No newline at end of file diff --git a/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclNilReturnSubmitted_cy.scala.txt b/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclNilReturnSubmitted_cy.scala.txt new file mode 100644 index 000000000..9513b86ce --- /dev/null +++ b/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclNilReturnSubmitted_cy.scala.txt @@ -0,0 +1,22 @@ +@(params: Map[String, Any]) +Rydych wedi cyflwyno datganiad ar gyfer yr Ardoll Troseddau Economaidd + +Annwyl @params("name") + +Rydych wedi cyflwyno datganiad ar gyfer yr Ardoll Troseddau Economaidd (ECL). Nid oes angen i chi dalu’r ardoll ar gyfer y flwyddyn ariannol hon. + +Dyddiad cyflwyno datganiad ECL @params("dateSubmitted") +Blwyddyn ariannol @params("periodStartDate") i @params("periodEndDate") +Y swm sydd angen i chi ei dalu @params("amountDue") + +Mae gwybodaeth am eich datganiad ar gael yn eich cyfrif ECL. + +Pam cawsoch yr e-bost hwn + +Hwn yw’r cyfeiriad e-bost a roddwyd gennych pan wnaethoch gyflwyno’ch datganiad. + +Peidiwch ag ymateb i’r e-bost hwn. + +Oddi wrth y Tîm Ardoll Troseddau Economaidd + +@{uk.gov.hmrc.hmrcemailrenderer.templates.helpers.txt.template_footer_cy()} \ No newline at end of file diff --git a/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclReturnSubmitted.scala.html b/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclReturnSubmitted.scala.html index 6c8926d35..da8481a6b 100644 --- a/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclReturnSubmitted.scala.html +++ b/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclReturnSubmitted.scala.html @@ -73,8 +73,8 @@

You can pay the levy by going to the guidance on how to pay:

- - https://www.gov.uk/guidance/pay-the-economic-crime-levy + + https://www.gov.uk/guidance/pay-your-economic-crime-levy }

Why you got this email

diff --git a/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclReturnSubmitted_cy.scala.html b/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclReturnSubmitted_cy.scala.html new file mode 100644 index 000000000..f1e302a9c --- /dev/null +++ b/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclReturnSubmitted_cy.scala.html @@ -0,0 +1,89 @@ +@* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *@ + +@(params: Map[String, Any]) + +@uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "Rydych wedi cyflwyno datganiad ar gyfer yr Ardoll Troseddau Economaidd", isWelsh=true) { + +
+

Annwyl @params("name")

+ +

+ Rydych wedi cyflwyno datganiad ar gyfer yr Ardoll Troseddau Economaidd (ECL). +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Rhif Datganiad ECL@params("chargeReference")
Dyddiad cyflwyno datganiad ECL@params("dateSubmitted")
Blwyddyn ariannol@params("periodStartDate") i @params("periodEndDate")
Y swm sydd angen i chi ei dalu@params("amountDue")
+ +

+ Mae’n rhaid i chi dalu’r ardoll erbyn @params("datePaymentDue"). Mae’n rhaid defnyddio’ch rhif ECL fel cyfeirnod talu pan ydych yn talu’r ardoll. +

+ +

+ Ni fyddwch yn cael e-bost na hysbysiad oddi wrth CThEF i’ch atgoffa i dalu. +

+ + @if(params("privateBetaEnabled").toString.toBoolean){ +

Byddwch yn gallu talu’r ardoll o fis Awst 2023.

+ } +

+ Codir llog arnoch os ydych yn talu’n hwyr. +

+ + @if(!params("privateBetaEnabled").toString.toBoolean) { +

Sut i dalu’r ardoll

+ +

Gallwch dalu’r ardoll drwy fynd i’r arweiniad ar sut i dalu:

+ + + https://www.gov.uk/guidance/pay-your-economic-crime-levy + + } +

Pam cawsoch yr e-bost hwn

+ +

Hwn yw’r cyfeiriad e-bost a roddwyd gennych pan wnaethoch gyflwyno’ch datganiad.

+ +

Peidiwch ag ymateb i’r e-bost hwn.

+ +

Oddi wrth y Tîm Ardoll Troseddau Economaidd

+
+ +} \ No newline at end of file diff --git a/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclReturnSubmitted_cy.scala.txt b/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclReturnSubmitted_cy.scala.txt new file mode 100644 index 000000000..9e5fb6696 --- /dev/null +++ b/app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/eclReturnSubmitted_cy.scala.txt @@ -0,0 +1,36 @@ +@(params: Map[String, Any]) +Rydych wedi cyflwyno datganiad ar gyfer yr Ardoll Troseddau Economaidd + +Annwyl @params("name") + +Rydych wedi cyflwyno datganiad ar gyfer yr Ardoll Troseddau Economaidd (ECL). + +Rhif Datganiad ECL @params("chargeReference") +Dyddiad cyflwyno datganiad ECL @params("dateSubmitted") +Blwyddyn ariannol @params("periodStartDate") i @params("periodEndDate") +Y swm sydd angen i chi ei dalu @params("amountDue") + +Mae’n rhaid i chi dalu’r ardoll erbyn @params("datePaymentDue"). Mae’n rhaid defnyddio’ch rhif ECL fel cyfeirnod talu pan ydych yn talu’r ardoll. + +Ni fyddwch yn cael e-bost na hysbysiad oddi wrth CThEF i’ch atgoffa i dalu. + +@if(params("privateBetaEnabled").toString.toBoolean){ +Byddwch yn gallu talu’r ardoll o fis Awst 2023. +} +Codir llog arnoch os ydych yn talu’n hwyr. +@if(!params("privateBetaEnabled").toString.toBoolean) { +Sut i dalu’r ardoll + +Gallwch dalu’r ardoll drwy fynd i’r arweiniad ar sut i dalu: +https://www.gov.uk/guidance/pay-your-economic-crime-levy +} + +Pam cawsoch yr e-bost hwn + +Hwn yw’r cyfeiriad e-bost a roddwyd gennych pan wnaethoch gyflwyno’ch datganiad. + +Peidiwch ag ymateb i’r e-bost hwn. + +Oddi wrth y Tîm Ardoll Troseddau Economaidd + +@{uk.gov.hmrc.hmrcemailrenderer.templates.helpers.txt.template_footer_cy()} \ No newline at end of file diff --git a/test/uk/gov/hmrc/hmrcemailrenderer/templates/TemplateLocatorSpec.scala b/test/uk/gov/hmrc/hmrcemailrenderer/templates/TemplateLocatorSpec.scala index b8f9c0aa7..551cc2649 100644 --- a/test/uk/gov/hmrc/hmrcemailrenderer/templates/TemplateLocatorSpec.scala +++ b/test/uk/gov/hmrc/hmrcemailrenderer/templates/TemplateLocatorSpec.scala @@ -983,7 +983,9 @@ class TemplateLocatorSpec extends AnyWordSpecLike with should.Matchers with Opti "newMessageAlert_LPi1_cy", "feeback_answers_for_digital_persona", "ecl_registration_received", - "ecl_registration_received_cy" + "ecl_registration_received_cy", + "ecl_return_submitted_cy", + "ecl_nil_return_submitted_cy", ) } } diff --git a/test/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/EclTemplatesSpec.scala b/test/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/EclTemplatesSpec.scala index ab34be6b9..19b806245 100644 --- a/test/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/EclTemplatesSpec.scala +++ b/test/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/EclTemplatesSpec.scala @@ -86,6 +86,23 @@ class EclTemplatesSpec extends TemplateComparisonSpec with CommonParamsForSpec { compareContent("ecl_return_submitted", returnSubmittedParams)(ecl) } + "include return submitted content cy" in { + val returnSubmittedParams = commonParameters ++ Map( + "name" -> "John Doe", + "dateSubmitted" -> "1 Medi 2023", + "periodStartDate" -> "1 Ebrill 2022", + "periodEndDate" -> "31 Mawrth 2023", + "chargeReference" -> "XY007000075424", + "fyStartYear" -> "2022", + "fyEndYear" -> "2023", + "datePaymentDue" -> "30 Medi 2023", + "amountDue" -> "£10,000", + "privateBetaEnabled" -> "true" + ) + + compareContent("ecl_return_submitted_cy", returnSubmittedParams, isWelsh = true)(ecl) + } + "include nil return submitted content" in { val nilReturnSubmittedParams = commonParameters ++ Map( "name" -> "John Doe", @@ -100,6 +117,20 @@ class EclTemplatesSpec extends TemplateComparisonSpec with CommonParamsForSpec { compareContent("ecl_nil_return_submitted", nilReturnSubmittedParams)(ecl) } + "include nil return submitted content cy" in { + val nilReturnSubmittedParams = commonParameters ++ Map( + "name" -> "John Doe", + "dateSubmitted" -> "1 Medi 2023", + "periodStartDate" -> "1 Ebrill 2022", + "periodEndDate" -> "31 Mawrth 2023", + "fyStartYear" -> "2022", + "fyEndYear" -> "2023", + "amountDue" -> "£0" + ) + + compareContent("ecl_nil_return_submitted_cy", nilReturnSubmittedParams, isWelsh = true)(ecl) + } + "include amend registration submitted content" in { val amendRegistrationSubmittedParams = commonParameters ++ Map( "name" -> "John Doe",