From 5cadd053645ed2275e52b0d58beace4934891d6c Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Mon, 3 Feb 2025 11:54:27 +0000 Subject: [PATCH] welsh language updated for errors on uploads --- .../case/representation/representationElements.js | 12 +++++++++--- components/elements/index.js | 12 +++++++++--- data/collections.json | 3 ++- locales/cy/myrepresentations.json | 3 +++ locales/cy/newappeal.json | 3 +++ locales/en/myrepresentations.json | 3 +++ locales/en/newappeal.json | 3 +++ 7 files changed, 32 insertions(+), 7 deletions(-) diff --git a/components/case/representation/representationElements.js b/components/case/representation/representationElements.js index 8de8e02b..431e1269 100644 --- a/components/case/representation/representationElements.js +++ b/components/case/representation/representationElements.js @@ -1040,12 +1040,18 @@ export const RenderFileUpload = (field) => { .map(({ file, errors }) => { return errors.map((error) => { if (error.code === "file-too-large") { - return `${file.name} is too large. Please upload a smaller file.`; + return `${file.name} ${t( + "myrepresentations:fileupload-file-error-filesize-label" + )}`; } if (error.code === "file-invalid-type") { - return `${file.name} has an invalid type. Please upload an image.`; + return `${file.name} ${t( + "myrepresentations:fileupload-file-error-invalid-type-label" + )}`; } - return `${file.name} is invalid.`; + return `${file.name} ${t( + "myrepresentations:fileupload-file-error-invalid-label" + )}`; }); }) .flat(); // Flatten the errors array diff --git a/components/elements/index.js b/components/elements/index.js index af6f1b6f..1502943e 100644 --- a/components/elements/index.js +++ b/components/elements/index.js @@ -1978,12 +1978,18 @@ const RenderFileUpload = (field) => { .map(({ file, errors }) => { return errors.map((error) => { if (error.code === "file-too-large") { - return `${file.name} is too large. Please upload a smaller file.`; + return `${file.name} ${t( + "newappeal:new-appeal-fileupload-file-error-filesize-label" + )}`; } if (error.code === "file-invalid-type") { - return `${file.name} has an invalid type. Please upload an image.`; + return `${file.name} ${t( + "newappeal:new-appeal-fileupload-file-error-invalid-type-label" + )}`; } - return `${file.name} is invalid.`; + return `${file.name} ${t( + "newappeal:new-appeal-fileupload-file-error-invalid-label" + )}`; }); }) .flat(); // Flatten the errors array diff --git a/data/collections.json b/data/collections.json index fc60b0cc..3240e7c1 100644 --- a/data/collections.json +++ b/data/collections.json @@ -124,7 +124,8 @@ "UrlName": "lawfuldevelopmentcertificate", "MetadataId": "184e4861-9681-eb11-aac0-00224800be9c", "appealTypeID": "846040008", - "NavigationProperty": "pinswg_LawfulDevelopmentCertificatAppIds" + "NavigationProperty": "pinswg_LawfulDevelopmentCertificatAppIds", + "value": "Lawful Development Certificate Appeal - S194 + 195" }, { "LogicalCollectionName": "pinswg_lawfuldevelopmentcertificates", diff --git a/locales/cy/myrepresentations.json b/locales/cy/myrepresentations.json index 9f7317eb..c6dc140e 100644 --- a/locales/cy/myrepresentations.json +++ b/locales/cy/myrepresentations.json @@ -24,6 +24,9 @@ "add-files-label": "Ychwanegwch eich ffeiliau", "fileupload-drop-label": "Llusgwch a gollyngwch eich ffeiliau yma.", "fileupload-file-list-label": "Dim ond ffeiliau .pdf, .doc, .docx, .xlsx, .tif, .tiff, .jpeg, .jpg neu .zip a dderbynnir", + "fileupload-file-error-filesize-label": "yn rhy fawr. Llwythwch ffeil lai i fyny.", + "fileupload-file-error-invalid-type-label": "mae ganddo fath annilys. Uwchlwythwch fath a ganiateir.", + "fileupload-file-error-invalid-label": "yn annilys", "capacity-para-one": "Mae'r ffurflen hon yn eich galluogi i gyflwyno sylwadau ar achos i Benderfyniadau Cynllunio ac Amgylchedd Cymru", "capacity-para-two": "Sylwch fod angen cyflwyno sylwadau gan bartïon â diddordeb o fewn yr amserlen. Mae hwn i'w weld ar y dudalen \"Crynodeb Achos\" flaenorol. Gall sylwadau a gyflwynir ar ôl y dyddiad hwn gael eu hystyried yn annilys.", "capacity-select-your-details": "Eich manylion", diff --git a/locales/cy/newappeal.json b/locales/cy/newappeal.json index 6a34d353..3fc577ac 100644 --- a/locales/cy/newappeal.json +++ b/locales/cy/newappeal.json @@ -83,6 +83,9 @@ "new-appeal-procedure-option-hybrid": "Hybrid", "new-appeal-fileupload-drop-label": "Llusgwch a gollyngwch eich ffeiliau yma.", "new-appeal-fileupload-file-list-label": "Dim ond ffeiliau .pdf, .doc, .docx, .xlsx .tif, .tiff, .jpeg, .jpg neu .zip a dderbynnir", + "new-appeal-fileupload-file-error-filesize-label": "yn rhy fawr. Llwythwch ffeil lai i fyny.", + "new-appeal-fileupload-file-error-invalid-type-label": "mae ganddo fath annilys. Uwchlwythwch fath a ganiateir.", + "new-appeal-fileupload-file-error-invalid-label": "yn annilys", "s78-appeals-only-label": "Gallwch ddefnyddio'r porth hwn i gyflwyno apêl yn erbyn y canlynol yn unig:", "s78-appeals-only-bullet-one": "gwrthod caniatâd cynllunio", "s78-appeals-only-bullet-two": "methiant i benderfynu ar gais cynllunio o fewn 8 wythnos", diff --git a/locales/en/myrepresentations.json b/locales/en/myrepresentations.json index e823eb5d..9493003a 100644 --- a/locales/en/myrepresentations.json +++ b/locales/en/myrepresentations.json @@ -24,6 +24,9 @@ "add-files-label": "Add your files", "fileupload-drop-label": "Drag and drop your files here.", "fileupload-file-list-label": "Only .pdf, .doc, .docx, .xlsx, .tif, .tiff, .jpeg, .jpg or .zip files will be accepted", + "fileupload-file-error-filesize-label": "is too large. Please upload a smaller file.", + "fileupload-file-error-invalid-type-label": "has an invalid type. Please upload an allowed type.", + "fileupload-file-error-invalid-label": "is invalid", "capacity-para-one": "This form enables you to submit representations on a case to Planning and Environment Decisions Wales.", "capacity-para-two": "Please note that representations from interested parties need to be made within the timetable. This can be found on the previous \"Case Summary\" page. Representations submitted after this date may be considered invalid.", "capacity-select-your-details": "Your details", diff --git a/locales/en/newappeal.json b/locales/en/newappeal.json index 689fc3c4..0dbdb358 100644 --- a/locales/en/newappeal.json +++ b/locales/en/newappeal.json @@ -83,6 +83,9 @@ "new-appeal-procedure-option-hybrid": "Hybrid", "new-appeal-fileupload-drop-label": "Drag and drop your files here.", "new-appeal-fileupload-file-list-label": "Only .pdf, .doc, .docx, .xlsx, .tif, .tiff, .jpeg, .jpg or .zip files will be accepted", + "new-appeal-fileupload-file-error-filesize-label": "is too large. Please upload a smaller file.", + "new-appeal-fileupload-file-error-invalid-type-label": "has an invalid type. Please upload an allowed type.", + "new-appeal-fileupload-file-error-invalid-label": "is invalid", "s78-appeals-only-label": "You can only use this portal to submit an appeal against:", "s78-appeals-only-bullet-one": "a refusal of planning permission", "s78-appeals-only-bullet-two": "failure to determine a planning application within 8 weeks",