Skip to content

Commit

Permalink
ECL-276-ECL-561: Added Welsh translations for returns emails and corr…
Browse files Browse the repository at this point in the history
…ected url (#1095)
  • Loading branch information
TheDanielDoyle authored Sep 15, 2023
1 parent e28cf60 commit 6eb5df4
Show file tree
Hide file tree
Showing 9 changed files with 286 additions and 3 deletions.
21 changes: 21 additions & 0 deletions app/preview/TemplateParams.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
18 changes: 18 additions & 0 deletions app/uk/gov/hmrc/hmrcemailrenderer/templates/ecl/EclTemplates.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {

<div style="margin: 0 0 30px;
font-size: 19px;">
<p>Annwyl @params("name")</p>

<p>
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.
</p>

<table width="100%" cellspacing="0" cellpadding="2px" style="text-align: left;
font-size: 19px;">
<tbody>

<tr>
<th>Dyddiad cyflwyno datganiad ECL</th>
<td>@params("dateSubmitted")</td>
</tr>

<tr>
<th>Blwyddyn ariannol</th>
<td>@params("periodStartDate") i @params("periodEndDate")</td>
</tr>

<tr>
<th>Y swm sydd angen i chi ei dalu</th>
<td>@params("amountDue")</td>
</tr>

</tbody>
</table>

<p>
Mae gwybodaeth am eich datganiad ar gael yn eich cyfrif ECL.
</p>

<p style="font-weight: bold;">Pam cawsoch yr e-bost hwn</p>

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

<p>Peidiwch ag ymateb i’r e-bost hwn.</p>

<p>Oddi wrth y Tîm Ardoll Troseddau Economaidd</p>
</div>

}
Original file line number Diff line number Diff line change
@@ -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()}
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@

<p>You can pay the levy by going to the guidance on how to pay:</p>

<a href="https://www.gov.uk/guidance/pay-the-economic-crime-levy" style="color: #005EA5;">
https://www.gov.uk/guidance/pay-the-economic-crime-levy
<a href="https://www.gov.uk/guidance/pay-your-economic-crime-levy" style="color: #005EA5;">
https://www.gov.uk/guidance/pay-your-economic-crime-levy
</a>
}
<p style="font-weight: bold;">Why you got this email</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {

<div style="margin: 0 0 30px;
font-size: 19px;">
<p>Annwyl @params("name")</p>

<p>
Rydych wedi cyflwyno datganiad ar gyfer yr Ardoll Troseddau Economaidd (ECL).
</p>

<table width="100%" cellspacing="0" cellpadding="2px" style="text-align: left;
font-size: 19px;">
<tbody>

<tr>
<th>Rhif Datganiad ECL</th>
<td>@params("chargeReference")</td>
</tr>

<tr>
<th>Dyddiad cyflwyno datganiad ECL</th>
<td>@params("dateSubmitted")</td>
</tr>

<tr>
<th>Blwyddyn ariannol</th>
<td>@params("periodStartDate") i @params("periodEndDate")</td>
</tr>

<tr>
<th>Y swm sydd angen i chi ei dalu</th>
<td>@params("amountDue")</td>
</tr>

</tbody>
</table>

<p>
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.
</p>

<p>
Ni fyddwch yn cael e-bost na hysbysiad oddi wrth CThEF i’ch atgoffa i dalu.
</p>

@if(params("privateBetaEnabled").toString.toBoolean){
<p>Byddwch yn gallu talu’r ardoll o fis Awst 2023.</p>
}
<p>
Codir llog arnoch os ydych yn talu’n hwyr.
</p>

@if(!params("privateBetaEnabled").toString.toBoolean) {
<p style="font-weight: bold;">Sut i dalu’r ardoll</p>

<p>Gallwch dalu’r ardoll drwy fynd i’r arweiniad ar sut i dalu:</p>

<a href="https://www.gov.uk/guidance/pay-your-economic-crime-levy" style="color: #005EA5;">
https://www.gov.uk/guidance/pay-your-economic-crime-levy
</a>
}
<p style="font-weight: bold;">Pam cawsoch yr e-bost hwn</p>

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

<p>Peidiwch ag ymateb i’r e-bost hwn.</p>

<p>Oddi wrth y Tîm Ardoll Troseddau Economaidd</p>
</div>

}
Original file line number Diff line number Diff line change
@@ -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()}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 6eb5df4

Please sign in to comment.