Translate table headers
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-07-03 17:14:56 +03:00
parent b956bb525d
commit e13d6a7f4a
4 changed files with 23 additions and 12 deletions

View File

@@ -51,11 +51,11 @@ steps:
- chmod 400 ~/.ssh/id_rsa - chmod 400 ~/.ssh/id_rsa
- scp -o StrictHostKeyChecking=no -r ./app/.next webmaster@warframe.center:~/warframe-center/app/.next - scp -o StrictHostKeyChecking=no -r ./app/.next webmaster@warframe.center:~/warframe-center/app/.next
- | - |
ssh -o StrictHostKeyChecking=no webmaster@warframe.center " ssh -o StrictHostKeyChecking=no webmaster@warframe.center '
"[ -s ~/.nvm/nvm.sh ] && source ~/.nvm/nvm.sh" "[ -s ~/.nvm/nvm.sh ] && source ~/.nvm/nvm.sh" &&
nvm use default nvm use default &&
pm2 restart warframe-center-app-3000 pm2 restart warframe-center-app-3000
" '
depends_on: depends_on:
- install dependencies - install dependencies

View File

@@ -1,10 +1,11 @@
import { Component } from 'react' import { Component } from 'react'
import { DataGrid } from '@mui/x-data-grid' import { DataGrid } from '@mui/x-data-grid'
import { Link, Typography, Box } from '@mui/material' import { Link, Typography, Box } from '@mui/material'
import { withTranslation } from 'react-i18next'
import Moment from 'react-moment' import Moment from 'react-moment'
export default class Table extends Component { class Table extends Component {
constructor ({ scanResults }) { constructor ({ scanResults, t }) {
super() super()
this.scanResults = scanResults.map(row => ({ this.scanResults = scanResults.map(row => ({
...row, ...row,
@@ -13,7 +14,7 @@ export default class Table extends Component {
this.columns = [ this.columns = [
{ {
field: 'name', field: 'name',
headerName: 'Name', headerName: t('name'),
flex: 2, flex: 2,
renderCell: (cellValues) => { renderCell: (cellValues) => {
return ( return (
@@ -43,17 +44,17 @@ export default class Table extends Component {
}, },
{ {
field: 'partsPrice', field: 'partsPrice',
headerName: 'Parts Price', headerName: t('parts_price'),
flex: 1 flex: 1
}, },
{ {
field: 'setPrice', field: 'setPrice',
headerName: 'Set Price', headerName: t('set_price'),
flex: 1 flex: 1
}, },
{ {
field: 'difference', field: 'difference',
headerName: 'Difference', headerName: t('difference'),
flex: 1 flex: 1
} }
] ]
@@ -91,3 +92,5 @@ export default class Table extends Component {
) )
} }
} }
export default withTranslation('home')(Table)

View File

@@ -1,3 +1,7 @@
{ {
"description": "Find a profitable difference between the price of the set and the price of the sum of it's parts." "description": "Find a profitable difference between the price of the set and the price of the sum of it's parts.",
"name": "Name",
"parts_price": "Parts Price",
"set_price": "Set Price",
"difference": "Difference"
} }

View File

@@ -1,3 +1,7 @@
{ {
"description": "Находи выгодную разницу между ценой набора и ценой его частей по отдельности." "description": "Находи выгодную разницу между ценой набора и ценой его частей по отдельности.",
"name": "Наименование",
"parts_price": "Цена частей",
"set_price": "Цена набора",
"difference": "Разница"
} }