Skip to content

Commit

Permalink
Resolve PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
johanah29 committed Nov 14, 2024
1 parent 38578ff commit 46b667f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { FunctionComponent, useState } from 'react';
import { useNavigate } from 'react-router-dom';

import { fetchPlatformParameters } from '../../../actions/Application';
import { LoggedHelper } from '../../../actions/helper';
import type { ScenarioStore } from '../../../actions/scenarios/Scenario';
import { addScenario } from '../../../actions/scenarios/scenario-actions';
Expand All @@ -11,7 +10,6 @@ import { useFormatter } from '../../../components/i18n';
import { useHelper } from '../../../store';
import type { PlatformSettings, ScenarioInput } from '../../../utils/api-types';
import { useAppDispatch } from '../../../utils/hooks';
import useDataLoader from '../../../utils/hooks/useDataLoader';
import ScenarioForm from './ScenarioForm';

interface Props {
Expand Down Expand Up @@ -46,9 +44,6 @@ const ScenarioCreation: FunctionComponent<Props> = ({
const { settings }: { settings: PlatformSettings } = useHelper((helper: LoggedHelper) => ({
settings: helper.getPlatformSettings(),
}));
useDataLoader(() => {
dispatch(fetchPlatformParameters());
});

const initialValues: ScenarioInput = {
scenario_name: '',
Expand All @@ -60,8 +55,8 @@ const ScenarioCreation: FunctionComponent<Props> = ({
scenario_external_reference: '',
scenario_external_url: '',
scenario_tags: [],
scenario_message_header: 'SIMULATION HEADER',
scenario_message_footer: 'SIMULATION FOOTER',
scenario_message_header: t('SIMULATION HEADER'),
scenario_message_footer: t('SIMULATION FOOTER'),
scenario_mail_from: settings.default_mailer ? settings.default_mailer : '',
scenario_mails_reply_to: [settings.default_reply_to ? settings.default_reply_to : ''],
};
Expand Down
4 changes: 4 additions & 0 deletions openbas-front/src/utils/Localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ const i18n = {
'Form request data': 'Données de formulaire de la requête',
'Key': 'Clé',
'Headers': 'En-têtes',
'SIMULATION HEADER': 'EN-TÊTE DE SIMULATION',
'SIMULATION FOOTER': 'PIED DE PAGE DE SIMULATION',
'team': 'Equipe',
'attachment': 'Document',
'Executed in': 'Exécuté en',
Expand Down Expand Up @@ -1766,6 +1768,8 @@ const i18n = {
'Form request data': '申请表数据',
'Key': '密钥',
'Headers': '头部',
'SIMULATION HEADER': '模拟标头',
'SIMULATION FOOTER': '模拟页脚',
'team': '团队',
'attachment': '附件',
'Executed in': '已执行',
Expand Down

0 comments on commit 46b667f

Please sign in to comment.