From a14ad98e6bd8a0bc792db1c42dd39367080dce22 Mon Sep 17 00:00:00 2001 From: Jonas Brunvoll Larsson Date: Fri, 27 Sep 2024 09:31:15 +0200 Subject: [PATCH 1/9] Update optionLabel and errorMessage.empty of both fromStop and toStop. --- src/translations/pages/contact.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/translations/pages/contact.ts b/src/translations/pages/contact.ts index cfdf16ac..533c56bd 100644 --- a/src/translations/pages/contact.ts +++ b/src/translations/pages/contact.ts @@ -690,15 +690,15 @@ export const Contact = { 'Haldeplass/kai', ), optionLabel: _( - 'Velg avreisested', - 'Select departure loation', - 'Velg avreisested', + 'Velg holdeplass/kai', + 'Select stop/harbor', + 'Velg haldeplass/kai', ), errorMessages: { empty: _( - 'Velg avreisested', - 'Select departure loation', - 'Velg avreisested', + 'Velg holdeplass/kai', + 'Select stop/harbor', + 'Velg haldeplass/kai', ), }, }, @@ -706,15 +706,15 @@ export const Contact = { toStop: { label: _('Til holdeplass/kai', 'To stop/harbor', 'Til haldeplass/kai'), optionLabel: _( - 'Velg anskomststed', - 'Select arrival location', - 'Velg ankomststed', + 'Velg holdeplass/kai', + 'Select stop/harbor', + 'Velg haldeplass/kai', ), errorMessages: { empty: _( - 'Velg anskomststed', - 'Select arrival location', - 'Velg ankomststed', + 'Velg holdeplass/kai', + 'Select stop/harbor', + 'Velg haldeplass/kai', ), }, }, From f95a8339e9aa81f2c8f92462f0a2dc6ec25a7286 Mon Sep 17 00:00:00 2001 From: Jonas Brunvoll Larsson Date: Fri, 27 Sep 2024 09:36:29 +0200 Subject: [PATCH 2/9] Add error messages to date and planned departure time. --- .../means-of-transport/forms/delayForm.tsx | 8 ++++-- .../means-of-transport/forms/driverForm.tsx | 8 ++++-- .../means-of-transport/forms/injuryForm.tsx | 8 ++++-- .../means-of-transport/forms/stopForm.tsx | 3 ++- .../forms/transportationForm.tsx | 8 ++++-- .../ticket-control/forms/feedbackForm.tsx | 8 ++++-- .../contact/travel-guarantee/index.tsx | 8 ++++-- .../validation/commonInputValidator.ts | 11 ++++++++ src/translations/pages/contact.ts | 26 ++++++++++++++----- 9 files changed, 69 insertions(+), 19 deletions(-) diff --git a/src/page-modules/contact/means-of-transport/forms/delayForm.tsx b/src/page-modules/contact/means-of-transport/forms/delayForm.tsx index b1d28263..e69e01e4 100644 --- a/src/page-modules/contact/means-of-transport/forms/delayForm.tsx +++ b/src/page-modules/contact/means-of-transport/forms/delayForm.tsx @@ -139,10 +139,11 @@ export const DelayForm = ({ state, send }: DelayFormProps) => { /> send({ type: 'ON_INPUT_CHANGE', @@ -153,10 +154,13 @@ export const DelayForm = ({ state, send }: DelayFormProps) => { /> send({ type: 'ON_INPUT_CHANGE', diff --git a/src/page-modules/contact/means-of-transport/forms/driverForm.tsx b/src/page-modules/contact/means-of-transport/forms/driverForm.tsx index 55a33c5e..bf2c794f 100644 --- a/src/page-modules/contact/means-of-transport/forms/driverForm.tsx +++ b/src/page-modules/contact/means-of-transport/forms/driverForm.tsx @@ -162,10 +162,11 @@ export const DriverForm = ({ state, send }: DriverFormProps) => { /> send({ type: 'ON_INPUT_CHANGE', @@ -176,10 +177,13 @@ export const DriverForm = ({ state, send }: DriverFormProps) => { /> send({ type: 'ON_INPUT_CHANGE', diff --git a/src/page-modules/contact/means-of-transport/forms/injuryForm.tsx b/src/page-modules/contact/means-of-transport/forms/injuryForm.tsx index 1a391e39..2e09500b 100644 --- a/src/page-modules/contact/means-of-transport/forms/injuryForm.tsx +++ b/src/page-modules/contact/means-of-transport/forms/injuryForm.tsx @@ -161,10 +161,11 @@ export const InjuryForm = ({ state, send }: InjuryFormProps) => { /> send({ type: 'ON_INPUT_CHANGE', @@ -175,10 +176,13 @@ export const InjuryForm = ({ state, send }: InjuryFormProps) => { /> send({ type: 'ON_INPUT_CHANGE', diff --git a/src/page-modules/contact/means-of-transport/forms/stopForm.tsx b/src/page-modules/contact/means-of-transport/forms/stopForm.tsx index 9b0cc5ee..db730668 100644 --- a/src/page-modules/contact/means-of-transport/forms/stopForm.tsx +++ b/src/page-modules/contact/means-of-transport/forms/stopForm.tsx @@ -112,10 +112,11 @@ export const StopForm = ({ state, send }: StopFormProps) => { /> send({ type: 'ON_INPUT_CHANGE', diff --git a/src/page-modules/contact/means-of-transport/forms/transportationForm.tsx b/src/page-modules/contact/means-of-transport/forms/transportationForm.tsx index 1dd7a302..b9845b54 100644 --- a/src/page-modules/contact/means-of-transport/forms/transportationForm.tsx +++ b/src/page-modules/contact/means-of-transport/forms/transportationForm.tsx @@ -143,10 +143,11 @@ export const TransportationForm = ({ /> send({ type: 'ON_INPUT_CHANGE', @@ -157,10 +158,13 @@ export const TransportationForm = ({ /> send({ type: 'ON_INPUT_CHANGE', diff --git a/src/page-modules/contact/ticket-control/forms/feedbackForm.tsx b/src/page-modules/contact/ticket-control/forms/feedbackForm.tsx index c0260e55..6017a11c 100644 --- a/src/page-modules/contact/ticket-control/forms/feedbackForm.tsx +++ b/src/page-modules/contact/ticket-control/forms/feedbackForm.tsx @@ -126,10 +126,11 @@ export const FeedbackForm = ({ state, send }: FeedbackFormProps) => { /> send({ type: 'ON_INPUT_CHANGE', @@ -139,10 +140,13 @@ export const FeedbackForm = ({ state, send }: FeedbackFormProps) => { } /> send({ type: 'ON_INPUT_CHANGE', diff --git a/src/page-modules/contact/travel-guarantee/index.tsx b/src/page-modules/contact/travel-guarantee/index.tsx index 4ac0b4ca..2f9a3855 100644 --- a/src/page-modules/contact/travel-guarantee/index.tsx +++ b/src/page-modules/contact/travel-guarantee/index.tsx @@ -148,10 +148,11 @@ export const RefundForm = () => { /> send({ type: 'ON_INPUT_CHANGE', @@ -161,10 +162,13 @@ export const RefundForm = () => { } /> send({ type: 'ON_INPUT_CHANGE', diff --git a/src/page-modules/contact/validation/commonInputValidator.ts b/src/page-modules/contact/validation/commonInputValidator.ts index 607f7a7f..c6467de4 100644 --- a/src/page-modules/contact/validation/commonInputValidator.ts +++ b/src/page-modules/contact/validation/commonInputValidator.ts @@ -74,6 +74,17 @@ export const commonInputValidator = (context: any) => { validCondition: context.toStop, errorMessage: PageText.Contact.inputFields.toStop.errorMessages.empty, }, + { + inputName: 'date', + validCondition: context.date, + errorMessage: PageText.Contact.inputFields.date.errorMessages.empty, + }, + { + inputName: 'plannedDepartureTime', + validCondition: context.plannedDepartureTime, + errorMessage: + PageText.Contact.inputFields.plannedDepartureTime.errorMessages.empty, + }, { inputName: 'reasonForTransportFailure', validCondition: context.reasonForTransportFailure, diff --git a/src/translations/pages/contact.ts b/src/translations/pages/contact.ts index 533c56bd..11d59b72 100644 --- a/src/translations/pages/contact.ts +++ b/src/translations/pages/contact.ts @@ -718,12 +718,26 @@ export const Contact = { ), }, }, - date: _('Dato', 'Date', 'Dato'), - plannedDepartureTime: _( - 'Planlagt avgangstid', - 'Planned departure time', - 'Planlagd avgangstid', - ), + date: { + label: _('Dato', 'Date', 'Dato'), + errorMessages: { + empty: _('Velg dato', 'Select date', 'Vel dato'), + }, + }, + plannedDepartureTime: { + label: _( + 'Planlagt avgangstid', + 'Planned departure time', + 'Planlagd avgangstid', + ), + errorMessages: { + empty: _( + 'Velg planlagt avgangstid', + 'Select planned departure time', + 'Vel avgangstid', + ), + }, + }, reasonForTransportFailure: { label: _('Mulige valg', 'Options', 'Moglege val'), optionLabel: _('Velg årsak', 'Select reason', 'Vel åtsak'), From 26d109cea98de6a0df5af392c6c405fdde3206d8 Mon Sep 17 00:00:00 2001 From: Jonas Brunvoll Larsson Date: Fri, 27 Sep 2024 09:52:04 +0200 Subject: [PATCH 3/9] Move title to the top of the feeComplaint object. --- src/translations/pages/contact.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/translations/pages/contact.ts b/src/translations/pages/contact.ts index 11d59b72..a88446cb 100644 --- a/src/translations/pages/contact.ts +++ b/src/translations/pages/contact.ts @@ -21,6 +21,11 @@ export const Contact = { ), feeComplaint: { + title: _( + 'Informasjon fra gebyret', + 'Information from the fee', + 'Informasjon frå gebyret', + ), description: _( 'Jeg har fått gebyr og ønsker å klage', 'I have received a fee and would like to file a complaint', From 414e1d43c65720f59f490d526907383e844605a6 Mon Sep 17 00:00:00 2001 From: Jonas Brunvoll Larsson Date: Fri, 27 Sep 2024 09:52:54 +0200 Subject: [PATCH 4/9] Delete unused translations and add spacing inbetween translations. --- src/translations/pages/contact.ts | 97 +++---------------------------- 1 file changed, 9 insertions(+), 88 deletions(-) diff --git a/src/translations/pages/contact.ts b/src/translations/pages/contact.ts index a88446cb..6edfc2f9 100644 --- a/src/translations/pages/contact.ts +++ b/src/translations/pages/contact.ts @@ -36,6 +36,7 @@ export const Contact = { 'If you have received a fee on incorrect grounds, you can submit a written complaint to us.', 'Dersom du har fått gebyr på feil grunnlag, kan du sende oss ei skriftleg klage.', ), + firstAgreement: { title: _( 'Har du fått gebyr etter billettkontroll?', @@ -81,6 +82,7 @@ export const Contact = { ], checkbox: _('Jeg forsår', 'I understand', 'Eg forstår'), }, + secondAgreement: { title: _( 'Typiske saker som ikke får medhold', @@ -125,11 +127,6 @@ export const Contact = { 'Eg forstår reglane og ønsker å klage på gebyret.', ), }, - title: _( - 'Informasjon fra gebyret', - 'Information from the fee', - 'Informasjon frå gebyret', - ), }, postponePayment: { @@ -162,59 +159,9 @@ export const Contact = { 'If you have feedback regarding a specific ticket inspection, we need a description of where and when the ticket inspection took place in order to proceed with the matter. If you have general feedback, you can skip the initial points.', 'Har du tilbakemelding på ein bestemt billettkontroll, treng vi ei beskriving av kor og kva tid billettkontrollen var for å kunne gå vidare med saka. Har du ei generell tilbakemelding, kan du hoppe over dei første punkta.', ), - locationQuestion: _( - 'Hvor var billettkontrollen?', - 'Where was the ticket control conducted?', - 'Kor var billettkontrollen?', - ), - transportMode: { - label: _('Reisemåte', 'Transport mode', 'Reisemåte'), - optionLabel: _( - 'Velg reisemåte', - 'Select transport mode', - 'Velg reisemåte', - ), - errorMessage: _( - 'Velg reisemåte', - 'Select transport mode', - 'Velg reisemåte', - ), - }, - line: { - label: _('Linje', 'Line', 'Linje'), - optionLabel: _('Velg linje', 'Choose line', 'Velg linje'), - errorMessage: _('Velg linje', 'Select line', 'Velg linje'), - }, - departureLocation: { - label: _('Avreisested', 'Departure location', 'Avreisested'), - optionLabel: _( - 'Velg avreisested', - 'Select departure loation', - 'Velg avreisested', - ), - errorMessage: _( - 'Velg avreisested', - 'Select departure loation', - 'Velg avreisested', - ), - }, - arrivalLocation: { - label: _('Ankomststed', 'Arrival location', 'Ankomststed'), - optionLabel: _( - 'Velg anskomststed', - 'Select arrival location', - 'Velg ankomststed', - ), - errorMessage: _( - 'Velg anskomststed', - 'Select arrival location', - 'Velg ankomststed', - ), - }, - date: _('Dato', 'Date', 'Dato'), - departureTime: _('Avgangstid', 'Departure time', 'Avgangstid'), }, }, + travelGuarantee: { title: _('Reisegaranti', 'Travel guarantee', 'Reisegaranti'), @@ -509,39 +456,8 @@ export const Contact = { 'Information about you (optinal)', 'Informasjon om deg (valfritt)', ), - - firstname: _( - 'Fornavn og mellomnavn', - 'First name and middle name', - 'Fornamn og mellomnamn', - ), - lastname: _('Etternavn', 'Lastname', 'Etternamn'), - address: _('Adresse', 'Address', 'Adresse'), - postalCode: _('Postnummer', 'Postal code', 'Postnummar'), - city: _('Bosted', 'City', 'Bustad'), - email: _('E-post', 'Email', 'E-post'), - phonenumber: _('Mobil', 'Mobile', 'Mobil'), - bankAccount: { - label: _('Bankkontonummer', 'Bank account number', 'Bankkontonummar'), - checkbox: _( - 'Jeg har et utenlandsk bankkontonummer', - 'I have a foreign bank account', - 'Eg har eit utanlandsk bankkontonummar', - ), - iban: _('IBAN', 'IBAN', 'IBAN'), - swift: _('SWIFT ', 'SWIFT ', 'SWIFT '), - errorMessageBankAccount: _( - 'Vennligst fyll ut ditt bankkontonummer', - 'Please provide your bank account', - 'Vennligst fyll ut ditt bankkontonummar', - ), - }, - errorMessage: _( - 'Vennligst fyll ut informasjon om deg', - 'Please provide your information', - 'Vennligst fyll ut din informasjon', - ), }, + submit: _('Send', 'Submit', 'Send'), inputFields: { @@ -596,6 +512,7 @@ export const Contact = { ), }, }, + address: { label: _('Adresse', 'Address', 'Adresse'), errorMessages: { @@ -784,6 +701,7 @@ export const Contact = { empty: _('Velg årsak', 'Select reason', 'Vel årsak'), }, }, + kilometersDriven: { label: _( 'Antall kjørte kilometer', @@ -845,6 +763,7 @@ export const Contact = { ), }, }, + ticketStorage: { question: _( 'Hvor pleier du å ha billetten din?', @@ -868,6 +787,7 @@ export const Contact = { ), }, }, + customerNumber: { label: _('Kundenummer', 'Customer number', 'Kundenummar'), errorMessages: { @@ -879,6 +799,7 @@ export const Contact = { }, }, }, + travelCardNumber: { label: _('Reisekort', 'Travelcard', 'Reisekort'), errorMessages: { From 2000679ec4980c30876e0c5fbd120ce635a85477 Mon Sep 17 00:00:00 2001 From: Jonas Brunvoll Larsson Date: Fri, 27 Sep 2024 09:54:52 +0200 Subject: [PATCH 5/9] rename layoutAgreement to agreement. --- .../travel-guarantee/form-selector.tsx | 19 +++++++------------ src/translations/pages/contact.ts | 2 +- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/page-modules/contact/travel-guarantee/form-selector.tsx b/src/page-modules/contact/travel-guarantee/form-selector.tsx index 20119de7..576b1dd3 100644 --- a/src/page-modules/contact/travel-guarantee/form-selector.tsx +++ b/src/page-modules/contact/travel-guarantee/form-selector.tsx @@ -19,40 +19,35 @@ export const FormSelector = ({ state, send }: FormSelectorProps) => { {!state.context.isIntialAgreementChecked && ( - {t( - PageText.Contact.travelGuarantee.layoutAgreement - .delayedRefundText, - )} + {t(PageText.Contact.travelGuarantee.agreement.delayedRefundText)} - {t( - PageText.Contact.travelGuarantee.layoutAgreement.ticketRefundText, - )} + {t(PageText.Contact.travelGuarantee.agreement.ticketRefundText)} {t( - PageText.Contact.travelGuarantee.layoutAgreement + PageText.Contact.travelGuarantee.agreement .travelGuaranteeExceptions.label, )} {t( - PageText.Contact.travelGuarantee.layoutAgreement + PageText.Contact.travelGuarantee.agreement .travelGuaranteeExceptions.minimumTimeToNextDeparture, )} {t( - PageText.Contact.travelGuarantee.layoutAgreement + PageText.Contact.travelGuarantee.agreement .travelGuaranteeExceptions.externalFactors, )}
    - {PageText.Contact.travelGuarantee.layoutAgreement.travelGuaranteeExceptions.examples.map( + {PageText.Contact.travelGuarantee.agreement.travelGuaranteeExceptions.examples.map( (example: TranslatedString, index: number) => (
  • {t(example)} @@ -63,7 +58,7 @@ export const FormSelector = ({ state, send }: FormSelectorProps) => { {t( - PageText.Contact.travelGuarantee.layoutAgreement + PageText.Contact.travelGuarantee.agreement .travelGuaranteeExceptions.exclusion, )} diff --git a/src/translations/pages/contact.ts b/src/translations/pages/contact.ts index 6edfc2f9..8453845c 100644 --- a/src/translations/pages/contact.ts +++ b/src/translations/pages/contact.ts @@ -165,7 +165,7 @@ export const Contact = { travelGuarantee: { title: _('Reisegaranti', 'Travel guarantee', 'Reisegaranti'), - layoutAgreement: { + agreement: { delayedRefundText: _( 'Ble du forsinket fordi vi ikke var i rute? Du kan ha krav på å få refundert utgifter til alternativ transport som for eksempel drosje, bil og annen kollektivtransport.', 'Were you delayed because we were not on schedule? You may be entitled to reimbursement for expenses related to alternative transportation such as taxi, car, and other public transportation.', From 7012843812e5520c3796e026b0a2beb9e6dbdbcc Mon Sep 17 00:00:00 2001 From: Jonas Brunvoll Larsson Date: Fri, 27 Sep 2024 10:05:47 +0200 Subject: [PATCH 6/9] Reorgonize structure of translations to get rid of subPageObject to achieve similarity with how the rest of the translations are organized. --- .../travel-guarantee/form-selector.tsx | 14 ++-- src/translations/pages/contact.ts | 66 ++++++++----------- 2 files changed, 33 insertions(+), 47 deletions(-) diff --git a/src/page-modules/contact/travel-guarantee/form-selector.tsx b/src/page-modules/contact/travel-guarantee/form-selector.tsx index 576b1dd3..734bba30 100644 --- a/src/page-modules/contact/travel-guarantee/form-selector.tsx +++ b/src/page-modules/contact/travel-guarantee/form-selector.tsx @@ -84,25 +84,19 @@ export const FormSelector = ({ state, send }: FormSelectorProps) => {
      send({ type: 'TAXI' })} /> send({ type: 'CAR' })} /> send({ type: 'OTHER' })} diff --git a/src/translations/pages/contact.ts b/src/translations/pages/contact.ts index 8453845c..911c30a0 100644 --- a/src/translations/pages/contact.ts +++ b/src/translations/pages/contact.ts @@ -234,44 +234,17 @@ export const Contact = { }, }, - subPageTitles: { - refundTaxi: { - description: _( - 'Jeg ønsker refusjon for drosje', - 'I would like refund for taxi', - 'Eg ønsker refusjon for drosje', - ), - info: _( - 'Hvis du ikke kommer frem med et annet rutetilbud, refunderer vi utgifter til drosje i henhold til gjeldende regler.', - 'If you do not provide an alternative route offer, we will refund taxi expenses according to the applicable regulations.', - 'Viss du ikkje kjem fram med eit anna rutetilbod, refunderer vi utlegg til drosje etter gjeldande reglar.', - ), - }, - - refundCar: { - description: _( - 'Jeg ønsker refusjon for bruk av bil', - 'I would like refund for the use of a car', - 'Eg ønsker refusjon for bruk av en bil', - ), - info: _( - 'Hvis du ikke kommer frem med et annet rutetilbud, refunderer vi dokumenterte utgifter for bruk av bil. Vi betaler kilometergodtgjørelse etter statens satser. Refusjonen dekker ikke bompenger, parkering eller andre utgifter knyttet til leiebil/delbil.', - 'If you do not provide an alternative route offer, we will refund documented expenses for the use of a car. We will pay mileage reimbursement according to the state´s rates. The refund does not cover tolls, parking, or other expenses related to rental cars/sharing cars.', - 'Viss du ikkje kjem fram med eit anna rutetilbod, refunderer vi dokumenterte utlegg for bruk av bil. Vi betalar kilometergodtgjersle etter statens satsar. Refusjonen dekker ikkje bompengar, parkering eller andre utgifter knytt til leigebil/delebil.', - ), - }, - - refundOtherPublicTransport: { - description: _( - 'Jeg ønsker refusjon for annen kollektivtransport', - 'I would like a refund for other public transport', - 'Eg ønsker refusjon for annan kollektivtransport', - ), - info: _('', '', ''), - }, - }, - refundTaxi: { + description: _( + 'Jeg ønsker refusjon for drosje', + 'I would like refund for taxi', + 'Eg ønsker refusjon for drosje', + ), + info: _( + 'Hvis du ikke kommer frem med et annet rutetilbud, refunderer vi utgifter til drosje i henhold til gjeldende regler.', + 'If you do not provide an alternative route offer, we will refund taxi expenses according to the applicable regulations.', + 'Viss du ikkje kjem fram med eit anna rutetilbod, refunderer vi utlegg til drosje etter gjeldande reglar.', + ), information: { title: _( 'Informasjon fra drosjekvitteringen', @@ -287,7 +260,18 @@ export const Contact = { ), }, }, + refundCar: { + description: _( + 'Jeg ønsker refusjon for bruk av bil', + 'I would like refund for the use of a car', + 'Eg ønsker refusjon for bruk av en bil', + ), + info: _( + 'Hvis du ikke kommer frem med et annet rutetilbud, refunderer vi dokumenterte utgifter for bruk av bil. Vi betaler kilometergodtgjørelse etter statens satser. Refusjonen dekker ikke bompenger, parkering eller andre utgifter knyttet til leiebil/delbil.', + 'If you do not provide an alternative route offer, we will refund documented expenses for the use of a car. We will pay mileage reimbursement according to the state´s rates. The refund does not cover tolls, parking, or other expenses related to rental cars/sharing cars.', + 'Viss du ikkje kjem fram med eit anna rutetilbod, refunderer vi dokumenterte utlegg for bruk av bil. Vi betalar kilometergodtgjersle etter statens satsar. Refusjonen dekker ikkje bompengar, parkering eller andre utgifter knytt til leigebil/delebil.', + ), aboutTheCarTrip: { title: _('Om bilturen', 'About the car trip', 'Om bilturen'), }, @@ -299,6 +283,14 @@ export const Contact = { ), }, }, + + refundOtherPublicTransport: { + description: _( + 'Jeg ønsker refusjon for annen kollektivtransport', + 'I would like a refund for other public transport', + 'Eg ønsker refusjon for annan kollektivtransport', + ), + }, }, modeOfTransport: { From bbe787fff467c2f187e23d16dcba2ca85330665d Mon Sep 17 00:00:00 2001 From: Jonas Brunvoll Larsson Date: Fri, 27 Sep 2024 10:18:14 +0200 Subject: [PATCH 7/9] rename from 'inputFields' to 'input' --- .../means-of-transport/forms/delayForm.tsx | 34 +++++----- .../means-of-transport/forms/driverForm.tsx | 46 +++++++------ .../means-of-transport/forms/injuryForm.tsx | 46 +++++++------ .../forms/serviceOfferingForm.tsx | 26 ++++---- .../means-of-transport/forms/stopForm.tsx | 30 ++++----- .../forms/transportationForm.tsx | 40 ++++++------ .../ticket-control/forms/feeComplaintForm.tsx | 48 ++++++-------- .../ticket-control/forms/feedbackForm.tsx | 32 +++++---- .../ticket-control/forms/postponePayment.tsx | 10 +-- .../contact/travel-guarantee/index.tsx | 65 ++++++++----------- .../validation/commonInputValidator.ts | 56 ++++++++-------- .../travelGuaranteeInputValidator.ts | 33 ++++------ src/page-modules/contact/validation/utils.ts | 10 +-- src/translations/pages/contact.ts | 2 +- 14 files changed, 216 insertions(+), 262 deletions(-) diff --git a/src/page-modules/contact/means-of-transport/forms/delayForm.tsx b/src/page-modules/contact/means-of-transport/forms/delayForm.tsx index e69e01e4..7e0744c6 100644 --- a/src/page-modules/contact/means-of-transport/forms/delayForm.tsx +++ b/src/page-modules/contact/means-of-transport/forms/delayForm.tsx @@ -39,7 +39,7 @@ export const DelayForm = ({ state, send }: DelayFormProps) => { { @@ -80,7 +78,7 @@ export const DelayForm = ({ state, send }: DelayFormProps) => { )} valueToId={(line: Line) => line.id} valueToText={(line: Line) => line.name} - placeholder={t(PageText.Contact.inputFields.line.optionLabel)} + placeholder={t(PageText.Contact.input.line.optionLabel)} error={ state.context?.errorMessages['line']?.[0] ? t(state.context?.errorMessages['line']?.[0]) @@ -89,7 +87,7 @@ export const DelayForm = ({ state, send }: DelayFormProps) => { /> { @@ -125,7 +123,7 @@ export const DelayForm = ({ state, send }: DelayFormProps) => { value: value, }); }} - placeholder={t(PageText.Contact.inputFields.toStop.optionLabel)} + placeholder={t(PageText.Contact.input.toStop.optionLabel)} options={ state.context.line?.id ? getQuaysByLine(state.context.line.id) : [] } @@ -139,7 +137,7 @@ export const DelayForm = ({ state, send }: DelayFormProps) => { /> { /> { /> - + - {t(PageText.Contact.inputFields.feedback.description)} + {t(PageText.Contact.input.feedback.description)}