Help simple edit modern version

smsoousaa year ago

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>
ubiteca year ago

Ok, maybe I'm misunderstanding, but do you want to translate the words online, offline, etc for easier ones?

smsoousaa year ago

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

ubiteca year ago

edit languaje file en,json in l10n folder

smsoousaa year ago

You still don't understand. The status text recorded in the database is not processed for translation.

ubiteca year ago

take a screenshot to see what do you want exactly