Hello everybody! I would like help from someone more educated. I would like to show the device status in the device listing, however, I would like to treat the values: 'online, unknown, offline' for a more acceptable translation for me, I have already made several attempts using IF but without success. If anyone can help me with this, I'd appreciate it.
devicesPage.js
<TableBody>
{!loading ? items.filter(filterByKeyword(searchKeyword)).map((item) => (
<TableRow className={classes.colorCell} key={item.id}>
<TableCell className={classes.headerTable}>{item.id}</TableCell>
<TableCell className={classes.headerTable}>{item.name}</TableCell>
<TableCell className={classes.headerTable}>{item.uniqueId}</TableCell>
<TableCell className={classes.headerTable}>{item.phone}</TableCell>
<TableCell className={classes.headerTable}>{item.model}</TableCell>
<TableCell className={classes.headerTable}>{item.contact}</TableCell>
<TableCell className={classes.headerTable}>{{ if (${item.status} === 'online') { item.status = 'ONLINE'; } }}</TableCell>
<TableCell className={classes.columnAction} padding="none">
<CollectionActions itemId={item.id} editPath="/settings/device" endpoint="devices" setTimestamp={setTimestamp} />
</TableCell>
</TableRow>
)) : (<TableShimmer className={classes.headerTable} columns={6} endAction />)}
</TableBody>
Ok, maybe I'm misunderstanding, but do you want to translate the words online, offline, etc for easier ones?
Actually I need to translate the status sentence, which is in lowercase and in English, I want to be able to translate the status.
From that 'unknown' for 'Vehicle Unknown' for example
edit languaje file en,json in l10n folder
You still don't understand. The status text recorded in the database is not processed for translation.
take a screenshot to see what do you want exactly
Hello everybody! I would like help from someone more educated. I would like to show the device status in the device listing, however, I would like to treat the values: 'online, unknown, offline' for a more acceptable translation for me, I have already made several attempts using IF but without success. If anyone can help me with this, I'd appreciate it.
devicesPage.js
<TableBody> {!loading ? items.filter(filterByKeyword(searchKeyword)).map((item) => ( <TableRow className={classes.colorCell} key={item.id}> <TableCell className={classes.headerTable}>{item.id}</TableCell> <TableCell className={classes.headerTable}>{item.name}</TableCell> <TableCell className={classes.headerTable}>{item.uniqueId}</TableCell> <TableCell className={classes.headerTable}>{item.phone}</TableCell> <TableCell className={classes.headerTable}>{item.model}</TableCell> <TableCell className={classes.headerTable}>{item.contact}</TableCell> <TableCell className={classes.headerTable}>{{ if (${item.status} === 'online') { item.status = 'ONLINE'; } }}</TableCell> <TableCell className={classes.columnAction} padding="none"> <CollectionActions itemId={item.id} editPath="/settings/device" endpoint="devices" setTimestamp={setTimestamp} /> </TableCell> </TableRow> )) : (<TableShimmer className={classes.headerTable} columns={6} endAction />)} </TableBody>