diff --git a/src/components/form/timeout/TimeoutControl.test.ts b/src/components/form/timeout/TimeoutControl.test.ts index 7919d5d3..c12bab20 100644 --- a/src/components/form/timeout/TimeoutControl.test.ts +++ b/src/components/form/timeout/TimeoutControl.test.ts @@ -20,13 +20,13 @@ describe(TimeoutControl.name, () => { instance.handleChecked(); expect(props.onChanged).toMatchCallSnapshot('check'); - instance.handleTimeoutChanged(TIMEOUT_OPTIONS[0]); + instance.handleTimeoutChanged(TIMEOUT_OPTIONS[1]); expect(props.onChanged).toMatchCallSnapshot('update'); }); it('handles initial values', () => { const { wrapper, instance } = setup(true, { - timeout: { $set: 60 }, + timeout: { $set: parseInt(TIMEOUT_OPTIONS[1].value) }, onChanged: setMock() }); diff --git a/src/components/form/timeout/TimeoutControl.tsx b/src/components/form/timeout/TimeoutControl.tsx index 3c27509b..408e2022 100644 --- a/src/components/form/timeout/TimeoutControl.tsx +++ b/src/components/form/timeout/TimeoutControl.tsx @@ -9,6 +9,7 @@ import TembaSelect, { TembaSelectStyle } from 'temba/TembaSelect'; import { SelectOption } from '../select/SelectElement'; export const TIMEOUT_OPTIONS: SelectOption[] = [ + { value: '1', name: i18n.t('forms.timeout_1 second', 'ASAP') }, { value: '60', name: i18n.t('forms.timeout_1 minute', '1 minute') }, { value: '120', name: i18n.t('forms.timeout_2 minutes', '2 minutes') }, { value: '180', name: i18n.t('forms.timeout_3 minutes', '3 minutes') }, @@ -28,7 +29,7 @@ export const TIMEOUT_OPTIONS: SelectOption[] = [ { value: '604800', name: i18n.t('forms.timeout_1 week', '1 week') } ]; -export const DEFAULT_TIMEOUT = TIMEOUT_OPTIONS[4]; +export const DEFAULT_TIMEOUT = TIMEOUT_OPTIONS[5]; export const ellipsize = (str: string) => `${str}...`; diff --git a/src/config/i18n/cs/resource.json b/src/config/i18n/cs/resource.json index fedf7baa..60c30123 100644 --- a/src/config/i18n/cs/resource.json +++ b/src/config/i18n/cs/resource.json @@ -311,6 +311,7 @@ "timeout_1 day": "1 den", "timeout_1 hour": "1 hodina", "timeout_1 minute": "1 minuta", + "timeout_1 second": "1 sekunda", "timeout_1 week": "1 týden", "timeout_10 minutes": "10 minut", "timeout_12 hours": "12 hodin", @@ -501,4 +502,4 @@ "header": "Překlad Toku", "label": "Překlady" } -} \ No newline at end of file +} diff --git a/src/config/i18n/defaults.json b/src/config/i18n/defaults.json index b59dd703..936e9573 100644 --- a/src/config/i18n/defaults.json +++ b/src/config/i18n/defaults.json @@ -311,6 +311,7 @@ "timeout_1 day": "1 day", "timeout_1 hour": "1 hour", "timeout_1 minute": "1 minute", + "timeout_1 second": "ASAP", "timeout_1 week": "1 week", "timeout_10 minutes": "10 minutes", "timeout_12 hours": "12 hours", @@ -501,4 +502,4 @@ "header": "Flow Translation", "label": "Translations" } -} \ No newline at end of file +} diff --git a/src/config/i18n/es/resource.json b/src/config/i18n/es/resource.json index facda907..b7600032 100644 --- a/src/config/i18n/es/resource.json +++ b/src/config/i18n/es/resource.json @@ -311,6 +311,7 @@ "timeout_1 day": "1 día", "timeout_1 hour": "1 hora", "timeout_1 minute": "1 minuto", + "timeout_1 second": "1 segundo", "timeout_1 week": "1 semana", "timeout_10 minutes": "10 minutos", "timeout_12 hours": "12 horas", @@ -501,4 +502,4 @@ "header": "Traducción de Flujo", "label": "Traducciones" } -} \ No newline at end of file +} diff --git a/src/config/i18n/fr/resource.json b/src/config/i18n/fr/resource.json index df60afec..0df51c22 100644 --- a/src/config/i18n/fr/resource.json +++ b/src/config/i18n/fr/resource.json @@ -311,6 +311,7 @@ "timeout_1 day": "1 jour", "timeout_1 hour": "1 heure", "timeout_1 minute": "1 minute", + "timeout_1 second": "1 seconde", "timeout_1 week": "1 semaine", "timeout_10 minutes": "10 minutes", "timeout_12 hours": "12 heures", @@ -501,4 +502,4 @@ "header": "Traduction de flux", "label": "Traductions" } -} \ No newline at end of file +} diff --git a/src/config/i18n/mn/resource.json b/src/config/i18n/mn/resource.json index f4ccc3c9..c3aa6e3e 100644 --- a/src/config/i18n/mn/resource.json +++ b/src/config/i18n/mn/resource.json @@ -311,6 +311,7 @@ "timeout_1 day": "1 өдөр", "timeout_1 hour": "1 цаг", "timeout_1 minute": "1 минут", + "timeout_1 second": "1 секунд", "timeout_1 week": "1 долоо хоног", "timeout_10 minutes": "10 минут ", "timeout_12 hours": "12 цаг", @@ -501,4 +502,4 @@ "header": "Урсгал орчуулга", "label": "Орчуулга " } -} \ No newline at end of file +} diff --git a/src/config/i18n/pt-br/resource.json b/src/config/i18n/pt-br/resource.json index 6b97457b..0a83a001 100644 --- a/src/config/i18n/pt-br/resource.json +++ b/src/config/i18n/pt-br/resource.json @@ -311,6 +311,7 @@ "timeout_1 day": "1 dia", "timeout_1 hour": "1 hora", "timeout_1 minute": "1 minuto", + "timeout_1 second": "1 segundo", "timeout_1 week": "1 semana", "timeout_10 minutes": "10 minutos", "timeout_12 hours": "12 horas", @@ -501,4 +502,4 @@ "header": "Tradução do fluxo", "label": "Traduções" } -} \ No newline at end of file +}