mirror of
https://github.com/umami-software/umami.git
synced 2026-02-16 02:25:35 +01:00
Convert text for internationalization.
This commit is contained in:
parent
6833a5bdb0
commit
f0ac9b6522
36 changed files with 1091 additions and 196 deletions
|
|
@ -1,8 +1,11 @@
|
|||
import React from 'react';
|
||||
import { useIntl } from 'react-intl';
|
||||
import CheckVisible from 'components/helpers/CheckVisible';
|
||||
import BarChart from './BarChart';
|
||||
|
||||
export default function PageviewsChart({ websiteId, data, unit, records, className }) {
|
||||
const intl = useIntl();
|
||||
|
||||
const handleUpdate = chart => {
|
||||
const {
|
||||
data: { datasets },
|
||||
|
|
@ -26,7 +29,10 @@ export default function PageviewsChart({ websiteId, data, unit, records, classNa
|
|||
chartId={websiteId}
|
||||
datasets={[
|
||||
{
|
||||
label: 'unique visitors',
|
||||
label: intl.formatMessage({
|
||||
id: 'metrics.unique-visitors',
|
||||
defaultMessage: 'Unique visitors',
|
||||
}),
|
||||
data: data.uniques,
|
||||
lineTension: 0,
|
||||
backgroundColor: 'rgb(38, 128, 235, 0.4)',
|
||||
|
|
@ -34,7 +40,10 @@ export default function PageviewsChart({ websiteId, data, unit, records, classNa
|
|||
borderWidth: 1,
|
||||
},
|
||||
{
|
||||
label: 'page views',
|
||||
label: intl.formatMessage({
|
||||
id: 'metrics.page-views',
|
||||
defaultMessage: 'Page views',
|
||||
}),
|
||||
data: data.pageviews,
|
||||
lineTension: 0,
|
||||
backgroundColor: 'rgb(38, 128, 235, 0.2)',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue