Translation on news

This commit is contained in:
Viktor Sarström 2021-04-13 17:21:40 +02:00
parent 89ee017783
commit 57d6e7150f
3 changed files with 11 additions and 2 deletions

View File

@ -11,6 +11,7 @@ import moment from 'moment'
import 'moment/locale/sv'
import React from 'react'
import { SafeAreaView, ScrollView, StyleSheet, View } from 'react-native'
import { translate } from '../utils/translation'
import { BackIcon } from './icon.component'
import { Image } from './image.component'
import { Markdown } from './markdown.component'
@ -38,7 +39,7 @@ export const NewsItem = ({ navigation, route }: NewsItemProps) => {
const BackAction = () => (
<TopNavigationAction
accessibilityLabel="Tillbaka till barn"
accessibilityLabel={translate('news.backToChild')}
icon={BackIcon}
onPress={navigateBack}
/>
@ -48,7 +49,7 @@ export const NewsItem = ({ navigation, route }: NewsItemProps) => {
<SafeAreaView style={styles.safeArea}>
<SafeAreaViewContainer>
<TopNavigation
title="Nyhet från Skolplattformen"
title={translate('news.title')}
alignment="center"
accessoryLeft={BackAction}
/>

View File

@ -54,5 +54,9 @@
"title": "Report absence",
"selectAbscenseEndTime": "Choose end time",
"entireDay": "Whole day"
},
"news": {
"title": "News from the school platform",
"backToChild": "Back to child"
}
}

View File

@ -54,5 +54,9 @@
"title": "Anmäl frånvaro",
"selectAbscenseEndTime": "Välj sluttid",
"entireDay": "Heldag"
},
"news": {
"title": "Nyhet från skolplattformen",
"backToChild": "Tillbaka till barn"
}
}