chore: fix type check for i18n (#30058)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
This commit is contained in:
Stephen Zhou
2025-12-24 16:31:16 +08:00
committed by GitHub
parent 0f41924db4
commit 1e3823e605
155 changed files with 560 additions and 1015 deletions

View File

@ -72,7 +72,7 @@ const OperationSelector: FC<OperationSelectorProps> = ({
className={`system-sm-regular overflow-hidden truncate text-ellipsis
${selectedItem ? 'text-components-input-text-filled' : 'text-components-input-text-disabled'}`}
>
{selectedItem?.name ? t(`${i18nPrefix}.operations.${selectedItem?.name}`) : t(`${i18nPrefix}.operations.title`)}
{selectedItem?.name ? t(`${i18nPrefix}.operations.${selectedItem?.name}` as any) as string : t(`${i18nPrefix}.operations.title` as any) as string}
</span>
</div>
<RiArrowDownSLine className={`h-4 w-4 text-text-quaternary ${disabled && 'text-components-input-text-placeholder'} ${open && 'text-text-secondary'}`} />
@ -83,7 +83,7 @@ const OperationSelector: FC<OperationSelectorProps> = ({
<div className="flex w-[140px] flex-col items-start rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-bg-blur shadow-lg">
<div className="flex flex-col items-start self-stretch p-1">
<div className="flex items-start self-stretch px-3 pb-0.5 pt-1">
<div className="system-xs-medium-uppercase flex grow text-text-tertiary">{t(`${i18nPrefix}.operations.title`)}</div>
<div className="system-xs-medium-uppercase flex grow text-text-tertiary">{t(`${i18nPrefix}.operations.title` as any) as string}</div>
</div>
{items.map(item => (
item.value === 'divider'
@ -100,7 +100,7 @@ const OperationSelector: FC<OperationSelectorProps> = ({
}}
>
<div className="flex min-h-5 grow items-center gap-1 px-1">
<span className="system-sm-medium flex grow text-text-secondary">{t(`${i18nPrefix}.operations.${item.name}`)}</span>
<span className="system-sm-medium flex grow text-text-secondary">{t(`${i18nPrefix}.operations.${item.name}` as any) as string}</span>
</div>
{item.value === value && (
<div className="flex items-center justify-center">

View File

@ -73,7 +73,7 @@ const NodeComponent: FC<NodeProps<AssignerNodeType>> = ({
nodeType={node?.data.type}
nodeTitle={node?.data.title}
rightSlot={
writeMode && <Badge className="!ml-auto shrink-0" text={t(`${i18nPrefix}.operations.${writeMode}`)} />
writeMode && <Badge className="!ml-auto shrink-0" text={t(`${i18nPrefix}.operations.${writeMode}` as any) as string} />
}
/>
</div>