Localization of device types
This commit is contained in:
parent
83ce716d94
commit
3d956ec141
2 changed files with 11 additions and 5 deletions
|
@ -125,6 +125,16 @@ export default class StatisticsOpened extends Component {
|
|||
|
||||
let charts = null;
|
||||
|
||||
const deviceTypes = {
|
||||
desktop: t('Desktop'),
|
||||
tv: t('TV'),
|
||||
tablet: t('Tablet'),
|
||||
phone: t('Phone'),
|
||||
bot: t('Bot'),
|
||||
car: t('Car'),
|
||||
console: t('Console')
|
||||
};
|
||||
|
||||
if (agg === 'devices') {
|
||||
charts = (
|
||||
<div className={styles.charts}>
|
||||
|
@ -137,7 +147,7 @@ export default class StatisticsOpened extends Component {
|
|||
loader={<div>{t('Loading chart')}</div>}
|
||||
data={[
|
||||
[t('Device type'), t('Count')],
|
||||
...stats.devices.map(entry => [entry.key, entry.count])
|
||||
...stats.devices.map(entry => [deviceTypes[entry.key] || t('Unknown'), entry.count])
|
||||
]}
|
||||
options={{
|
||||
chartArea: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue