fix: make similar albums translateable

This commit is contained in:
Lei Nelissen
2023-04-23 22:06:39 +02:00
parent 913d185b46
commit 81b9ba683a
7 changed files with 15 additions and 6 deletions

View File

@@ -52,6 +52,12 @@ module.exports = {
'react/prop-types': 'off',
'@typescript-eslint/no-unused-vars': [
'error'
],
'react/jsx-no-literals': [
'error',
{
ignoreProps: true
}
]
},
settings: {

View File

@@ -60,5 +60,6 @@
"playing-on": "Playing on",
"local-playback": "Local playback",
"streaming": "Streaming",
"total-duration": "Total duration"
"total-duration": "Total duration",
"similar-albums": "Similar albums"
}

View File

@@ -60,5 +60,6 @@
"playing-on": "Speelt af op",
"local-playback": "Lokaal afspelen",
"streaming": "Streamen",
"total-duration": "Totale duur"
"total-duration": "Totale duur",
"similar-albums": "Vergelijkbare albums"
}

View File

@@ -58,4 +58,5 @@ export type LocaleKeys = 'play-next'
| 'playing-on'
| 'local-playback'
| 'streaming'
| 'total-duration'
| 'total-duration'
| 'similar-albums'

View File

@@ -82,7 +82,7 @@ function Downloads() {
]}
numberOfLines={1}
>
{t('total-download-size')}: {formatBytes(totalDownloadSize)}
{t('total-download-size')}{': '}{formatBytes(totalDownloadSize)}
</Text>
<Button
icon={TrashIcon}

View File

@@ -88,7 +88,7 @@ const Album: React.FC = () => {
) : null}
{album?.Similar?.length ? (
<>
<SubHeader>Similar albums</SubHeader>
<SubHeader>{t('similar-albums')}</SubHeader>
<ScrollView horizontal style={{ marginLeft: -24, marginRight: -24, marginTop: 8, marginBottom: 36 }} contentContainerStyle={{ paddingHorizontal: 24 }} showsHorizontalScrollIndicator={false}>
{album.Similar.map((id) => (
<SimilarAlbum id={id} key={id} />

View File

@@ -204,7 +204,7 @@ const TrackListView: React.FC<TrackListViewProps> = ({
</TrackContainer>
</TouchableHandler>
)}
<Text style={{ paddingTop: 24, paddingBottom: 12, textAlign: 'center', opacity: 0.5 }}>{t('total-duration')}: {ticksToDuration(totalDuration)}</Text>
<Text style={{ paddingTop: 24, paddingBottom: 12, textAlign: 'center', opacity: 0.5 }}>{t('total-duration')}{': '}{ticksToDuration(totalDuration)}</Text>
<WrappableButtonRow style={{ marginTop: 24 }}>
<WrappableButton
icon={CloudDownArrow}