diff options
author | Anton Tananaev <anton@traccar.org> | 2022-04-17 19:25:46 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-04-17 19:25:46 -0700 |
commit | fa3ecdcd8f181c01279a0712dc795f7f2cf909ee (patch) | |
tree | c1f7b4aabd1591499b69a3ba31a463218f6b3e3a /modern/src/DevicesList.js | |
parent | 7d3e4252fb09da9b1d466ac704ba4aa301317ef9 (diff) | |
download | trackermap-web-fa3ecdcd8f181c01279a0712dc795f7f2cf909ee.tar.gz trackermap-web-fa3ecdcd8f181c01279a0712dc795f7f2cf909ee.tar.bz2 trackermap-web-fa3ecdcd8f181c01279a0712dc795f7f2cf909ee.zip |
Fix localization issues
Diffstat (limited to 'modern/src/DevicesList.js')
-rw-r--r-- | modern/src/DevicesList.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modern/src/DevicesList.js b/modern/src/DevicesList.js index c51385ef..bcd6786a 100644 --- a/modern/src/DevicesList.js +++ b/modern/src/DevicesList.js @@ -24,7 +24,7 @@ import { devicesActions } from './store'; import EditCollectionView from './EditCollectionView'; import { useEffectAsync } from './reactHelper'; import { - formatAlarm, formatBoolean, formatPercentage, getStatusColor, + formatAlarm, formatBoolean, formatPercentage, formatStatus, getStatusColor, } from './common/formatter'; import { useTranslation } from './LocalizationProvider'; @@ -86,7 +86,11 @@ const DeviceRow = ({ data, index, style }) => { <img className={classes.icon} src={`images/icon/${item.category || 'default'}.svg`} alt="" /> </Avatar> </ListItemAvatar> - <ListItemText primary={item.name} secondary={item.status} classes={{ secondary: classes[getStatusColor(item.status)] }} /> + <ListItemText + primary={item.name} + secondary={formatStatus(item.status, t)} + classes={{ secondary: classes[getStatusColor(item.status)] }} + /> <ListItemSecondaryAction className={classes.indicators}> {position && ( <> |