Add lokalisation (#3103)

* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales

* fix erorrs
This commit is contained in:
Andrey Babushkin 2025-03-06 18:17:38 +01:00 committed by GitHub
parent fd5c0c9747
commit 9f9990d737
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 34 additions and 39 deletions

View file

@ -216,43 +216,46 @@ const PathAnalysisFilter = observer(({ metric, writeOption }: any) => {
};
return (
<div className="rounded-lg bg-white border">
<div className='flex flex-col justify-start gap-2 flex-wrap'>
<Form.Item className='mb-0 hover:bg-bg-blue/30 px-4 pb-1 pt-2'>
<div className="flex flex-wrap gap-2 items-center justify-start">
<span className="font-medium">{t('Journeys With')}</span>
<div className="flex gap-2 items-center">
<Select
className="w-36 rounded-lg"
name="startType"
options={[
{ value: 'start', label: 'Start Point' },
{ value: 'end', label: 'End Point' },
]}
defaultValue={metric.startType || 'start'}
onChange={onPointChange}
placeholder="Select Start Type"
/>
<div className="flex flex-col justify-start gap-2 flex-wrap">
<Form.Item className="mb-0 hover:bg-bg-blue/30 px-4 pb-1 pt-2">
<div className="flex flex-wrap gap-2 items-center justify-start">
<span className="font-medium">{t('Journeys With')}</span>
<div className="flex gap-2 items-center">
<Select
className="w-36 rounded-lg"
name="startType"
options={[
{ value: 'start', label: t('Start Point') },
{ value: 'end', label: t('End Point') },
]}
defaultValue={metric.startType || 'start'}
onChange={onPointChange}
placeholder={t('Select Start Type')}
/>
<span className="">{t('showing')}</span>
<Select
mode="multiple"
className="rounded-lg w-max min-w-44 max-w-58"
allowClear
name="metricValue"
options={metricValueOptions}
value={metric.metricValue || []}
onChange={(value) => writeOption({ name: 'metricValue', value })}
placeholder={t('Select Metrics')}
maxTagCount={'responsive'}
showSearch={false}
/>
<Select
mode="multiple"
className="rounded-lg w-max min-w-44 max-w-58"
allowClear
name="metricValue"
options={metricValueOptions}
value={metric.metricValue || []}
onChange={(value) =>
writeOption({ name: 'metricValue', value })
}
placeholder={t('Select Metrics')}
maxTagCount={'responsive'}
showSearch={false}
/>
</div>
</div>
</Form.Item>
<Form.Item className="mb-0 hover:bg-bg-blue/30 px-4 pb-2 pt-1">
<div className="flex flex-wrap items-center justify-start">
<span className="font-medium mr-2">
{metric.startType === 'start' ? 'Start Point' : 'End Point'}
{metric.startType === 'start' ? t('Start Point') : t('End Point')}
</span>
<span className="font-normal">
<FilterItem
@ -318,7 +321,7 @@ const AdditionalFilters = observer(() => {
);
});
function PredefinedMessage() {
const PredefinedMessage = () => {
const { t } = useTranslation();
return (
<Alert
@ -329,4 +332,4 @@ function PredefinedMessage() {
className="border-transparent rounded-lg"
/>
);
}
};

View file

@ -10,11 +10,3 @@ export default function (props: Props) {
const { className = '', label = '', ...rest } = props;
return <AntCheckbox {...rest}>{label}</AntCheckbox>;
}
export default (props: Props) => {
const { className = '', label, ...rest } = props;
return (
<AntCheckbox {...rest}>
{label}
</AntCheckbox>
);
};