@parhelia/localization 0.1.12602 → 0.1.12614
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LocalizeItemDialog.d.ts.map +1 -1
- package/dist/LocalizeItemDialog.js +13 -17
- package/dist/api/discovery.d.ts +1 -4
- package/dist/api/discovery.d.ts.map +1 -1
- package/dist/api/discovery.js +3 -4
- package/dist/hooks/useTranslationWizard.d.ts.map +1 -1
- package/dist/hooks/useTranslationWizard.js +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -28
- package/dist/services/translationService.d.ts +48 -7
- package/dist/services/translationService.d.ts.map +1 -1
- package/dist/services/translationService.js +3 -0
- package/dist/settings/TranslationServicesPanel.d.ts.map +1 -1
- package/dist/settings/TranslationServicesPanel.js +111 -42
- package/dist/setup/LocalizationSetupStep.d.ts.map +1 -1
- package/dist/setup/LocalizationSetupStep.js +8 -7
- package/dist/steps/ServiceLanguageSelectionStep.d.ts.map +1 -1
- package/dist/steps/ServiceLanguageSelectionStep.js +18 -1
- package/dist/steps/SubitemDiscoveryStep.d.ts.map +1 -1
- package/dist/steps/SubitemDiscoveryStep.js +95 -181
- package/dist/translation-center/BatchTranslationView.d.ts +1 -1
- package/dist/translation-center/BatchTranslationView.d.ts.map +1 -1
- package/dist/translation-center/BatchTranslationView.js +356 -98
- package/dist/translation-center/RecentTranslations.d.ts.map +1 -1
- package/dist/translation-center/RecentTranslations.js +20 -13
- package/dist/translation-center/TranslationManagement.d.ts.map +1 -1
- package/dist/translation-center/TranslationManagement.js +2 -4
- package/package.json +10 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalizeItemDialog.d.ts","sourceRoot":"","sources":["../src/LocalizeItemDialog.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"LocalizeItemDialog.d.ts","sourceRoot":"","sources":["../src/LocalizeItemDialog.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EAExB,MAAM,eAAe,CAAC;AAuBvB,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,uBAAuB,GAAG,WAAW,CAAC,uBAAuB,CAAC,2CA0btE"}
|
|
@@ -2,16 +2,14 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { Dialog, DialogContent, DialogHeader, DialogTitle, Button, cn, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "@parhelia/core";
|
|
3
3
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { AlertTriangle as LucideAlertTriangle } from "lucide-react";
|
|
5
|
-
import { ChevronRight as LucideChevronRight } from "lucide-react";
|
|
6
5
|
import { useTranslationWizard } from "./hooks/useTranslationWizard";
|
|
7
6
|
import { performDefaultTranslation, generateBatchId } from "./LocalizeItemUtils";
|
|
8
|
-
const ChevronRightIcon = LucideChevronRight;
|
|
9
7
|
const AlertTriangleIcon = LucideAlertTriangle;
|
|
10
8
|
// Threshold for warning about large batch translations
|
|
11
9
|
const LARGE_BATCH_WARNING_THRESHOLD = 100;
|
|
12
10
|
// Note: DialogButtons is an internal component that might need to be added to core exports
|
|
13
11
|
// For now, we'll implement it inline
|
|
14
|
-
const DialogButtons = ({ children, ...props }) => (_jsx("div", { className: "flex justify-end gap-2
|
|
12
|
+
const DialogButtons = ({ children, ...props }) => (_jsx("div", { className: "mt-auto flex flex-wrap items-stretch justify-end gap-2 gap-y-2 border-t border-[var(--color-gray-3)] bg-background px-6 pt-4 pb-6", ...props, children: children }));
|
|
15
13
|
export function LocalizeItemDialog(props) {
|
|
16
14
|
const editContext = props.editContext;
|
|
17
15
|
const configuration = editContext.configuration.translationWizard;
|
|
@@ -222,25 +220,23 @@ export function LocalizeItemDialog(props) {
|
|
|
222
220
|
if (!open) {
|
|
223
221
|
props.onClose?.(null);
|
|
224
222
|
}
|
|
225
|
-
}, children: [_jsxs(DialogContent, { className: "
|
|
226
|
-
width:
|
|
227
|
-
height:
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
? "text-[#9650fb]"
|
|
237
|
-
: "text-[var(--color-gray-2)]"), "data-testid": `step-indicator-label-${step.id}`, children: step.name }), index < activeSteps.length - 1 && (_jsx(ChevronRightIcon, { className: "w-4 h-4 text-[var(--color-gray-3)] mx-2", strokeWidth: 1 }))] }, step.id))) }) }), _jsx("div", { className: "flex-1 overflow-y-auto min-h-0 bg-[var(--color-gray-5)]", "data-testid": "translation-wizard-step-content", children: _jsx("div", { className: "h-full relative", children: activeSteps.map((step, index) => {
|
|
223
|
+
}, children: [_jsxs(DialogContent, { className: "flex h-[85vh] max-h-[900px] min-h-0 w-[90vw] max-w-5xl flex-col overflow-hidden md:min-h-[700px]", "data-testid": "translation-wizard-dialog", onPointerDownOutside: (e) => e.preventDefault(), onEscapeKeyDown: (e) => e.preventDefault(), "aria-describedby": "translation-wizard-description", style: {
|
|
224
|
+
width: "min(90vw, 1280px)",
|
|
225
|
+
height: "min(85vh, 900px)",
|
|
226
|
+
}, children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { "data-testid": "translation-wizard-title", children: "Translation Wizard" }), _jsx("div", { id: "translation-wizard-description", className: "sr-only", children: currentStep?.description || "Configure and start translation for your content." })] }), _jsxs("div", { className: "flex flex-1 flex-col min-h-0", children: [_jsx("div", { className: "border-b border-[var(--color-gray-3)] bg-background px-6", "data-testid": "translation-wizard-step-navigation", children: _jsx("div", { className: "flex min-w-0 flex-nowrap items-center gap-1 overflow-x-auto py-2.5 md:gap-1.5", children: activeSteps.map((step, index) => {
|
|
227
|
+
const isCurrent = currentStepIndex === index;
|
|
228
|
+
return (_jsxs("div", { className: "flex shrink-0 items-center gap-1", "data-testid": `step-indicator-${step.id}`, "aria-current": isCurrent ? "step" : undefined, children: [_jsx("div", { className: cn("flex h-8 w-8 shrink-0 items-center justify-center rounded-full border text-sm font-medium transition-colors", isCurrent && "border-[#9650fb] bg-[#f6eeff] text-[#9650fb]", currentStepIndex < index && "border-[var(--color-gray-3)] text-[var(--color-gray-2)]", currentStepIndex > index && "border-[#9650fb] bg-[#9650fb] text-white"), style: currentStepIndex > index ? { backgroundColor: "#9650fb", color: "#ffffff" } : undefined, "data-testid": `step-indicator-circle-${step.id}`, "aria-label": step.name, children: currentStepIndex > index ? "✓" : index + 1 }), _jsx("span", { className: cn("inline-block text-sm align-middle transition-[max-width,opacity] duration-200 ease-out md:max-w-none md:opacity-100", isCurrent
|
|
229
|
+
? "max-w-[min(calc(100vw-5rem),20rem)] overflow-visible text-[#9650fb] font-medium max-md:opacity-100 md:max-w-none"
|
|
230
|
+
: currentStepIndex > index
|
|
231
|
+
? "overflow-hidden text-[#9650fb] max-md:pointer-events-none max-md:max-w-0 max-md:opacity-0"
|
|
232
|
+
: "overflow-hidden text-[var(--color-gray-2)] max-md:pointer-events-none max-md:max-w-0 max-md:opacity-0"), "data-testid": `step-indicator-label-${step.id}`, children: _jsx("span", { className: cn(isCurrent ? "whitespace-normal break-words md:whitespace-nowrap" : "whitespace-nowrap"), children: step.name }) })] }, step.id));
|
|
233
|
+
}) }) }), _jsx("div", { className: "flex-1 overflow-y-auto min-h-0 bg-[var(--color-gray-5)]", "data-testid": "translation-wizard-step-content", children: _jsx("div", { className: "h-full relative", children: activeSteps.map((step, index) => {
|
|
238
234
|
const StepComponent = step.component;
|
|
239
235
|
const isActive = index === currentStepIndex;
|
|
240
236
|
if (!StepComponent)
|
|
241
237
|
return null;
|
|
242
238
|
return (_jsx("div", { className: "h-full", style: { display: isActive ? 'block' : 'none' }, "aria-hidden": !isActive, "data-testid": `step-content-${step.id}`, children: _jsx(StepComponent, { stepIndex: index, isActive: isActive, data: wizardData, setData: setWizardDataStable, editContext: editContext, onStepCompleted: (completed) => handleStepCompleted(completed, index), setBeforeNextCallback: isActive ? setBeforeNextCallbackStable : undefined, setFooterActions: isActive ? provideFooterActions : undefined, requestClose: isActive ? requestCloseCb : undefined }) }, step.id));
|
|
243
|
-
}) }) }), _jsxs(DialogButtons, { "data-testid": "translation-wizard-dialog-buttons", children: [_jsx(Button, { onClick: () => props.onClose?.(null), variant: "outline", size: "default", "data-testid": "translation-wizard-cancel-button", children: "Cancel" }), currentStepIndex > 0 && (_jsx(Button, { onClick: handlePrevious, variant: "outline", size: "default", "data-testid": "translation-wizard-previous-button", children: "Previous" })), footerActions.map((a) => (_jsx(Button, { onClick: a.onClick, disabled: !!a.disabled, variant: "default", size: "default", "data-testid": `translation-wizard-footer-action-${a.key}`, children: a.label }, a.key))), _jsx(Button, { onClick: handleNext, disabled: !canProceed || isSubmitting, variant: "default", size: "default", "data-testid": "translation-wizard-next-button", children: isSubmitting ? "Starting..." : isLastStep ? "Start Translation" : "Next" })] })] })] }), _jsx(AlertDialog, { open: showLargeBatchWarning, onOpenChange: setShowLargeBatchWarning, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsxs(AlertDialogTitle, { className: "flex items-center gap-2", children: [_jsx(AlertTriangleIcon, { className: "h-5 w-5 text-amber-500" }), "Large Translation Batch"] }), _jsx(AlertDialogDescription, { children: (() => {
|
|
239
|
+
}) }) }), _jsxs(DialogButtons, { "data-testid": "translation-wizard-dialog-buttons", children: [_jsx(Button, { onClick: () => props.onClose?.(null), variant: "outline", size: "default", className: "max-md:hidden", "data-testid": "translation-wizard-cancel-button", children: "Cancel" }), _jsxs("div", { className: "flex min-h-10 min-w-0 flex-1 flex-wrap items-stretch justify-end gap-2 md:contents", children: [currentStepIndex > 0 && (_jsx(Button, { onClick: handlePrevious, variant: "outline", size: "default", className: "min-w-0 flex-1 md:min-w-[6.5rem] md:flex-initial", "data-testid": "translation-wizard-previous-button", children: "Previous" })), footerActions.map((a) => (_jsx(Button, { onClick: a.onClick, disabled: !!a.disabled, variant: "default", size: "default", className: "min-w-0 flex-1 md:flex-initial md:min-w-[6.5rem]", "data-testid": `translation-wizard-footer-action-${a.key}`, children: a.label }, a.key))), _jsx(Button, { onClick: handleNext, disabled: !canProceed || isSubmitting, variant: "default", size: "default", className: "min-w-0 flex-1 md:min-w-[6.5rem] md:flex-initial", "data-testid": "translation-wizard-next-button", children: isSubmitting ? "Starting..." : isLastStep ? "Start Translation" : "Next" })] })] })] })] }), _jsx(AlertDialog, { open: showLargeBatchWarning, onOpenChange: setShowLargeBatchWarning, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsxs(AlertDialogTitle, { className: "flex items-center gap-2", children: [_jsx(AlertTriangleIcon, { className: "h-5 w-5 text-amber-500" }), "Large Translation Batch"] }), _jsx(AlertDialogDescription, { children: (() => {
|
|
244
240
|
const { itemCount, languageCount, totalTranslations } = calculateTranslationCounts(wizardData);
|
|
245
241
|
return (_jsxs(_Fragment, { children: ["You are about to start ", _jsxs("strong", { children: [totalTranslations, " translations"] }), " (", itemCount, " items \u00D7 ", languageCount, " languages). Large batches may take a significant amount of time to process.", _jsx("br", {}), _jsx("br", {}), "Are you sure you want to continue?"] }));
|
|
246
242
|
})() })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { disabled: isSubmitting, children: "Cancel" }), _jsx(AlertDialogAction, { onClick: handleLargeBatchConfirm, disabled: isSubmitting, children: isSubmitting ? "Starting..." : "Continue" })] })] }) })] }));
|
package/dist/api/discovery.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export type DiscoveredItem = {
|
|
|
4
4
|
path: string;
|
|
5
5
|
parentId?: string | null;
|
|
6
6
|
hasChildren: boolean;
|
|
7
|
-
hasLayout?: boolean;
|
|
8
7
|
};
|
|
9
8
|
export type TreeNode = {
|
|
10
9
|
key: string;
|
|
@@ -16,8 +15,6 @@ export type BackendTreeNode = {
|
|
|
16
15
|
id: string;
|
|
17
16
|
name: string;
|
|
18
17
|
path: string;
|
|
19
|
-
hasLayout: boolean;
|
|
20
|
-
isTranslatable: boolean;
|
|
21
18
|
isFolder: boolean;
|
|
22
19
|
icon?: string;
|
|
23
20
|
children: BackendTreeNode[];
|
|
@@ -33,5 +30,5 @@ export type DiscoverItemsTreeResponse = {
|
|
|
33
30
|
};
|
|
34
31
|
export declare function discoverItemsTree(req: DiscoverItemsTreeRequest, sessionId?: string): Promise<DiscoverItemsTreeResponse>;
|
|
35
32
|
export declare function convertBackendTreeToTreeNodes(trees: BackendTreeNode[]): TreeNode[];
|
|
36
|
-
export declare function
|
|
33
|
+
export declare function flattenSelectableItemsFromBackendTrees(trees: BackendTreeNode[]): DiscoveredItem[];
|
|
37
34
|
//# sourceMappingURL=discovery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/api/discovery.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/api/discovery.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAA;CAAE,CAAC;AAInG,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,wBAAwB,EAC7B,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,yBAAyB,CAAC,CAWpC;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,QAAQ,EAAE,CAQlF;AAED,wBAAgB,sCAAsC,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,cAAc,EAAE,CAQjG"}
|
package/dist/api/discovery.js
CHANGED
|
@@ -12,16 +12,15 @@ export function convertBackendTreeToTreeNodes(trees) {
|
|
|
12
12
|
const convert = (n) => ({
|
|
13
13
|
key: n.id,
|
|
14
14
|
label: n.name,
|
|
15
|
-
data: { id: n.id, name: n.name, path: n.path,
|
|
15
|
+
data: { id: n.id, name: n.name, path: n.path, isFolder: n.isFolder, icon: n.icon, parentId: undefined, hasChildren: (n.children?.length ?? 0) > 0 },
|
|
16
16
|
children: n.children?.map(convert) || [],
|
|
17
17
|
});
|
|
18
18
|
return trees.map(convert);
|
|
19
19
|
}
|
|
20
|
-
export function
|
|
20
|
+
export function flattenSelectableItemsFromBackendTrees(trees) {
|
|
21
21
|
const out = [];
|
|
22
22
|
const walk = (n) => {
|
|
23
|
-
|
|
24
|
-
out.push({ id: n.id, name: n.name, path: n.path, hasChildren: (n.children?.length ?? 0) > 0, parentId: undefined });
|
|
23
|
+
out.push({ id: n.id, name: n.name, path: n.path, hasChildren: (n.children?.length ?? 0) > 0, parentId: undefined });
|
|
25
24
|
n.children?.forEach(walk);
|
|
26
25
|
};
|
|
27
26
|
trees.forEach(walk);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTranslationWizard.d.ts","sourceRoot":"","sources":["../../src/hooks/useTranslationWizard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"useTranslationWizard.d.ts","sourceRoot":"","sources":["../../src/hooks/useTranslationWizard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAOhF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,uBAAuB;;;EA8FlE"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useState, useEffect } from "react";
|
|
2
2
|
import { getLanguagesAndVersions } from "@parhelia/core";
|
|
3
3
|
import { getTranslationStatus, getTranslationProviders } from "../services/translationService";
|
|
4
|
+
import { localStorageService } from "@parhelia/core";
|
|
4
5
|
export function useTranslationWizard(props) {
|
|
5
6
|
const [wizardData, setWizardData] = useState({
|
|
6
7
|
items: props.items,
|
|
@@ -21,7 +22,7 @@ export function useTranslationWizard(props) {
|
|
|
21
22
|
const providersResult = await getTranslationProviders();
|
|
22
23
|
const providers = providersResult.data || [];
|
|
23
24
|
if (providers.length > 0) {
|
|
24
|
-
const savedProvider =
|
|
25
|
+
const savedProvider = localStorageService.getString("editor.translationProvider");
|
|
25
26
|
// Validate that saved provider exists in current providers by name
|
|
26
27
|
const validProvider = savedProvider && providers.find(p => p.name === savedProvider)
|
|
27
28
|
? savedProvider
|
|
@@ -68,7 +69,7 @@ export function useTranslationWizard(props) {
|
|
|
68
69
|
// Save translation provider to localStorage when it changes
|
|
69
70
|
useEffect(() => {
|
|
70
71
|
if (wizardData.translationProvider) {
|
|
71
|
-
|
|
72
|
+
localStorageService.setString("editor.translationProvider", wizardData.translationProvider);
|
|
72
73
|
}
|
|
73
74
|
}, [wizardData.translationProvider]);
|
|
74
75
|
return {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAatD,OAAO,EACL,mBAAmB,EAGpB,MAAM,gBAAgB,CAAC;AAUxB,QAAA,MAAM,wCAAwC;;;;;;;;;;;;8BAalB,qBAAqB;;CAchD,CAAC;AAEF,QAAA,MAAM,4CAA4C;;;;;;;CAUjD,CAAC;AAkCF,OAAO,EAAE,wCAAwC,EAAE,4CAA4C,EAAE,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,YAAY,EAC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,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,YAAY,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,yBAAyB,EACzB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,YAAY,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEhF,MAAM,MAAM,yBAAyB,GAAG;IACtC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,mBAAmB,EAClC,OAAO,CAAC,EAAE,yBAAyB,uBAsHpC"}
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,6 @@ import { localizeItemCommand } from "./LocalizeItemCommand";
|
|
|
6
6
|
import { TranslationSidebar } from "./sidebar/TranslationSidebar";
|
|
7
7
|
import { TranslationManagement } from "./translation-center/TranslationManagement";
|
|
8
8
|
import { RecentTranslations } from "./translation-center/RecentTranslations";
|
|
9
|
-
import { LocalizationSetupStep } from "./setup/LocalizationSetupStep";
|
|
10
9
|
import { TranslationServicesPanel } from "./settings/TranslationServicesPanel";
|
|
11
10
|
import { Languages as LucideLanguages, LayoutGrid as LucideLayoutGrid, Globe as LucideGlobe, } from "lucide-react";
|
|
12
11
|
const LanguagesIcon = LucideLanguages;
|
|
@@ -110,15 +109,6 @@ export * from "./steps/types";
|
|
|
110
109
|
export function configureLocalization(configuration, options) {
|
|
111
110
|
const enableMultiItem = options?.multiItem !== false; // Default to true
|
|
112
111
|
const enableTranslationManagement = options?.translationManagement !== false; // Default to true
|
|
113
|
-
// Add localization setup step
|
|
114
|
-
if (!configuration.setup) {
|
|
115
|
-
configuration.setup = { steps: [] };
|
|
116
|
-
}
|
|
117
|
-
// Check if the step is already added (to prevent duplicates)
|
|
118
|
-
const hasLocalizationSetup = configuration.setup.steps.some((step) => step === LocalizationSetupStep || step.name === "LocalizationSetupStep");
|
|
119
|
-
if (!hasLocalizationSetup) {
|
|
120
|
-
configuration.setup.steps.push(LocalizationSetupStep);
|
|
121
|
-
}
|
|
122
112
|
// Initialize the translation wizard configuration if it doesn't exist
|
|
123
113
|
if (!configuration.translationWizard) {
|
|
124
114
|
configuration.translationWizard = enableMultiItem
|
|
@@ -188,35 +178,30 @@ export function configureLocalization(configuration, options) {
|
|
|
188
178
|
icon: _jsx(LanguagesIcon, { strokeWidth: 1 }),
|
|
189
179
|
content: _jsx(TranslationServicesPanel, {}),
|
|
190
180
|
};
|
|
181
|
+
const ensureLocalizationPanels = (group) => {
|
|
182
|
+
if (!group.panels.some((p) => p.id === "translation-services")) {
|
|
183
|
+
group.panels.push(translationServicesPanel);
|
|
184
|
+
}
|
|
185
|
+
};
|
|
191
186
|
if (localizationGroupIndex >= 0) {
|
|
192
|
-
// Group exists, check if panel is already added
|
|
193
187
|
const group = configuration.settings.groups[localizationGroupIndex];
|
|
194
188
|
if (group) {
|
|
195
|
-
|
|
196
|
-
if (!hasPanel) {
|
|
197
|
-
group.panels.push(translationServicesPanel);
|
|
198
|
-
}
|
|
189
|
+
ensureLocalizationPanels(group);
|
|
199
190
|
}
|
|
200
191
|
}
|
|
201
192
|
else {
|
|
202
|
-
// Group doesn't exist, create it
|
|
203
193
|
const groups = configuration.settings.groups;
|
|
204
194
|
const aboutIndex = groups.findIndex((g) => g.title === "About");
|
|
195
|
+
const localizationGroup = {
|
|
196
|
+
title: "Localization",
|
|
197
|
+
icon: _jsx(LanguagesIcon, { strokeWidth: 1 }),
|
|
198
|
+
panels: [translationServicesPanel],
|
|
199
|
+
};
|
|
205
200
|
if (aboutIndex >= 0) {
|
|
206
|
-
|
|
207
|
-
groups.splice(aboutIndex, 0, {
|
|
208
|
-
title: "Localization",
|
|
209
|
-
icon: _jsx(LanguagesIcon, { strokeWidth: 1 }),
|
|
210
|
-
panels: [translationServicesPanel],
|
|
211
|
-
});
|
|
201
|
+
groups.splice(aboutIndex, 0, localizationGroup);
|
|
212
202
|
}
|
|
213
203
|
else {
|
|
214
|
-
|
|
215
|
-
groups.push({
|
|
216
|
-
title: "Localization",
|
|
217
|
-
icon: _jsx(LanguagesIcon, { strokeWidth: 1 }),
|
|
218
|
-
panels: [translationServicesPanel],
|
|
219
|
-
});
|
|
204
|
+
groups.push(localizationGroup);
|
|
220
205
|
}
|
|
221
206
|
}
|
|
222
207
|
return configuration;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { TranslationStatus } from "../types";
|
|
2
2
|
import { TranslationProviderInfo } from "../steps/types";
|
|
3
|
+
export type TranslationApiResponse<T> = {
|
|
4
|
+
success: boolean;
|
|
5
|
+
data?: T;
|
|
6
|
+
error?: string;
|
|
7
|
+
message?: string;
|
|
8
|
+
};
|
|
3
9
|
export type TranslationRequestResponse = {
|
|
4
10
|
jobId: string;
|
|
5
11
|
};
|
|
@@ -23,13 +29,11 @@ export type AvailableTranslationService = {
|
|
|
23
29
|
templateId: string;
|
|
24
30
|
templateName: string;
|
|
25
31
|
};
|
|
26
|
-
export declare function getAvailableTranslationServices(): Promise<import("@parhelia/core").ExecutionResult<AvailableTranslationService[]
|
|
27
|
-
export declare function createProviderSettings(serviceName: string, templateId: string, language?: string, structureSettings?: TranslationStructureSettings): Promise<import("@parhelia/core").ExecutionResult<{
|
|
28
|
-
success: boolean;
|
|
32
|
+
export declare function getAvailableTranslationServices(): Promise<import("@parhelia/core").ExecutionResult<TranslationApiResponse<AvailableTranslationService[]>>>;
|
|
33
|
+
export declare function createProviderSettings(serviceName: string, templateId: string, language?: string, structureSettings?: TranslationStructureSettings): Promise<import("@parhelia/core").ExecutionResult<TranslationApiResponse<{
|
|
29
34
|
itemId: string;
|
|
30
35
|
itemPath: string;
|
|
31
|
-
|
|
32
|
-
}>>;
|
|
36
|
+
}>>>;
|
|
33
37
|
export type TranslationStructureSettings = {
|
|
34
38
|
translationFolderPath: string;
|
|
35
39
|
translationFolderTemplateId: string;
|
|
@@ -46,9 +50,10 @@ export type TranslationStructureResponse = {
|
|
|
46
50
|
translationFolder: TranslationStructureItemInfo;
|
|
47
51
|
translationProvidersFolder: TranslationStructureItemInfo;
|
|
48
52
|
};
|
|
49
|
-
export declare function getTranslationStructure(settings: TranslationStructureSettings): Promise<import("@parhelia/core").ExecutionResult<TranslationStructureResponse
|
|
50
|
-
export declare function ensureTranslationStructure(settings: TranslationStructureSettings): Promise<import("@parhelia/core").ExecutionResult<TranslationStructureResponse
|
|
53
|
+
export declare function getTranslationStructure(settings: TranslationStructureSettings): Promise<import("@parhelia/core").ExecutionResult<TranslationApiResponse<TranslationStructureResponse>>>;
|
|
54
|
+
export declare function ensureTranslationStructure(settings: TranslationStructureSettings): Promise<import("@parhelia/core").ExecutionResult<TranslationApiResponse<TranslationStructureResponse>>>;
|
|
51
55
|
export type TranslationJobRecord = {
|
|
56
|
+
id?: number;
|
|
52
57
|
itemId: string;
|
|
53
58
|
targetLanguage: string;
|
|
54
59
|
sourceLanguage: string;
|
|
@@ -57,6 +62,7 @@ export type TranslationJobRecord = {
|
|
|
57
62
|
hash?: string;
|
|
58
63
|
message?: string;
|
|
59
64
|
batchId?: string;
|
|
65
|
+
metadata?: string | null;
|
|
60
66
|
};
|
|
61
67
|
export declare function listBatchTranslationJobs(batchId: string): Promise<import("@parhelia/core").ExecutionResult<TranslationJobRecord[]>>;
|
|
62
68
|
export type TranslationBatchInfo = {
|
|
@@ -112,4 +118,39 @@ export declare function requestBatchTranslation({ sessionId, batchId, provider,
|
|
|
112
118
|
languageMappings: LanguageMapping[];
|
|
113
119
|
itemIds: string[];
|
|
114
120
|
}): Promise<import("@parhelia/core").ExecutionResult<BatchTranslationResponse>>;
|
|
121
|
+
export type RetryBatchTranslationJobRequest = {
|
|
122
|
+
sourceTranslationId?: number;
|
|
123
|
+
itemId: string;
|
|
124
|
+
sourceLanguage: string;
|
|
125
|
+
targetLanguage: string;
|
|
126
|
+
metadata?: string | null;
|
|
127
|
+
};
|
|
128
|
+
export type RetryBatchTranslationStartedJob = {
|
|
129
|
+
sourceTranslationId?: number;
|
|
130
|
+
itemId: string;
|
|
131
|
+
sourceLanguage: string;
|
|
132
|
+
targetLanguage: string;
|
|
133
|
+
metadata?: string | null;
|
|
134
|
+
jobId: string;
|
|
135
|
+
};
|
|
136
|
+
export type RetryBatchTranslationSkippedJob = {
|
|
137
|
+
sourceTranslationId?: number;
|
|
138
|
+
itemId: string;
|
|
139
|
+
sourceLanguage: string;
|
|
140
|
+
targetLanguage: string;
|
|
141
|
+
error: string;
|
|
142
|
+
};
|
|
143
|
+
export type RetryBatchTranslationResponse = {
|
|
144
|
+
sourceBatchId: string;
|
|
145
|
+
retryBatchId: string;
|
|
146
|
+
provider: string;
|
|
147
|
+
started: RetryBatchTranslationStartedJob[];
|
|
148
|
+
skipped: RetryBatchTranslationSkippedJob[];
|
|
149
|
+
};
|
|
150
|
+
export declare function retryBatchTranslation({ sessionId, sourceBatchId, provider, jobs, }: {
|
|
151
|
+
sessionId: string;
|
|
152
|
+
sourceBatchId: string;
|
|
153
|
+
provider?: string;
|
|
154
|
+
jobs: RetryBatchTranslationJobRequest[];
|
|
155
|
+
}): Promise<import("@parhelia/core").ExecutionResult<RetryBatchTranslationResponse>>;
|
|
115
156
|
//# sourceMappingURL=translationService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translationService.d.ts","sourceRoot":"","sources":["../../src/services/translationService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,uBAAuB,E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|
|
|
56
56
|
export async function requestBatchTranslation({ sessionId, batchId, provider, batchMetadata, languageMappings, itemIds }) {
|
|
57
57
|
return await post("/parhelia/translation/requestBatchTranslation", { sessionId, batchId, provider, batchMetadata: batchMetadata || "", languageMappings, itemIds });
|
|
58
58
|
}
|
|
59
|
+
export async function retryBatchTranslation({ sessionId, sourceBatchId, provider, jobs, }) {
|
|
60
|
+
return await post("/parhelia/translation/retryBatchTranslation", { sessionId, sourceBatchId, provider, jobs });
|
|
61
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TranslationServicesPanel.d.ts","sourceRoot":"","sources":["../../src/settings/TranslationServicesPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TranslationServicesPanel.d.ts","sourceRoot":"","sources":["../../src/settings/TranslationServicesPanel.tsx"],"names":[],"mappings":"AAgEA;;;GAGG;AACH,wBAAgB,wBAAwB,4CAusBvC;AAED,eAAe,wBAAwB,CAAC"}
|