Skip to content

Commit

Permalink
CIV-16620 - Welsh translation of hearing type or dates (#6158)
Browse files Browse the repository at this point in the history
* CIV-16620 - Welsh translation of hearing type or dates
* CIV-16620 - Update welsh hearing types
* CIV-16620 - re-add Welsh methods
  • Loading branch information
m-meulendijks-v1 authored Feb 20, 2025
1 parent 1361c6e commit 3d4e7b0
Show file tree
Hide file tree
Showing 45 changed files with 632 additions and 356 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private void verifyNotification(String caseId, String role, boolean isCreated, b
jsonPath("$[0].titleCy").value("Mae bwndel yr achos wedi'i ddiweddaru"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Cafodd bwndel yr achos ei newid a'i ail-uwchlwytho ar " +
DateUtils.formatDateInWelsh(april.toLocalDate()) +
DateUtils.formatDateInWelsh(april.toLocalDate(), false) +
". <a href=\"{VIEW_BUNDLE_REDIRECT}\" class=\"govuk-link\">Adolygu’r bwndel newydd</a></p>")
);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void shouldCreateNotification_forDefendantWhenLRvLipFullAdmitPayImmediately() th
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Mae John White wedi derbyn eich cynnig i dalu £9001 " +
"yn llawn ar unwaith fel setliad llawn a therfynol o’r hawliad. Rhaid i’r arian fod yn <a href={VIEW_INFO_ABOUT_CLAIMANT} class=\"govuk-link\">ei g/chyfrif</a> erbyn "
+ DateUtils.formatDateInWelsh(whenWillThisAmountBePaid) + ".</p><p class=\"govuk-body\"> Os na fydd yr arian wedi cyrraedd erbyn hynny," +
+ DateUtils.formatDateInWelsh(whenWillThisAmountBePaid, false) + ".</p><p class=\"govuk-body\"> Os na fydd yr arian wedi cyrraedd erbyn hynny," +
" gallant ofyn am Ddyfarniad Llys Sirol (CCJ).</p>"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void should_create_claimant_settlement_agreement_scenario() throws Exception {
"<p class=\"govuk-body\">Rydych wedi derbyn cynnig Mr. Sole Trader ac wedi gofyn " +
"iddynt lofnodi cytundeb setlo.</p><p class=\"govuk-body\">Mae’n rhaid i’r diffynnydd ymateb " +
"erbyn " +
DateUtils.formatDateInWelsh(respondent1SettlementDeadline.toLocalDate()) +
DateUtils.formatDateInWelsh(respondent1SettlementDeadline.toLocalDate(), false) +
".</p><p class=\"govuk-body\">Os na fyddant wedi ymateb erbyn hynny, neu os byddant yn gwrthod " +
"y cytundeb, gallwch wneud cais am Ddyfarniad Llys Sifil (CCJ).</p>")
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ void should_enable_dashboardNotification_scenario() throws Exception {
jsonPath("$[0].titleCy").value("Cadarnhau a yw dyled dyfarniad wedi'i thalu"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Mae diffynnydd a oedd arnynt arian ichi wedi dweud wrthym eu bod wedi talu’n llawn ar " + DateUtils.formatDateInWelsh(
coscFullPaymentDate) +
coscFullPaymentDate, false) +
". Dylech <a href=\"{CONFIRM_YOU_HAVE_BEEN_PAID_URL}\" class=\"govuk-link\">gadarnhau os ydych wedi cael eich talu</a>." +
"<br><br>Os nad ydych wedi cael eich talu, bydd angen i chi ysgrifennu at y llys lle cyhoeddwyd y dyfarniad o fewn mis i " + DateUtils.formatDateInWelsh(
coscFullPaymentDate) +
coscFullPaymentDate, false) +
" fel y gall barnwr rhanbarth adolygu’r cais. Gallwch ddod o hyd i enw’r llys ar ochr dde uchaf y dyfarniad." +
" Yna gallwch <u>chwilio am fanylion cyswllt y llys</u> i gael y cyfeiriad.</p>"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void should_create_full_defence_full_dispute_carm_scenario() throws Exception {
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Mae John Doe wedi gwrthod yr hawliad. " +
"Mae angen i chi ymateb erbyn " +
DateUtils.formatDateInWelsh(applicantResponseDeadline) + ".</p>" +
DateUtils.formatDateInWelsh(applicantResponseDeadline, false) + ".</p>" +
"<a href=\"{VIEW_AND_RESPOND}\" class=\"govuk-link\">Gweld ac ymateb</a>"
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void should_create_full_defence_pay_already_partial_claimant_scenario() throws E
jsonPath("$[0].titleCy").value("Ymateb i’r hawliad"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Mae James John wedi gwrthod yr hawliad ac wedi awgrymu cyfryngu. Gallwch wrthod neu gytuno i gyfryngu." +
" Mae angen i chi ymateb erbyn " + DateUtils.formatDateInWelsh(paymentDate) + ".</p>" +
" Mae angen i chi ymateb erbyn " + DateUtils.formatDateInWelsh(paymentDate, false) + ".</p>" +
"<p class=\"govuk-body\"><a href=\"{CLAIMANT_RESPONSE_TASK_LIST}\" rel=\"noopener noreferrer\" class=\"govuk-link\">Gweld ac ymateb</a></p>"
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void should_create_full_admit_pay_immediately_claimant_scenario() throws Excepti
jsonPath("$[0].titleCy").value("Ymateb i’r hawliad"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Mae James John wedi cynnig talu £1001 erbyn " +
DateUtils.formatDateInWelsh(admitPaymentDeadline) + ".</p>" +
DateUtils.formatDateInWelsh(admitPaymentDeadline, false) + ".</p>" +
"<p class=\"govuk-body\">Rhaid i’r taliad fod yn eich cyfrif erbyn y dyddiad hwnnw. Os nad yw, yna gallwch wneud cais am ddyfarniad llys sirol.</p>" +
"<p class=\"govuk-body\"><a href=\"{TELL_US_IT_IS_SETTLED}\" rel=\"noopener noreferrer\" class=\"govuk-link\">Tell us you've settled the claim</a></p>"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void should_create_full_part_admit_installments_org_com_claimant_scenario() thro
+ MonetaryConversions.penniesToPounds(installmentAmount).toPlainString().replace(
".00", "")
+ " " + frequency.getDashboardLabelWelsh() + ". Maent yn cynnig gwneud hyn o "
+ DateUtils.formatDateInWelsh(firstPaymentDate)
+ DateUtils.formatDateInWelsh(firstPaymentDate, false)
+ " ymlaen. Mae angen i’r diffynnydd anfon eu manylion ariannol atoch.</p>"
+ "<p class=\"govuk-body\"><a href=\"{CLAIMANT_RESPONSE_TASK_LIST}\" rel=\"noopener noreferrer\" class=\"govuk-link\">Gweld ac ymateb"
+ "</a></p>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void should_create_full_admit_pay_immediately_no_payment_scenario() throws Excep
jsonPath("$[0].titleCy").value("Talu ar unwaith"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Rydych wedi derbyn cynnig Dave Indent i dalu £{fullAdmitPayImmediatelyPaymentAmount} " +
"ar unwaith. Rhaid i’r arian gyrraedd eich cyfrif erbyn " + DateUtils.formatDateInWelsh(whenWillThisAmountBePaid) + ".</p>" +
"ar unwaith. Rhaid i’r arian gyrraedd eich cyfrif erbyn " + DateUtils.formatDateInWelsh(whenWillThisAmountBePaid, false) + ".</p>" +
"<p class=\"govuk-body\">Os na fyddwch wedi cael yr arian erbyn hynny, <a href=\"{COUNTY_COURT_JUDGEMENT_URL}\"" +
" rel=\"noopener noreferrer\" class=\"govuk-link\">gallwch wneud cais am Ddyfarniad Llys Sifil (CCJ)</a>.</p>")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void should_create_part_admit_pay_by_setDate_scenario() throws Exception {
jsonPath("$[0].titleCy").value("Ymateb i’r hawliad"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Mae Company one wedi cynnig talu £1000 i chi erbyn "
+ DateUtils.formatDateInWelsh(responseDeadline)
+ DateUtils.formatDateInWelsh(responseDeadline, false)
+ ". Mae angen i’r diffynnydd anfon eu manylion ariannol atoch.</p>"
+ "<p class=\"govuk-body\"><a href=\"{CLAIMANT_RESPONSE_TASK_LIST}\" class=\"govuk-link\">Gweld ac ymateb</a></p>")
);
Expand Down Expand Up @@ -121,7 +121,7 @@ void should_create_full_admit_pay_by_setDate_scenario() throws Exception {
jsonPath("$[0].titleCy").value("Ymateb i’r hawliad"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Mae Org one wedi cynnig talu £1001 i chi erbyn "
+ DateUtils.formatDateInWelsh(admitPaymentDeadline)
+ DateUtils.formatDateInWelsh(admitPaymentDeadline, false)
+ ". Mae angen i’r diffynnydd anfon eu manylion ariannol atoch.</p>"
+ "<p class=\"govuk-body\"><a href=\"{CLAIMANT_RESPONSE_TASK_LIST}\" class=\"govuk-link\">Gweld ac ymateb</a></p>")
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void should_create_part_admit_pay_by_setDate_scenario() throws Exception {
jsonPath("$[0].titleCy").value("Ymateb i’r hawliad"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Mae Defendant John wedi cynnig talu £1000 i chi erbyn "
+ DateUtils.formatDateInWelsh(responseDeadline) + ".</p>"
+ DateUtils.formatDateInWelsh(responseDeadline, false) + ".</p>"
+ "<p class=\"govuk-body\"><a href=\"{CLAIMANT_RESPONSE_TASK_LIST}\" class=\"govuk-link\">Gweld ac ymateb</a></p>")
);

Expand Down Expand Up @@ -118,7 +118,7 @@ void should_create_full_admit_pay_by_setDate_scenario() throws Exception {
jsonPath("$[0].titleCy").value("Ymateb i’r hawliad"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Mae Mr. Sole Trader wedi cynnig talu £1001 i chi erbyn "
+ DateUtils.formatDateInWelsh(admitPaymentDeadline) + ".</p><p class=\"govuk-body\">"
+ DateUtils.formatDateInWelsh(admitPaymentDeadline, false) + ".</p><p class=\"govuk-body\">"
+ "<a href=\"{CLAIMANT_RESPONSE_TASK_LIST}\" class=\"govuk-link\">Gweld ac ymateb</a></p>")
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void should_create_hearing_fee_hwf_rejected_scenario() throws Exception {
"Mae eich cais am help i dalu ffioedd wedi cael ei wrthod"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Rydym wedi gwrthod eich cais am help i dalu ffi'r gwrandawiad. Gweler yr e-bost am ragor o fanylion. Rhaid i chi <a href={PAY_HEARING_FEE} class=\"govuk-link\">dalu'r ffi lawn</a> o £455 erbyn "
+ DateUtils.formatDateInWelsh(LocalDate.of(2024, 4, 4))
+ DateUtils.formatDateInWelsh(LocalDate.of(2024, 4, 4), false)
+ ". Gallwch dalu dros y ffôn drwy ffonio {civilMoneyClaimsTelephone}. Os na fyddwch yn talu, bydd eich hawliad yn cael ei ddileu.</p>")
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void should_create_hearing_fee_unpaid_scenario() throws Exception {
jsonPath("$[0].titleCy").value("Mae'r hawliad wedi cael ei ddileu"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Y rheswm am hyn yw na thalwyd ffi'r gwrandawiad erbyn "
+ DateUtils.formatDateInWelsh(hearingDueDate)
+ DateUtils.formatDateInWelsh(hearingDueDate, false)
+ " fel y nodir yn yr <a href=\"{VIEW_HEARING_NOTICE}\" rel=\"noopener noreferrer\" target=\"_blank\" class=\"govuk-link\">hysbysiad o wrandawiad</a>.</p>")
);

Expand Down Expand Up @@ -107,7 +107,7 @@ void should_create_hearing_fee_unpaid_scenario_without_trial_arrangements_when_s
jsonPath("$[0].titleCy").value("Mae'r hawliad wedi cael ei ddileu"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Y rheswm am hyn yw na thalwyd ffi'r gwrandawiad erbyn "
+ DateUtils.formatDateInWelsh(hearingDueDate)
+ DateUtils.formatDateInWelsh(hearingDueDate, false)
+ " fel y nodir yn yr <a href=\"{VIEW_HEARING_NOTICE}\" rel=\"noopener noreferrer\" target=\"_blank\" class=\"govuk-link\">hysbysiad o wrandawiad</a>.</p>")
);

Expand Down Expand Up @@ -150,7 +150,7 @@ void should_create_hearing_fee_unpaid_trial_ready_scenario() throws Exception {
jsonPath("$[0].titleCy").value("Mae'r hawliad wedi cael ei ddileu"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Y rheswm am hyn yw na thalwyd ffi'r gwrandawiad erbyn "
+ DateUtils.formatDateInWelsh(hearingDueDate)
+ DateUtils.formatDateInWelsh(hearingDueDate, false)
+ " fel y nodir yn yr <a href=\"{VIEW_HEARING_NOTICE}\" rel=\"noopener noreferrer\" target=\"_blank\" class=\"govuk-link\">hysbysiad o wrandawiad</a>.</p>")
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ void should_create_full_defence_full_paid_claimant_scenario() throws Exception {
jsonPath("$[0].titleCy").value("Ymateb i’r hawliad"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Mae’r diffynnydd wedi dweud eu bod wedi talu £1000 yn barod ar " +
DateUtils.formatDateInWelsh(paymentDate) +
DateUtils.formatDateInWelsh(paymentDate, false) +
". Gallwch gadarnhau bod y taliad wedi’i wneud a setlo, neu barhau â’r hawliad." +
" Mae angen i chi ymateb erbyn 4pm ar " + DateUtils.formatDateInWelsh(deadline) + " neu ni fydd yr hawliad yn parhau.</p>" +
" Mae angen i chi ymateb erbyn 4pm ar " + DateUtils.formatDateInWelsh(deadline, false) + " neu ni fydd yr hawliad yn parhau.</p>" +
"<p class=\"govuk-body\"><a href=\"{CLAIMANT_RESPONSE_TASK_LIST}\" class=\"govuk-link\">Gweld ac ymateb</a></p>"
)
);
Expand Down Expand Up @@ -124,9 +124,9 @@ void should_create_part_admit_full_paid_claimant_scenario() throws Exception {
jsonPath("$[0].titleCy").value("Ymateb i’r hawliad"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Mae’r diffynnydd wedi dweud eu bod wedi talu £1000 yn barod ar " +
DateUtils.formatDateInWelsh(paymentDate) +
DateUtils.formatDateInWelsh(paymentDate, false) +
". Gallwch gadarnhau bod y taliad wedi’i wneud a setlo, neu barhau â’r hawliad." +
" Mae angen i chi ymateb erbyn 4pm ar " + DateUtils.formatDateInWelsh(deadline) + " neu ni fydd yr hawliad yn parhau.</p>" +
" Mae angen i chi ymateb erbyn 4pm ar " + DateUtils.formatDateInWelsh(deadline, false) + " neu ni fydd yr hawliad yn parhau.</p>" +
"<p class=\"govuk-body\"><a href=\"{CLAIMANT_RESPONSE_TASK_LIST}\" class=\"govuk-link\">Gweld ac ymateb</a></p>"
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void should_create_full_defence_pay_already_partial_claimant_scenario() throws E
),
jsonPath("$[0].titleCy").value("Ymateb i’r hawliad"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Mae’r diffynnydd wedi dweud eu bod wedi talu £10 yn barod ar " + DateUtils.formatDateInWelsh(paymentDate) + "." +
"<p class=\"govuk-body\">Mae’r diffynnydd wedi dweud eu bod wedi talu £10 yn barod ar " + DateUtils.formatDateInWelsh(paymentDate, false) + "." +
" Gallwch gadarnhau bod y taliad wedi’i wneud a setlo, neu barhau â’r hawliad.</p>" +
"<p class=\"govuk-body\"><a href=\"{CLAIMANT_RESPONSE_TASK_LIST}\" class=\"govuk-link\">Gweld ac ymateb</a></p>"
)
Expand Down Expand Up @@ -114,7 +114,7 @@ void should_create_part_admit_pay_already_partial_claimant_scenario() throws Exc
),
jsonPath("$[0].titleCy").value("Ymateb i’r hawliad"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Mae’r diffynnydd wedi dweud eu bod wedi talu £10 yn barod ar " + DateUtils.formatDateInWelsh(paymentDate) + "." +
"<p class=\"govuk-body\">Mae’r diffynnydd wedi dweud eu bod wedi talu £10 yn barod ar " + DateUtils.formatDateInWelsh(paymentDate, false) + "." +
" Gallwch gadarnhau bod y taliad wedi’i wneud a setlo, neu barhau â’r hawliad.</p>" +
"<p class=\"govuk-body\"><a href=\"{CLAIMANT_RESPONSE_TASK_LIST}\" class=\"govuk-link\">Gweld ac ymateb</a></p>"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void should_create_full_part_admit_installments_claimant_scenario() throws Excep
+ MonetaryConversions.penniesToPounds(installmentAmount).toPlainString().replace(
".00", "")
+ " " + frequency.getDashboardLabelWelsh() + ". Maent yn cynnig gwneud hyn o "
+ DateUtils.formatDateInWelsh(firstPaymentDate)
+ DateUtils.formatDateInWelsh(firstPaymentDate, false)
+ " ymlaen.</p>"
+ "<p class=\"govuk-body\"><a href=\"{CLAIMANT_RESPONSE_TASK_LIST}\" rel=\"noopener noreferrer\" class=\"govuk-link\">Gweld ac ymateb"
+ "</a></p>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void should_create_request_for_reconsideration_claimant_scenario() throws Except
handler.handle(callbackParams(caseData));

String requestForReconsiderationDeadlineEn = DateUtils.formatDate(LocalDate.of(2024, 6, 14));
String requestForReconsiderationDeadlineCy = DateUtils.formatDateInWelsh(LocalDate.of(2024, 6, 14));
String requestForReconsiderationDeadlineCy = DateUtils.formatDateInWelsh(LocalDate.of(2024, 6, 14), false);

//Verify Notification is created
doGet(BEARER_TOKEN, GET_NOTIFICATIONS_URL, caseId, "CLAIMANT")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void should_create_order_made_claimant_scenario() throws Exception {
handler.handle(callbackParamsTestSDO(caseData));

String requestForReconsiderationDeadlineEn = DateUtils.formatDate(LocalDate.now().plusDays(7));
String requestForReconsiderationDeadlineCy = DateUtils.formatDateInWelsh(LocalDate.now().plusDays(7));
String requestForReconsiderationDeadlineCy = DateUtils.formatDateInWelsh(LocalDate.now().plusDays(7), false);

//Verify Notification is created
doGet(BEARER_TOKEN, GET_NOTIFICATIONS_URL, caseId, "CLAIMANT")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private void verifyNotification(String caseId, String role, boolean isCreated, b
jsonPath("$[0].titleCy").value("Mae bwndel yr achos wedi'i ddiweddaru"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Cafodd bwndel yr achos ei newid a'i ail-uwchlwytho ar " +
DateUtils.formatDateInWelsh(LocalDateTime.of(2024, 4, 1, 0, 0).toLocalDate()) +
DateUtils.formatDateInWelsh(LocalDateTime.of(2024, 4, 1, 0, 0).toLocalDate(), false) +
". <a href=\"{VIEW_BUNDLE_REDIRECT}\" class=\"govuk-link\">Adolygu’r bwndel newydd</a></p>")
);
} else {
Expand Down
Loading

0 comments on commit 3d4e7b0

Please sign in to comment.