- Liquid Line
+ 液管
- {follow
- ? 'Click a lineset to lay the line beside it.'
- : 'Trace a line alongside an existing lineset (F).'}
+ {follow ? '单击冷媒管组,在其旁边铺设液管。' : '沿现有冷媒管组绘制液管(F)。'}
) : null}
diff --git a/apps/editor/components/save-button.tsx b/apps/editor/components/save-button.tsx
index de8825535..8d2764243 100644
--- a/apps/editor/components/save-button.tsx
+++ b/apps/editor/components/save-button.tsx
@@ -20,7 +20,7 @@ interface SaveButtonProps {
/**
* Creates a new empty scene and navigates the user to it.
*/
-export function CreateSceneButton({ label = 'Create new scene' }: { label?: string } = {}) {
+export function CreateSceneButton({ label = '新建场景' }: { label?: string } = {}) {
const router = useRouter()
const [isCreating, setIsCreating] = useState(false)
const [error, setError] = useState(null)
@@ -32,16 +32,16 @@ export function CreateSceneButton({ label = 'Create new scene' }: { label?: stri
const response = await fetch(withPascalBasePath('/api/scenes'), {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({ name: 'Untitled scene', graph: EMPTY_GRAPH }),
+ body: JSON.stringify({ name: '未命名场景', graph: EMPTY_GRAPH }),
})
if (!response.ok) {
- setError(`Failed to create scene (${response.status})`)
+ setError(`创建场景失败 (${response.status})`)
return
}
const meta = (await response.json()) as { id: string }
router.push(`/scene/${meta.id}`)
} catch (err) {
- setError(err instanceof Error ? err.message : 'Failed to create scene')
+ setError(err instanceof Error ? err.message : '创建场景失败')
} finally {
setIsCreating(false)
}
@@ -56,7 +56,7 @@ export function CreateSceneButton({ label = 'Create new scene' }: { label?: stri
onClick={handleCreate}
type="button"
>
- {isCreating ? 'Creating…' : label}
+ {isCreating ? '正在创建…' : label}