mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-09-23 16:09:30 +02:00
fix: missing translations
This commit is contained in:
@@ -29,14 +29,33 @@
|
|||||||
},
|
},
|
||||||
"mergeAudio": {
|
"mergeAudio": {
|
||||||
"description": "Combine multiple audio files into a single audio file by concatenating them in sequence.",
|
"description": "Combine multiple audio files into a single audio file by concatenating them in sequence.",
|
||||||
|
"inputTitle": "Input Audio Files",
|
||||||
"longDescription": "This tool allows you to merge multiple audio files into a single file by concatenating them in the order you upload them. Perfect for combining podcast segments, music tracks, or any audio files that need to be joined together. Supports various audio formats including MP3, AAC, and WAV.",
|
"longDescription": "This tool allows you to merge multiple audio files into a single file by concatenating them in the order you upload them. Perfect for combining podcast segments, music tracks, or any audio files that need to be joined together. Supports various audio formats including MP3, AAC, and WAV.",
|
||||||
|
"mergingAudio": "Merging Audio",
|
||||||
|
"outputFormat": "Output Format",
|
||||||
|
"resultTitle": "Merged Audio",
|
||||||
"shortDescription": "Merge multiple audio files into one (MP3, AAC, WAV).",
|
"shortDescription": "Merge multiple audio files into one (MP3, AAC, WAV).",
|
||||||
"title": "Merge Audio"
|
"title": "Merge Audio",
|
||||||
|
"toolInfo": {
|
||||||
|
"title": "What is {{title}}?"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"trim": {
|
"trim": {
|
||||||
"description": "Cut and trim audio files to extract specific segments by specifying start and end times.",
|
"description": "Cut and trim audio files to extract specific segments by specifying start and end times.",
|
||||||
|
"endTime": "End Time",
|
||||||
|
"endTimeDescription": "End time in format HH:MM:SS (e.g., 00:01:30)",
|
||||||
|
"inputTitle": "Input Audio",
|
||||||
"longDescription": "This tool allows you to trim audio files by specifying start and end times. You can extract specific segments from longer audio files, remove unwanted parts, or create shorter clips. Supports various audio formats including MP3, AAC, and WAV. Perfect for podcast editing, music production, or any audio editing needs.",
|
"longDescription": "This tool allows you to trim audio files by specifying start and end times. You can extract specific segments from longer audio files, remove unwanted parts, or create shorter clips. Supports various audio formats including MP3, AAC, and WAV. Perfect for podcast editing, music production, or any audio editing needs.",
|
||||||
|
"outputFormat": "Output Format",
|
||||||
|
"resultTitle": "Trimmed Audio",
|
||||||
"shortDescription": "Trim audio files to extract specific time segments (MP3, AAC, WAV).",
|
"shortDescription": "Trim audio files to extract specific time segments (MP3, AAC, WAV).",
|
||||||
"title": "Trim Audio"
|
"startTime": "Start Time",
|
||||||
|
"startTimeDescription": "Start time in format HH:MM:SS (e.g., 00:00:30)",
|
||||||
|
"timeSettings": "Time Settings",
|
||||||
|
"title": "Trim Audio",
|
||||||
|
"toolInfo": {
|
||||||
|
"title": "What is {{title}}?"
|
||||||
|
},
|
||||||
|
"trimmingAudio": "Trimming Audio"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -17,15 +17,21 @@
|
|||||||
"description": "Convert CSV files to JSON format with customizable options for delimiters, quotes, and output formatting. Support for headers, comments, and dynamic type conversion.",
|
"description": "Convert CSV files to JSON format with customizable options for delimiters, quotes, and output formatting. Support for headers, comments, and dynamic type conversion.",
|
||||||
"dynamicTypes": "Dynamic Types",
|
"dynamicTypes": "Dynamic Types",
|
||||||
"dynamicTypesDescription": "Automatically convert numbers and booleans",
|
"dynamicTypesDescription": "Automatically convert numbers and booleans",
|
||||||
|
"error": "Error",
|
||||||
"errorParsing": "Error parsing CSV: {{error}}",
|
"errorParsing": "Error parsing CSV: {{error}}",
|
||||||
"fieldQuote": "Field Quote (e.g., \")",
|
"fieldQuote": "Field Quote (e.g., \")",
|
||||||
"inputCsvFormat": "Input CSV Format",
|
"inputCsvFormat": "Input CSV Format",
|
||||||
"inputTitle": "Input CSV",
|
"inputTitle": "Input CSV",
|
||||||
|
"invalidCsvFormat": "Invalid CSV format",
|
||||||
"resultTitle": "Output JSON",
|
"resultTitle": "Output JSON",
|
||||||
"shortDescription": "Convert CSV data to JSON format.",
|
"shortDescription": "Convert CSV data to JSON format.",
|
||||||
"skipEmptyLines": "Skip Empty Lines",
|
"skipEmptyLines": "Skip Empty Lines",
|
||||||
"skipEmptyLinesDescription": "Ignore empty lines in the input CSV",
|
"skipEmptyLinesDescription": "Ignore empty lines in the input CSV",
|
||||||
"title": "Convert CSV to JSON",
|
"title": "Convert CSV to JSON",
|
||||||
|
"toolInfo": {
|
||||||
|
"description": "This tool transforms Comma Separated Values (CSV) files to JavaScript Object Notation (JSON) data structures. It supports various CSV formats with customizable delimiters, quote characters, and comment symbols. The converter can treat the first row as headers, skip empty lines, and automatically detect data types like numbers and booleans. The resulting JSON can be used for data migration, backups, or as input for other applications.",
|
||||||
|
"title": "What Is a CSV to JSON Converter?"
|
||||||
|
},
|
||||||
"useHeaders": "Use Headers",
|
"useHeaders": "Use Headers",
|
||||||
"useHeadersDescription": "Treat the first row as column headers"
|
"useHeadersDescription": "Treat the first row as column headers"
|
||||||
},
|
},
|
||||||
|
@@ -10,8 +10,15 @@
|
|||||||
"title": "Change image Opacity"
|
"title": "Change image Opacity"
|
||||||
},
|
},
|
||||||
"compress": {
|
"compress": {
|
||||||
|
"compressedSize": "Compressed Size",
|
||||||
|
"compressionOptions": "Compression options",
|
||||||
"description": "Reduce image file size while maintaining quality.",
|
"description": "Reduce image file size while maintaining quality.",
|
||||||
|
"failedToCompress": "Failed to compress image. Please try again.",
|
||||||
|
"fileSizes": "File sizes",
|
||||||
"inputTitle": "Input image",
|
"inputTitle": "Input image",
|
||||||
|
"maxFileSizeDescription": "Maximum file size in megabytes",
|
||||||
|
"originalSize": "Original Size",
|
||||||
|
"qualityDescription": "Image quality percentage (lower means smaller file size)",
|
||||||
"resultTitle": "Compressed image",
|
"resultTitle": "Compressed image",
|
||||||
"shortDescription": "Compress images to reduce file size while maintaining reasonable quality.",
|
"shortDescription": "Compress images to reduce file size while maintaining reasonable quality.",
|
||||||
"title": "Compress Image"
|
"title": "Compress Image"
|
||||||
|
@@ -5,6 +5,15 @@
|
|||||||
"copyDescription": "Number of copies (can be fractional)",
|
"copyDescription": "Number of copies (can be fractional)",
|
||||||
"description": "World's simplest browser-based utility for duplicating list items. Input your list and specify duplication criteria to create copies of items. Perfect for data expansion, testing, or creating repeated patterns.",
|
"description": "World's simplest browser-based utility for duplicating list items. Input your list and specify duplication criteria to create copies of items. Perfect for data expansion, testing, or creating repeated patterns.",
|
||||||
"duplicationOptions": "Duplication Options",
|
"duplicationOptions": "Duplication Options",
|
||||||
|
"error": "Error",
|
||||||
|
"example1Description": "This example shows how to duplicate a list of words.",
|
||||||
|
"example1Title": "Simple duplication",
|
||||||
|
"example2Description": "This example shows how to duplicate a list in reverse order.",
|
||||||
|
"example2Title": "Reverse duplication",
|
||||||
|
"example3Description": "This example shows how to interweave items instead of concatenating them.",
|
||||||
|
"example3Title": "Interweaving items",
|
||||||
|
"example4Description": "This example shows how to duplicate a list with a fractional number of copies.",
|
||||||
|
"example4Title": "Fractional duplication",
|
||||||
"examples": {
|
"examples": {
|
||||||
"fractional": {
|
"fractional": {
|
||||||
"description": "This example shows how to duplicate a list with a fractional number of copies.",
|
"description": "This example shows how to duplicate a list with a fractional number of copies.",
|
||||||
@@ -37,12 +46,53 @@
|
|||||||
"toolInfo": {
|
"toolInfo": {
|
||||||
"description": "This tool allows you to duplicate items in a list. You can specify the number of copies (including fractional values), control whether items are concatenated or interweaved, and even reverse the duplicated items. It's useful for creating repeated patterns, generating test data, or expanding lists with predictable content.",
|
"description": "This tool allows you to duplicate items in a list. You can specify the number of copies (including fractional values), control whether items are concatenated or interweaved, and even reverse the duplicated items. It's useful for creating repeated patterns, generating test data, or expanding lists with predictable content.",
|
||||||
"title": "List Duplication"
|
"title": "List Duplication"
|
||||||
|
},
|
||||||
|
"unknownError": "An unknown error occurred",
|
||||||
|
"validation": {
|
||||||
|
"copyMustBeNumber": "Number of copies must be a number",
|
||||||
|
"copyMustBePositive": "Number of copies must be positive",
|
||||||
|
"copyRequired": "Number of copies is required",
|
||||||
|
"joinSeparatorRequired": "The join separator is required",
|
||||||
|
"separatorRequired": "The separator is required"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"findMostPopular": {
|
"findMostPopular": {
|
||||||
"description": "World's simplest browser-based utility for finding the most popular items in a list. Input your list and instantly get the items that appear most frequently. Perfect for data analysis, trend identification, or finding common elements.",
|
"description": "World's simplest browser-based utility for finding the most popular items in a list. Input your list and instantly get the items that appear most frequently. Perfect for data analysis, trend identification, or finding common elements.",
|
||||||
|
"displayFormatDescription": "How to display the most popular list items?",
|
||||||
|
"displayOptions": {
|
||||||
|
"count": "Show item count",
|
||||||
|
"percentage": "Show item percentage",
|
||||||
|
"total": "Show item total"
|
||||||
|
},
|
||||||
|
"extractListItems": "How to Extract List Items?",
|
||||||
|
"ignoreItemCase": "Ignore Item Case",
|
||||||
|
"ignoreItemCaseDescription": "Compare all list items in lowercase.",
|
||||||
|
"inputTitle": "Input list",
|
||||||
|
"itemComparison": "Item comparison",
|
||||||
|
"outputFormat": "Top item output format",
|
||||||
|
"removeEmptyItems": "Remove empty items",
|
||||||
|
"removeEmptyItemsDescription": "Ignore empty items from comparison.",
|
||||||
|
"resultTitle": "Most popular items",
|
||||||
"shortDescription": "Find most frequently occurring items",
|
"shortDescription": "Find most frequently occurring items",
|
||||||
"title": "Find most popular"
|
"sortOptions": {
|
||||||
|
"alphabetic": "Sort Alphabetically",
|
||||||
|
"count": "Sort by count"
|
||||||
|
},
|
||||||
|
"sortingMethodDescription": "Select a sorting method.",
|
||||||
|
"splitOperators": {
|
||||||
|
"regex": {
|
||||||
|
"description": "Delimit input list items with a regular expression.",
|
||||||
|
"title": "Use a Regex for Splitting"
|
||||||
|
},
|
||||||
|
"symbol": {
|
||||||
|
"description": "Delimit input list items with a character.",
|
||||||
|
"title": "Use a Symbol for Splitting"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"splitSeparatorDescription": "Set a delimiting symbol or regular expression.",
|
||||||
|
"title": "Find most popular",
|
||||||
|
"trimItems": "Trim top list items",
|
||||||
|
"trimItemsDescription": "Remove leading and trailing spaces before comparing items"
|
||||||
},
|
},
|
||||||
"findUnique": {
|
"findUnique": {
|
||||||
"caseSensitiveItems": "Case Sensitive Items",
|
"caseSensitiveItems": "Case Sensitive Items",
|
||||||
|
@@ -57,6 +57,14 @@
|
|||||||
},
|
},
|
||||||
"sum": {
|
"sum": {
|
||||||
"description": "Calculate the sum of a list of numbers. Enter numbers separated by commas or newlines to get their total sum.",
|
"description": "Calculate the sum of a list of numbers. Enter numbers separated by commas or newlines to get their total sum.",
|
||||||
|
"example1Description": "In this example, we calculate the sum of ten positive integers. These integers are listed as a column and their total sum equals 19494.",
|
||||||
|
"example1Title": "Sum of Ten Positive Numbers",
|
||||||
|
"example2Description": "This example reverses a column of twenty three-syllable nouns and prints all the words from the bottom to top. To separate the list items, it uses the \\n character as input item separator, which means that each item is on its own line.",
|
||||||
|
"example2Title": "Count Trees in the Park",
|
||||||
|
"example3Description": "In this example, we add together ninety different values – positive numbers, negative numbers, integers and decimal fractions. We set the input separator to a comma and after adding all of them together, we get 0 as output.",
|
||||||
|
"example3Title": "Sum of Integers and Decimals",
|
||||||
|
"example4Description": "In this example, we calculate the sum of all ten digits and enable the option \"Print Running Sum\". We get the intermediate values of the sum in the process of addition. Thus, we have the following sequence in the output: 0, 1 (0 + 1), 3 (0 + 1 + 2), 6 (0 + 1 + 2 + 3), 10 (0 + 1 + 2 + 3 + 4), and so on.",
|
||||||
|
"example4Title": "Running Sum of Numbers",
|
||||||
"extractionTypes": {
|
"extractionTypes": {
|
||||||
"delimiter": {
|
"delimiter": {
|
||||||
"description": "Customize the number separator here. (By default a line break.)",
|
"description": "Customize the number separator here. (By default a line break.)",
|
||||||
|
@@ -156,23 +156,23 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"split": {
|
"split": {
|
||||||
"charAfterChunkDescription": "Character after each chunk",
|
|
||||||
"charBeforeChunkDescription": "Character before each chunk",
|
|
||||||
"chunksDescription": "Number of chunks of equal\nlength in the output.",
|
|
||||||
"chunksTitle": "Use a Number of Chunks",
|
|
||||||
"description": "World's simplest browser-based utility for splitting text. Input your text and specify a separator to split it into multiple parts. Perfect for data processing, text manipulation, or extracting specific content from larger text blocks.",
|
"description": "World's simplest browser-based utility for splitting text. Input your text and specify a separator to split it into multiple parts. Perfect for data processing, text manipulation, or extracting specific content from larger text blocks.",
|
||||||
"lengthDescription": "Number of symbols that will be put in each output chunk.",
|
|
||||||
"lengthTitle": "Use Length for Splitting",
|
|
||||||
"outputSeparatorDescription": "Character that will be put between the split chunks.\n(It's newline \"\\n\" by default.)",
|
|
||||||
"outputSeparatorOptions": "Output separator options",
|
|
||||||
"regexDescription": "Regular expression that will be used to break text into parts.\n(Multiple spaces by default.)",
|
|
||||||
"regexTitle": "Use a Regex for Splitting",
|
|
||||||
"resultTitle": "Text pieces",
|
|
||||||
"shortDescription": "Split text into multiple parts using a separator",
|
"shortDescription": "Split text into multiple parts using a separator",
|
||||||
"splitSeparatorOptions": "Split separator options",
|
"splitSeparatorOptions": "Split separator options",
|
||||||
"symbolDescription": "Character that will be used to break text into parts.\n(Space by default.)",
|
"title": "Split",
|
||||||
|
"resultTitle": "Split Result",
|
||||||
|
"outputSeparatorOptions": "Output Separator Options",
|
||||||
"symbolTitle": "Use a Symbol for Splitting",
|
"symbolTitle": "Use a Symbol for Splitting",
|
||||||
"title": "Split"
|
"symbolDescription": "Character that will be used to break text into parts. (Space by default.)",
|
||||||
|
"regexTitle": "Use a Regex for Splitting",
|
||||||
|
"regexDescription": "Regular expression that will be used to break text into parts. (Multiple spaces by default.)",
|
||||||
|
"lengthTitle": "Use Length for Splitting",
|
||||||
|
"lengthDescription": "Number of characters that will be put in each output chunk.",
|
||||||
|
"chunksTitle": "Use a Number of Chunks",
|
||||||
|
"chunksDescription": "Number of chunks of equal length in the output.",
|
||||||
|
"outputSeparatorDescription": "Character that will be put between the split chunks. (It's newline \"\\n\" by default.)",
|
||||||
|
"charBeforeChunkDescription": "Character before each chunk",
|
||||||
|
"charAfterChunkDescription": "Character after each chunk"
|
||||||
},
|
},
|
||||||
"statistic": {
|
"statistic": {
|
||||||
"characterFrequencyAnalysis": "Character Frequency Analysis",
|
"characterFrequencyAnalysis": "Character Frequency Analysis",
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
{
|
{
|
||||||
"checkLeapYears": {
|
"checkLeapYears": {
|
||||||
"description": "Check if a year is a leap year and get leap year information.",
|
"description": "Check if a year is a leap year and get leap year information.",
|
||||||
|
"exampleDescription": "One of our friends was born on a leap year on February 29th and as a consequence, she has a birthday only once every 4 years. As we can never really remember when her birthday is, we are using our program to create a reminder list of the upcoming leap years. To create a list of her next birthdays, we load a sequence of years from 2025 to 2040 into the input and get the status of each year. If the program says that it's a leap year, then we know that we'll be invited to a birthday party on February 29th.",
|
||||||
|
"exampleTitle": "Find Birthdays on February 29",
|
||||||
"inputTitle": "Input year",
|
"inputTitle": "Input year",
|
||||||
"resultTitle": "Leap year result",
|
"resultTitle": "Leap year result",
|
||||||
"shortDescription": "Check if a year is a leap year",
|
"shortDescription": "Check if a year is a leap year",
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
import { Box, FormControlLabel, Radio, RadioGroup } from '@mui/material';
|
import { Box, FormControlLabel, Radio, RadioGroup } from '@mui/material';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import ToolContent from '@components/ToolContent';
|
import ToolContent from '@components/ToolContent';
|
||||||
import { ToolComponentProps } from '@tools/defineTool';
|
import { ToolComponentProps } from '@tools/defineTool';
|
||||||
import { GetGroupsType } from '@components/options/ToolOptions';
|
import { GetGroupsType } from '@components/options/ToolOptions';
|
||||||
@@ -24,6 +25,7 @@ export default function MergeAudio({
|
|||||||
title,
|
title,
|
||||||
longDescription
|
longDescription
|
||||||
}: ToolComponentProps) {
|
}: ToolComponentProps) {
|
||||||
|
const { t } = useTranslation('audio');
|
||||||
const [input, setInput] = useState<MultiAudioInput[]>([]);
|
const [input, setInput] = useState<MultiAudioInput[]>([]);
|
||||||
const [result, setResult] = useState<File | null>(null);
|
const [result, setResult] = useState<File | null>(null);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
@@ -51,7 +53,7 @@ export default function MergeAudio({
|
|||||||
updateField
|
updateField
|
||||||
}) => [
|
}) => [
|
||||||
{
|
{
|
||||||
title: 'Output Format',
|
title: t('mergeAudio.outputFormat'),
|
||||||
component: (
|
component: (
|
||||||
<Box mt={2}>
|
<Box mt={2}>
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
@@ -87,16 +89,20 @@ export default function MergeAudio({
|
|||||||
value={input}
|
value={input}
|
||||||
onChange={setInput}
|
onChange={setInput}
|
||||||
accept={['audio/*', '.mp3', '.wav', '.aac']}
|
accept={['audio/*', '.mp3', '.wav', '.aac']}
|
||||||
title={'Input Audio Files'}
|
title={t('mergeAudio.inputTitle')}
|
||||||
type="audio"
|
type="audio"
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
resultComponent={
|
resultComponent={
|
||||||
loading ? (
|
loading ? (
|
||||||
<ToolFileResult title="Merging Audio" value={null} loading={true} />
|
<ToolFileResult
|
||||||
|
title={t('mergeAudio.mergingAudio')}
|
||||||
|
value={null}
|
||||||
|
loading={true}
|
||||||
|
/>
|
||||||
) : (
|
) : (
|
||||||
<ToolFileResult
|
<ToolFileResult
|
||||||
title="Merged Audio"
|
title={t('mergeAudio.resultTitle')}
|
||||||
value={result}
|
value={result}
|
||||||
extension={result ? result.name.split('.').pop() : undefined}
|
extension={result ? result.name.split('.').pop() : undefined}
|
||||||
/>
|
/>
|
||||||
@@ -106,7 +112,10 @@ export default function MergeAudio({
|
|||||||
getGroups={getGroups}
|
getGroups={getGroups}
|
||||||
setInput={setInput}
|
setInput={setInput}
|
||||||
compute={compute}
|
compute={compute}
|
||||||
toolInfo={{ title: `What is ${title}?`, description: longDescription }}
|
toolInfo={{
|
||||||
|
title: t('mergeAudio.toolInfo.title', { title }),
|
||||||
|
description: longDescription
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
import { Box, FormControlLabel, Radio, RadioGroup } from '@mui/material';
|
import { Box, FormControlLabel, Radio, RadioGroup } from '@mui/material';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import ToolContent from '@components/ToolContent';
|
import ToolContent from '@components/ToolContent';
|
||||||
import { ToolComponentProps } from '@tools/defineTool';
|
import { ToolComponentProps } from '@tools/defineTool';
|
||||||
import { GetGroupsType } from '@components/options/ToolOptions';
|
import { GetGroupsType } from '@components/options/ToolOptions';
|
||||||
@@ -22,6 +23,7 @@ const formatOptions = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export default function Trim({ title, longDescription }: ToolComponentProps) {
|
export default function Trim({ title, longDescription }: ToolComponentProps) {
|
||||||
|
const { t } = useTranslation('audio');
|
||||||
const [input, setInput] = useState<File | null>(null);
|
const [input, setInput] = useState<File | null>(null);
|
||||||
const [result, setResult] = useState<File | null>(null);
|
const [result, setResult] = useState<File | null>(null);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
@@ -48,28 +50,28 @@ export default function Trim({ title, longDescription }: ToolComponentProps) {
|
|||||||
updateField
|
updateField
|
||||||
}) => [
|
}) => [
|
||||||
{
|
{
|
||||||
title: 'Time Settings',
|
title: t('trim.timeSettings'),
|
||||||
component: (
|
component: (
|
||||||
<Box>
|
<Box>
|
||||||
<TextFieldWithDesc
|
<TextFieldWithDesc
|
||||||
value={values.startTime}
|
value={values.startTime}
|
||||||
onOwnChange={(val) => updateField('startTime', val)}
|
onOwnChange={(val) => updateField('startTime', val)}
|
||||||
description="Start time in format HH:MM:SS (e.g., 00:00:30)"
|
description={t('trim.startTimeDescription')}
|
||||||
label="Start Time"
|
label={t('trim.startTime')}
|
||||||
/>
|
/>
|
||||||
<Box mt={2}>
|
<Box mt={2}>
|
||||||
<TextFieldWithDesc
|
<TextFieldWithDesc
|
||||||
value={values.endTime}
|
value={values.endTime}
|
||||||
onOwnChange={(val) => updateField('endTime', val)}
|
onOwnChange={(val) => updateField('endTime', val)}
|
||||||
description="End time in format HH:MM:SS (e.g., 00:01:30)"
|
description={t('trim.endTimeDescription')}
|
||||||
label="End Time"
|
label={t('trim.endTime')}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Output Format',
|
title: t('trim.outputFormat'),
|
||||||
component: (
|
component: (
|
||||||
<Box mt={2}>
|
<Box mt={2}>
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
@@ -104,15 +106,19 @@ export default function Trim({ title, longDescription }: ToolComponentProps) {
|
|||||||
<ToolAudioInput
|
<ToolAudioInput
|
||||||
value={input}
|
value={input}
|
||||||
onChange={setInput}
|
onChange={setInput}
|
||||||
title={'Input Audio'}
|
title={t('trim.inputTitle')}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
resultComponent={
|
resultComponent={
|
||||||
loading ? (
|
loading ? (
|
||||||
<ToolFileResult title="Trimming Audio" value={null} loading={true} />
|
<ToolFileResult
|
||||||
|
title={t('trim.trimmingAudio')}
|
||||||
|
value={null}
|
||||||
|
loading={true}
|
||||||
|
/>
|
||||||
) : (
|
) : (
|
||||||
<ToolFileResult
|
<ToolFileResult
|
||||||
title="Trimmed Audio"
|
title={t('trim.resultTitle')}
|
||||||
value={result}
|
value={result}
|
||||||
extension={result ? result.name.split('.').pop() : undefined}
|
extension={result ? result.name.split('.').pop() : undefined}
|
||||||
/>
|
/>
|
||||||
@@ -122,7 +128,10 @@ export default function Trim({ title, longDescription }: ToolComponentProps) {
|
|||||||
getGroups={getGroups}
|
getGroups={getGroups}
|
||||||
setInput={setInput}
|
setInput={setInput}
|
||||||
compute={compute}
|
compute={compute}
|
||||||
toolInfo={{ title: `What is ${title}?`, description: longDescription }}
|
toolInfo={{
|
||||||
|
title: t('trim.toolInfo.title', { title }),
|
||||||
|
description: longDescription
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -131,8 +131,10 @@ export default function CsvToJson({ title }: ToolComponentProps) {
|
|||||||
setResult(jsonResult);
|
setResult(jsonResult);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setResult(
|
setResult(
|
||||||
`Error: ${
|
`${t('csvToJson.error')}: ${
|
||||||
error instanceof Error ? error.message : 'Invalid CSV format'
|
error instanceof Error
|
||||||
|
? error.message
|
||||||
|
: t('csvToJson.invalidCsvFormat')
|
||||||
}`
|
}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -211,9 +213,8 @@ export default function CsvToJson({ title }: ToolComponentProps) {
|
|||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
toolInfo={{
|
toolInfo={{
|
||||||
title: 'What Is a CSV to JSON Converter?',
|
title: t('csvToJson.toolInfo.title'),
|
||||||
description:
|
description: t('csvToJson.toolInfo.description')
|
||||||
'This tool transforms Comma Separated Values (CSV) files to JavaScript Object Notation (JSON) data structures. It supports various CSV formats with customizable delimiters, quote characters, and comment symbols. The converter can treat the first row as headers, skip empty lines, and automatically detect data types like numbers and booleans. The resulting JSON can be used for data migration, backups, or as input for other applications.'
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
import React, { useContext, useState } from 'react';
|
import React, { useContext, useState } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { InitialValuesType } from './types';
|
import { InitialValuesType } from './types';
|
||||||
import { compressImage } from './service';
|
import { compressImage } from './service';
|
||||||
import ToolContent from '@components/ToolContent';
|
import ToolContent from '@components/ToolContent';
|
||||||
@@ -17,6 +18,7 @@ const initialValues: InitialValuesType = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default function CompressImage({ title }: ToolComponentProps) {
|
export default function CompressImage({ title }: ToolComponentProps) {
|
||||||
|
const { t } = useTranslation('image');
|
||||||
const [input, setInput] = useState<File | null>(null);
|
const [input, setInput] = useState<File | null>(null);
|
||||||
const [result, setResult] = useState<File | null>(null);
|
const [result, setResult] = useState<File | null>(null);
|
||||||
const [isProcessing, setIsProcessing] = useState<boolean>(false);
|
const [isProcessing, setIsProcessing] = useState<boolean>(false);
|
||||||
@@ -37,7 +39,7 @@ export default function CompressImage({ title }: ToolComponentProps) {
|
|||||||
setResult(compressed);
|
setResult(compressed);
|
||||||
setCompressedSize(compressed.size);
|
setCompressedSize(compressed.size);
|
||||||
} else {
|
} else {
|
||||||
showSnackBar('Failed to compress image. Please try again.', 'error');
|
showSnackBar(t('compress.failedToCompress'), 'error');
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Error in compression:', err);
|
console.error('Error in compression:', err);
|
||||||
@@ -55,12 +57,12 @@ export default function CompressImage({ title }: ToolComponentProps) {
|
|||||||
value={input}
|
value={input}
|
||||||
onChange={setInput}
|
onChange={setInput}
|
||||||
accept={['image/*']}
|
accept={['image/*']}
|
||||||
title={'Input image'}
|
title={t('compress.inputTitle')}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
resultComponent={
|
resultComponent={
|
||||||
<ToolFileResult
|
<ToolFileResult
|
||||||
title={'Compressed image'}
|
title={t('compress.resultTitle')}
|
||||||
value={result}
|
value={result}
|
||||||
loading={isProcessing}
|
loading={isProcessing}
|
||||||
/>
|
/>
|
||||||
@@ -68,14 +70,14 @@ export default function CompressImage({ title }: ToolComponentProps) {
|
|||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
getGroups={({ values, updateField }) => [
|
getGroups={({ values, updateField }) => [
|
||||||
{
|
{
|
||||||
title: 'Compression options',
|
title: t('compress.compressionOptions'),
|
||||||
component: (
|
component: (
|
||||||
<Box>
|
<Box>
|
||||||
<TextFieldWithDesc
|
<TextFieldWithDesc
|
||||||
name="maxFileSizeInMB"
|
name="maxFileSizeInMB"
|
||||||
type="number"
|
type="number"
|
||||||
inputProps={{ min: 0.1, step: 0.1 }}
|
inputProps={{ min: 0.1, step: 0.1 }}
|
||||||
description="Maximum file size in megabytes"
|
description={t('compress.maxFileSizeDescription')}
|
||||||
onOwnChange={(value) =>
|
onOwnChange={(value) =>
|
||||||
updateNumberField(value, 'maxFileSizeInMB', updateField)
|
updateNumberField(value, 'maxFileSizeInMB', updateField)
|
||||||
}
|
}
|
||||||
@@ -85,7 +87,7 @@ export default function CompressImage({ title }: ToolComponentProps) {
|
|||||||
name="quality"
|
name="quality"
|
||||||
type="number"
|
type="number"
|
||||||
inputProps={{ min: 10, max: 100, step: 1 }}
|
inputProps={{ min: 10, max: 100, step: 1 }}
|
||||||
description="Image quality percentage (lower means smaller file size)"
|
description={t('compress.qualityDescription')}
|
||||||
onOwnChange={(value) =>
|
onOwnChange={(value) =>
|
||||||
updateNumberField(value, 'quality', updateField)
|
updateNumberField(value, 'quality', updateField)
|
||||||
}
|
}
|
||||||
@@ -95,18 +97,20 @@ export default function CompressImage({ title }: ToolComponentProps) {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'File sizes',
|
title: t('compress.fileSizes'),
|
||||||
component: (
|
component: (
|
||||||
<Box>
|
<Box>
|
||||||
<Box>
|
<Box>
|
||||||
{originalSize !== null && (
|
{originalSize !== null && (
|
||||||
<Typography>
|
<Typography>
|
||||||
Original Size: {(originalSize / 1024).toFixed(2)} KB
|
{t('compress.originalSize')}:{' '}
|
||||||
|
{(originalSize / 1024).toFixed(2)} KB
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
{compressedSize !== null && (
|
{compressedSize !== null && (
|
||||||
<Typography>
|
<Typography>
|
||||||
Compressed Size: {(compressedSize / 1024).toFixed(2)} KB
|
{t('compress.compressedSize')}:{' '}
|
||||||
|
{(compressedSize / 1024).toFixed(2)} KB
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
@@ -123,9 +123,9 @@ export default function Duplicate({ title }: ToolComponentProps) {
|
|||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof Error) {
|
if (error instanceof Error) {
|
||||||
setResult(`Error: ${error.message}`);
|
setResult(`${t('duplicate.error')}: ${error.message}`);
|
||||||
} else {
|
} else {
|
||||||
setResult('An unknown error occurred');
|
setResult(t('duplicate.unknownError'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
import { Box } from '@mui/material';
|
import { Box } from '@mui/material';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import ToolTextInput from '@components/input/ToolTextInput';
|
import ToolTextInput from '@components/input/ToolTextInput';
|
||||||
import ToolTextResult from '@components/result/ToolTextResult';
|
import ToolTextResult from '@components/result/ToolTextResult';
|
||||||
import {
|
import {
|
||||||
@@ -14,6 +15,7 @@ import CheckboxWithDesc from '@components/options/CheckboxWithDesc';
|
|||||||
import SelectWithDesc from '@components/options/SelectWithDesc';
|
import SelectWithDesc from '@components/options/SelectWithDesc';
|
||||||
import ToolContent from '@components/ToolContent';
|
import ToolContent from '@components/ToolContent';
|
||||||
import { ToolComponentProps } from '@tools/defineTool';
|
import { ToolComponentProps } from '@tools/defineTool';
|
||||||
|
import { ParseKeys } from 'i18next';
|
||||||
|
|
||||||
const initialValues = {
|
const initialValues = {
|
||||||
splitSeparatorType: 'symbol' as SplitOperatorType,
|
splitSeparatorType: 'symbol' as SplitOperatorType,
|
||||||
@@ -25,23 +27,24 @@ const initialValues = {
|
|||||||
trimItems: false
|
trimItems: false
|
||||||
};
|
};
|
||||||
const splitOperators: {
|
const splitOperators: {
|
||||||
title: string;
|
title: ParseKeys<'list'>;
|
||||||
description: string;
|
description: ParseKeys<'list'>;
|
||||||
type: SplitOperatorType;
|
type: SplitOperatorType;
|
||||||
}[] = [
|
}[] = [
|
||||||
{
|
{
|
||||||
title: 'Use a Symbol for Splitting',
|
title: 'findMostPopular.splitOperators.symbol.title',
|
||||||
description: 'Delimit input list items with a character.',
|
description: 'findMostPopular.splitOperators.symbol.description',
|
||||||
type: 'symbol'
|
type: 'symbol'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Use a Regex for Splitting',
|
title: 'findMostPopular.splitOperators.regex.title',
|
||||||
type: 'regex',
|
type: 'regex',
|
||||||
description: 'Delimit input list items with a regular expression.'
|
description: 'findMostPopular.splitOperators.regex.description'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function FindMostPopular({ title }: ToolComponentProps) {
|
export default function FindMostPopular({ title }: ToolComponentProps) {
|
||||||
|
const { t } = useTranslation('list');
|
||||||
const [input, setInput] = useState<string>('');
|
const [input, setInput] = useState<string>('');
|
||||||
const [result, setResult] = useState<string>('');
|
const [result, setResult] = useState<string>('');
|
||||||
const compute = (optionsValues: typeof initialValues, input: any) => {
|
const compute = (optionsValues: typeof initialValues, input: any) => {
|
||||||
@@ -74,28 +77,35 @@ export default function FindMostPopular({ title }: ToolComponentProps) {
|
|||||||
title={title}
|
title={title}
|
||||||
input={input}
|
input={input}
|
||||||
inputComponent={
|
inputComponent={
|
||||||
<ToolTextInput title={'Input list'} value={input} onChange={setInput} />
|
<ToolTextInput
|
||||||
|
title={t('findMostPopular.inputTitle')}
|
||||||
|
value={input}
|
||||||
|
onChange={setInput}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
resultComponent={
|
resultComponent={
|
||||||
<ToolTextResult title={'Most popular items'} value={result} />
|
<ToolTextResult
|
||||||
|
title={t('findMostPopular.resultTitle')}
|
||||||
|
value={result}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
getGroups={({ values, updateField }) => [
|
getGroups={({ values, updateField }) => [
|
||||||
{
|
{
|
||||||
title: 'How to Extract List Items?',
|
title: t('findMostPopular.extractListItems'),
|
||||||
component: (
|
component: (
|
||||||
<Box>
|
<Box>
|
||||||
{splitOperators.map(({ title, description, type }) => (
|
{splitOperators.map(({ title, description, type }) => (
|
||||||
<SimpleRadio
|
<SimpleRadio
|
||||||
key={type}
|
key={type}
|
||||||
onClick={() => updateField('splitSeparatorType', type)}
|
onClick={() => updateField('splitSeparatorType', type)}
|
||||||
title={title}
|
title={t(title)}
|
||||||
description={description}
|
description={t(description)}
|
||||||
checked={values.splitSeparatorType === type}
|
checked={values.splitSeparatorType === type}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
<TextFieldWithDesc
|
<TextFieldWithDesc
|
||||||
description={'Set a delimiting symbol or regular expression.'}
|
description={t('findMostPopular.splitSeparatorDescription')}
|
||||||
value={values.splitSeparator}
|
value={values.splitSeparator}
|
||||||
onOwnChange={(val) => updateField('splitSeparator', val)}
|
onOwnChange={(val) => updateField('splitSeparator', val)}
|
||||||
/>
|
/>
|
||||||
@@ -103,26 +113,24 @@ export default function FindMostPopular({ title }: ToolComponentProps) {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Item comparison',
|
title: t('findMostPopular.itemComparison'),
|
||||||
component: (
|
component: (
|
||||||
<Box>
|
<Box>
|
||||||
<CheckboxWithDesc
|
<CheckboxWithDesc
|
||||||
title={'Remove empty items'}
|
title={t('findMostPopular.removeEmptyItems')}
|
||||||
description={'Ignore empty items from comparison.'}
|
description={t('findMostPopular.removeEmptyItemsDescription')}
|
||||||
checked={values.deleteEmptyItems}
|
checked={values.deleteEmptyItems}
|
||||||
onChange={(value) => updateField('deleteEmptyItems', value)}
|
onChange={(value) => updateField('deleteEmptyItems', value)}
|
||||||
/>
|
/>
|
||||||
<CheckboxWithDesc
|
<CheckboxWithDesc
|
||||||
title={'Trim top list items'}
|
title={t('findMostPopular.trimItems')}
|
||||||
description={
|
description={t('findMostPopular.trimItemsDescription')}
|
||||||
'Remove leading and trailing spaces before comparing items'
|
|
||||||
}
|
|
||||||
checked={values.trimItems}
|
checked={values.trimItems}
|
||||||
onChange={(value) => updateField('trimItems', value)}
|
onChange={(value) => updateField('trimItems', value)}
|
||||||
/>
|
/>
|
||||||
<CheckboxWithDesc
|
<CheckboxWithDesc
|
||||||
title={'Ignore Item Case'}
|
title={t('findMostPopular.ignoreItemCase')}
|
||||||
description={'Compare all list items in lowercase.'}
|
description={t('findMostPopular.ignoreItemCaseDescription')}
|
||||||
checked={values.ignoreItemCase}
|
checked={values.ignoreItemCase}
|
||||||
onChange={(value) => updateField('ignoreItemCase', value)}
|
onChange={(value) => updateField('ignoreItemCase', value)}
|
||||||
/>
|
/>
|
||||||
@@ -130,27 +138,42 @@ export default function FindMostPopular({ title }: ToolComponentProps) {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Top item output format',
|
title: t('findMostPopular.outputFormat'),
|
||||||
component: (
|
component: (
|
||||||
<Box>
|
<Box>
|
||||||
<SelectWithDesc
|
<SelectWithDesc
|
||||||
selected={values.displayFormat}
|
selected={values.displayFormat}
|
||||||
options={[
|
options={[
|
||||||
{ label: 'Show item percentage', value: 'percentage' },
|
{
|
||||||
{ label: 'Show item count', value: 'count' },
|
label: t('findMostPopular.displayOptions.percentage'),
|
||||||
{ label: 'Show item total', value: 'total' }
|
value: 'percentage'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('findMostPopular.displayOptions.count'),
|
||||||
|
value: 'count'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('findMostPopular.displayOptions.total'),
|
||||||
|
value: 'total'
|
||||||
|
}
|
||||||
]}
|
]}
|
||||||
onChange={(value) => updateField('displayFormat', value)}
|
onChange={(value) => updateField('displayFormat', value)}
|
||||||
description={'How to display the most popular list items?'}
|
description={t('findMostPopular.displayFormatDescription')}
|
||||||
/>
|
/>
|
||||||
<SelectWithDesc
|
<SelectWithDesc
|
||||||
selected={values.sortingMethod}
|
selected={values.sortingMethod}
|
||||||
options={[
|
options={[
|
||||||
{ label: 'Sort Alphabetically', value: 'alphabetic' },
|
{
|
||||||
{ label: 'Sort by count', value: 'count' }
|
label: t('findMostPopular.sortOptions.alphabetic'),
|
||||||
|
value: 'alphabetic'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('findMostPopular.sortOptions.count'),
|
||||||
|
value: 'count'
|
||||||
|
}
|
||||||
]}
|
]}
|
||||||
onChange={(value) => updateField('sortingMethod', value)}
|
onChange={(value) => updateField('sortingMethod', value)}
|
||||||
description={'Select a sorting method.'}
|
description={t('findMostPopular.sortingMethodDescription')}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
)
|
)
|
||||||
|
@@ -12,6 +12,7 @@ import { ToolComponentProps } from '@tools/defineTool';
|
|||||||
import { FormikProps } from 'formik';
|
import { FormikProps } from 'formik';
|
||||||
import ToolContent from '@components/ToolContent';
|
import ToolContent from '@components/ToolContent';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { ParseKeys } from 'i18next';
|
||||||
|
|
||||||
const initialValues = {
|
const initialValues = {
|
||||||
splitSeparatorType: 'symbol' as SplitOperatorType,
|
splitSeparatorType: 'symbol' as SplitOperatorType,
|
||||||
@@ -25,55 +26,45 @@ const initialValues = {
|
|||||||
charAfterChunk: ''
|
charAfterChunk: ''
|
||||||
};
|
};
|
||||||
const splitOperators: {
|
const splitOperators: {
|
||||||
title: string;
|
title: ParseKeys<'string'>;
|
||||||
description: string;
|
description: ParseKeys<'string'>;
|
||||||
type: SplitOperatorType;
|
type: SplitOperatorType;
|
||||||
}[] = [
|
}[] = [
|
||||||
{
|
{
|
||||||
title: 'Use a Symbol for Splitting',
|
title: 'split.symbolTitle',
|
||||||
description:
|
description: 'split.symbolDescription',
|
||||||
'Character that will be used to\n' +
|
|
||||||
'break text into parts.\n' +
|
|
||||||
'(Space by default.)',
|
|
||||||
type: 'symbol'
|
type: 'symbol'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Use a Regex for Splitting',
|
title: 'split.regexTitle',
|
||||||
type: 'regex',
|
type: 'regex',
|
||||||
description:
|
description: 'split.regexDescription'
|
||||||
'Regular expression that will be\n' +
|
|
||||||
'used to break text into parts.\n' +
|
|
||||||
'(Multiple spaces by default.)'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Use Length for Splitting',
|
title: 'split.lengthTitle',
|
||||||
description:
|
description: 'split.lengthDescription',
|
||||||
'Number of symbols that will be\n' + 'put in each output chunk.',
|
|
||||||
type: 'length'
|
type: 'length'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Use a Number of Chunks',
|
title: 'split.chunksTitle',
|
||||||
description: 'Number of chunks of equal\n' + 'length in the output.',
|
description: 'split.chunksDescription',
|
||||||
type: 'chunks'
|
type: 'chunks'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
const outputOptions: {
|
const outputOptions: {
|
||||||
description: string;
|
description: ParseKeys<'string'>;
|
||||||
accessor: keyof typeof initialValues;
|
accessor: keyof typeof initialValues;
|
||||||
}[] = [
|
}[] = [
|
||||||
{
|
{
|
||||||
description:
|
description: 'split.outputSeparatorDescription',
|
||||||
'Character that will be put\n' +
|
|
||||||
'between the split chunks.\n' +
|
|
||||||
'(It\'s newline "\\n" by default.)',
|
|
||||||
accessor: 'outputSeparator'
|
accessor: 'outputSeparator'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
description: 'Character before each chunk',
|
description: 'split.charBeforeChunkDescription',
|
||||||
accessor: 'charBeforeChunk'
|
accessor: 'charBeforeChunk'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
description: 'Character after each chunk',
|
description: 'split.charAfterChunkDescription',
|
||||||
accessor: 'charAfterChunk'
|
accessor: 'charAfterChunk'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -183,9 +174,9 @@ export default function SplitText({ title }: ToolComponentProps) {
|
|||||||
<RadioWithTextField
|
<RadioWithTextField
|
||||||
key={type}
|
key={type}
|
||||||
checked={type === values.splitSeparatorType}
|
checked={type === values.splitSeparatorType}
|
||||||
title={t(`split.${type}Title`)}
|
title={t(title)}
|
||||||
fieldName={'splitSeparatorType'}
|
fieldName={'splitSeparatorType'}
|
||||||
description={t(`split.${type}Description`)}
|
description={t(description)}
|
||||||
value={values[`${type}Value`]}
|
value={values[`${type}Value`]}
|
||||||
onRadioClick={() => updateField('splitSeparatorType', type)}
|
onRadioClick={() => updateField('splitSeparatorType', type)}
|
||||||
onTextChange={(val) => updateField(`${type}Value`, val)}
|
onTextChange={(val) => updateField(`${type}Value`, val)}
|
||||||
@@ -199,8 +190,7 @@ export default function SplitText({ title }: ToolComponentProps) {
|
|||||||
key={option.accessor}
|
key={option.accessor}
|
||||||
value={values[option.accessor]}
|
value={values[option.accessor]}
|
||||||
onOwnChange={(value) => updateField(option.accessor, value)}
|
onOwnChange={(value) => updateField(option.accessor, value)}
|
||||||
//@ts-ignore
|
description={t(option.description)}
|
||||||
description={t(`split.${option.accessor}Description`)}
|
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user