mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-12-19 19:17:47 +01:00
fix: text to diagram translation update issue on language update (#10016)
This commit is contained in:
@@ -12,19 +12,16 @@ import {
|
|||||||
import {
|
import {
|
||||||
shouldAllowVerticalAlign,
|
shouldAllowVerticalAlign,
|
||||||
suppportsHorizontalAlign,
|
suppportsHorizontalAlign,
|
||||||
} from "@excalidraw/element";
|
|
||||||
|
|
||||||
import {
|
|
||||||
hasBoundTextElement,
|
hasBoundTextElement,
|
||||||
isElbowArrow,
|
isElbowArrow,
|
||||||
isImageElement,
|
isImageElement,
|
||||||
isLinearElement,
|
isLinearElement,
|
||||||
isTextElement,
|
isTextElement,
|
||||||
isArrowElement,
|
isArrowElement,
|
||||||
|
hasStrokeColor,
|
||||||
|
toolIsArrow,
|
||||||
} from "@excalidraw/element";
|
} from "@excalidraw/element";
|
||||||
|
|
||||||
import { hasStrokeColor, toolIsArrow } from "@excalidraw/element";
|
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
ExcalidrawElement,
|
ExcalidrawElement,
|
||||||
ExcalidrawElementType,
|
ExcalidrawElementType,
|
||||||
@@ -902,7 +899,6 @@ export const ShapesSwitcher = ({
|
|||||||
{t("toolBar.mermaidToExcalidraw")}
|
{t("toolBar.mermaidToExcalidraw")}
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
{app.props.aiEnabled !== false && app.plugins.diagramToCode && (
|
{app.props.aiEnabled !== false && app.plugins.diagramToCode && (
|
||||||
<>
|
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
onSelect={() => app.onMagicframeToolSelect()}
|
onSelect={() => app.onMagicframeToolSelect()}
|
||||||
icon={MagicIcon}
|
icon={MagicIcon}
|
||||||
@@ -911,7 +907,6 @@ export const ShapesSwitcher = ({
|
|||||||
{t("toolBar.magicframe")}
|
{t("toolBar.magicframe")}
|
||||||
<DropdownMenu.Item.Badge>AI</DropdownMenu.Item.Badge>
|
<DropdownMenu.Item.Badge>AI</DropdownMenu.Item.Badge>
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
</DropdownMenu.Content>
|
</DropdownMenu.Content>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import { trackEvent } from "../../analytics";
|
import { trackEvent } from "../../analytics";
|
||||||
import { useTunnels } from "../../context/tunnels";
|
import { useTunnels } from "../../context/tunnels";
|
||||||
import { t } from "../../i18n";
|
import { useI18n } from "../../i18n";
|
||||||
import { useExcalidrawSetAppState } from "../App";
|
import { useExcalidrawSetAppState } from "../App";
|
||||||
import DropdownMenu from "../dropdownMenu/DropdownMenu";
|
import DropdownMenu from "../dropdownMenu/DropdownMenu";
|
||||||
import { brainIcon } from "../icons";
|
import { brainIcon } from "../icons";
|
||||||
|
|
||||||
import type { ReactNode } from "react";
|
import type { JSX, ReactNode } from "react";
|
||||||
import type { JSX } from "react";
|
|
||||||
|
|
||||||
export const TTDDialogTrigger = ({
|
export const TTDDialogTrigger = ({
|
||||||
children,
|
children,
|
||||||
@@ -15,6 +14,7 @@ export const TTDDialogTrigger = ({
|
|||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
icon?: JSX.Element;
|
icon?: JSX.Element;
|
||||||
}) => {
|
}) => {
|
||||||
|
const { t } = useI18n();
|
||||||
const { TTDDialogTriggerTunnel } = useTunnels();
|
const { TTDDialogTriggerTunnel } = useTunnels();
|
||||||
const setAppState = useExcalidrawSetAppState();
|
const setAppState = useExcalidrawSetAppState();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user