diff --git a/web/src/app.html b/web/src/app.html index 87cc0de..6a2bb58 100644 --- a/web/src/app.html +++ b/web/src/app.html @@ -1,5 +1,5 @@ - + diff --git a/web/src/lib/components/ParamForm.svelte b/web/src/lib/components/ParamForm.svelte index 70f46ee..9a3bedc 100644 --- a/web/src/lib/components/ParamForm.svelte +++ b/web/src/lib/components/ParamForm.svelte @@ -4,10 +4,12 @@ import SelectField from './ui/SelectField.svelte'; import SliderField from './ui/SliderField.svelte'; import TextField from './ui/TextField.svelte'; - import type { ParamDef } from '$lib/registry'; + import type { ParamDef, ToolEntry } from '$lib/registry'; + import { optionLabel, paramLabel } from '$lib/i18n/tool-strings'; import { t } from '$lib/i18n/t'; interface Props { + tool: ToolEntry; params: ParamDef[]; values: Record; pipetteTargetId?: string | null; @@ -17,6 +19,7 @@ } let { + tool, params, values = $bindable(), pipetteTargetId = null, @@ -33,11 +36,11 @@ {#each params as param (param.id)}
{#if param.type === 'checkbox'} - + {:else if param.type === 'number'} ({ + value: o.value, + label: optionLabel(tool, param, o.value) + }))} bind:value={values[param.id]} /> {:else if param.type === 'color'} onPipetteToggle?.(param.id)} diff --git a/web/src/lib/components/ToolPage.svelte b/web/src/lib/components/ToolPage.svelte index ec835e1..677cb21 100644 --- a/web/src/lib/components/ToolPage.svelte +++ b/web/src/lib/components/ToolPage.svelte @@ -12,6 +12,7 @@ import { createAutoRunner } from '$lib/tools/auto-run'; import { executeStep } from '$lib/tools/executor'; import { t } from '$lib/i18n/t'; + import { toolDescription, toolTitle } from '$lib/i18n/tool-strings'; import ParamsCard from './tool/ParamsCard.svelte'; import ResultCard from './tool/ResultCard.svelte'; import SourceCard from './tool/SourceCard.svelte'; @@ -178,7 +179,7 @@ } catch (e) { const rawMsg = e instanceof Error ? e.message : String(e); throw new Error( - t('toolPage.stepError', { n: i + 1, title: stepTool.title, msg: t(rawMsg) }) + t('toolPage.stepError', { n: i + 1, title: toolTitle(stepTool), msg: t(rawMsg) }) ); } if (!runner.isCurrent(token)) return; @@ -255,8 +256,8 @@
-

{tool.title}

-

{tool.description}

+

{toolTitle(tool)}

+

{toolDescription(tool)}

{#if errorText} @@ -307,6 +308,7 @@