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: {
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const log = require('../lib/log');
|
||||
const knex = require('../lib/knex');
|
||||
const dtHelpers = require('../lib/dt-helpers');
|
||||
const shares = require('./shares');
|
||||
const campaigns = require('./campaigns');
|
||||
const lists = require('./lists');
|
||||
const subscriptions = require('./subscriptions');
|
||||
|
@ -11,7 +8,6 @@ const contextHelpers = require('../lib/context-helpers');
|
|||
const geoip = require('geoip-ultralight');
|
||||
const uaParser = require('device');
|
||||
const he = require('he');
|
||||
const { enforce } = require('../lib/helpers');
|
||||
const { getPublicUrl } = require('../lib/urls');
|
||||
const tools = require('../lib/tools');
|
||||
const shortid = require('shortid');
|
||||
|
|
Loading…
Reference in a new issue