Quiero que Yup elija las traducciones, pero parece que no funciona. Este es mi código:
export const whenCheckAllocationOwner = { is: (modalType: ModalType, currentLegalForm: LegalForm) => currentLegalForm !== EKLegalForm && currentLegalForm !== FreelanceLegalForm && modalType === 'owner', then: Yup.string().when( ['modalType', 'currentLegalForm', 'isBeneficialOwner'], whenAllocationGbR, ), otherwise: Yup.string().test( 'test_allocation', i18n.t( 'Ensure that there are no less than 0.00% or no more than 100% or a maximum of two decimals', ), (value) => checkLocaleValidAllocation(value, true), ), };El valor de la traducción está en alemán, pero no se está seleccionando.