fix: misc

This commit is contained in:
Ibrahima G. Coulibaly
2025-07-13 11:25:05 +01:00
parent 035eb2edd1
commit 21c4f44d4e
121 changed files with 987 additions and 837 deletions

View File

@@ -78,7 +78,7 @@ export default function ConvertDaysToHours({
setInput={setInput}
compute={compute}
toolInfo={{
title: t('time.checkLeapYears.toolInfo.title', { title }),
title: t('time:checkLeapYears.toolInfo.title', { title }),
description: longDescription
}}
exampleCards={exampleCards}

View File

@@ -11,8 +11,8 @@ export const tool = defineTool('time', {
keywords: ['leap', 'year', 'calendar', 'date'],
component: lazy(() => import('./index')),
i18n: {
name: 'time.checkLeapYears.name',
description: 'time.checkLeapYears.description',
shortDescription: 'time.checkLeapYears.shortDescription'
name: 'time:checkLeapYears.title',
description: 'time:checkLeapYears.description',
shortDescription: 'time:checkLeapYears.shortDescription'
}
});

View File

@@ -19,7 +19,7 @@ const exampleCards: CardExampleType<InitialValuesType>[] = [
title: 'Full Days to Hours',
description:
'This example calculates how many hours there are in 1 day, in one week (7 days), in one month (30 days), and in even longer time periods. To see all the results at once, we enter each individual day value on a new line. We also use the "days" suffix in the input and add the "hours" suffix to the output.',
sampleText: `1 day
sampleText: `1 day
7 days
30 days
90 days
@@ -76,14 +76,14 @@ export default function ConvertDaysToHours({
updateField
}) => [
{
title: t('time.convertDaysToHours.hoursName'),
title: t('time:convertDaysToHours.hoursName'),
component: (
<Box>
<CheckboxWithDesc
onChange={(val) => updateField('hoursFlag', val)}
checked={values.hoursFlag}
title={t('time.convertDaysToHours.addHoursName')}
description={t('time.convertDaysToHours.addHoursNameDescription')}
title={t('time:convertDaysToHours.addHoursName')}
description={t('time:convertDaysToHours.addHoursNameDescription')}
/>
</Box>
)
@@ -101,8 +101,8 @@ export default function ConvertDaysToHours({
setInput={setInput}
compute={compute}
toolInfo={{
title: t('time.convertDaysToHours.toolInfo.title'),
description: t('time.convertDaysToHours.toolInfo.description')
title: t('time:convertDaysToHours.toolInfo.title'),
description: t('time:convertDaysToHours.toolInfo.description')
}}
exampleCards={exampleCards}
/>

View File

@@ -11,8 +11,8 @@ export const tool = defineTool('time', {
keywords: ['days', 'hours', 'convert', 'time'],
component: lazy(() => import('./index')),
i18n: {
name: 'time.convertDaysToHours.name',
description: 'time.convertDaysToHours.description',
shortDescription: 'time.convertDaysToHours.shortDescription'
name: 'time:convertDaysToHours.title',
description: 'time:convertDaysToHours.description',
shortDescription: 'time:convertDaysToHours.shortDescription'
}
});

View File

@@ -11,8 +11,8 @@ export const tool = defineTool('time', {
keywords: ['hours', 'days', 'convert', 'time'],
component: lazy(() => import('./index')),
i18n: {
name: 'time.convertHoursToDays.name',
description: 'time.convertHoursToDays.description',
shortDescription: 'time.convertHoursToDays.shortDescription'
name: 'time:convertHoursToDays.title',
description: 'time:convertHoursToDays.description',
shortDescription: 'time:convertHoursToDays.shortDescription'
}
});

View File

@@ -82,14 +82,14 @@ export default function SecondsToTime({
updateField
}) => [
{
title: t('time.convertSecondsToTime.timePadding'),
title: t('time:convertSecondsToTime.timePadding'),
component: (
<Box>
<CheckboxWithDesc
onChange={(val) => updateField('paddingFlag', val)}
checked={values.paddingFlag}
title={t('time.convertSecondsToTime.addPadding')}
description={t('time.convertSecondsToTime.addPaddingDescription')}
title={t('time:convertSecondsToTime.addPadding')}
description={t('time:convertSecondsToTime.addPaddingDescription')}
/>
</Box>
)
@@ -107,7 +107,7 @@ export default function SecondsToTime({
setInput={setInput}
compute={compute}
toolInfo={{
title: t('time.convertSecondsToTime.toolInfo.title', { title }),
title: t('time:convertSecondsToTime.toolInfo.title', { title }),
description: longDescription
}}
exampleCards={exampleCards}

View File

@@ -11,8 +11,8 @@ export const tool = defineTool('time', {
keywords: ['seconds', 'time', 'convert', 'format'],
component: lazy(() => import('./index')),
i18n: {
name: 'time.convertSecondsToTime.name',
description: 'time.convertSecondsToTime.description',
shortDescription: 'time.convertSecondsToTime.shortDescription'
name: 'time:convertSecondsToTime.title',
description: 'time:convertSecondsToTime.description',
shortDescription: 'time:convertSecondsToTime.shortDescription'
}
});

View File

@@ -95,7 +95,7 @@ export default function TimeToSeconds({
setInput={setInput}
compute={compute}
toolInfo={{
title: t('time.convertTimeToSeconds.toolInfo.title', { title }),
title: t('time:convertTimeToSeconds.toolInfo.title', { title }),
description: longDescription
}}
exampleCards={exampleCards}

View File

@@ -11,8 +11,8 @@ export const tool = defineTool('time', {
keywords: ['time', 'seconds', 'convert', 'format'],
component: lazy(() => import('./index')),
i18n: {
name: 'time.convertTimeToSeconds.name',
description: 'time.convertTimeToSeconds.description',
shortDescription: 'time.convertTimeToSeconds.shortDescription'
name: 'time:convertTimeToSeconds.title',
description: 'time:convertTimeToSeconds.description',
shortDescription: 'time:convertTimeToSeconds.shortDescription'
}
});

View File

@@ -11,8 +11,8 @@ export const tool = defineTool('time', {
keywords: ['cron', 'schedule', 'automation', 'expression'],
component: lazy(() => import('./index')),
i18n: {
name: 'time.crontabGuru.name',
description: 'time.crontabGuru.description',
shortDescription: 'time.crontabGuru.shortDescription'
name: 'time:crontabGuru.title',
description: 'time:crontabGuru.description',
shortDescription: 'time:crontabGuru.shortDescription'
}
});

View File

@@ -126,7 +126,7 @@ export default function TimeBetweenDates() {
return (
<ToolContent
title={t('time.timeBetweenDates.title')}
title={t('time:timeBetweenDates.title')}
inputComponent={null}
resultComponent={
result ? (
@@ -155,28 +155,28 @@ export default function TimeBetweenDates() {
validationSchema={validationSchema}
exampleCards={exampleCards}
toolInfo={{
title: t('time.timeBetweenDates.toolInfo.title'),
description: t('time.timeBetweenDates.toolInfo.description')
title: t('time:timeBetweenDates.toolInfo.title'),
description: t('time:timeBetweenDates.toolInfo.description')
}}
getGroups={({ values, updateField }) => [
{
title: t('time.timeBetweenDates.startDateTime'),
title: t('time:timeBetweenDates.startDateTime'),
component: (
<Box>
<TextFieldWithDesc
description={t('time.timeBetweenDates.startDate')}
description={t('time:timeBetweenDates.startDate')}
value={values.startDate}
onOwnChange={(val) => updateField('startDate', val)}
type="date"
/>
<TextFieldWithDesc
description={t('time.timeBetweenDates.startTime')}
description={t('time:timeBetweenDates.startTime')}
value={values.startTime}
onOwnChange={(val) => updateField('startTime', val)}
type="time"
/>
<SelectWithDesc
description={t('time.timeBetweenDates.startTimezone')}
description={t('time:timeBetweenDates.startTimezone')}
selected={values.startTimezone}
onChange={(val: string) => updateField('startTimezone', val)}
options={timezoneOptions}
@@ -185,23 +185,23 @@ export default function TimeBetweenDates() {
)
},
{
title: t('time.timeBetweenDates.endDateTime'),
title: t('time:timeBetweenDates.endDateTime'),
component: (
<Box>
<TextFieldWithDesc
description={t('time.timeBetweenDates.endDate')}
description={t('time:timeBetweenDates.endDate')}
value={values.endDate}
onOwnChange={(val) => updateField('endDate', val)}
type="date"
/>
<TextFieldWithDesc
description={t('time.timeBetweenDates.endTime')}
description={t('time:timeBetweenDates.endTime')}
value={values.endTime}
onOwnChange={(val) => updateField('endTime', val)}
type="time"
/>
<SelectWithDesc
description={t('time.timeBetweenDates.endTimezone')}
description={t('time:timeBetweenDates.endTimezone')}
selected={values.endTimezone}
onChange={(val: string) => updateField('endTimezone', val)}
options={timezoneOptions}

View File

@@ -11,8 +11,8 @@ export const tool = defineTool('time', {
keywords: ['dates', 'time', 'difference', 'duration', 'calculate'],
component: lazy(() => import('./index')),
i18n: {
name: 'time.timeBetweenDates.name',
description: 'time.timeBetweenDates.description',
shortDescription: 'time.timeBetweenDates.shortDescription'
name: 'time:timeBetweenDates.title',
description: 'time:timeBetweenDates.description',
shortDescription: 'time:timeBetweenDates.shortDescription'
}
});

View File

@@ -88,50 +88,50 @@ export default function TruncateClockTime({
updateField
}) => [
{
title: t('time.truncateClockTime.truncationSide'),
title: t('time:truncateClockTime.truncationSide'),
component: (
<Box>
<SimpleRadio
onClick={() => updateField('onlySecond', true)}
checked={values.onlySecond}
title={t('time.truncateClockTime.truncateOnlySeconds')}
title={t('time:truncateClockTime.truncateOnlySeconds')}
description={t(
'time.truncateClockTime.truncateOnlySecondsDescription'
'time:truncateClockTime.truncateOnlySecondsDescription'
)}
/>
<SimpleRadio
onClick={() => updateField('onlySecond', false)}
checked={!values.onlySecond}
title={t('time.truncateClockTime.truncateMinutesAndSeconds')}
title={t('time:truncateClockTime.truncateMinutesAndSeconds')}
description={t(
'time.truncateClockTime.truncateMinutesAndSecondsDescription'
'time:truncateClockTime.truncateMinutesAndSecondsDescription'
)}
/>
</Box>
)
},
{
title: t('time.truncateClockTime.printDroppedComponents'),
title: t('time:truncateClockTime.printDroppedComponents'),
component: (
<Box>
<CheckboxWithDesc
onChange={(val) => updateField('zeroPrint', val)}
checked={values.zeroPrint}
title={t('time.truncateClockTime.zeroPrintTruncatedParts')}
description={t('time.truncateClockTime.zeroPrintDescription')}
title={t('time:truncateClockTime.zeroPrintTruncatedParts')}
description={t('time:truncateClockTime.zeroPrintDescription')}
/>
</Box>
)
},
{
title: t('time.truncateClockTime.timePadding'),
title: t('time:truncateClockTime.timePadding'),
component: (
<Box>
<CheckboxWithDesc
onChange={(val) => updateField('zeroPadding', val)}
checked={values.zeroPadding}
title={t('time.truncateClockTime.useZeroPadding')}
description={t('time.truncateClockTime.zeroPaddingDescription')}
title={t('time:truncateClockTime.useZeroPadding')}
description={t('time:truncateClockTime.zeroPaddingDescription')}
/>
</Box>
)
@@ -149,7 +149,7 @@ export default function TruncateClockTime({
setInput={setInput}
compute={compute}
toolInfo={{
title: t('time.truncateClockTime.toolInfo.title', { title }),
title: t('time:truncateClockTime.toolInfo.title', { title }),
description: longDescription
}}
exampleCards={exampleCards}

View File

@@ -11,8 +11,8 @@ export const tool = defineTool('time', {
keywords: ['time', 'truncate', 'clock', 'round', 'precision'],
component: lazy(() => import('./index')),
i18n: {
name: 'time.truncateClockTime.name',
description: 'time.truncateClockTime.description',
shortDescription: 'time.truncateClockTime.shortDescription'
name: 'time:truncateClockTime.title',
description: 'time:truncateClockTime.description',
shortDescription: 'time:truncateClockTime.shortDescription'
}
});