From 118d8a56c7adc5677eef9cf5ec6037fe413870f1 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Wed, 1 Oct 2025 09:18:31 +0100 Subject: [PATCH] welsh language labels --- .gitignore | 1 + components/utils/downloads.js | 11 ++++++----- locales/cy/case.json | 6 +++++- locales/en/case.json | 6 +++++- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index fe4298be..ad55dc2c 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ certificates/cert.pem gitclean.sh pages/admin/logcheck.js pages/admin/logchecker.js +pages/baracuda.html diff --git a/components/utils/downloads.js b/components/utils/downloads.js index 7283c030..6e8c81b4 100644 --- a/components/utils/downloads.js +++ b/components/utils/downloads.js @@ -222,6 +222,7 @@ // } import { useState } from "react"; +import useTranslation from "next-translate/useTranslation"; export default function DocumentLink({ id, @@ -231,7 +232,7 @@ export default function DocumentLink({ getStatus, }) { const [progress, setProgress] = useState(null); - + let { t } = useTranslation(); const downloadFile = async () => { setProgress(0); @@ -309,13 +310,13 @@ export default function DocumentLink({ } > {status === "downloading" && progress !== null - ? `Downloading ` + ? t("case:downloading-label") : status === "queued" - ? "Queued" + ? t("case:download-queued-label") : status === "done" - ? "Download complete!" + ? t("case:download-complete-label") : status === "failed" - ? "Download failed" + ? t("case:download-failed-label") : ""}

)} diff --git a/locales/cy/case.json b/locales/cy/case.json index a0490f05..da629c24 100644 --- a/locales/cy/case.json +++ b/locales/cy/case.json @@ -100,5 +100,9 @@ "do-you-want-to-delete-case-disclaimer-label": "Ar ôl dileu, bydd yr holl wybodaeth a gyflwynwyd gennych yn cael ei cholli.", "representation-date-passed-label": "Mae'r cyfnod cyflwyno sylwadau ar gyfer yr apêl hon rhwng {{startDate}} a {{endDate}}", "representation-date-passed-additional-label": "Gallwch wneud sylw drwy e-bostio,", - "date-raised": "Dyddiad codi" + "date-raised": "Dyddiad codi", + "download-complete-label": "Lawrlwytho wedi'i gwblhau!", + "downloading-label": "Wrthi'n llwytho i lawr", + "download-failed-label": "Methodd y lawrlwythiad", + "download-queued-label": "Wedi'i giwio" } \ No newline at end of file diff --git a/locales/en/case.json b/locales/en/case.json index fac349c1..25e02d0c 100644 --- a/locales/en/case.json +++ b/locales/en/case.json @@ -100,5 +100,9 @@ "do-you-want-to-delete-case-disclaimer-label": "Once deleted all information you have submited, will be lost.", "representation-date-passed-label": "The representation period for this appeal is between {{startDate}} and {{endDate}}", "representation-date-passed-additional-label": "You can make a representation by emailing,", - "date-raised": "Date raised" + "date-raised": "Date raised", + "download-complete-label": "Download complete!", + "downloading-label": "Downloading", + "download-failed-label": "Download failed", + "download-queued-label": "Queued" } \ No newline at end of file