spelling: abbreviations
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
This commit is contained in:
parent
948568dd7c
commit
b232a23eb5
|
@ -125,7 +125,7 @@ test('renders child in high school', () => {
|
|||
|
||||
expect(screen.getByText('Test Testsson')).toBeTruthy()
|
||||
expect(
|
||||
screen.getByText(translate('abbrevations.upperSecondarySchool'))
|
||||
screen.getByText(translate('abbreviations.upperSecondarySchool'))
|
||||
).toBeTruthy()
|
||||
})
|
||||
|
||||
|
@ -148,12 +148,12 @@ test('renders multiple children', () => {
|
|||
|
||||
expect(screen.getByText('Storasyster Testsson')).toBeTruthy()
|
||||
expect(
|
||||
screen.getByText(translate('abbrevations.upperSecondarySchool'))
|
||||
screen.getByText(translate('abbreviations.upperSecondarySchool'))
|
||||
).toBeTruthy()
|
||||
|
||||
expect(screen.getByText('Lillebror Testsson')).toBeTruthy()
|
||||
expect(
|
||||
screen.getByText(translate('abbrevations.compulsorySchool'))
|
||||
screen.getByText(translate('abbreviations.compulsorySchool'))
|
||||
).toBeTruthy()
|
||||
})
|
||||
|
||||
|
@ -214,9 +214,9 @@ test('handles multiple statuses for a child', () => {
|
|||
const screen = setup()
|
||||
|
||||
var multipleStatusesRendered = `${translate(
|
||||
'abbrevations.upperSecondarySchool'
|
||||
)}, ${translate('abbrevations.compulsorySchool')}, ${translate(
|
||||
'abbrevations.leisureTimeCentre'
|
||||
'abbreviations.upperSecondarySchool'
|
||||
)}, ${translate('abbreviations.compulsorySchool')}, ${translate(
|
||||
'abbreviations.leisureTimeCentre'
|
||||
)}`
|
||||
|
||||
expect(screen.getByText('Test Testsson')).toBeTruthy()
|
||||
|
|
|
@ -123,20 +123,20 @@ export const ChildListItem = ({
|
|||
|
||||
// Taken from Skolverket
|
||||
// https://www.skolverket.se/skolutveckling/anordna-och-administrera-utbildning/administrera-utbildning/skoltermer-pa-engelska
|
||||
const abbrevations = {
|
||||
G: t('abbrevations.upperSecondarySchool'),
|
||||
GR: t('abbrevations.compulsorySchool'),
|
||||
F: t('abbrevations.leisureTimeCentre'),
|
||||
FS: t('abbrevations.preSchool'),
|
||||
const abbreviations = {
|
||||
G: t('abbreviations.upperSecondarySchool'),
|
||||
GR: t('abbreviations.compulsorySchool'),
|
||||
F: t('abbreviations.leisureTimeCentre'),
|
||||
FS: t('abbreviations.preSchool'),
|
||||
}
|
||||
|
||||
return child.status
|
||||
? child.status
|
||||
.split(';')
|
||||
.map((status) => {
|
||||
const statusAsAbbreviation = status as keyof typeof abbrevations
|
||||
const statusAsAbbreviation = status as keyof typeof abbreviations
|
||||
|
||||
return abbrevations[statusAsAbbreviation] || status
|
||||
return abbreviations[statusAsAbbreviation] || status
|
||||
})
|
||||
.join(', ')
|
||||
: null
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"abbrevations": {
|
||||
"abbreviations": {
|
||||
"compulsorySchool": "Primary/lower-secondary school",
|
||||
"leisureTimeCentre": "After-school care",
|
||||
"preSchool": "Preschool",
|
||||
|
|
Loading…
Reference in New Issue