mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-09-18 01:19:24 +00:00
Split placeholders per split by...
This commit is contained in:
parent
48421e4922
commit
87cf284b3b
@ -691,6 +691,28 @@
|
|||||||
"label": "Choose split method",
|
"label": "Choose split method",
|
||||||
"placeholder": "Select how to split the PDF"
|
"placeholder": "Select how to split the PDF"
|
||||||
},
|
},
|
||||||
|
"methods": {
|
||||||
|
"byPages": "Split by Pages",
|
||||||
|
"bySections": "Split by Sections",
|
||||||
|
"bySize": "Split by File Size",
|
||||||
|
"byPageCount": "Split by Page Count",
|
||||||
|
"byDocCount": "Split by Document Count",
|
||||||
|
"byChapters": "Split by Chapters"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"fileSize": {
|
||||||
|
"label": "File Size",
|
||||||
|
"placeholder": "e.g. 10MB, 500KB"
|
||||||
|
},
|
||||||
|
"pageCount": {
|
||||||
|
"label": "Pages per File",
|
||||||
|
"placeholder": "e.g. 5, 10"
|
||||||
|
},
|
||||||
|
"docCount": {
|
||||||
|
"label": "Number of Files",
|
||||||
|
"placeholder": "e.g. 3, 5"
|
||||||
|
}
|
||||||
|
},
|
||||||
"tooltip": {
|
"tooltip": {
|
||||||
"header": {
|
"header": {
|
||||||
"title": "Split Methods Overview"
|
"title": "Split Methods Overview"
|
||||||
|
@ -57,15 +57,37 @@ const SplitSettings = ({
|
|||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
|
|
||||||
const renderSplitValueForm = () => (
|
const renderSplitValueForm = () => {
|
||||||
<TextInput
|
let label, placeholder;
|
||||||
label={t("split-by-size-or-count.value.label", "Split Value")}
|
|
||||||
placeholder={t("split-by-size-or-count.value.placeholder", "e.g. 10MB or 5 pages")}
|
switch (parameters.method) {
|
||||||
value={parameters.splitValue}
|
case SPLIT_METHODS.BY_SIZE:
|
||||||
onChange={(e) => onParameterChange('splitValue', e.target.value)}
|
label = t("split.value.fileSize.label", "File Size");
|
||||||
disabled={disabled}
|
placeholder = t("split.value.fileSize.placeholder", "e.g. 10MB, 500KB");
|
||||||
/>
|
break;
|
||||||
);
|
case SPLIT_METHODS.BY_PAGE_COUNT:
|
||||||
|
label = t("split.value.pageCount.label", "Pages per File");
|
||||||
|
placeholder = t("split.value.pageCount.placeholder", "e.g. 5, 10");
|
||||||
|
break;
|
||||||
|
case SPLIT_METHODS.BY_DOC_COUNT:
|
||||||
|
label = t("split.value.docCount.label", "Number of Files");
|
||||||
|
placeholder = t("split.value.docCount.placeholder", "e.g. 3, 5");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
label = t("split-by-size-or-count.value.label", "Split Value");
|
||||||
|
placeholder = t("split-by-size-or-count.value.placeholder", "e.g. 10MB or 5 pages");
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<TextInput
|
||||||
|
label={label}
|
||||||
|
placeholder={placeholder}
|
||||||
|
value={parameters.splitValue}
|
||||||
|
onChange={(e) => onParameterChange('splitValue', e.target.value)}
|
||||||
|
disabled={disabled}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const renderByChaptersForm = () => (
|
const renderByChaptersForm = () => (
|
||||||
<Stack gap="sm">
|
<Stack gap="sm">
|
||||||
@ -101,12 +123,12 @@ const SplitSettings = ({
|
|||||||
onChange={(v) => isSplitMethod(v) && onParameterChange('method', v)}
|
onChange={(v) => isSplitMethod(v) && onParameterChange('method', v)}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
data={[
|
data={[
|
||||||
{ value: SPLIT_METHODS.BY_PAGES, label: t("split.header", "Split by Pages") + " (e.g. 1,3,5-10)" },
|
{ value: SPLIT_METHODS.BY_PAGES, label: t("split.methods.byPages", "Split by Pages") },
|
||||||
{ value: SPLIT_METHODS.BY_SECTIONS, label: t("split-by-sections.title", "Split by Grid Sections") },
|
{ value: SPLIT_METHODS.BY_SECTIONS, label: t("split.methods.bySections", "Split by Sections") },
|
||||||
{ value: SPLIT_METHODS.BY_SIZE, label: t("split-by-size-or-count.type.size", "By Size") },
|
{ value: SPLIT_METHODS.BY_SIZE, label: t("split.methods.bySize", "Split by Size") },
|
||||||
{ value: SPLIT_METHODS.BY_PAGE_COUNT, label: t("split-by-size-or-count.type.pageCount", "By Page Count") },
|
{ value: SPLIT_METHODS.BY_PAGE_COUNT, label: t("split.methods.byPageCount", "Split by Page Count") },
|
||||||
{ value: SPLIT_METHODS.BY_DOC_COUNT, label: t("split-by-size-or-count.type.docCount", "By Document Count") },
|
{ value: SPLIT_METHODS.BY_DOC_COUNT, label: t("split.methods.byDocCount", "Split by Document Count") },
|
||||||
{ value: SPLIT_METHODS.BY_CHAPTERS, label: t("splitByChapters.title", "Split by Chapters") },
|
{ value: SPLIT_METHODS.BY_CHAPTERS, label: t("split.methods.byChapters", "Split by Chapters") },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user