📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
fix translations
Blue Mouse9c8ae34c1726
diff --git a/web/app/lib/constants/index.ts b/web/app/lib/constants/index.tsindex f28300f2e..0d1b97502 100644--- a/web/app/lib/constants/index.ts+++ b/web/app/lib/constants/index.ts@@ -247,7 +247,7 @@ export const PERIOD_PAIRS_COMPARE = {} as const// the order of panels in the project view-export const TRAFFIC_PANELS_ORDER = ['location', 'pg', 'device', 'traffic-sources']+export const TRAFFIC_PANELS_ORDER = ['location', 'pg', 'devices', 'traffic-sources']export const FILTERS_PANELS_ORDER = ['cc', 'pg', 'br', 'os', 'ref', 'lc', 'dv']export const ERRORS_FILTERS_PANELS_ORDER = ['cc', 'pg', 'br', 'os', 'lc', 'dv']export const PERFORMANCE_PANELS_ORDER = ['cc', 'pg', 'br', 'dv']diff --git a/web/app/pages/Project/View/Panels.tsx b/web/app/pages/Project/View/Panels.tsxindex fb1e35bc5..9d07bb4f9 100644--- a/web/app/pages/Project/View/Panels.tsx+++ b/web/app/pages/Project/View/Panels.tsx@@ -35,7 +35,7 @@ import { nFormatter } from '~/utils/generic'import CustomEventsDropdown from './components/CustomEventsDropdown'import { Customs, Filter, Properties } from './interfaces/traffic'import { useViewProjectContext } from './ViewProject'-import { iconClassName } from './ViewProject.helpers'+import { iconClassName, typeNameMapping } from './ViewProject.helpers'const ENTRIES_PER_PANEL = 8const ENTRIES_PER_CUSTOM_EVENTS_PANEL = 8@@ -1373,6 +1373,8 @@ const Panel = ({const [expandedItems, setExpandedItems] = useState<Set<string>>(new Set())const navigate = useNavigate()+ const tnMapping = typeNameMapping(t)+const entriesToDisplay = useMemo(() => {const orderedData = _orderBy(data, 'count', 'desc')return _slice(orderedData, 0, ENTRIES_PER_PANEL)@@ -1457,7 +1459,7 @@ const Panel = ({className='flex w-2/5 cursor-pointer items-center pl-2 text-left hover:opacity-90 sm:w-4/6'onClick={() => onSortBy('name')}>- {t('project.source')}+ {tnMapping[activeTabId as keyof typeof tnMapping]}<SortclassName='ml-1'sortByAscend={sort.label === 'name' ? sort.sortByAscend : null}@@ -1584,7 +1586,9 @@ const Panel = ({) : (<><div className='mb-2 flex items-center justify-between px-1 py-1'>- <span className='text-sm font-medium text-gray-600 dark:text-gray-400'>{t('project.source')}</span>+ <span className='text-sm font-medium text-gray-600 dark:text-gray-400'>+ {tnMapping[activeTabId as keyof typeof tnMapping]}+ </span><span className='text-sm font-medium text-gray-600 dark:text-gray-400'>{t('project.visitors')}</span></div>diff --git a/web/app/pages/Project/View/ViewProject.helpers.tsx b/web/app/pages/Project/View/ViewProject.helpers.tsxindex 4b531610c..e8fcf414a 100644--- a/web/app/pages/Project/View/ViewProject.helpers.tsx+++ b/web/app/pages/Project/View/ViewProject.helpers.tsx@@ -1421,7 +1421,7 @@ const typeNameMapping = (t: typeof i18next.t) => ({// Combined panel typeslocation: t('project.location'),browser: t('project.browser'),- device: t('project.device'),+ devices: t('project.devices'),map: t('project.map'),})diff --git a/web/app/pages/Project/View/ViewProject.tsx b/web/app/pages/Project/View/ViewProject.tsxindex 757c784a4..8f29266ae 100644--- a/web/app/pages/Project/View/ViewProject.tsx+++ b/web/app/pages/Project/View/ViewProject.tsx@@ -3773,7 +3773,7 @@ const ViewProject = () => {)}- if (type === 'device') {+ if (type === 'devices') {const deviceTabs = [{ id: 'br', label: t('project.mapping.br'), hasData: !!panelsData.data.br },{ id: 'os', label: t('project.mapping.os'), hasData: !!panelsData.data.os },@@ -3871,7 +3871,7 @@ const ViewProject = () => {icon={panelIconMapping.os}id={deviceActiveTab}getFilterLink={getFilterLink}- name={t('project.device')}+ name={t('project.devices')}tabs={deviceTabs}onTabChange={(tab) => setDeviceActiveTab(tab as 'br' | 'os' | 'dv')}activeTabId={deviceActiveTab}@@ -3963,10 +3963,10 @@ const ViewProject = () => {return (<Panelkey={trafficSourcesActiveTab}- icon={panelIconMapping.so}+ icon={panelIconMapping.ref}id={trafficSourcesActiveTab}getFilterLink={getFilterLink}- name='Traffic Sources'+ name={t('project.trafficSources')}tabs={trafficSourcesTabs}onTabChange={(tab) =>setTrafficSourcesActiveTab(tab as 'ref' | 'so' | 'me' | 'ca' | 'te' | 'co')diff --git a/web/public/locales/en.json b/web/public/locales/en.jsonindex f2f8d0c7a..99cce08b3 100644--- a/web/public/locales/en.json+++ b/web/public/locales/en.json@@ -850,6 +850,10 @@"removeFilter": "Remove filter","toggleFilterToIs": "Change filter from '{{column}} is not \"{{filter}}\"' to '{{column}} is \"{{filter}}\"'","toggleFilterToIsNot": "Change filter from '{{column}} is \"{{filter}}\"' to '{{column}} is not \"{{filter}}\"'",+ "location": "Location",+ "pages": "Pages",+ "devices": "Devices",+ "trafficSources": "Traffic sources","metrics": {"xAvg": "\"{{x}}\" average","xTotal": "\"{{x}}\" total",