Skip to content

Commit

Permalink
feat: better usage of limitations string
Browse files Browse the repository at this point in the history
  • Loading branch information
thoreyjona committed Oct 15, 2024
1 parent 37582b7 commit d654f23
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
6 changes: 3 additions & 3 deletions apps/native/app/src/messages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,9 @@ export const en: TranslatedMessages = {
'Ég heimila líffæragjöf, með takmörkunum.',
'health.organDonation.isNotDonor': 'Ég heimila ekki líffæragjöf',
'health.organDonation.isDonorDescription':
'Öll líffærin mín má nota til ígræðslu',
'Öll líffærin mín má nota til ígræðslu.',
'health.organDonation.isNotDonorDescription':
'Engin líffæri má nota til ígræðslu',
'Engin líffæri má nota til ígræðslu.',
'health.organDonation.isDonorWithLimitationsDescription':
'Öll líffærin mín má nota til ígræðslu fyrir utan: ',
'Öll líffærin mín má nota til ígræðslu fyrir utan: {limitations}.',
}
6 changes: 3 additions & 3 deletions apps/native/app/src/messages/is.ts
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,9 @@ export const is = {
'Ég heimila líffæragjöf, með takmörkunum.',
'health.organDonation.isNotDonor': 'Ég heimila ekki líffæragjöf',
'health.organDonation.isDonorDescription':
'Öll líffærin mín má nota til ígræðslu',
'Öll líffærin mín má nota til ígræðslu.',
'health.organDonation.isNotDonorDescription':
'Engin líffæri má nota til ígræðslu',
'Engin líffæri má nota til ígræðslu.',
'health.organDonation.isDonorWithLimitationsDescription':
'Öll líffærin mín má nota til ígræðslu fyrir utan: ',
'Öll líffærin mín má nota til ígræðslu fyrir utan: {limitations}.',
}
25 changes: 14 additions & 11 deletions apps/native/app/src/screens/health/health-overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -428,17 +428,20 @@ export const HealthOverviewScreen: NavigationFunctionComponent = ({
? 'health.organDonation.isDonor'
: 'health.organDonation.isNotDonor',
})}
value={`${intl.formatMessage({
id: isOrganDonorWithLimitations
? 'health.organDonation.isDonorWithLimitationsDescription'
: isOrganDonor
? 'health.organDonation.isDonorDescription'
: 'health.organDonation.isNotDonorDescription',
})}${
isOrganDonorWithLimitations
? organLimitations?.join(', ')
: ''
}.`}
value={`${intl.formatMessage(
{
id: isOrganDonorWithLimitations
? 'health.organDonation.isDonorWithLimitationsDescription'
: isOrganDonor
? 'health.organDonation.isDonorDescription'
: 'health.organDonation.isNotDonorDescription',
},
{
limitations: isOrganDonorWithLimitations
? organLimitations?.join(', ')
: '',
},
)}`}
loading={paymentStatusRes.loading && !paymentStatusRes.data}
error={paymentStatusRes.error && !paymentStatusRes.data}
noBorder
Expand Down

0 comments on commit d654f23

Please sign in to comment.