A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
feat(editor): full zh-CN sweep - every panel, dialog, and toast speaks both languages
yhh44295c3e09d2
diff --git a/desktop/src/App.tsx b/desktop/src/App.tsxindex 072e76b28..1ee9e7970 100644--- a/desktop/src/App.tsx+++ b/desktop/src/App.tsx@@ -33,6 +33,7 @@ import { ProjectStore } from '@/project/ProjectStore';import { EditorHistory } from '@/engine/EditorHistory';import { dockApi } from '@/layout/dockApi';import { Toasts } from '@/store/Toasts';+import { t } from '@/i18n';// The editor shell: fixed menu + toolbar on top, dockable workspace in the// middle, status strip at the bottom.@@ -132,8 +133,8 @@ export function App() {const bridge = window.estella?.app;if (!bridge?.onUpdateAvailable) return;return bridge.onUpdateAvailable((release) => {- Toasts.push(`Estella ${release.version} is available`, 'info', 0, {- label: 'Download',+ Toasts.push(t('toast.updateAvailable', { version: release.version }), 'info', 0, {+ label: t('ui.download'),run: () => window.open(release.url),});});@@ -153,7 +154,7 @@ export function App() {if (isPlaying) {const payload = ProjectStore.playPayload();if (!payload) {- Toasts.push('Open a scene before playing', 'error');+ Toasts.push(t('layout.toast.openSceneFirst'), 'error');useEditorStore.getState().stop();return;}diff --git a/desktop/src/bt/openBehaviorTree.ts b/desktop/src/bt/openBehaviorTree.tsindex 432552b06..08dc6c6fd 100644--- a/desktop/src/bt/openBehaviorTree.ts+++ b/desktop/src/bt/openBehaviorTree.ts@@ -11,15 +11,16 @@ import { ProjectStore } from '@/project/ProjectStore';import { dockApi } from '@/layout/dockApi';import { baseName } from '@/project/assetMeta';import { Toasts } from '@/store/Toasts';+import { t } from '@/i18n';export async function openBehaviorTree(path: string): Promise<void> {try {const text = await window.estella.fs.read(path);// Hand-written trees may lack editor ids; assign before editing.BtDocument.openJson(ensureBtIds(JSON.parse(text) as BtDefinition), path);- dockApi.openDocument('behaviortree', 'behaviortree', 'Behavior Tree');+ dockApi.openDocument('behaviortree', 'behaviortree', t('bt.tabTitle'));} catch (e) {- Toasts.push(`Failed to open behavior tree: ${String(e)}`, 'error');+ Toasts.push(t('bt.toastOpenFailed', { error: String(e) }), 'error');}}@@ -36,10 +37,10 @@ export async function createBehaviorTree(dir: string): Promise<void> {JSON.stringify({ uuid: crypto.randomUUID(), version: '1.0', type: 'behaviortree', importer: { autoMigrate: true } }, null, 2) + '\n',);} catch (e) {- Toasts.push(`Failed to create behavior tree: ${String(e)}`, 'error');+ Toasts.push(t('bt.toastCreateFailed', { error: String(e) }), 'error');return;}await ProjectStore.refreshAssets();- Toasts.push(`Created behavior tree: ${baseName(rel)}`, 'info');+ Toasts.push(t('bt.toastCreated', { name: baseName(rel) }), 'info');await openBehaviorTree(rel);}diff --git a/desktop/src/components/AddComponentMenu.tsx b/desktop/src/components/AddComponentMenu.tsxindex 0887d054c..f85ae8451 100644--- a/desktop/src/components/AddComponentMenu.tsx+++ b/desktop/src/components/AddComponentMenu.tsx@@ -13,6 +13,7 @@ import { ComponentIcon } from '@/components/icons';import { SearchField } from '@/components/SearchField';import { useDialogFocus } from '@/components/dialogFocus';import { CATEGORY_ORDER } from '@/engine/schema';+import { t } from '@/i18n';export interface AddComponentEntry {name: string;@@ -122,13 +123,13 @@ export function AddComponentMenu({return createPortal(<div className="ac-scrim open" onMouseDown={onClose}>- <div ref={shellRef} className="ac" role="dialog" aria-modal="true" aria-label="Add component" tabIndex={-1} onMouseDown={(e) => e.stopPropagation()}>+ <div ref={shellRef} className="ac" role="dialog" aria-modal="true" aria-label={t('det.addComponentAria')} tabIndex={-1} onMouseDown={(e) => e.stopPropagation()}><SearchFieldflushclassName="ac-search"iconSize={15}inputRef={inputRef}- placeholder="Search components…"+ placeholder={t('det.searchComponents')}value={query}onChange={setQuery}onKeyDown={onKeyDown}@@ -139,7 +140,7 @@ export function AddComponentMenu({<div className="ac-body">{flat.length === 0 ? (<div className="empty-line">- {entries.length === 0 ? 'All components added' : 'No matching components'}+ {entries.length === 0 ? t('det.allComponentsAdded') : t('det.noMatchingComponents')}</div>) : (groups.map((g) => (diff --git a/desktop/src/components/BuildDialog.tsx b/desktop/src/components/BuildDialog.tsxindex a863809f6..47638a040 100644--- a/desktop/src/components/BuildDialog.tsx+++ b/desktop/src/components/BuildDialog.tsx@@ -17,6 +17,7 @@ import { Segmented } from '@/components/Segmented';import { Button } from '@/components/Button';import { ProjectStore } from '@/project/ProjectStore';import { useEditorStore } from '@/store/editorStore';+import { t } from '@/i18n';type Phase = 'idle' | 'running' | 'done' | 'error';type Config = 'development' | 'shipping';@@ -53,30 +54,30 @@ interface PlatformDef {const PLATFORMS: PlatformDef[] = [{- id: 'web', label: 'Web', ready: true,- blurb: 'Static, self-contained web build — host it anywhere.',+ id: 'web', label: t('build.plat.web'), ready: true,+ blurb: t('build.blurb.web'),defaultOut: 'dist-web', sourceMaps: true, httpPreview: true,- next: (o) => `Preview over http below, or upload ${o}/ to any static host. (A web build needs an http origin — opening index.html directly won't stream the wasm.)`,+ next: (o) => t('build.next.web', { out: o }),},{- id: 'desktop', label: 'Desktop', ready: true,- blurb: 'Electron app — package to .dmg / .exe / AppImage.',+ id: 'desktop', label: t('build.plat.desktop'), ready: true,+ blurb: t('build.blurb.desktop'),defaultOut: 'dist-desktop', sourceMaps: true,- next: (o) => `cd ${o} && npm install && npm start — or npm run dist for a native installer.`,+ next: (o) => t('build.next.desktop', { out: o }),},{- id: 'wechat', label: 'WeChat', ready: true,- blurb: 'WeChat MiniGame package.',+ id: 'wechat', label: t('build.plat.wechat'), ready: true,+ blurb: t('build.blurb.wechat'),defaultOut: 'dist-wechat', sourceMaps: false,- prereq: 'Requires the WeChat runtime — run: node build-tools/cli.js build -t wechat',- next: (o) => `Open ${o}/ in WeChat DevTools, then set your appid in project.config.json.`,+ prereq: t('build.prereq.wechat'),+ next: (o) => t('build.next.wechat', { out: o }),},{- id: 'playable', label: 'Playable', ready: true,- blurb: 'Single-file HTML playable ad — everything inlined, no requests.',+ id: 'playable', label: t('build.plat.playable'), ready: true,+ blurb: t('build.blurb.playable'),defaultOut: 'dist-playable', sourceMaps: false, httpPreview: true,- prereq: 'Requires the single-file runtime — run: node build-tools/cli.js build -t playable',- next: () => `Preview over http below (its real surface is an ad-network iframe). Note: a full engine usually exceeds ad-network size limits.`,+ prereq: t('build.prereq.playable'),+ next: () => t('build.next.playable'),},];@@ -149,7 +150,7 @@ export function BuildDialog() {atlasTextures,})) as Result | null;if (!res) {- setResult({ ok: false, outDir, included: 0, warnings: [], errors: ['no project open'] });+ setResult({ ok: false, outDir, included: 0, warnings: [], errors: [t('build.noProjectOpen')] });setPhase('error');return;}@@ -185,16 +186,16 @@ export function BuildDialog() {const footer = (<><Button onClick={close} disabled={running}>- {phase === 'done' ? 'Close' : 'Cancel'}+ {phase === 'done' ? t('ui.close') : t('ui.cancel')}</Button><Button variant="primary" onClick={() => void build()} disabled={running || !project}>{running ? (<>- <Loader2 size={14} className="spin" /> Packaging…+ <Loader2 size={14} className="spin" /> {t('build.packaging')}</>) : (<>- <Boxes size={14} /> Package+ <Boxes size={14} /> {t('build.package')}</>)}</Button>@@ -202,9 +203,9 @@ export function BuildDialog() {);return (- <Modal title="Package Project" onClose={running ? () => {} : close} footer={footer} width={500}>+ <Modal title={t('build.title')} onClose={running ? () => {} : close} footer={footer} width={500}><div className="build">- <div className="build__label">Platform</div>+ <div className="build__label">{t('build.platform')}</div><div className="build__platforms">{PLATFORMS.map((p) => (<button@@ -213,31 +214,31 @@ export function BuildDialog() {className={`build__plat${platform === p.id ? ' on' : ''}`}disabled={!p.ready}aria-pressed={platform === p.id}- title={p.ready ? p.label : 'Coming soon'}+ title={p.ready ? p.label : t('build.comingSoon')}onClick={() => pickPlatform(p)}>{p.label}- {!p.ready && <span className="soon">soon</span>}+ {!p.ready && <span className="soon">{t('build.soon')}</span>}</button>))}</div><div className="build__blurb">{def.blurb}</div><div className="build__row">- <span className="build__label">Configuration</span>+ <span className="build__label">{t('build.configuration')}</span><Segmented- ariaLabel="Configuration"+ ariaLabel={t('build.configuration')}value={config}options={[- { value: 'development', label: 'Development' },- { value: 'shipping', label: 'Shipping' },+ { value: 'development', label: t('build.development') },+ { value: 'shipping', label: t('build.shipping') },]}onChange={setConfig}/></div><div className="build__row">- <span className="build__label">Output</span>+ <span className="build__label">{t('build.output')}</span><div className="build__out"><inputvalue={outDir}@@ -245,28 +246,28 @@ export function BuildDialog() {onChange={(e) => setOutDir(e.target.value)}/><Button onClick={() => void browse()}>- <FolderOpen size={13} /> Browse+ <FolderOpen size={13} /> {t('build.browse')}</Button></div></div><label className="build__opt"><input type="checkbox" checked={openFolder} onChange={(e) => setOpenFolder(e.target.checked)} />- Open output folder when done+ {t('build.openFolderWhenDone')}</label>{def.sourceMaps && (<label className="build__opt"><input type="checkbox" checked={sourceMaps} onChange={(e) => setSourceMaps(e.target.checked)} />- Include source maps+ {t('build.includeSourceMaps')}</label>)}<label className="build__opt"><input type="checkbox" checked={compressTextures} onChange={(e) => setCompressTextures(e.target.checked)} />- Compress textures (PNG → KTX2)+ {t('build.compressTextures')}</label><label className="build__opt"><input type="checkbox" checked={atlasTextures} onChange={(e) => setAtlasTextures(e.target.checked)} />- Pack .atlas folders into atlases+ {t('build.atlasTextures')}</label>{def.prereq && (@@ -279,7 +280,7 @@ export function BuildDialog() {(defaultScene + packaging.excludeScenes), edited in place. Thestartup scene is pinned: it boots the game, so it always ships. */}<div className="build__scenes">- <div className="build__scenes-head">Scenes in build</div>+ <div className="build__scenes-head">{t('build.scenesHead')}</div>{sceneList.map((s) => {const isEntry = s.path === project?.defaultScene;const ships = isEntry || !excludedScenes.has(s.path);@@ -288,8 +289,8 @@ export function BuildDialog() {<buttontype="button"className={`build__scene-start${isEntry ? ' is-on' : ''}`}- title={isEntry ? 'Startup scene' : 'Set as startup scene'}- aria-label={isEntry ? 'Startup scene' : `Set ${s.name} as startup scene`}+ title={isEntry ? t('build.startupScene') : t('build.setStartupScene')}+ aria-label={isEntry ? t('build.startupScene') : t('build.setStartupSceneNamed', { name: s.name })}disabled={running || isEntry}onClick={() => void ProjectStore.setDefaultScene(s.path)}>@@ -308,9 +309,9 @@ export function BuildDialog() {</div>);})}- {sceneList.length === 0 && <div className="build__scenes-empty">No scenes found under the project's scenes folder.</div>}+ {sceneList.length === 0 && <div className="build__scenes-empty">{t('build.noScenes')}</div>}{platform === 'playable' && sceneList.length > 1 && (- <div className="build__scenes-note">Playable ships the startup scene only — a size-capped single file.</div>+ <div className="build__scenes-note">{t('build.playableSingleScene')}</div>)}</div>@@ -318,14 +319,14 @@ export function BuildDialog() {<div className={`build__status ${phase}`}>{phase === 'running' && (<span className="build__status-line">- <Loader2 size={14} className="spin" /> Packaging the {def.label} build…+ <Loader2 size={14} className="spin" /> {t('build.packagingPlatform', { platform: def.label })}</span>)}{log.length > 0 && (<div className="build__logwrap"><div className="build__loghead">- <span className="build__loglabel">Output Log</span>- <button type="button" className="build__copy" title="Copy log" aria-label="Copy log" onClick={copyLog}>+ <span className="build__loglabel">{t('build.outputLog')}</span>+ <button type="button" className="build__copy" title={t('build.copyLog')} aria-label={t('build.copyLog')} onClick={copyLog}><Copy size={13} /></button></div>@@ -337,18 +338,18 @@ export function BuildDialog() {{phase === 'done' && result && (<><span className="build__status-line selectable">- <CheckCircle2 size={14} /> Packaged {result.included} assets{result.bytes ? ` · ${mb(result.bytes)}` : ''} → {result.outDir}+ <CheckCircle2 size={14} /> {t('build.packagedSummary', { count: result.included, size: result.bytes ? ` · ${mb(result.bytes)}` : '', out: result.outDir })}</span><div className="build__next selectable">{def.next(result.outDir)}</div>{result.ok && (<div className="build__actions">{def.httpPreview && (<Button variant="primary" onClick={() => void preview()}>- <ExternalLink size={13} /> Preview over http+ <ExternalLink size={13} /> {t('build.previewHttp')}</Button>)}<Button onClick={() => void window.estella.shell?.openPath?.(result.outDir)}>- <FolderOpen size={13} /> Open folder+ <FolderOpen size={13} /> {t('build.openFolder')}</Button></div>)}@@ -356,11 +357,11 @@ export function BuildDialog() {)}{phase === 'error' && result && (<span className="build__status-line selectable">- <AlertCircle size={14} /> {result.errors[0] ?? 'Package failed'}+ <AlertCircle size={14} /> {result.errors[0] ?? t('build.packageFailed')}</span>)}{result && result.warnings.length > 0 && (- <div className="build__warn selectable">{result.warnings.length} warning(s): {result.warnings[0]}</div>+ <div className="build__warn selectable">{t('build.warnings', { count: result.warnings.length, first: result.warnings[0] })}</div>)}</div>)}diff --git a/desktop/src/components/ConfirmDialog.tsx b/desktop/src/components/ConfirmDialog.tsxindex da766399b..f5509cebb 100644--- a/desktop/src/components/ConfirmDialog.tsx+++ b/desktop/src/components/ConfirmDialog.tsx@@ -7,13 +7,14 @@* via Modal. `danger` puts the error fill on the confirm action.*/import { useEffect, useRef, type ReactNode } from 'react';+import { t } from '@/i18n';import { Modal } from './Modal';import { Button } from './Button';export function ConfirmDialog({title,body,- confirmLabel = 'OK',+ confirmLabel = t('ui.ok'),danger,onConfirm,onCancel,@@ -37,7 +38,7 @@ export function ConfirmDialog({width={420}footer={<>- <Button onClick={onCancel}>Cancel</Button>+ <Button onClick={onCancel}>{t('ui.cancel')}</Button><Button ref={btn} variant={danger ? 'danger' : 'primary'} onClick={onConfirm}>{confirmLabel}</Button>diff --git a/desktop/src/components/ConfirmHost.tsx b/desktop/src/components/ConfirmHost.tsxindex 2a367e19e..44a10e5ae 100644--- a/desktop/src/components/ConfirmHost.tsx+++ b/desktop/src/components/ConfirmHost.tsx@@ -6,6 +6,7 @@* queued requests show one at a time in arrival order.*/import { useSyncExternalStore } from 'react';+import { t } from '@/i18n';import { ConfirmService } from './confirm';import { ConfirmDialog } from './ConfirmDialog';@@ -18,7 +19,7 @@ export function ConfirmHost() {key={cur.id}title={cur.title}body={cur.body}- confirmLabel={cur.confirmLabel ?? 'OK'}+ confirmLabel={cur.confirmLabel ?? t('ui.ok')}danger={cur.danger}onConfirm={() => ConfirmService.settle(cur.id, true)}onCancel={() => ConfirmService.settle(cur.id, false)}diff --git a/desktop/src/components/CreatePopover.tsx b/desktop/src/components/CreatePopover.tsxindex 78811fb52..498db997c 100644--- a/desktop/src/components/CreatePopover.tsx+++ b/desktop/src/components/CreatePopover.tsx@@ -16,6 +16,7 @@ import { ENTITY_SOURCES, userComponentSources, matchSources, CREATE_CATEGORY_ORDimport { ProjectStore } from '@/project/ProjectStore';import { SearchField } from '@/components/SearchField';import { useDialogFocus } from '@/components/dialogFocus';+import { t } from '@/i18n';/** Group sources by category, ordered by CREATE_CATEGORY_ORDER — sources arrive in* mixed category order now that anchors are auto-generated and dynamic sources@@ -87,13 +88,13 @@ export function CreatePopover({return createPortal(<div className="ac-scrim open" onMouseDown={onClose}>- <div ref={shellRef} className="ac" role="dialog" aria-modal="true" aria-label="Create entity" tabIndex={-1} onMouseDown={(e) => e.stopPropagation()}>+ <div ref={shellRef} className="ac" role="dialog" aria-modal="true" aria-label={t('cb.createEntity')} tabIndex={-1} onMouseDown={(e) => e.stopPropagation()}><SearchFieldflushclassName="ac-search"iconSize={15}inputRef={inputRef}- placeholder="Create entity…"+ placeholder={t('cb.createEntityPlaceholder')}value={query}onChange={setQuery}onKeyDown={onKeyDown}@@ -103,7 +104,7 @@ export function CreatePopover({<div className="ac-body">{results.length === 0 ? (- <div className="empty-line">No matching templates</div>+ <div className="empty-line">{t('cb.noMatchingTemplates')}</div>) : (groups.map((g) => (<div key={g.category}>diff --git a/desktop/src/components/DirtyDot.tsx b/desktop/src/components/DirtyDot.tsxindex b25a86b2e..ba8cd6f70 100644--- a/desktop/src/components/DirtyDot.tsx+++ b/desktop/src/components/DirtyDot.tsx@@ -6,7 +6,9 @@* selection orange), everywhere a document can be dirty: the menubar* scene title, asset-editor toolbars, and dock tabs.*/-export function DirtyDot({ title = 'Unsaved changes' }: { title?: string }) {+import { t } from '@/i18n';++export function DirtyDot({ title = t('discard.title') }: { title?: string }) {return (<span className="dirty-dot" title={title}>●diff --git a/desktop/src/components/ErrorBoundary.tsx b/desktop/src/components/ErrorBoundary.tsxindex 6ad633607..68d7e8b0b 100644--- a/desktop/src/components/ErrorBoundary.tsx+++ b/desktop/src/components/ErrorBoundary.tsx@@ -7,6 +7,7 @@* offending code restores the panel without a full page reload.*/import { Component, type ErrorInfo, type ReactNode, type CSSProperties } from 'react';+import { t } from '@/i18n';interface Props {/** Human label for the crashed region, shown in the fallback. */@@ -53,10 +54,12 @@ export class ErrorBoundary extends Component<Props, State> {if (!error) return this.props.children;return (<div style={S.root} role="alert">- <div style={S.title}>⚠ {this.props.label ?? 'This panel'} hit an error</div>+ <div style={S.title}>+ ⚠ {this.props.label != null ? t('ui.crashTitle', { label: this.props.label }) : t('ui.crashTitleGeneric')}+ </div><div style={S.msg}>{error.message}</div><button type="button" style={S.btn} onClick={this.reset}>- Reload panel+ {t('ui.reloadPanel')}</button></div>);diff --git a/desktop/src/components/Modal.tsx b/desktop/src/components/Modal.tsxindex 50a85a1c8..95e63d1e7 100644--- a/desktop/src/components/Modal.tsx+++ b/desktop/src/components/Modal.tsx@@ -8,6 +8,7 @@import { useEffect, useRef, type ReactNode } from 'react';import { createPortal } from 'react-dom';import { X } from 'lucide-react';+import { t } from '@/i18n';import { IconButton } from './IconButton';import { useDialogFocus } from './dialogFocus';@@ -49,7 +50,7 @@ export function Modal({><div className="modal__head"><span className="modal__title">{title}</span>- <IconButton size="lg" title="Close" onClick={onClose}>+ <IconButton size="lg" title={t('ui.close')} onClick={onClose}><X size={15} strokeWidth={2} /></IconButton></div>diff --git a/desktop/src/components/NodeGraphCanvas.tsx b/desktop/src/components/NodeGraphCanvas.tsxindex 726af21b7..cf59949d8 100644--- a/desktop/src/components/NodeGraphCanvas.tsx+++ b/desktop/src/components/NodeGraphCanvas.tsx@@ -16,6 +16,7 @@*/import { useEffect, useImperativeHandle, useRef, useState, type ReactNode, type Ref, type MouseEvent as ReactMouseEvent } from 'react';import { ContextMenu, type MenuItem } from '@/components/Menu';+import { t } from '@/i18n';export type { MenuItem };@@ -416,7 +417,7 @@ export function NodeGraphCanvas<N extends CanvasNode, E extends CanvasEdge>(propclassName={`ng-in-anchor${onInputPortDown ? ' clickable' : ''}`}style={{ top: port.y - 5, background: port.color }}aria-hidden={onInputPortDown ? undefined : true}- title={port.title ?? 'Edges land here'}+ title={port.title ?? t('ng.inPortTip')}onPointerDown={onInputPortDown ? (e) => { e.stopPropagation(); onInputPortDown(n.id, port.id); } : undefined}/>))}@@ -426,7 +427,7 @@ export function NodeGraphCanvas<N extends CanvasNode, E extends CanvasEdge>(propkey={`out:${port.id}`}className="ng-handle"style={{ top: port.y - 7, background: port.color }}- title={port.title ?? 'Drag to another node to connect'}+ title={port.title ?? t('ng.outPortTip')}onPointerDown={e => { e.stopPropagation(); wire.current = { from: n.id, port }; setWiring(true); setCursor(toCanvas(e.clientX, e.clientY)); }}/>))}diff --git a/desktop/src/components/PerfOverlay.tsx b/desktop/src/components/PerfOverlay.tsxindex 9ebb3d4a2..3fa187ee5 100644--- a/desktop/src/components/PerfOverlay.tsx+++ b/desktop/src/components/PerfOverlay.tsx@@ -5,6 +5,7 @@* lives in the dockable Profiler panel. Leaf subscriber (no viewport re-render).*/import { useSyncExternalStore } from 'react';+import { t } from '@/i18n';import { PerfMonitor } from '@/engine/PerfMonitor';const mute = 'var(--text-mute)';@@ -42,8 +43,8 @@ export function PerfOverlay() {</div>{s.longFrames > 0 || s.longTaskMs > 0 ? (<div>- <span style={{ color: mute }}>long frames</span> <b>{s.longFrames}</b>- {s.longTaskMs > 0 ? <span style={{ color: warn }}>{' · task '}{s.longTaskMs}ms</span> : null}+ <span style={{ color: mute }}>{t('vp.perfLongFrames')}</span> <b>{s.longFrames}</b>+ {s.longTaskMs > 0 ? <span style={{ color: warn }}>{' · '}{t('vp.perfTask')}{' '}{s.longTaskMs}ms</span> : null}</div>) : null}</div>diff --git a/desktop/src/components/TilemapPickerDialog.tsx b/desktop/src/components/TilemapPickerDialog.tsxindex 8fe92626b..ff41d7d77 100644--- a/desktop/src/components/TilemapPickerDialog.tsx+++ b/desktop/src/components/TilemapPickerDialog.tsx@@ -15,6 +15,7 @@ import { SearchField } from '@/components/SearchField';import { ProjectStore } from '@/project/ProjectStore';import { useEditorStore } from '@/store/editorStore';import { createTilemapFromTileset } from '@/tilemap/createTilemap';+import { t } from '@/i18n';export function TilemapPickerDialog() {const close = () => useEditorStore.getState().setTilemapPickerOpen(false);@@ -30,12 +31,12 @@ export function TilemapPickerDialog() {};return (- <Modal title="New Tilemap" onClose={close} width={440}>+ <Modal title={t('cmd.tilemap.new')} onClose={close} width={440}><div className="tmpick">- <p className="tmpick__hint">Pick a tileset to use as the map's palette</p>- <SearchField className="tmpick__search" autoFocus placeholder="Search tilesets…" value={q} onChange={setQ} />+ <p className="tmpick__hint">{t('tile.pick.hint')}</p>+ <SearchField className="tmpick__search" autoFocus placeholder={t('tile.pick.search')} value={q} onChange={setQ} />{shown.length === 0 ? (- <div className="empty-line">No matching tilesets</div>+ <div className="empty-line">{t('tile.pick.noMatch')}</div>) : (<div className="tmpick__list">{shown.map((t) => (diff --git a/desktop/src/components/Toaster.tsx b/desktop/src/components/Toaster.tsxindex afbd45b1a..c8d443ef1 100644--- a/desktop/src/components/Toaster.tsx+++ b/desktop/src/components/Toaster.tsx@@ -2,6 +2,7 @@// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Teamimport { useSyncExternalStore } from 'react';import { X } from 'lucide-react';+import { t } from '@/i18n';import { Toasts } from '@/store/Toasts';// Transient action feedback, stacked bottom-right over the editor shell.@@ -10,26 +11,26 @@ export function Toaster() {if (toasts.length === 0) return null;return (<div className="toaster">- {toasts.map((t) => (- <div key={t.id} className={`toast toast--${t.kind}`} role="status">- <span className="toast__msg">{t.message}</span>- {t.action && (+ {toasts.map((toast) => (+ <div key={toast.id} className={`toast toast--${toast.kind}`} role="status">+ <span className="toast__msg">{toast.message}</span>+ {toast.action && (<buttontype="button"className="toast__action"onClick={() => {- t.action?.run();- Toasts.dismiss(t.id);+ toast.action?.run();+ Toasts.dismiss(toast.id);}}>- {t.action.label}+ {toast.action.label}</button>)}<buttontype="button"className="toast__close"- aria-label="Dismiss"- onClick={() => Toasts.dismiss(t.id)}+ aria-label={t('ui.dismiss')}+ onClick={() => Toasts.dismiss(toast.id)}><X size={12} strokeWidth={2.2} /></button>diff --git a/desktop/src/engine/PlayRealm.ts b/desktop/src/engine/PlayRealm.tsindex b99d5b0d6..a53323d32 100644--- a/desktop/src/engine/PlayRealm.ts+++ b/desktop/src/engine/PlayRealm.ts@@ -20,6 +20,7 @@import { createStore } from 'zustand/vanilla';import type { SubsystemStatus } from 'esengine';import { LogStore } from '@/store/LogStore';+import { t } from '@/i18n';import { playProtocolMismatch } from './playProtocol';import type { PlayOutbound, PlayInbound, PlayPayload, PlaySnapshot, PlayStatsReply } from './playProtocol';@@ -94,7 +95,7 @@ export class PlayRealmInstance {try {const realm = await window.estella.project.preparePlayRealm();if (!realm.ok) {- this.set({ error: realm.errors[0] ?? 'failed to prepare play realm' });+ this.set({ error: realm.errors[0] ?? t('proj.playPrepareFailed') });return;}frame.src = `estella://project/${realm.hostPath}?n=${++this.epoch}`;@@ -227,7 +228,7 @@ export class PlayRealmInstance {if (this.id === 0) this.focusGame();break;case 'estella:play:error':- this.set({ error: data.message ?? 'play realm error' });+ this.set({ error: data.message ?? t('proj.playRealmError') });break;case 'estella:play:reply': {const resolve = data.reqId != null ? this.pending.get(data.reqId) : undefined;diff --git a/desktop/src/fsm/openStateMachine.ts b/desktop/src/fsm/openStateMachine.tsindex 3bd937b8c..48e000ff4 100644--- a/desktop/src/fsm/openStateMachine.ts+++ b/desktop/src/fsm/openStateMachine.ts@@ -13,15 +13,16 @@ import { ProjectStore } from '@/project/ProjectStore';import { dockApi } from '@/layout/dockApi';import { baseName } from '@/project/assetMeta';import { Toasts } from '@/store/Toasts';+import { t } from '@/i18n';/** Open an existing `.esfsm` into the state-machine editor and reveal the panel. */export async function openStateMachine(path: string): Promise<void> {try {const text = await window.estella.fs.read(path);FsmGraphDocument.openJson(JSON.parse(text), path);- dockApi.openDocument('statemachine', 'statemachine', 'State Machine');+ dockApi.openDocument('statemachine', 'statemachine', t('fsm.tabTitle'));} catch (e) {- Toasts.push(`Failed to open state machine: ${String(e)}`, 'error');+ Toasts.push(t('fsm.toastOpenFailed', { error: String(e) }), 'error');}}@@ -39,10 +40,10 @@ export async function createStateMachine(dir: string): Promise<void> {JSON.stringify({ uuid: crypto.randomUUID(), version: '1.0', type: 'statemachine', importer: { autoMigrate: true } }, null, 2) + '\n',);} catch (e) {- Toasts.push(`Failed to create state machine: ${String(e)}`, 'error');+ Toasts.push(t('fsm.toastCreateFailed', { error: String(e) }), 'error');return;}await ProjectStore.refreshAssets();- Toasts.push(`Created state machine: ${baseName(rel)}`, 'info');+ Toasts.push(t('fsm.toastCreated', { name: baseName(rel) }), 'info');await openStateMachine(rel);}diff --git a/desktop/src/i18n/messages/common.ts b/desktop/src/i18n/messages/common.tsindex 4f01b97b8..7d2f67ea9 100644--- a/desktop/src/i18n/messages/common.ts+++ b/desktop/src/i18n/messages/common.ts@@ -18,6 +18,12 @@ export const commonMessages = defineMessages({'ui.untitled': { en: 'untitled', zh: '未命名' },'ui.download': { en: 'Download', zh: '下载' },'ui.reloadNow': { en: 'Reload now', zh: '立即重新加载' },+ 'ui.dismiss': { en: 'Dismiss', zh: '关闭' },++ // — Panel crash fallback (components/ErrorBoundary.tsx) —+ 'ui.crashTitle': { en: '{label} hit an error', zh: '{label} 出错了' },+ 'ui.crashTitleGeneric': { en: 'This panel hit an error', zh: '此面板出错了' },+ 'ui.reloadPanel': { en: 'Reload panel', zh: '重新加载面板' },// — The unsaved-changes gate (project/discardGuard.ts) —// `discard.body` wraps a consequence sentence; the `discard.*` fragmentsdiff --git a/desktop/src/i18n/messages/content.ts b/desktop/src/i18n/messages/content.tsnew file mode 100644index 000000000..33218f0cc--- /dev/null+++ b/desktop/src/i18n/messages/content.ts@@ -0,0 +1,122 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file content.ts — the Content Browser: asset grid, folder ops, create menu, import feedback.+ */+import { defineMessages } from './types';++export const contentMessages = defineMessages({+ // — Panel chrome: headers, nav, search, view controls —+ 'cb.sources': { en: 'Sources', zh: '源' },+ 'cb.folders': { en: 'Folders', zh: '文件夹' },+ 'cb.project': { en: 'Project', zh: '项目' },+ 'cb.back': { en: 'Back', zh: '后退' },+ 'cb.forward': { en: 'Forward', zh: '前进' },+ 'cb.upOneLevel': { en: 'Up one level', zh: '上一级' },+ 'cb.searchPlaceholder': { en: 'Search (type:texture …)', zh: '搜索(type:texture …)' },+ 'cb.sortTitle': { en: 'Sort by {current} — click to sort by {next}', zh: '按{current}排序,点击改为按{next}排序' },+ 'cb.sortName': { en: 'name', zh: '名称' },+ 'cb.sortType': { en: 'type', zh: '类型' },+ 'cb.view': { en: 'View', zh: '视图' },+ 'cb.gridView': { en: 'Grid view', zh: '网格视图' },+ 'cb.listView': { en: 'List view', zh: '列表视图' },+ 'cb.importAssets': { en: 'Import assets', zh: '导入资产' },+ 'cb.import': { en: 'Import', zh: '导入' },+ 'cb.thumbSize': { en: 'Thumbnail size', zh: '缩略图大小' },++ // — Type filter chips —+ 'cb.chipAll': { en: 'All', zh: '全部' },+ 'cb.chipImage': { en: 'Image', zh: '图像' },+ 'cb.chipPrefab': { en: 'Prefab', zh: '预制体' },+ 'cb.chipScene': { en: 'Scene', zh: '场景' },+ 'cb.chipAnimation': { en: 'Animation', zh: '动画' },+ 'cb.chipScript': { en: 'Script', zh: '脚本' },+ 'cb.chipAudio': { en: 'Audio', zh: '音频' },+ 'cb.chipMaterial': { en: 'Material', zh: '材质' },++ // — Grid / list body —+ 'cb.name': { en: 'Name', zh: '名称' },+ 'cb.type': { en: 'Type', zh: '类型' },+ 'cb.noMatch': { en: 'No assets match.', zh: '没有匹配的资产。' },+ 'cb.emptyFolder': {+ en: 'Empty folder — drag files here or use Import.',+ zh: '空文件夹——将文件拖到此处,或使用导入。',+ },+ 'cb.openProjectPrompt': { en: 'Open a project to browse its assets.', zh: '打开一个项目以浏览其资产。' },+ 'cb.startupScene': { en: 'Startup scene', zh: '启动场景' },+ 'cb.excludedFromExport': { en: 'Excluded from export', zh: '已从导出中排除' },+ 'cb.footItems': { en: '{count} items', zh: '{count} 项' },+ 'cb.footItemsSelected': { en: '{count} items · 1 selected', zh: '{count} 项 · 已选中 1 个' },++ // — Hover-card rows (labels; `cb.type` above is reused as a row label) —+ 'cb.tipFolder': { en: 'Folder', zh: '文件夹' },+ 'cb.tipDimensions': { en: 'Dimensions', zh: '尺寸' },+ 'cb.tipSize': { en: 'Size', zh: '大小' },+ 'cb.tipModified': { en: 'Modified', zh: '修改时间' },+ 'cb.tipPath': { en: 'Path', zh: '路径' },+ 'cb.tipReference': { en: 'Reference', zh: '引用' },++ // — Context menus (empty space + per-asset) —+ 'cb.menuImport': { en: 'Import…', zh: '导入…' },+ 'cb.menuNewFolder': { en: 'New Folder', zh: '新建文件夹' },+ 'cb.menuNewScene': { en: 'New Scene', zh: '新建场景' },+ 'cb.menuNewAnimation': { en: 'New Animation', zh: '新建动画' },+ 'cb.menuNewInputMap': { en: 'New Input Map', zh: '新建输入映射' },+ 'cb.menuNewMaterial': { en: 'New Material', zh: '新建材质' },+ 'cb.menuNewMaterialGraph': { en: 'New Material Graph', zh: '新建材质图' },+ 'cb.menuNewStateMachine': { en: 'New State Machine', zh: '新建状态机' },+ 'cb.menuNewBehaviorTree': { en: 'New Behavior Tree', zh: '新建行为树' },+ 'cb.menuShowInExplorer': { en: 'Show in Explorer', zh: '在资源管理器中显示' },+ 'cb.menuOpen': { en: 'Open', zh: '打开' },+ 'cb.menuSetStartupScene': { en: 'Set as Startup Scene', zh: '设为启动场景' },+ 'cb.menuIncludeInExport': { en: 'Include in Export', zh: '包含在导出中' },+ 'cb.menuExcludeFromExport': { en: 'Exclude from Export', zh: '从导出中排除' },+ 'cb.menuCreateTileset': { en: 'Create Tileset', zh: '创建瓦片集' },+ 'cb.menuCreateTilemap': { en: 'Create Tilemap', zh: '创建瓦片地图' },+ 'cb.menuCreateMaterialInstance': { en: 'Create Material Instance', zh: '创建材质实例' },+ 'cb.menuDuplicate': { en: 'Duplicate', zh: '创建副本' },+ 'cb.menuCopyPath': { en: 'Copy Path', zh: '复制路径' },+ 'cb.menuCopyReference': { en: 'Copy Reference', zh: '复制引用' },++ // — File ops: undo toasts, failures, delete confirm —+ 'cb.undo': { en: 'Undo', zh: '撤销' },+ 'cb.undoFailed': { en: 'Undo failed: {error}', zh: '撤销失败:{error}' },+ 'cb.nameNoSlashes': { en: 'Name can’t contain slashes', zh: '名称不能包含斜杠' },+ 'cb.renamedTo': { en: 'Renamed to “{name}”', zh: '已重命名为“{name}”' },+ 'cb.renameFailed': { en: 'Rename failed: {error}', zh: '重命名失败:{error}' },+ 'cb.duplicatedAs': { en: 'Duplicated as “{name}”', zh: '已创建副本“{name}”' },+ 'cb.duplicateFailed': { en: 'Duplicate failed: {error}', zh: '创建副本失败:{error}' },+ 'cb.deleteFailed': { en: 'Delete failed: {error}', zh: '删除失败:{error}' },+ 'cb.deleteTitle': { en: 'Delete asset', zh: '删除资产' },+ 'cb.deleteBody': {+ en: 'Delete “{name}”? It will be moved to the trash.',+ zh: '确定删除“{name}”?它将被移入回收站。',+ },+ 'cb.deleteRefWarnOne': {+ en: 'It is referenced by {count} asset ({names}); those references will break.',+ zh: '它被 {count} 个资产引用({names});这些引用将会失效。',+ },+ 'cb.deleteRefWarnMany': {+ en: 'It is referenced by {count} assets ({names}); those references will break.',+ zh: '它被 {count} 个资产引用({names});这些引用将会失效。',+ },+ 'cb.movedTo': { en: 'Moved “{name}” to {dest}', zh: '已将“{name}”移动到 {dest}' },+ 'cb.projectRoot': { en: 'the project root', zh: '项目根目录' },+ 'cb.moveFailed': { en: 'Move failed: {error}', zh: '移动失败:{error}' },+ 'cb.newFolderFailed': { en: 'New folder failed: {error}', zh: '新建文件夹失败:{error}' },+ 'cb.newSceneFailed': { en: 'New scene failed: {error}', zh: '新建场景失败:{error}' },+ 'cb.newInputMapFailed': { en: 'New input map failed: {error}', zh: '新建输入映射失败:{error}' },+ 'cb.revealFailed': { en: 'Couldn’t reveal: {error}', zh: '无法在资源管理器中显示:{error}' },+ 'cb.copiedPath': { en: 'Copied path', zh: '已复制路径' },+ 'cb.copiedReference': { en: 'Copied reference', zh: '已复制引用' },+ 'cb.importedOne': { en: 'Imported {count} asset', zh: '已导入 {count} 个资产' },+ 'cb.importedMany': { en: 'Imported {count} assets', zh: '已导入 {count} 个资产' },+ 'cb.skippedOne': { en: 'Skipped {count} unsupported file', zh: '已跳过 {count} 个不支持的文件' },+ 'cb.skippedMany': { en: 'Skipped {count} unsupported files', zh: '已跳过 {count} 个不支持的文件' },+ 'cb.importFailed': { en: 'Import failed: {error}', zh: '导入失败:{error}' },++ // — Create-entity picker (CreatePopover) —+ 'cb.createEntity': { en: 'Create entity', zh: '创建实体' },+ 'cb.createEntityPlaceholder': { en: 'Create entity…', zh: '创建实体…' },+ 'cb.noMatchingTemplates': { en: 'No matching templates', zh: '没有匹配的模板' },+});diff --git a/desktop/src/i18n/messages/details.ts b/desktop/src/i18n/messages/details.tsnew file mode 100644index 000000000..2d2e8b0e3--- /dev/null+++ b/desktop/src/i18n/messages/details.ts@@ -0,0 +1,203 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file details.ts — the Details (inspector) panel: entity header, component blocks,+ * field controls, asset meta page, add-component menu.+ */+import { defineMessages } from './types';++export const detailsMessages = defineMessages({+ // — Shared field controls (enum/flags dropdowns, asset refs, gradients/curves) —+ 'det.noMatch': { en: 'No match', zh: '无匹配项' },+ 'det.none': { en: 'None', zh: '无' },+ 'det.noneOption': { en: '(none)', zh: '(无)' },+ 'det.everything': { en: 'Everything', zh: '全部' },+ 'det.nothing': { en: 'Nothing', zh: '清空' },+ 'det.unitAria': { en: 'unit', zh: '单位' },+ 'det.removeStop': { en: 'Remove stop', zh: '移除色标' },+ 'det.removeKey': { en: 'Remove key', zh: '移除关键点' },+ 'det.wrongAssetType': { en: 'This field only accepts {type} assets', zh: '此字段只接受 {type} 资产' },+ 'det.locateInBrowser': { en: 'Locate {path} in the Content Browser', zh: '在内容浏览器中定位 {path}' },+ 'det.pickAsset': { en: 'Pick asset', zh: '选择资产' },+ 'det.clear': { en: 'Clear', zh: '清除' },+ 'det.searchAssets': { en: 'Search assets', zh: '搜索资产' },+ 'det.noMatchingAssets': { en: 'No matching assets', zh: '没有匹配的资产' },+ 'det.copy': { en: 'Copy', zh: '复制' },+ 'det.paste': { en: 'Paste', zh: '粘贴' },+ 'det.resetToDefault': { en: 'Reset to default', zh: '重置为默认值' },++ // — One-click fix-up actions (Text layout box, UINode under Canvas) —+ 'det.addLayoutBox': { en: 'Add layout box', zh: '添加布局盒' },+ 'det.addLayoutBoxTip': {+ en: 'Add a UINode and place this Text under a Canvas so align / vertical align resolve within a fixed box.',+ zh: '添加一个 UINode 并将此 Text 置于 Canvas 之下,使对齐 / 垂直对齐在固定的盒子内生效。',+ },+ 'det.placeUnderCanvas': { en: 'Place under a Canvas', zh: '放置到 Canvas 下' },+ 'det.placeUnderCanvasTip': {+ en: "This UI element isn't under a Canvas, so it can't lay out or be moved. Adds/attaches a Canvas and places it inside.",+ zh: '此 UI 元素不在 Canvas 之下,无法布局或移动。将添加/使用一个 Canvas 并把它放入其中。',+ },++ // — UINode layout block (position mode, anchors, align-self) —+ 'det.position': { en: 'Position', zh: '位置' },+ 'det.positionModeAria': { en: 'Position mode', zh: '定位模式' },+ 'det.inLayout': { en: 'In Layout', zh: '布局内' },+ 'det.absolute': { en: 'Absolute', zh: '绝对定位' },+ 'det.anchor': { en: 'Anchor', zh: '锚点' },+ 'det.anchorCustom': { en: 'Custom', zh: '自定义' },+ 'det.horizontal': { en: 'Horizontal', zh: '水平' },+ 'det.vertical': { en: 'Vertical', zh: '垂直' },+ 'det.horizontalAnchorAria': { en: 'Horizontal anchor', zh: '水平锚点' },+ 'det.verticalAnchorAria': { en: 'Vertical anchor', zh: '垂直锚点' },+ 'det.anchorLeft': { en: 'Left', zh: '左' },+ 'det.anchorCenter': { en: 'Center', zh: '中' },+ 'det.anchorRight': { en: 'Right', zh: '右' },+ 'det.anchorTop': { en: 'Top', zh: '上' },+ 'det.anchorMiddle': { en: 'Middle', zh: '中' },+ 'det.anchorBottom': { en: 'Bottom', zh: '下' },+ 'det.anchorStretch': { en: 'Stretch', zh: '拉伸' },+ 'det.anchorStretchH': { en: 'Stretch H', zh: '水平拉伸' },+ 'det.anchorStretchV': { en: 'Stretch V', zh: '垂直拉伸' },+ 'det.alignSelf': { en: 'Align Self', zh: '自身对齐' },+ 'det.alignSelfAria': { en: 'Align self', zh: '自身对齐' },+ 'det.alignAuto': { en: 'Auto', zh: '自动' },+ 'det.alignStart': { en: 'Start', zh: '起点' },+ 'det.alignCenter': { en: 'Center', zh: '居中' },+ 'det.alignEnd': { en: 'End', zh: '终点' },+ 'det.alignStretch': { en: 'Stretch', zh: '拉伸' },+ 'det.flowHint': {+ en: 'Placed by the parent’s layout · Align Self overrides the cross-axis.',+ zh: '由父级布局决定位置 · 自身对齐覆盖交叉轴。',+ },++ // — Component section chrome —+ 'det.enableComponent': { en: 'Enable component', zh: '启用组件' },+ 'det.disableComponent': { en: 'Disable component', zh: '禁用组件' },+ 'det.componentOptions': { en: 'Component options', zh: '组件选项' },+ 'det.advanced': { en: 'Advanced', zh: '高级' },++ // — Entity kind pill (mirrors the Outliner's kind labels) —+ 'det.kindCamera': { en: 'Camera', zh: '相机' },+ 'det.kindSprite': { en: 'Sprite', zh: '精灵' },+ 'det.kindSpine': { en: 'Spine', zh: 'Spine' },+ 'det.kindPhysics': { en: 'Physics', zh: '物理' },+ 'det.kindUi': { en: 'UI', zh: 'UI' },+ 'det.kindAudio': { en: 'Audio', zh: '音频' },+ 'det.kindGroup': { en: 'Group', zh: '分组' },+ 'det.kindLight': { en: 'Light', zh: '灯光' },+ 'det.kindEntity': { en: 'Entity', zh: '实体' },++ // — Live "Game" inspector (PIE) —+ 'det.playingLive': { en: '● Playing — live values (revert on Stop)', zh: '● 运行中 — 实时值(停止时还原)' },+ 'det.gameSelectHint': {+ en: 'Select a running entity in the Outliner to inspect + tweak it live.',+ zh: '在大纲中选择一个运行中的实体,即可实时检视和调整。',+ },++ // — Material asset inspector —+ 'det.loadingMaterial': { en: 'Loading material…', zh: '正在加载材质…' },+ 'det.save': { en: 'Save', zh: '保存' },+ 'det.saveMaterialTip': { en: 'Save material', zh: '保存材质' },+ 'det.materialSaved': { en: 'Material saved', zh: '材质已保存' },+ 'det.materialSaveFailed': { en: 'Failed to save material: {error}', zh: '保存材质失败:{error}' },+ 'det.material': { en: 'Material', zh: '材质' },+ 'det.instance': { en: 'Instance', zh: '实例' },+ 'det.unsaved': { en: 'Unsaved', zh: '未保存' },+ 'det.livePreview': { en: 'Edits preview live in the viewport.', zh: '编辑会在视口中实时预览。' },+ 'det.notInScene': { en: 'Not in the current scene — edits apply on Save.', zh: '不在当前场景中——编辑将在保存时生效。' },+ 'det.noShaderParams': { en: "This material's shader declares no parameters.", zh: '此材质的着色器未声明任何参数。' },++ // — Input-map asset editor —+ 'det.loading': { en: 'Loading…', zh: '加载中…' },+ 'det.inputActions': { en: 'Input Actions', zh: '输入动作' },+ 'det.addAction': { en: '+ Action', zh: '+ 动作' },+ 'det.noActions': {+ en: 'No actions yet — add one to bind keys / buttons / axes.',+ zh: '还没有动作——添加一个来绑定按键 / 按钮 / 轴。',+ },+ 'det.actionTypeAria': { en: 'Action type', zh: '动作类型' },+ 'det.actButton': { en: 'Button', zh: '按钮' },+ 'det.actAxis': { en: 'Axis', zh: '轴' },+ 'det.actAxis2d': { en: 'Axis 2D', zh: '2D 轴' },+ 'det.removeAction': { en: 'Remove action', zh: '移除动作' },+ 'det.addBinding': { en: '+ Binding', zh: '+ 绑定' },+ 'det.removeBinding': { en: 'Remove binding', zh: '移除绑定' },+ 'det.bindingKindAria': { en: 'Binding kind', zh: '绑定类型' },+ 'det.bindKey': { en: 'Key', zh: '按键' },+ 'det.bindKeys1d': { en: 'Keys · 1D axis', zh: '按键 · 1D 轴' },+ 'det.bindKeys2d': { en: 'Keys · 2D axis', zh: '按键 · 2D 轴' },+ 'det.bindMouse': { en: 'Mouse button', zh: '鼠标按键' },+ 'det.bindGpButton': { en: 'Gamepad button', zh: '手柄按键' },+ 'det.bindGpAxis': { en: 'Gamepad axis', zh: '手柄轴' },+ 'det.bindStick': { en: 'Gamepad stick', zh: '手柄摇杆' },+ 'det.bindCodePh': { en: 'Code (e.g. Space, KeyW)', zh: '键码(如 Space、KeyW)' },+ 'det.bindUp': { en: 'Up', zh: '上' },+ 'det.bindDown': { en: 'Down', zh: '下' },+ 'det.bindLeft': { en: 'Left', zh: '左' },+ 'det.bindRight': { en: 'Right', zh: '右' },+ 'det.stickAria': { en: 'Stick', zh: '摇杆' },++ // — Generic asset inspector (import settings + metadata) —+ 'det.importSettings': { en: 'Import Settings', zh: '导入设置' },+ 'det.saveImportTip': { en: 'Save import settings', zh: '保存导入设置' },+ 'det.importSaved': { en: 'Import settings saved', zh: '导入设置已保存' },+ 'det.importSaveFailed': { en: 'Failed to save import settings: {error}', zh: '保存导入设置失败:{error}' },+ 'det.noImportSettings': { en: 'This asset type has no import settings.', zh: '此资产类型没有导入设置。' },+ 'det.type': { en: 'Type', zh: '类型' },+ 'det.metaPath': { en: 'Path', zh: '路径' },+ 'det.metaDimensions': { en: 'Dimensions', zh: '尺寸' },+ 'det.metaSize': { en: 'Size', zh: '大小' },+ 'det.metaModified': { en: 'Modified', zh: '修改时间' },+ 'det.metaUuid': { en: 'UUID', zh: 'UUID' },+ 'det.metaReferences': { en: 'References', zh: '引用' },+ 'det.openScene': { en: 'Open Scene', zh: '打开场景' },+ 'det.copyPath': { en: 'Copy Path', zh: '复制路径' },+ 'det.copiedPath': { en: 'Copied path', zh: '已复制路径' },++ // — Folder inspector —+ 'det.folder': { en: 'Folder', zh: '文件夹' },+ 'det.items': { en: 'Items', zh: '条目' },+ 'det.folderOneEntity': { en: '1 entity in this folder', zh: '此文件夹中有 1 个实体' },+ 'det.folderEntities': { en: '{count} entities in this folder', zh: '此文件夹中有 {count} 个实体' },+ 'det.folderHint': {+ en: "Folders organize the outliner; they aren't part of the scene.",+ zh: '文件夹用于组织大纲;它们不属于场景。',+ },++ // — Entity inspector (header, prefab bar, add/remove component) —+ 'det.noSelection': { en: 'No selection', zh: '未选择任何内容' },+ 'det.noSelectionHint': {+ en: 'Select an entity in the scene, or an asset in the Content Browser.',+ zh: '在场景中选择一个实体,或在内容浏览器中选择一个资产。',+ },+ 'det.filterProps': { en: 'Filter properties', zh: '过滤属性' },+ 'det.entitiesSelected': { en: '{count} entities selected', zh: '已选择 {count} 个实体' },+ 'det.editing': { en: 'Editing', zh: '编辑中' },+ 'det.editingShared': { en: '{count} entities · shared components', zh: '{count} 个实体 · 共同组件' },+ 'det.id': { en: 'ID', zh: 'ID' },+ 'det.prefabSelect': { en: 'Select', zh: '选择' },+ 'det.prefabSelectTip': { en: 'Select the prefab asset in the Content Browser', zh: '在内容浏览器中选中该预制体资产' },+ 'det.prefabApply': { en: 'Apply', zh: '应用' },+ 'det.prefabApplyTip': {+ en: "Apply this instance's overrides to the prefab asset (updates the base for all instances)",+ zh: '将此实例的覆盖应用到预制体资产(更新所有实例的基准)',+ },+ 'det.prefabRevert': { en: 'Revert', zh: '还原' },+ 'det.prefabRevertTip': {+ en: 'Revert all overrides — re-sync this instance to the prefab',+ zh: '还原所有覆盖——将此实例重新同步到预制体',+ },+ 'det.addComponent': { en: 'Add Component', zh: '添加组件' },+ 'det.noComponentsMatch': { en: 'No components match “{query}”.', zh: '没有与“{query}”匹配的组件。' },+ 'det.copyValues': { en: 'Copy Values', zh: '复制值' },+ 'det.pasteValues': { en: 'Paste Values', zh: '粘贴值' },+ 'det.resetDefaults': { en: 'Reset to Defaults', zh: '重置为默认值' },+ 'det.removeComponent': { en: 'Remove Component', zh: '移除组件' },+ 'det.removeComponentN': { en: 'Remove Component ({count})', zh: '移除组件({count})' },++ // — Add Component picker (AddComponentMenu.tsx) —+ 'det.addComponentAria': { en: 'Add component', zh: '添加组件' },+ 'det.searchComponents': { en: 'Search components…', zh: '搜索组件…' },+ 'det.allComponentsAdded': { en: 'All components added', zh: '所有组件均已添加' },+ 'det.noMatchingComponents': { en: 'No matching components', zh: '没有匹配的组件' },+});diff --git a/desktop/src/i18n/messages/index.ts b/desktop/src/i18n/messages/index.tsindex 3669aa2d1..e4f057f04 100644--- a/desktop/src/i18n/messages/index.ts+++ b/desktop/src/i18n/messages/index.ts@@ -22,6 +22,18 @@ import { commonMessages } from './common';import { commandMessages } from './commands';import { menuMessages } from './menu';import { settingsMessages } from './settings';+import { launcherMessages } from './launcher';+import { layoutMessages } from './layout';+import { contentMessages } from './content';+import { detailsMessages } from './details';+import { outlinerMessages } from './outliner';+import { viewportMessages } from './viewport';+import { logsMessages } from './logs';+import { sequencerMessages } from './sequencer';+import { nodegraphMessages } from './nodegraph';+import { tileMessages } from './tile';+import { materialMessages } from './material';+import { projectMessages } from './project';/** Every per-area module, for the uniqueness guard in i18n.test.ts. */export const messageModules = {@@ -29,6 +41,18 @@ export const messageModules = {commands: commandMessages,menu: menuMessages,settings: settingsMessages,+ launcher: launcherMessages,+ layout: layoutMessages,+ content: contentMessages,+ details: detailsMessages,+ outliner: outlinerMessages,+ viewport: viewportMessages,+ logs: logsMessages,+ sequencer: sequencerMessages,+ nodegraph: nodegraphMessages,+ tile: tileMessages,+ material: materialMessages,+ project: projectMessages,} as const;export const editorMessages = {@@ -36,4 +60,16 @@ export const editorMessages = {...commandMessages,...menuMessages,...settingsMessages,+ ...launcherMessages,+ ...layoutMessages,+ ...contentMessages,+ ...detailsMessages,+ ...outlinerMessages,+ ...viewportMessages,+ ...logsMessages,+ ...sequencerMessages,+ ...nodegraphMessages,+ ...tileMessages,+ ...materialMessages,+ ...projectMessages,} as const;diff --git a/desktop/src/i18n/messages/launcher.ts b/desktop/src/i18n/messages/launcher.tsnew file mode 100644index 000000000..c04fcc4f3--- /dev/null+++ b/desktop/src/i18n/messages/launcher.ts@@ -0,0 +1,54 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file launcher.ts — the project launcher: project list, templates, new-project flow.+ */+import { defineMessages } from './types';++export const launcherMessages = defineMessages({+ // — Relative timestamps on project cards —+ 'launcher.justNow': { en: 'just now', zh: '刚刚' },+ 'launcher.minutesAgo': { en: '{m}m ago', zh: '{m} 分钟前' },+ 'launcher.hoursAgo': { en: '{h}h ago', zh: '{h} 小时前' },+ 'launcher.daysAgo': { en: '{d}d ago', zh: '{d} 天前' },+ 'launcher.weeksAgo': { en: '{w}w ago', zh: '{w} 周前' },++ // — Recent view —+ 'launcher.recent': { en: 'Recent', zh: '最近' },+ 'launcher.searchProjects': { en: 'Search projects', zh: '搜索项目' },+ 'launcher.viewLabel': { en: 'View', zh: '视图' },+ 'launcher.viewGrid': { en: 'Grid', zh: '网格' },+ 'launcher.viewList': { en: 'List', zh: '列表' },+ 'launcher.noRecent': { en: 'No recent projects yet.', zh: '还没有最近打开的项目。' },+ 'launcher.openProjectFolder': { en: 'Open a project folder', zh: '打开项目文件夹' },+ 'launcher.noMatch': { en: 'No projects match “{query}”.', zh: '没有匹配“{query}”的项目。' },+ 'launcher.removeFromRecents': { en: 'Remove from recents', zh: '从最近列表移除' },+ 'launcher.colProject': { en: 'Project', zh: '项目' },+ 'launcher.colLastOpened': { en: 'Last opened', zh: '最近打开' },+ 'launcher.colBuild': { en: 'Build', zh: '构建' },++ // — New-project view —+ 'launcher.newProject': { en: 'New project', zh: '新建项目' },+ 'launcher.newProjectSub': {+ en: 'Start from a template — you can change anything later.',+ zh: '从模板开始——之后一切都可以修改。',+ },+ 'launcher.templatesMissing': { en: 'The bundled templates are missing.', zh: '内置模板缺失。' },+ 'launcher.templatesMissingHint': {+ en: 'Reinstalling the editor should restore them.',+ zh: '重新安装编辑器应可恢复。',+ },+ 'launcher.groupStarters': { en: 'Starters', zh: '起步模板' },+ 'launcher.groupExamples': { en: 'Examples', zh: '示例' },+ 'launcher.projectName': { en: 'Project name', zh: '项目名称' },+ 'launcher.location': { en: 'Location', zh: '位置' },+ 'launcher.chooseFolderPlaceholder': { en: 'Choose a folder…', zh: '选择文件夹…' },+ 'launcher.chooseFolder': { en: 'Choose folder', zh: '选择文件夹' },+ 'launcher.creating': { en: 'Creating…', zh: '创建中…' },+ 'launcher.createProject': { en: 'Create project', zh: '创建项目' },+ 'launcher.pickTemplate': { en: 'Pick a template to begin.', zh: '选择一个模板开始。' },++ // — Chrome (top bar, rail) —+ 'launcher.brandEditor': { en: 'editor', zh: '编辑器' },+ 'launcher.openFolder': { en: 'Open folder…', zh: '打开文件夹…' },+});diff --git a/desktop/src/i18n/messages/layout.ts b/desktop/src/i18n/messages/layout.tsnew file mode 100644index 000000000..c352a4679--- /dev/null+++ b/desktop/src/i18n/messages/layout.ts@@ -0,0 +1,91 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file layout.ts — dock/window chrome: panel titles, toolbar, status bar,+ * activity bar, content drawer, window controls, subsystem indicator.+ */+import { defineMessages } from './types';++export const layoutMessages = defineMessages({+ // — Dock panel titles —+ 'layout.panel.viewport': { en: 'Viewport', zh: '视口' },+ 'layout.panel.worldOutliner': { en: 'World Outliner', zh: '世界大纲' },+ 'layout.panel.details': { en: 'Details', zh: '细节' },+ 'layout.panel.contentBrowser': { en: 'Content Browser', zh: '内容浏览器' },+ 'layout.panel.outputLog': { en: 'Output Log', zh: '输出日志' },+ 'layout.panel.sequencer': { en: 'Sequencer', zh: '序列器' },+ 'layout.panel.profiler': { en: 'Profiler', zh: '性能分析器' },+ 'layout.panel.game': { en: 'Game', zh: '游戏' },+ 'layout.panel.gamePlayer': { en: 'Game P{n}', zh: '游戏 P{n}' },++ // — Dock chrome (tabs, collapse chevron) —+ 'layout.closeTab': { en: 'Close {title}', zh: '关闭 {title}' },+ 'layout.collapsePanel': { en: 'Collapse panel', zh: '折叠面板' },+ 'layout.expandPanel': { en: 'Expand panel', zh: '展开面板' },++ // — Activity bar —+ 'layout.toggleOutliner': { en: 'Toggle Outliner', zh: '切换大纲' },+ 'layout.toggleDetails': { en: 'Toggle Details', zh: '切换细节' },+ 'layout.contentDrawerTooltip': { en: 'Content Drawer (Ctrl+Space)', zh: '内容抽屉 (Ctrl+Space)' },+ 'layout.settingsTooltip': { en: 'Settings (Ctrl+,)', zh: '设置 (Ctrl+,)' },++ // — Content drawer —+ 'layout.closeEsc': { en: 'Close (Esc)', zh: '关闭 (Esc)' },++ // — Toolbar —+ 'layout.undoWithLabel': { en: 'Undo {label}', zh: '撤销 {label}' },+ 'layout.redoWithLabel': { en: 'Redo {label}', zh: '重做 {label}' },+ 'layout.transformTool': { en: 'Transform tool', zh: '变换工具' },+ 'layout.tool.select': { en: 'Select', zh: '选择' },+ 'layout.tool.move': { en: 'Move', zh: '移动' },+ 'layout.tool.rotate': { en: 'Rotate', zh: '旋转' },+ 'layout.tool.scale': { en: 'Scale', zh: '缩放' },+ 'layout.restart': { en: 'Restart', zh: '重新运行' },+ 'layout.pause': { en: 'Pause', zh: '暂停' },+ 'layout.playInViewportTooltip': { en: 'Play in Viewport', zh: '在视口中运行' },+ 'layout.playInWindowTooltip': { en: 'Play in New Window', zh: '在新窗口中运行' },+ 'layout.playInViewport': { en: 'Play In Viewport', zh: '在视口中运行' },+ 'layout.playInWindow': { en: 'Play In New Window', zh: '在新窗口中运行' },+ 'layout.singlePlayer': { en: 'Single Player', zh: '单人' },+ 'layout.playersListenServer': { en: '{n} Players (Listen Server)', zh: '{n} 名玩家(监听服务器)' },+ 'layout.build': { en: 'Build', zh: '构建' },+ 'layout.buildScriptsTooltip': { en: 'Build project scripts', zh: '构建项目脚本' },++ // — Status bar —+ 'layout.contentDrawer': { en: 'Content Drawer', zh: '内容抽屉' },+ 'layout.status.running': { en: 'Running', zh: '运行中' },+ 'layout.status.editMode': { en: 'Edit Mode', zh: '编辑模式' },+ 'layout.status.selected': { en: '{count} selected', zh: '已选中 {count} 个' },+ 'layout.status.noSelection': { en: 'No selection', zh: '未选中' },+ 'layout.status.selectionTooltip': { en: 'Selected transform (X, Y · rotation)', zh: '所选对象的变换(X、Y · 旋转)' },+ 'layout.status.entities': { en: '{count} entities', zh: '{count} 个实体' },+ 'layout.status.vramTooltip': {+ en: 'Resident texture memory / budget · {count} cached (evictable) texture(s)',+ zh: '驻留纹理内存 / 预算 · {count} 个已缓存(可逐出)纹理',+ },+ 'layout.status.backendTooltip': {+ en: 'Active GPU backend — the device actually rendering (reflects any WebGL2 fallback). Change it in Settings → Renderer.',+ zh: '当前使用的 GPU 后端——实际执行渲染的设备(反映 WebGL2 回退情况)。可在设置 → 渲染器中更改。',+ },++ // — Subsystem (engine modules) indicator —+ 'layout.mods.tooltip': { en: 'Engine modules', zh: '引擎模块' },+ 'layout.mods.label': { en: 'Modules', zh: '模块' },+ 'layout.mods.heading': { en: 'Engine Modules', zh: '引擎模块' },+ 'layout.mods.playSuffix': { en: ' · Play', zh: ' · 运行' },+ 'layout.mods.notBooted': { en: 'Engine not booted', zh: '引擎尚未启动' },+ 'layout.mods.error': { en: 'error', zh: '错误' },+ 'layout.mods.loading': { en: 'loading…', zh: '加载中…' },+ 'layout.mods.registered': { en: 'registered', zh: '已注册' },+ 'layout.mods.running': { en: 'running', zh: '运行中' },+ 'layout.mods.idle': { en: 'idle', zh: '空闲' },+ 'layout.mods.ready': { en: 'ready', zh: '就绪' },++ // — Window controls —+ 'layout.minimize': { en: 'Minimize', zh: '最小化' },+ 'layout.maximize': { en: 'Maximize', zh: '最大化' },+ 'layout.restore': { en: 'Restore', zh: '还原' },++ // — App shell toasts —+ 'layout.toast.openSceneFirst': { en: 'Open a scene before playing', zh: '请先打开场景再运行' },+});diff --git a/desktop/src/i18n/messages/logs.ts b/desktop/src/i18n/messages/logs.tsnew file mode 100644index 000000000..c18b844ad--- /dev/null+++ b/desktop/src/i18n/messages/logs.ts@@ -0,0 +1,103 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file logs.ts — Output Log + Profiler panels: filters, toolbar, empty states, group names.+ */+import { defineMessages } from './types';++export const logsMessages = defineMessages({+ // — Output Log: level chips + toolbar —+ 'log.all': { en: 'All', zh: '全部' },+ 'log.info': { en: 'Info', zh: '信息' },+ 'log.warnings': { en: 'Warnings', zh: '警告' },+ 'log.errors': { en: 'Errors', zh: '错误' },+ 'log.filterPlaceholder': { en: 'Filter', zh: '过滤' },+ 'log.categories': { en: 'Categories', zh: '类别' },+ 'log.showTimestamps': { en: 'Show timestamps', zh: '显示时间戳' },+ 'log.scrollToBottom': { en: 'Scroll to bottom', zh: '滚动到底部' },+ 'log.clearLog': { en: 'Clear log', zh: '清空日志' },++ // — Output Log: category filter popover —+ 'log.showAll': { en: 'Show All', zh: '全部显示' },+ 'log.hideAll': { en: 'Hide All', zh: '全部隐藏' },+ 'log.noCategoriesYet': { en: 'No categories yet', zh: '暂无类别' },+ 'log.noCategory': { en: '(no category)', zh: '(无类别)' },++ // — Output Log: context menu + save toast —+ 'log.copy': { en: 'Copy', zh: '复制' },+ 'log.copyAll': { en: 'Copy All', zh: '全部复制' },+ 'log.saveLog': { en: 'Save Log…', zh: '保存日志…' },+ 'log.clear': { en: 'Clear', zh: '清空' },+ 'log.savedLines': { en: 'Saved {count} lines', zh: '已保存 {count} 行' },++ // — Output Log: empty states —+ 'log.emptyNoOutput': {+ en: 'No log output yet — engine and script logs appear here.',+ zh: '暂无日志输出——引擎与脚本日志将显示在这里。',+ },+ 'log.emptyNoMatch': { en: 'No entries match the filter.', zh: '没有符合过滤条件的条目。' },++ // — Profiler: capture controls —+ 'prof.live': { en: 'Live', zh: '实时' },+ 'prof.pause': { en: 'Pause', zh: '暂停' },+ 'prof.resumeLiveTitle': { en: 'Resume live capture', zh: '恢复实时捕获' },+ 'prof.freezeTitle': { en: 'Freeze capture to inspect frames', zh: '冻结捕获以检查帧' },+ 'prof.pauseOnHitch': { en: 'Pause on hitch', zh: '卡顿时暂停' },+ 'prof.rec': { en: 'Rec', zh: '录制' },+ 'prof.stopRecTitle': { en: 'Stop recording', zh: '停止录制' },+ 'prof.recordTitle': { en: 'Record a session for export', zh: '录制会话以便导出' },+ 'prof.export': { en: 'Export', zh: '导出' },+ 'prof.exportTitle': {+ en: 'Export the recorded session (or the live window) as JSON',+ zh: '将录制的会话(或实时窗口)导出为 JSON',+ },+ 'prof.pinnedFrame': { en: 'frame #{id} · {ms}ms', zh: '帧 #{id} · {ms}ms' },+ 'prof.liveBadge': { en: 'live', zh: '实时' },++ // — Profiler: group chips (the section headers reuse these) —+ 'prof.groupFrame': { en: 'Frame', zh: '帧' },+ 'prof.groupUnit': { en: 'CPU/GPU', zh: 'CPU/GPU' },+ 'prof.groupRender': { en: 'Render', zh: '渲染' },+ 'prof.groupCounters': { en: 'Counters', zh: '计数器' },+ 'prof.groupMemory': { en: 'Memory', zh: '内存' },+ 'prof.groupSystems': { en: 'Systems', zh: '系统' },++ // — Profiler: Frame section —+ 'prof.clickToInspect': { en: 'Click a frame to inspect it', zh: '点击某一帧以查看详情' },+ 'prof.inspectingFrame': { en: 'inspecting frame #{id} · {ms}ms', zh: '正在查看帧 #{id} · {ms}ms' },+ 'prof.hitch': { en: 'hitch', zh: '卡顿' },+ 'prof.backToLive': { en: 'back to live', zh: '返回实时' },+ 'prof.budget': { en: 'budget {ms}ms', zh: '预算 {ms}ms' },+ 'prof.longFrameOne': { en: '{count} long frame', zh: '{count} 个长帧' },+ 'prof.longFrames': { en: '{count} long frames', zh: '{count} 个长帧' },+ 'prof.worst': { en: 'worst {ms}ms', zh: '最差 {ms}ms' },+ 'prof.other': { en: 'other', zh: '其他' },+ 'prof.longTaskStat': { en: 'long task {ms}ms (GC/JS)', zh: '长任务 {ms}ms(GC/JS)' },++ // — Profiler: Unit section —+ 'prof.unitHeader': { en: 'Unit', zh: '单元' },+ 'prof.engine': { en: 'engine', zh: '引擎' },+ 'prof.editor': { en: 'editor', zh: '编辑器' },+ 'prof.present': { en: 'present', zh: '呈现' },+ 'prof.idle': { en: 'idle', zh: '空闲' },+ 'prof.na': { en: 'n/a', zh: '不可用' },++ // — Profiler: Render / Memory sections —+ 'prof.drawCalls': { en: 'draw calls', zh: '绘制调用' },+ 'prof.triangles': { en: 'triangles', zh: '三角形' },+ 'prof.entities': { en: 'entities', zh: '实体' },+ 'prof.jsHeap': { en: 'js heap', zh: 'JS 堆' },+ 'prof.jsHeapLimit': { en: 'js heap limit {mb}MB', zh: 'JS 堆上限 {mb}MB' },++ // — Profiler: pinned-frame breakdown —+ 'prof.breakdownHeader': { en: 'Breakdown · frame #{id}', zh: '细分 · 帧 #{id}' },+ 'prof.longTaskLabel': { en: '⚠ long task', zh: '⚠ 长任务' },+ 'prof.gcUninstrumented': { en: '· GC / uninstrumented JS', zh: '· GC / 未插桩的 JS' },+ 'prof.measured': { en: 'measured {measured}ms of {total}ms', zh: '已测量 {measured}ms(共 {total}ms)' },+ 'prof.unattributed': { en: '{ms}ms unattributed', zh: '{ms}ms 未归因' },+ 'prof.browserPaintGc': { en: 'browser paint / GC', zh: '浏览器绘制 / GC' },++ // — Profiler: Systems section —+ 'prof.thisFrame': { en: 'this frame', zh: '当前帧' },+ 'prof.noSystemTimings': { en: 'No system timings yet.', zh: '暂无系统耗时数据。' },+});diff --git a/desktop/src/i18n/messages/material.ts b/desktop/src/i18n/messages/material.tsnew file mode 100644index 000000000..1305045bf--- /dev/null+++ b/desktop/src/i18n/messages/material.ts@@ -0,0 +1,59 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file material.ts — Material graph editor + UI Widgets palette.+ */+import { defineMessages } from './types';++export const materialMessages = defineMessages({+ // — Material Graph editor (panels/MaterialGraphEditor.tsx) —+ 'mat.panelTitle': { en: 'Material Graph', zh: '材质图' },+ 'mat.openHintPrefix': { en: 'Open a ', zh: '从内容浏览器打开 ' },+ 'mat.openHintSuffix': { en: ' from the Content Browser to edit it.', zh: ' 文件进行编辑。' },+ 'mat.add': { en: 'Add', zh: '添加' },+ 'mat.addNode': { en: 'Add node', zh: '添加节点' },+ 'mat.deleteNode': { en: 'Delete node', zh: '删除节点' },+ 'mat.deleteSelected': { en: 'Delete selected', zh: '删除所选' },+ 'mat.save': { en: 'Save', zh: '保存' },+ 'mat.addNodeType': { en: 'Add {label}', zh: '添加 {label}' },+ 'mat.emptyHint': {+ en: 'Right-click to add a node, then drag from an output port into a typed input.',+ zh: '右键单击添加节点,然后从输出端口拖拽连线到类型匹配的输入端口。',+ },++ // — Material graph open/create/save feedback (material/openMaterialGraph.ts) —+ 'mat.openGraphFailed': { en: 'Failed to open material graph: {error}', zh: '打开材质图失败:{error}' },+ 'mat.graphSaved': { en: 'Material graph saved', zh: '材质图已保存' },+ 'mat.saveGraphFailed': { en: 'Failed to save material graph: {error}', zh: '保存材质图失败:{error}' },+ 'mat.createGraphFailed': { en: 'Failed to create material graph: {error}', zh: '创建材质图失败:{error}' },+ 'mat.createdGraph': { en: 'Created material graph: {name}', zh: '已创建材质图:{name}' },++ // — Material create feedback (material/openMaterial.ts) —+ 'mat.unknownTemplate': { en: 'Unknown material template: {id}', zh: '未知的材质模板:{id}' },+ 'mat.createFailed': { en: 'Failed to create material: {error}', zh: '创建材质失败:{error}' },+ 'mat.created': { en: 'Created material: {name}', zh: '已创建材质:{name}' },+ 'mat.createInstanceFailed': { en: 'Failed to create material instance: {error}', zh: '创建材质实例失败:{error}' },+ 'mat.createdInstance': { en: 'Created material instance: {name}', zh: '已创建材质实例:{name}' },++ // — Material inspector sections + render state (material/materialInspectorModel.ts) —+ 'mat.parameters': { en: 'Parameters', zh: '参数' },+ 'mat.renderState': { en: 'Render State', zh: '渲染状态' },+ 'mat.blendMode': { en: 'Blend Mode', zh: '混合模式' },+ 'mat.depthTest': { en: 'Depth Test', zh: '深度测试' },+ 'mat.depthWrite': { en: 'Depth Write', zh: '深度写入' },+ 'mat.cull': { en: 'Cull', zh: '剔除' },+ 'mat.blendNormal': { en: 'Normal', zh: '正常' },+ 'mat.blendAdditive': { en: 'Additive', zh: '相加' },+ 'mat.blendMultiply': { en: 'Multiply', zh: '正片叠底' },+ 'mat.blendScreen': { en: 'Screen', zh: '滤色' },+ 'mat.blendPremultiplied': { en: 'Premultiplied', zh: '预乘' },+ 'mat.cullNone': { en: 'None', zh: '无' },+ 'mat.cullBack': { en: 'Back', zh: '背面' },+ 'mat.cullFront': { en: 'Front', zh: '正面' },++ // — UI Widgets palette (panels/UIWidgetsPanel.tsx) —+ 'uiw.hint': {+ en: 'Drag onto the canvas, or click to add under the Canvas.',+ zh: '拖拽到画布上,或点击添加到 Canvas 下。',+ },+});diff --git a/desktop/src/i18n/messages/nodegraph.ts b/desktop/src/i18n/messages/nodegraph.tsnew file mode 100644index 000000000..4fd3a02cf--- /dev/null+++ b/desktop/src/i18n/messages/nodegraph.ts@@ -0,0 +1,87 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file nodegraph.ts — State Machine + Behavior Tree editors and the shared graph canvas.+ */+import { defineMessages } from './types';++export const nodegraphMessages = defineMessages({+ // — Shared graph-editor chrome (ng.*) —+ // The "open a file" placeholder is split around the <code> extension so the+ // markup survives translation (pre + <code>.ext</code> + post).+ 'ng.openHintPre': { en: 'Open a ', zh: '从内容浏览器打开 ' },+ 'ng.openHintPost': { en: ' from the Content Browser to edit it.', zh: ' 文件进行编辑。' },+ 'ng.save': { en: 'Save', zh: '保存' },+ 'ng.deleteSelected': { en: 'Delete selected', zh: '删除所选' },+ 'ng.name': { en: 'Name', zh: '名称' },+ 'ng.phActionName': { en: 'action name', zh: '动作名称' },+ 'ng.phConditionName': { en: 'condition name', zh: '条件名称' },+ 'ng.inPortTip': { en: 'Edges land here', zh: '连线在此接入' },+ 'ng.outPortTip': { en: 'Drag to another node to connect', zh: '拖到另一个节点以连接' },++ // — State Machine editor (fsm.*) —+ 'fsm.tabTitle': { en: 'State Machine', zh: '状态机' },+ 'fsm.addStateTip': { en: 'Add state', zh: '添加状态' },+ 'fsm.stateBtn': { en: 'State', zh: '状态' },+ 'fsm.menuAddState': { en: 'Add State', zh: '添加状态' },+ 'fsm.menuSetInitial': { en: 'Set as initial', zh: '设为初始状态' },+ 'fsm.menuDeleteState': { en: 'Delete state', zh: '删除状态' },+ 'fsm.emptyHint': {+ en: 'Add a state, then drag from its handle to another to add a transition.',+ zh: '先添加一个状态,再从它的手柄拖到另一个状态以添加转移。',+ },+ 'fsm.initialState': { en: 'Initial state', zh: '初始状态' },+ 'fsm.noActions': { en: 'no actions', zh: '无动作' },+ 'fsm.always': { en: '(always)', zh: '(总是)' },+ 'fsm.guardCount': { en: '{count} guards', zh: '{count} 个守卫' },+ 'fsm.inspStateTitle': { en: 'State', zh: '状态' },+ 'fsm.inspTransitionTitle': { en: 'Transition', zh: '转移' },+ 'fsm.target': { en: 'Target', zh: '目标' },+ 'fsm.targetState': { en: 'Target state', zh: '目标状态' },+ 'fsm.trigger': { en: 'Trigger (event)', zh: '触发器(事件)' },+ 'fsm.phEventName': { en: 'event name', zh: '事件名称' },+ 'fsm.condition': { en: 'Condition', zh: '条件' },+ 'fsm.guardSub': { en: 'Guard (blackboard)', zh: '守卫(黑板)' },+ 'fsm.phKey': { en: 'key', zh: '键名' },+ 'fsm.guardOp': { en: 'Guard operator', zh: '守卫运算符' },+ 'fsm.value': { en: 'Value', zh: '值' },+ 'fsm.phValue': { en: 'value', zh: '值' },+ 'fsm.toastOpenFailed': { en: 'Failed to open state machine: {error}', zh: '打开状态机失败:{error}' },+ 'fsm.toastCreateFailed': { en: 'Failed to create state machine: {error}', zh: '创建状态机失败:{error}' },+ 'fsm.toastCreated': { en: 'Created state machine: {name}', zh: '已创建状态机:{name}' },++ // — Behavior Tree editor (bt.*) —+ // Type labels are display names only; the persisted node type ids stay English.+ 'bt.tabTitle': { en: 'Behavior Tree', zh: '行为树' },+ 'bt.typeSequence': { en: 'Sequence', zh: '序列' },+ 'bt.typeSelector': { en: 'Selector', zh: '选择器' },+ 'bt.typeParallel': { en: 'Parallel', zh: '并行' },+ 'bt.typeInverter': { en: 'Inverter', zh: '反转器' },+ 'bt.typeSucceeder': { en: 'Succeeder', zh: '成功器' },+ 'bt.typeRepeater': { en: 'Repeater', zh: '重复器' },+ 'bt.typeWait': { en: 'Wait', zh: '等待' },+ 'bt.typeAction': { en: 'Action', zh: '动作' },+ 'bt.typeCondition': { en: 'Condition', zh: '条件' },+ 'bt.unnamed': { en: '(unnamed)', zh: '(未命名)' },+ 'bt.deleteNode': { en: 'Delete node', zh: '删除节点' },+ 'bt.menuAdd': { en: 'Add {type}', zh: '添加{type}' },+ 'bt.menuAddChild': { en: 'Add child: {type}', zh: '添加子节点:{type}' },+ 'bt.emptyHint': {+ en: 'Drag from a node\'s handle to another to set parent → child.',+ zh: '从一个节点的手柄拖到另一个节点,以建立父 → 子关系。',+ },+ 'bt.inspNodeTitle': { en: 'Node', zh: '节点' },+ 'bt.type': { en: 'Type', zh: '类型' },+ 'bt.nodeType': { en: 'Node type', zh: '节点类型' },+ 'bt.count': { en: 'Count (0 = forever)', zh: '次数(0 = 无限)' },+ 'bt.seconds': { en: 'Seconds', zh: '秒数' },+ 'bt.successPolicy': { en: 'Success policy', zh: '成功策略' },+ 'bt.policyAll': { en: 'all children', zh: '所有子节点' },+ 'bt.policyOne': { en: 'any child', zh: '任一子节点' },+ 'bt.addChildSub': { en: 'Add child', zh: '添加子节点' },+ 'bt.childNodeType': { en: 'Child node type', zh: '子节点类型' },+ 'bt.addBtn': { en: '+ Add', zh: '+ 添加' },+ 'bt.toastOpenFailed': { en: 'Failed to open behavior tree: {error}', zh: '打开行为树失败:{error}' },+ 'bt.toastCreateFailed': { en: 'Failed to create behavior tree: {error}', zh: '创建行为树失败:{error}' },+ 'bt.toastCreated': { en: 'Created behavior tree: {name}', zh: '已创建行为树:{name}' },+});diff --git a/desktop/src/i18n/messages/outliner.ts b/desktop/src/i18n/messages/outliner.tsnew file mode 100644index 000000000..5d6927022--- /dev/null+++ b/desktop/src/i18n/messages/outliner.ts@@ -0,0 +1,72 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file outliner.ts — the Outliner panel: entity tree, folders, columns, context menu.+ */+import { defineMessages } from './types';++export const outlinerMessages = defineMessages({+ // — World picker (edit vs live game) + the live-game tree —+ 'out.inspectedWorld': { en: 'Inspected world', zh: '检视的世界' },+ 'out.worldEditor': { en: 'Editor', zh: '编辑器' },+ 'out.worldGame': { en: 'Game', zh: '游戏' },+ 'out.waitingGame': { en: 'Waiting for the running game…', zh: '正在等待运行中的游戏…' },++ // — Header strip (search / sort / create buttons) —+ // `type:` / `comp:` are literal query tokens (parseQuery grammar) — never translated.+ 'out.searchPlaceholder': { en: 'Search · type: comp:', zh: '搜索 · type: comp:' },+ 'out.sortLabel': { en: 'Sort: {mode}', zh: '排序:{mode}' },+ 'out.sortManual': { en: 'Manual', zh: '手动' },+ 'out.sortName': { en: 'Name', zh: '名称' },+ 'out.sortType': { en: 'Type', zh: '类型' },+ 'out.newFolderTip': { en: 'New folder', zh: '新建文件夹' },+ 'out.addEntityTip': { en: 'Add entity', zh: '添加实体' },++ // — Column header strip + show/hide-columns menu —+ 'out.columnsTip': { en: 'Right-click to show/hide columns', zh: '右键点击以显示/隐藏列' },+ 'out.colName': { en: 'Name', zh: '名称' },+ 'out.colType': { en: 'Type', zh: '类型' },+ // Menu labels for the icon-only (headerless) columns; en mirrors the raw ids shown today.+ 'out.colLock': { en: 'lock', zh: '锁定' },+ 'out.colVis': { en: 'vis', zh: '可见性' },++ // — Empty states —+ 'out.emptyScene': { en: 'No entities in scene.', zh: '场景中没有实体。' },+ 'out.waitingEngine': { en: 'Waiting for engine…', zh: '正在等待引擎…' },+ 'out.emptyHint': { en: 'Right-click here or use the + button to add one.', zh: '在此右键点击,或使用 + 按钮添加实体。' },+ 'out.noMatch': { en: 'No entities match “{query}”.', zh: '没有与“{query}”匹配的实体。' },++ // — Context menus (empty space / folder / entity) —+ 'out.addEntity': { en: 'Add Entity', zh: '添加实体' },+ 'out.createTemplate': { en: 'Create…', zh: '创建…' },+ 'out.newFolder': { en: 'New Folder', zh: '新建文件夹' },+ 'out.expandAll': { en: 'Expand All', zh: '全部展开' },+ 'out.collapseAll': { en: 'Collapse All', zh: '全部折叠' },+ 'out.newSubfolder': { en: 'New Subfolder', zh: '新建子文件夹' },+ 'out.moveSelectionHere': { en: 'Move Selection Here', zh: '将所选移动到此处' },+ 'out.deleteFolder': { en: 'Delete Folder', zh: '删除文件夹' },+ 'out.duplicate': { en: 'Duplicate', zh: '创建副本' },+ 'out.createPrefab': { en: 'Create Prefab', zh: '创建预制体' },+ 'out.hide': { en: 'Hide', zh: '隐藏' },+ 'out.show': { en: 'Show', zh: '显示' },+ 'out.lock': { en: 'Lock', zh: '锁定' },+ 'out.unlock': { en: 'Unlock', zh: '解锁' },+ 'out.newFolderFromSelection': { en: 'New Folder from Selection', zh: '从所选新建文件夹' },+ 'out.moveToRoot': { en: 'Move to Root', zh: '移动到根级' },+ 'out.unparent': { en: 'Unparent', zh: '解除父级' },++ // — Type column labels (entity kind → display) —+ 'out.prefab': { en: 'Prefab', zh: '预制体' },+ 'out.kindCamera': { en: 'Camera', zh: '相机' },+ 'out.kindSprite': { en: 'Sprite', zh: '精灵' },+ 'out.kindSpine': { en: 'Spine', zh: 'Spine' },+ 'out.kindPhysics': { en: 'Physics', zh: '物理' },+ 'out.kindUi': { en: 'UI', zh: 'UI' },+ 'out.kindAudio': { en: 'Audio', zh: '音频' },+ 'out.kindGroup': { en: 'Group', zh: '分组' },+ 'out.kindLight': { en: 'Light', zh: '灯光' },+ 'out.kindEntity': { en: 'Entity', zh: '实体' },++ // — Lock / visibility cell tooltips —+ 'out.toggleVisibility': { en: 'Toggle visibility', zh: '切换可见性' },+});diff --git a/desktop/src/i18n/messages/project.ts b/desktop/src/i18n/messages/project.tsnew file mode 100644index 000000000..243247fbb--- /dev/null+++ b/desktop/src/i18n/messages/project.ts@@ -0,0 +1,120 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file project.ts — Build/export dialog + project-level feedback (save, watch, play realm).+ */+import { defineMessages } from './types';++export const projectMessages = defineMessages({+ // — Package Project dialog: platform picker —+ 'build.title': { en: 'Package Project', zh: '打包项目' },+ 'build.platform': { en: 'Platform', zh: '平台' },+ 'build.plat.web': { en: 'Web', zh: '网页' },+ 'build.plat.desktop': { en: 'Desktop', zh: '桌面' },+ 'build.plat.wechat': { en: 'WeChat', zh: '微信小游戏' },+ 'build.plat.playable': { en: 'Playable', zh: 'Playable' },+ 'build.comingSoon': { en: 'Coming soon', zh: '即将推出' },+ 'build.soon': { en: 'soon', zh: '即将' },+ 'build.blurb.web': {+ en: 'Static, self-contained web build — host it anywhere.',+ zh: '静态、自包含的网页构建——可托管在任何地方。',+ },+ 'build.blurb.desktop': {+ en: 'Electron app — package to .dmg / .exe / AppImage.',+ zh: 'Electron 应用——可打包为 .dmg / .exe / AppImage。',+ },+ 'build.blurb.wechat': { en: 'WeChat MiniGame package.', zh: '微信小游戏包。' },+ 'build.blurb.playable': {+ en: 'Single-file HTML playable ad — everything inlined, no requests.',+ zh: '单文件 HTML 试玩广告——所有内容内联,无网络请求。',+ },+ 'build.prereq.wechat': {+ en: 'Requires the WeChat runtime — run: node build-tools/cli.js build -t wechat',+ zh: '需要微信运行时——请运行:node build-tools/cli.js build -t wechat',+ },+ 'build.prereq.playable': {+ en: 'Requires the single-file runtime — run: node build-tools/cli.js build -t playable',+ zh: '需要单文件运行时——请运行:node build-tools/cli.js build -t playable',+ },+ 'build.next.web': {+ en: "Preview over http below, or upload {out}/ to any static host. (A web build needs an http origin — opening index.html directly won't stream the wasm.)",+ zh: '在下方通过 http 预览,或将 {out}/ 上传到任意静态托管。(网页构建需要 http 源——直接打开 index.html 无法流式加载 wasm。)',+ },+ 'build.next.desktop': {+ en: 'cd {out} && npm install && npm start — or npm run dist for a native installer.',+ zh: 'cd {out} && npm install && npm start——或运行 npm run dist 以生成原生安装包。',+ },+ 'build.next.wechat': {+ en: 'Open {out}/ in WeChat DevTools, then set your appid in project.config.json.',+ zh: '在微信开发者工具中打开 {out}/,然后在 project.config.json 中设置 appid。',+ },+ 'build.next.playable': {+ en: 'Preview over http below (its real surface is an ad-network iframe). Note: a full engine usually exceeds ad-network size limits.',+ zh: '在下方通过 http 预览(其真实运行环境是广告网络的 iframe)。注意:完整引擎通常会超出广告网络的体积限制。',+ },++ // — Options —+ 'build.configuration': { en: 'Configuration', zh: '配置' },+ 'build.development': { en: 'Development', zh: '开发' },+ 'build.shipping': { en: 'Shipping', zh: '发行' },+ 'build.output': { en: 'Output', zh: '输出' },+ 'build.browse': { en: 'Browse', zh: '浏览' },+ 'build.openFolderWhenDone': { en: 'Open output folder when done', zh: '完成后打开输出文件夹' },+ 'build.includeSourceMaps': { en: 'Include source maps', zh: '包含源码映射' },+ 'build.compressTextures': { en: 'Compress textures (PNG → KTX2)', zh: '压缩纹理(PNG → KTX2)' },+ 'build.atlasTextures': { en: 'Pack .atlas folders into atlases', zh: '将 .atlas 文件夹打包为图集' },++ // — Scenes in build —+ 'build.scenesHead': { en: 'Scenes in build', zh: '构建包含的场景' },+ 'build.startupScene': { en: 'Startup scene', zh: '启动场景' },+ 'build.setStartupScene': { en: 'Set as startup scene', zh: '设为启动场景' },+ 'build.setStartupSceneNamed': { en: 'Set {name} as startup scene', zh: '将 {name} 设为启动场景' },+ 'build.noScenes': {+ en: "No scenes found under the project's scenes folder.",+ zh: '项目的场景文件夹下未找到场景。',+ },+ 'build.playableSingleScene': {+ en: 'Playable ships the startup scene only — a size-capped single file.',+ zh: 'Playable 仅打包启动场景——一个有体积上限的单文件。',+ },++ // — Run / progress / result —+ 'build.package': { en: 'Package', zh: '打包' },+ 'build.packaging': { en: 'Packaging…', zh: '打包中…' },+ 'build.packagingPlatform': { en: 'Packaging the {platform} build…', zh: '正在打包 {platform} 构建…' },+ 'build.outputLog': { en: 'Output Log', zh: '输出日志' },+ 'build.copyLog': { en: 'Copy log', zh: '复制日志' },+ // {size} is either '' or a pre-built ' · N.N MB' fragment.+ 'build.packagedSummary': { en: 'Packaged {count} assets{size} → {out}', zh: '已打包 {count} 个资产{size} → {out}' },+ 'build.previewHttp': { en: 'Preview over http', zh: '通过 http 预览' },+ 'build.openFolder': { en: 'Open folder', zh: '打开文件夹' },+ 'build.packageFailed': { en: 'Package failed', zh: '打包失败' },+ 'build.warnings': { en: '{count} warning(s): {first}', zh: '{count} 个警告:{first}' },+ 'build.noProjectOpen': { en: 'no project open', zh: '没有打开的项目' },++ // — Project-level feedback toasts (ProjectStore) —+ 'proj.openFailed': { en: 'Could not open project: {message}', zh: '无法打开项目:{message}' },+ 'proj.prefabLoadFailed': { en: 'Could not load prefab: {name}', zh: '无法加载预制体:{name}' },+ 'proj.noOverrides': { en: 'No overrides to apply', zh: '没有可应用的覆盖' },+ 'proj.applyWriteFailed': { en: 'Apply failed: could not write {name}', zh: '应用失败:无法写入 {name}' },+ 'proj.appliedOverride': { en: 'Applied {count} override to {name}', zh: '已将 {count} 项覆盖应用到 {name}' },+ 'proj.appliedOverrides': { en: 'Applied {count} overrides to {name}', zh: '已将 {count} 项覆盖应用到 {name}' },+ 'proj.prefabCreateFailed': { en: 'Failed to create prefab: {name}', zh: '创建预制体失败:{name}' },+ 'proj.prefabCreated': { en: 'Created prefab: {name}', zh: '已创建预制体:{name}' },+ 'proj.saveSortingLayersFailed': { en: 'Failed to save sorting layers', zh: '保存排序层失败' },+ 'proj.saveDesignResolutionFailed': { en: 'Failed to save design resolution', zh: '保存设计分辨率失败' },+ 'proj.savePackagingFailed': { en: 'Failed to save packaging settings', zh: '保存打包设置失败' },+ 'proj.savePlatformFailed': { en: 'Failed to save platform settings', zh: '保存平台设置失败' },+ 'proj.savePhysicsFailed': { en: 'Failed to save physics setting', zh: '保存物理设置失败' },+ 'proj.startupScene': { en: 'Startup scene: {name}', zh: '启动场景:{name}' },+ 'proj.saveStartupSceneFailed': { en: 'Failed to save startup scene', zh: '保存启动场景失败' },+ 'proj.excludedFromExport': { en: 'Excluded from export: {name}', zh: '已从导出中排除:{name}' },+ 'proj.includedInExport': { en: 'Included in export: {name}', zh: '已包含在导出中:{name}' },+ 'proj.saveExclusionFailed': { en: 'Failed to save export exclusion', zh: '保存导出排除项失败' },+ 'proj.openedScene': { en: 'Opened {name}', zh: '已打开 {name}' },+ 'proj.savedScene': { en: 'Saved {name}', zh: '已保存 {name}' },++ // — Play realm (Game panel overlay fallbacks) —+ 'proj.playPrepareFailed': { en: 'failed to prepare play realm', zh: '无法准备游戏运行环境' },+ 'proj.playRealmError': { en: 'play realm error', zh: '游戏运行环境错误' },+});diff --git a/desktop/src/i18n/messages/sequencer.ts b/desktop/src/i18n/messages/sequencer.tsnew file mode 100644index 000000000..08fcf7d3e--- /dev/null+++ b/desktop/src/i18n/messages/sequencer.ts@@ -0,0 +1,94 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file sequencer.ts — the Sequencer (timeline/animation) panel and timeline documents.+ */+import { defineMessages } from './types';++export const sequencerMessages = defineMessages({+ // — empty state —+ 'seq.empty.title': { en: 'No animation open', zh: '未打开动画' },+ 'seq.empty.hint': {+ en: 'Create a new animation, or double-click an existing .esanim in the Content Browser.',+ zh: '新建一个动画,或在内容浏览器中双击已有的 .esanim 文件。',+ },+ 'seq.empty.new': { en: 'New animation', zh: '新建动画' },+ 'seq.empty.step1': {+ en: 'Select an object in the scene, then click Bind in the toolbar to attach the preview to it',+ zh: '在场景中选中一个对象,然后点击工具栏中的绑定,将预览附加到它',+ },+ 'seq.empty.step2': {+ en: 'Turn on Record, then move/rotate it or edit properties — keyframes are recorded automatically',+ zh: '开启录制,然后移动/旋转它或编辑属性——关键帧会自动录制',+ },+ 'seq.empty.step3': {+ en: 'Drag the playhead to preview, then click Save to write back to the file',+ zh: '拖动播放头进行预览,然后点击保存写回文件',+ },++ // — transport bar —+ 'seq.unnamed': { en: 'Unnamed', zh: '未命名' },+ 'seq.metaSummary': { en: '· {frames} frames · {fps}fps · {wrap}', zh: '· {frames} 帧 · {fps}fps · {wrap}' },+ 'seq.bindTitle': { en: 'Bind preview to the selected entity', zh: '将预览绑定到所选实体' },+ 'seq.unbound': { en: 'Unbound', zh: '未绑定' },+ 'seq.recordTitle': { en: 'Record: property edits auto-key', zh: '录制:编辑属性时自动打关键帧' },+ 'seq.jumpStart': { en: 'Jump to start', zh: '跳到开头' },+ 'seq.prevKeyframe': { en: 'Previous keyframe', zh: '上一个关键帧' },+ 'seq.playPause': { en: 'Play / pause (Space)', zh: '播放 / 暂停(空格)' },+ 'seq.nextKeyframe': { en: 'Next keyframe', zh: '下一个关键帧' },+ 'seq.jumpEnd': { en: 'Jump to end', zh: '跳到结尾' },+ 'seq.frameWord': { en: 'Frame', zh: '帧' },+ 'seq.tabSheet': { en: 'Sheet', zh: '摄影表' },+ 'seq.tabCurves': { en: 'Curves', zh: '曲线' },+ 'seq.snapTitle': { en: 'Snap to frame', zh: '吸附到帧' },+ 'seq.settingsTitle': { en: 'Clip settings (duration / fps / loop)', zh: '剪辑设置(时长 / 帧率 / 循环)' },+ 'seq.addTrack': { en: 'Add track', zh: '添加轨道' },+ 'seq.trackBtn': { en: 'Track', zh: '轨道' },+ 'seq.saveTitle': { en: 'Save animation', zh: '保存动画' },+ 'seq.save': { en: 'Save', zh: '保存' },++ // — track tree + lanes —+ 'seq.tracksHead': { en: 'Tracks', zh: '轨道' },+ 'seq.rootEntity': { en: 'Root entity', zh: '根实体' },+ 'seq.keyAtPlayhead': { en: 'Key at playhead', zh: '在播放头处打关键帧' },+ 'seq.muteTrack': { en: 'Mute track', zh: '禁用轨道' },+ 'seq.unmuteTrack': { en: 'Unmute track', zh: '启用轨道' },+ 'seq.frameTip': { en: 'Frame {frame}', zh: '第 {frame} 帧' },+ 'seq.deleteTrack': { en: 'Delete track', zh: '删除轨道' },++ // — add-track picker —+ 'seq.noAnimatable': { en: 'No animatable properties to add', zh: '没有可添加的可动画属性' },++ // — clip settings popover —+ 'seq.clipSettings': { en: 'Clip settings', zh: '剪辑设置' },+ 'seq.durationS': { en: 'Duration (s)', zh: '时长(秒)' },+ 'seq.frameRateFps': { en: 'Frame rate (fps)', zh: '帧率(fps)' },+ 'seq.wrap.once': { en: 'Once', zh: '单次' },+ 'seq.wrap.loop': { en: 'Loop', zh: '循环' },+ 'seq.wrap.pingPong': { en: 'Ping-pong', zh: '往返' },++ // — keyframe interpolation popover —+ 'seq.interpTitle': { en: 'Interpolation', zh: '插值' },+ 'seq.interp.auto': { en: 'Auto (smooth)', zh: '自动(平滑)' },+ 'seq.interp.linear': { en: 'Linear', zh: '线性' },+ 'seq.interp.step': { en: 'Step (constant)', zh: '阶梯(恒定)' },+ 'seq.interp.easeInOut': { en: 'Ease in-out', zh: '缓入缓出' },+ 'seq.deleteKeyframe': { en: 'Delete keyframe', zh: '删除关键帧' },++ // — status strip —+ 'seq.footRecording': { en: '● Recording', zh: '● 录制中' },+ 'seq.footIdle': { en: 'Animation edit', zh: '动画编辑' },+ 'seq.keysUnit': { en: 'keys', zh: '个关键帧' },+ 'seq.tracksUnit': { en: 'tracks', zh: '条轨道' },++ // — toasts (openClip.ts / TimelineCommands.ts) —+ 'seq.toast.openFailed': { en: 'Failed to open animation: {error}', zh: '打开动画失败:{error}' },+ 'seq.toast.createFailed': { en: 'Failed to create animation: {error}', zh: '创建动画失败:{error}' },+ 'seq.toast.created': { en: 'Created animation: {name}', zh: '已创建动画:{name}' },+ 'seq.toast.noFile': {+ en: 'Animation has no file (sample clips cannot be saved)',+ zh: '动画没有对应的文件(示例剪辑无法保存)',+ },+ 'seq.toast.saved': { en: 'Animation saved', zh: '动画已保存' },+ 'seq.toast.saveFailed': { en: 'Failed to save: {error}', zh: '保存失败:{error}' },+});diff --git a/desktop/src/i18n/messages/tile.ts b/desktop/src/i18n/messages/tile.tsnew file mode 100644index 000000000..ddac13933--- /dev/null+++ b/desktop/src/i18n/messages/tile.ts@@ -0,0 +1,166 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file tile.ts — Tilemap painter + Tileset editor: palette, brushes, layers, animation UI.+ */+import { defineMessages } from './types';++export const tileMessages = defineMessages({+ // — Painter paint tools (button tooltips; the shortcut letter is appended in code) —+ 'tile.tool.brush': { en: 'Brush', zh: '笔刷' },+ 'tile.tool.eraser': { en: 'Eraser', zh: '橡皮擦' },+ 'tile.tool.rect': { en: 'Rect', zh: '矩形' },+ 'tile.tool.line': { en: 'Line', zh: '直线' },+ 'tile.tool.bucket': { en: 'Bucket', zh: '填充' },+ 'tile.tool.select': { en: 'Select ({mod}C/X/V copy/cut/paste)', zh: '选择({mod}C/X/V 复制/剪切/粘贴)' },+ 'tile.tool.eyedropper': { en: 'Eyedropper', zh: '取色器' },+ 'tile.tool.terrain': { en: 'Terrain', zh: '地形' },+ 'tile.tool.exit': { en: 'Select / transform (Q · Esc to exit painting)', zh: '选择 / 变换(Q · Esc 退出绘制)' },+ 'tile.flipH': { en: 'Flip horizontal (H)', zh: '水平翻转(H)' },+ 'tile.flipV': { en: 'Flip vertical (V)', zh: '垂直翻转(V)' },+ 'tile.rotate': { en: 'Rotate 90° (R)', zh: '旋转 90°(R)' },+ 'tile.randomTip': {+ en: 'Random: each painted cell samples one tile from the selection',+ zh: '随机:每个绘制的单元格从选区中随机取一块瓦片',+ },+ 'tile.terrainBrush': { en: 'Terrain brush', zh: '地形笔刷' },++ // — Painter layer strip —+ 'tile.newLayerTip': { en: 'New layer on this tileset', zh: '在此瓦片集上新建层' },+ 'tile.show': { en: 'Show', zh: '显示' },+ 'tile.hide': { en: 'Hide', zh: '隐藏' },+ 'tile.paintOn': { en: 'Paint on "{name}"', zh: '在“{name}”上绘制' },+ 'tile.opacityPct': { en: 'Opacity {pct}%', zh: '不透明度 {pct}%' },+ 'tile.lock': { en: 'Lock', zh: '锁定' },+ 'tile.unlock': { en: 'Unlock', zh: '解锁' },++ // — Painter tileset tabs —+ 'tile.tilesetN': { en: 'Tileset {n}', zh: '瓦片集 {n}' },+ 'tile.addTileset': { en: 'Add tileset', zh: '添加瓦片集' },+ 'tile.removeTileset': { en: 'Remove tileset', zh: '移除瓦片集' },+ 'tile.noTilesetsToAdd': { en: 'No tilesets to add', zh: '没有可添加的瓦片集' },++ // — Painter palette + zoom bar —+ 'tile.zoomIn': { en: 'Zoom in', zh: '放大' },+ 'tile.zoomOut': { en: 'Zoom out', zh: '缩小' },+ 'tile.fitWidth': { en: 'Fit width', zh: '适配宽度' },+ 'tile.paletteAria': { en: 'Tile palette', zh: '瓦片调色板' },+ 'tile.noPalette': {+ en: 'No palette (the tilemap references no .estileset)',+ zh: '没有调色板(该瓦片地图未引用任何 .estileset)',+ },+ 'tile.noTerrains': {+ en: "No terrains (create and tag tiles in the Tileset Editor's Terrain mode)",+ zh: '没有地形(在瓦片集编辑器的地形模式中创建并标记瓦片)',+ },++ // — Painter palette-cell badges —+ 'tile.badgeCollision': { en: 'Has collision', zh: '有碰撞' },+ 'tile.badgeTerrain': { en: 'Terrain member', zh: '地形成员' },+ 'tile.badgeAnimated': { en: 'Animated', zh: '有动画' },++ // — Painter empty state —+ 'tile.noTilemap': { en: 'No tilemap selected', zh: '未选中瓦片地图' },+ 'tile.noTilemapHint': {+ en: 'Right-click an .estileset in the Content Browser → Create Tilemap, or select a tilemap entity in the Outliner',+ zh: '在内容浏览器中右键一个 .estileset → 创建瓦片地图,或在大纲中选中一个瓦片地图实体',+ },++ // — Tileset editor: toolbar fields + modes —+ 'tile.field.tileW': { en: 'Tile W', zh: '瓦片宽' },+ 'tile.field.tileH': { en: 'Tile H', zh: '瓦片高' },+ 'tile.field.margin': { en: 'Margin', zh: '边距' },+ 'tile.field.spacing': { en: 'Spacing', zh: '间距' },+ 'tile.field.zoom': { en: 'Zoom', zh: '缩放' },+ 'tile.mode.aria': { en: 'Edit mode', zh: '编辑模式' },+ 'tile.mode.collision': { en: 'Collision', zh: '碰撞' },+ 'tile.mode.terrain': { en: 'Terrain', zh: '地形' },+ 'tile.mode.animation': { en: 'Animation', zh: '动画' },+ 'tile.shape.aria': { en: 'Collision shape', zh: '碰撞形状' },+ 'tile.shape.box': { en: 'Box', zh: '矩形' },+ 'tile.shape.polygon': { en: 'Polygon', zh: '多边形' },+ 'tile.solidCount': { en: '{count} solid', zh: '{count} 个实心' },+ 'tile.save': { en: 'Save', zh: '保存' },+ 'tile.done': { en: 'Done', zh: '完成' },++ // — Tileset editor: empty state + canvas warning —+ 'tile.noOpen': { en: 'No tileset open', zh: '未打开瓦片集' },+ 'tile.noOpenHint': {+ en: 'Double-click an .estileset in the Content Browser, or right-click a texture → Create Tileset',+ zh: '在内容浏览器中双击一个 .estileset,或右键一张纹理 → 创建瓦片集',+ },+ 'tile.texNotFound': { en: 'Texture not found (ref {ref})', zh: '未找到纹理(引用 {ref})' },+ 'tile.refEmpty': { en: 'empty', zh: '空' },++ // — Tileset editor: collision cells + polygon editor —+ 'tile.cell.polyTip': { en: '#{id} — click to edit collision polygon', zh: '#{id}——点击编辑碰撞多边形' },+ 'tile.pe.title': { en: 'Collision polygon · #{id}', zh: '碰撞多边形 · #{id}' },+ 'tile.pe.clear': { en: 'Clear', zh: '清除' },+ 'tile.pe.hint': {+ en: 'Click to add a vertex · click a vertex to delete · takes effect at ≥3 points',+ zh: '点击添加顶点 · 点击顶点以删除 · ≥3 个顶点时生效',+ },++ // — Tileset editor: terrain authoring —+ 'tile.zone.member': { en: 'Tile belongs to this terrain', zh: '瓦片属于此地形' },+ 'tile.zone.aria': { en: '{dir} peering zone', zh: '{dir}邻接区域' },+ 'tile.zone.peerTip': { en: 'Peer with the {dir} neighbor', zh: '与{dir}方向的邻居相接' },+ 'tile.dir.north': { en: 'north', zh: '北' },+ 'tile.dir.northEast': { en: 'north-east', zh: '东北' },+ 'tile.dir.east': { en: 'east', zh: '东' },+ 'tile.dir.southEast': { en: 'south-east', zh: '东南' },+ 'tile.dir.south': { en: 'south', zh: '南' },+ 'tile.dir.southWest': { en: 'south-west', zh: '西南' },+ 'tile.dir.west': { en: 'west', zh: '西' },+ 'tile.dir.northWest': { en: 'north-west', zh: '西北' },+ 'tile.terrain.edgeShort': { en: 'Edge', zh: '边' },+ 'tile.terrain.cornerShort': { en: 'Corner', zh: '角' },+ 'tile.terrain.new': { en: 'New terrain', zh: '新建地形' },+ 'tile.terrain.modeAria': { en: 'Terrain mode', zh: '地形模式' },+ 'tile.terrain.edge4': { en: 'Edge (4-bit)', zh: '边(4 位)' },+ 'tile.terrain.cornerBlob': { en: 'Corner (blob)', zh: '角(blob)' },+ 'tile.terrain.delete': { en: 'Delete terrain', zh: '删除地形' },++ // — Tileset editor: animation authoring —+ 'tile.anim.pickHint': {+ en: 'Click a tile in the atlas to edit its animation — animated tiles carry a ▶ mark',+ zh: '在图集中点击一块瓦片以编辑其动画——有动画的瓦片带 ▶ 标记',+ },+ 'tile.cell.animEditTip': { en: '#{id} — click to edit its animation', zh: '#{id}——点击编辑其动画' },+ 'tile.cell.animAppendTip': { en: '#{id} — click to append as a frame', zh: '#{id}——点击追加为一帧' },+ 'tile.anim.durTip': { en: 'Frame duration (ms)', zh: '帧时长(毫秒)' },+ 'tile.anim.removeFrame': { en: 'Remove frame', zh: '移除帧' },+ 'tile.anim.addFrames': { en: 'Click atlas tiles to add frames', zh: '点击图集瓦片以添加帧' },+ 'tile.anim.appendFrames': { en: 'Click atlas tiles to append frames', zh: '点击图集瓦片以追加帧' },+ 'tile.anim.clear': { en: 'Clear animation', zh: '清除动画' },+ 'tile.preview': { en: 'Preview', zh: '预览' },++ // — New-Tilemap picker dialog —+ 'tile.pick.hint': { en: "Pick a tileset to use as the map's palette", zh: '选择一个瓦片集作为地图的调色板' },+ 'tile.pick.search': { en: 'Search tilesets…', zh: '搜索瓦片集…' },+ 'tile.pick.noMatch': { en: 'No matching tilesets', zh: '没有匹配的瓦片集' },++ // — Dock panel title (the Tileset editor tab) —+ 'tile.panelTileset': { en: 'Tileset', zh: '瓦片集' },++ // — Toasts —+ 'tile.toast.created': {+ en: 'Created tilemap — pick a brush to paint in the viewport',+ zh: '已创建瓦片地图——选择笔刷即可在视口中绘制',+ },+ 'tile.toast.untracked': { en: 'Tileset is not tracked by the project', zh: '瓦片集未被项目跟踪' },+ 'tile.toast.readFailed': { en: 'Failed to read tileset: {error}', zh: '读取瓦片集失败:{error}' },+ 'tile.toast.openFailed': { en: 'Failed to open tileset: {error}', zh: '打开瓦片集失败:{error}' },+ 'tile.toast.texUntracked': {+ en: 'Texture is not tracked by the project — cannot create tileset',+ zh: '纹理未被项目跟踪——无法创建瓦片集',+ },+ 'tile.toast.createFailed': { en: 'Failed to create tileset: {error}', zh: '创建瓦片集失败:{error}' },+ 'tile.toast.createdTileset': { en: 'Created tileset: {name}', zh: '已创建瓦片集:{name}' },+ 'tile.toast.saved': { en: 'Tileset saved', zh: '瓦片集已保存' },+ 'tile.toast.saveFailed': { en: 'Failed to save tileset: {error}', zh: '保存瓦片集失败:{error}' },+ 'tile.toast.bucketCap': {+ en: 'Bucket fill hit the {cap}-cell cap — filled partially',+ zh: '填充达到 {cap} 单元格上限——已部分填充',+ },+});diff --git a/desktop/src/i18n/messages/viewport.ts b/desktop/src/i18n/messages/viewport.tsnew file mode 100644index 000000000..9b83aa597--- /dev/null+++ b/desktop/src/i18n/messages/viewport.ts@@ -0,0 +1,142 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file viewport.ts — the scene viewport + Game panel: toolbar, overlays, play chrome, perf HUD.+ */+import { defineMessages } from './types';++export const viewportMessages = defineMessages({+ // — Transform tool buttons (top-right cluster) —+ 'vp.tool.select': { en: 'Select', zh: '选择' },+ 'vp.tool.move': { en: 'Move', zh: '移动' },+ 'vp.tool.rotate': { en: 'Rotate', zh: '旋转' },+ 'vp.tool.scale': { en: 'Scale', zh: '缩放' },++ // — HUD hint line (active transform tool) —+ 'vp.hint.select': {+ en: 'Click to select · Shift adds · drag empty to box-select',+ zh: '点击选择 · Shift 加选 · 拖动空白处框选',+ },+ 'vp.hint.move': {+ en: 'Drag a gizmo axis or the body · Alt-drag duplicates · arrows nudge',+ zh: '拖动 Gizmo 轴或其主体 · Alt 拖动创建副本 · 方向键微移',+ },+ 'vp.hint.rotate': { en: 'Drag the ring to rotate the selection', zh: '拖动圆环旋转所选' },+ 'vp.hint.scale': {+ en: 'Drag a handle for per-axis scale · center for uniform',+ zh: '拖动手柄按轴缩放 · 拖动中心等比缩放',+ },++ // — HUD hint line (tilemap paint tools) —+ 'vp.tileHint.brush': {+ en: 'Drag to paint · H/V flips · R rotates the brush · I eyedropper · Q/Esc exits',+ zh: '拖动绘制 · H/V 翻转 · R 旋转笔刷 · I 取色 · Q/Esc 退出',+ },+ 'vp.tileHint.erase': { en: 'Drag to erase (brush-sized) · Q/Esc exits', zh: '拖动擦除(笔刷大小)· Q/Esc 退出' },+ 'vp.tileHint.rect': { en: 'Drag a rectangle to fill · Q/Esc exits', zh: '拖出矩形以填充 · Q/Esc 退出' },+ 'vp.tileHint.line': { en: 'Drag a straight line · Q/Esc exits', zh: '拖出直线 · Q/Esc 退出' },+ 'vp.tileHint.bucket': { en: 'Click to fill the connected region · Q/Esc exits', zh: '点击填充连通区域 · Q/Esc 退出' },+ 'vp.tileHint.select': {+ en: 'Box-select · {mod}C/X copies/cuts · Del clears · {mod}V pastes as brush · Q/Esc exits',+ zh: '框选 · {mod}C/X 复制/剪切 · Del 清除 · {mod}V 粘贴为笔刷 · Q/Esc 退出',+ },+ 'vp.tileHint.eyedropper': { en: 'Click to pick a tile into the brush · Q/Esc exits', zh: '点击拾取瓦片作为笔刷 · Q/Esc 退出' },+ 'vp.tileHint.terrain': {+ en: 'Drag to paint terrain (auto-transitions) · Q/Esc exits',+ zh: '拖动绘制地形(自动过渡)· Q/Esc 退出',+ },++ // — Mode badge: the paint tool's short name —+ 'vp.tileTool.brush': { en: 'Brush', zh: '笔刷' },+ 'vp.tileTool.erase': { en: 'Erase', zh: '擦除' },+ 'vp.tileTool.rect': { en: 'Rect', zh: '矩形' },+ 'vp.tileTool.line': { en: 'Line', zh: '直线' },+ 'vp.tileTool.bucket': { en: 'Bucket', zh: '油漆桶' },+ 'vp.tileTool.select': { en: 'Select', zh: '选择' },+ 'vp.tileTool.eyedropper': { en: 'Eyedropper', zh: '取色器' },+ 'vp.tileTool.terrain': { en: 'Terrain', zh: '地形' },++ // — Corner perf HUD + coord readout —+ 'vp.hud.frame': { en: 'Frame', zh: '帧耗时' },+ 'vp.hud.entities': { en: 'Entities', zh: '实体' },+ 'vp.hud.sel': { en: 'Sel', zh: '选中' },++ // — Show Flags dropdown —+ 'vp.show': { en: 'Show', zh: '显示' },+ 'vp.showFlags': { en: 'Show Flags', zh: '显示标记' },+ 'vp.flag.grid': { en: 'Grid', zh: '网格' },+ 'vp.flag.gizmos': { en: 'Gizmos', zh: 'Gizmo' },+ 'vp.flag.colliders': { en: 'Colliders', zh: '碰撞体' },+ 'vp.flag.previewFx': { en: 'Preview FX', zh: '预览特效' },+ 'vp.flag.perf': { en: 'Perf', zh: '性能' },++ // — View controls —+ 'vp.frameSelected': { en: 'Frame Selected', zh: '聚焦所选' },+ 'vp.coordSpaceTitle': {+ en: "Gizmo axes: World / Local (the active object's own axes)",+ zh: 'Gizmo 坐标轴:世界 / 局部(活动对象自身的坐标轴)',+ },+ 'vp.coord.local': { en: 'Local', zh: '局部' },+ 'vp.coord.world': { en: 'World', zh: '世界' },+ 'vp.pivotTitle': {+ en: "Gizmo pivot: Center of selection / the active object's Pivot",+ zh: 'Gizmo 轴心:所选内容的中心 / 活动对象的轴心',+ },+ 'vp.pivot.pivot': { en: 'Pivot', zh: '轴心' },+ 'vp.pivot.center': { en: 'Center', zh: '中心' },++ // — Design-resolution + device-preview dropdowns (UI mode) —+ 'vp.designResTitle': {+ en: 'Design resolution — the canvas you author against. Picking a preset writes Canvas.designResolution (undoable).',+ zh: '设计分辨率——创作时所依据的画布。选择预设会写入 Canvas.designResolution(可撤销)。',+ },+ 'vp.designRes': { en: 'Design Resolution', zh: '设计分辨率' },+ 'vp.designResExact': { en: 'Exact values: select the Canvas → Inspector', zh: '精确数值:选中 Canvas → 细节面板' },+ 'vp.deviceTitle': {+ en: 'Preview device — simulates a target screen (does NOT change the design resolution)',+ zh: '预览设备——模拟目标屏幕(不会更改设计分辨率)',+ },+ 'vp.device': { en: 'Device', zh: '设备' },+ 'vp.devDesign': { en: 'Design', zh: '设计' },+ 'vp.orientation': { en: 'Orientation', zh: '方向' },+ 'vp.landscape': { en: 'Landscape', zh: '横屏' },+ 'vp.portrait': { en: 'Portrait', zh: '竖屏' },+ 'vp.overlay': { en: 'Overlay', zh: '叠加层' },+ 'vp.safeArea': { en: 'Safe area', zh: '安全区域' },++ // — Snap dropdown —+ 'vp.gridSnap': { en: 'Grid Snap', zh: '网格吸附' },+ 'vp.snapOff': { en: 'Off', zh: '关' },+ 'vp.snapMove': { en: 'Move (units)', zh: '移动(单位)' },+ 'vp.snapRotate': { en: 'Rotate (°)', zh: '旋转(°)' },+ 'vp.snapScale': { en: 'Scale (×)', zh: '缩放(×)' },++ // — Play chrome (Play-in-viewport + Game panel) —+ 'vp.playFailed': { en: 'Play failed: {error}', zh: '运行失败:{error}' },+ 'vp.startingGame': { en: 'Starting game…', zh: '正在启动游戏…' },+ 'vp.stopTitle': { en: 'Stop (Esc)', zh: '停止(Esc)' },+ 'vp.playingStop': { en: '● Playing · Stop', zh: '● 运行中 · 停止' },+ 'vp.playFlag': { en: '● PLAY', zh: '● 运行中' },+ 'vp.pressPlay': { en: 'Press Play to run the game.', zh: '点击“运行”启动游戏。' },+ 'vp.starting': { en: 'Starting…', zh: '正在启动…' },+ 'vp.noMpSession': { en: 'No multiplayer session.', zh: '没有多人会话。' },++ // — Engine boot status —+ 'vp.engineFailed': { en: 'Engine failed to start', zh: '引擎启动失败' },+ 'vp.booting': { en: 'Booting esengine…', zh: '正在启动 esengine…' },++ // — Perf overlay (fps/p50/p95/p99/ms stay as acronyms) —+ 'vp.perfLongFrames': { en: 'long frames', zh: '长帧' },+ 'vp.perfTask': { en: 'task', zh: '任务' },++ // — Transform-tool drag hints (tools/transformTools.ts); the quoted UI names+ // mirror det.placeUnderCanvas / det.position / det.absolute verbatim —+ 'vp.orphanUiHint': {+ en: 'This UI element has no Canvas, so it can’t be positioned — add one via Details ▸ “Place under a Canvas”.',+ zh: '此 UI 元素没有 Canvas,无法定位——请通过 细节 ▸ “放置到 Canvas 下” 添加一个。',+ },+ 'vp.flowUiHint': {+ en: 'This UI node is Relative (flow-positioned) — set Position to Absolute to move it freely.',+ zh: '此 UI 节点为相对定位(随布局流动)——将“位置”设为“绝对定位”后才能自由移动。',+ },+});diff --git a/desktop/src/launcher/Launcher.tsx b/desktop/src/launcher/Launcher.tsxindex 6f50bcb52..6a108cb5e 100644--- a/desktop/src/launcher/Launcher.tsx+++ b/desktop/src/launcher/Launcher.tsx@@ -7,6 +7,7 @@ import { ProjectStore } from '@/project/ProjectStore';import { WindowControls } from '@/layout/WindowControls';import { SearchField } from '@/components/SearchField';import { Segmented } from '@/components/Segmented';+import { t } from '@/i18n';import type { RecentEntry, TemplateEntry } from '@/project/format';import { version } from '../../package.json';@@ -21,14 +22,14 @@ type Layout = 'grid' | 'list';function relTime(ts: number): string {const s = Math.max(1, Math.floor((Date.now() - ts) / 1000));- if (s < 60) return 'just now';+ if (s < 60) return t('launcher.justNow');const m = Math.floor(s / 60);- if (m < 60) return `${m}m ago`;+ if (m < 60) return t('launcher.minutesAgo', { m });const h = Math.floor(m / 60);- if (h < 24) return `${h}h ago`;+ if (h < 24) return t('launcher.hoursAgo', { h });const d = Math.floor(h / 24);- if (d < 7) return `${d}d ago`;- return `${Math.floor(d / 7)}w ago`;+ if (d < 7) return t('launcher.daysAgo', { d });+ return t('launcher.weeksAgo', { w: Math.floor(d / 7) });}/** A static SVG constellation — the launcher's quiet signature mark. */@@ -100,16 +101,16 @@ function RecentView({return (<><header className="lc-head">- <h1>Recent</h1>+ <h1>{t('launcher.recent')}</h1><div className="lc-head__tools">- <SearchField className="lc-search" placeholder="Search projects" value={query} onChange={setQuery} />+ <SearchField className="lc-search" placeholder={t('launcher.searchProjects')} value={query} onChange={setQuery} /><Segmentedvalue={layout}onChange={setLayout}- ariaLabel="View"+ ariaLabel={t('launcher.viewLabel')}options={[- { value: 'grid', icon: <LayoutGrid size={14} strokeWidth={1.9} />, title: 'Grid' },- { value: 'list', icon: <Rows3 size={14} strokeWidth={1.9} />, title: 'List' },+ { value: 'grid', icon: <LayoutGrid size={14} strokeWidth={1.9} />, title: t('launcher.viewGrid') },+ { value: 'list', icon: <Rows3 size={14} strokeWidth={1.9} />, title: t('launcher.viewList') },]}/></div>@@ -130,14 +131,14 @@ function RecentView({</div>) : recents.length === 0 ? (<div className="lc-empty">- <p>No recent projects yet.</p>+ <p>{t('launcher.noRecent')}</p><button type="button" className="lc-btn lc-btn--primary" onClick={onOpenFolder}>- <FolderOpen size={14} strokeWidth={2} /> Open a project folder+ <FolderOpen size={14} strokeWidth={2} /> {t('launcher.openProjectFolder')}</button></div>) : items.length === 0 ? (<div className="lc-empty">- <p>No projects match “{query}”.</p>+ <p>{t('launcher.noMatch', { query })}</p></div>) : layout === 'grid' ? (<div className="proj-grid">@@ -160,8 +161,8 @@ function RecentView({<buttontype="button"className="proj-card__remove"- title="Remove from recents"- aria-label="Remove from recents"+ title={t('launcher.removeFromRecents')}+ aria-label={t('launcher.removeFromRecents')}onClick={(e) => { e.stopPropagation(); onRemove(p.root); }}><X size={13} strokeWidth={2} />@@ -172,9 +173,9 @@ function RecentView({) : (<div className="proj-list"><div className="proj-list__head mono">- <span>Project</span>- <span>Last opened</span>- <span>Build</span>+ <span>{t('launcher.colProject')}</span>+ <span>{t('launcher.colLastOpened')}</span>+ <span>{t('launcher.colBuild')}</span></div>{items.map((p) => (<div@@ -194,8 +195,8 @@ function RecentView({<buttontype="button"className="proj-row__remove"- title="Remove from recents"- aria-label="Remove from recents"+ title={t('launcher.removeFromRecents')}+ aria-label={t('launcher.removeFromRecents')}onClick={(e) => { e.stopPropagation(); onRemove(p.root); }}><X size={13} strokeWidth={2} />@@ -265,19 +266,19 @@ function NewView({ onCreated }: { onCreated: () => void }) {<div className="lc-new"><div className="lc-new__gallery"><header className="lc-head">- <h1>New project</h1>- <p className="lc-head__sub">Start from a template — you can change anything later.</p>+ <h1>{t('launcher.newProject')}</h1>+ <p className="lc-head__sub">{t('launcher.newProjectSub')}</p></header>{templates.length === 0 ? (<div className="lc-empty">- <p>The bundled templates are missing.</p>- <p className="lc-empty__hint">Reinstalling the editor should restore them.</p>+ <p>{t('launcher.templatesMissing')}</p>+ <p className="lc-empty__hint">{t('launcher.templatesMissingHint')}</p></div>) : (<div className="proj-grid">{[- { label: 'Starters', items: starters },- { label: 'Examples', items: examples },+ { label: t('launcher.groupStarters'), items: starters },+ { label: t('launcher.groupExamples'), items: examples },].map(({ label, items }) =>items.length === 0 ? null : (<Fragment key={label}>@@ -314,19 +315,19 @@ function NewView({ onCreated }: { onCreated: () => void }) {{tpl.description && <p className="lc-create__desc">{tpl.description}</p>}<label className="lc-field">- <span>Project name</span>+ <span>{t('launcher.projectName')}</span><input value={name} onChange={(e) => setName(e.target.value)} spellCheck={false} /></label><label className="lc-field">- <span>Location</span>+ <span>{t('launcher.location')}</span><span className="lc-field__path"><inputvalue={location}onChange={(e) => setLocation(e.target.value)}- placeholder="Choose a folder…"+ placeholder={t('launcher.chooseFolderPlaceholder')}spellCheck={false}/>- <button type="button" className="lc-field__browse" title="Choose folder" onClick={browse}>+ <button type="button" className="lc-field__browse" title={t('launcher.chooseFolder')} onClick={browse}><FolderOpen size={13} strokeWidth={1.9} /></button></span>@@ -339,17 +340,17 @@ function NewView({ onCreated }: { onCreated: () => void }) {disabled={busy || !name}>{busy ? (- 'Creating…'+ t('launcher.creating')) : (<>- Create project <ArrowRight size={15} strokeWidth={2} />+ {t('launcher.createProject')} <ArrowRight size={15} strokeWidth={2} /></>)}</button></>) : (<div className="lc-create__hint">- <p>Pick a template to begin.</p>+ <p>{t('launcher.pickTemplate')}</p></div>)}</aside>@@ -381,15 +382,15 @@ export function Launcher() {</svg><div className="lc-brand__text"><strong>Estella</strong>- <span>editor</span>+ <span>{t('launcher.brandEditor')}</span></div></div><div className="launcher__bar-actions"><button type="button" className="lc-btn" onClick={() => setView('new')}>- <Plus size={14} strokeWidth={2} /> New project+ <Plus size={14} strokeWidth={2} /> {t('launcher.newProject')}</button><button type="button" className="lc-btn lc-btn--primary" onClick={openFolder}>- <FolderOpen size={14} strokeWidth={2} /> Open folder…+ <FolderOpen size={14} strokeWidth={2} /> {t('launcher.openFolder')}</button></div><WindowControls />@@ -403,14 +404,14 @@ export function Launcher() {className={`lc-nav__item${view === 'recent' ? ' is-active' : ''}`}onClick={() => setView('recent')}>- <Clock size={15} strokeWidth={1.85} /> Recent+ <Clock size={15} strokeWidth={1.85} /> {t('launcher.recent')}</button><buttontype="button"className={`lc-nav__item${view === 'new' ? ' is-active' : ''}`}onClick={() => setView('new')}>- <Plus size={15} strokeWidth={1.85} /> New project+ <Plus size={15} strokeWidth={1.85} /> {t('launcher.newProject')}</button></nav><div className="lc-rail__foot">diff --git a/desktop/src/layout/ActivityBar.tsx b/desktop/src/layout/ActivityBar.tsxindex e7fa38d6c..15069415c 100644--- a/desktop/src/layout/ActivityBar.tsx+++ b/desktop/src/layout/ActivityBar.tsx@@ -10,6 +10,7 @@ import { EDITOR_MODES } from '@/mode/editorModes';import { activeMode } from '@/mode/activeMode';import { dockApi } from '@/layout/dockApi';import { commands } from '@/commands';+import { t } from '@/i18n';export function ActivityBar() {const contentDrawer = useEditorStore((s) => s.contentDrawer);@@ -29,7 +30,7 @@ export function ActivityBar() {key={m.id}type="button"className={`act${current === m.id ? ' active' : ''}`}- title={`${m.label} Mode`}+ title={t(`cmd.mode.${m.id}` as const)}onClick={() => commands.run(`mode.${m.id}`)}><Icon size={19} strokeWidth={1.7} />@@ -40,7 +41,7 @@ export function ActivityBar() {<buttontype="button"className="act"- title="Toggle Outliner"+ title={t('layout.toggleOutliner')}onClick={() => dockApi.togglePanelCollapse('outliner')}><ListTree size={19} strokeWidth={1.7} />@@ -48,7 +49,7 @@ export function ActivityBar() {<buttontype="button"className="act"- title="Toggle Details"+ title={t('layout.toggleDetails')}onClick={() => dockApi.togglePanelCollapse('details')}><SlidersHorizontal size={19} strokeWidth={1.7} />@@ -56,7 +57,7 @@ export function ActivityBar() {<buttontype="button"className={`act${contentDrawer ? ' active' : ''}`}- title="Content Drawer (Ctrl+Space)"+ title={t('layout.contentDrawerTooltip')}onClick={toggleContentDrawer}><FolderOpen size={19} strokeWidth={1.7} />@@ -64,7 +65,7 @@ export function ActivityBar() {<buttontype="button"className="act"- title="Output Log"+ title={t('layout.panel.outputLog')}onClick={() => dockApi.revealAndExpand('log')}><Terminal size={19} strokeWidth={1.7} />@@ -72,7 +73,7 @@ export function ActivityBar() {<buttontype="button"className="act"- title="Sequencer"+ title={t('layout.panel.sequencer')}onClick={() => dockApi.revealAndExpand('sequencer')}><Clapperboard size={19} strokeWidth={1.7} />@@ -80,7 +81,7 @@ export function ActivityBar() {<buttontype="button"className="act"- title="Profiler"+ title={t('layout.panel.profiler')}onClick={() => dockApi.revealAndExpand('profiler')}><Gauge size={19} strokeWidth={1.7} />@@ -91,7 +92,7 @@ export function ActivityBar() {<buttontype="button"className="act"- title="Settings (Ctrl+,)"+ title={t('layout.settingsTooltip')}onClick={() => commands.run('settings.open')}><Settings size={19} strokeWidth={1.7} />diff --git a/desktop/src/layout/ContentDrawer.tsx b/desktop/src/layout/ContentDrawer.tsxindex ea34cf31c..941f49efa 100644--- a/desktop/src/layout/ContentDrawer.tsx+++ b/desktop/src/layout/ContentDrawer.tsx@@ -7,6 +7,7 @@ import { useEffect } from 'react';import { FolderOpen, X } from 'lucide-react';import { useEditorStore } from '@/store/editorStore';import { ContentBrowser } from '@/panels/ContentBrowser';+import { t } from '@/i18n';export function ContentDrawer() {const open = useEditorStore((s) => s.contentDrawer);@@ -29,10 +30,10 @@ export function ContentDrawer() {<span className="ic"><FolderOpen size={16} strokeWidth={1.8} /></span>- Content Browser+ {t('layout.panel.contentBrowser')}</span><span className="drawer-sp" />- <button type="button" className="drawer-x" title="Close (Esc)" onClick={() => setOpen(false)}>+ <button type="button" className="drawer-x" title={t('layout.closeEsc')} onClick={() => setOpen(false)}><X size={15} strokeWidth={2} /></button></div>diff --git a/desktop/src/layout/DockLayout.tsx b/desktop/src/layout/DockLayout.tsxindex a3570c81b..2a342c781 100644--- a/desktop/src/layout/DockLayout.tsx+++ b/desktop/src/layout/DockLayout.tsx@@ -28,6 +28,7 @@ import { ProfilerPanel } from '@/panels/ProfilerPanel';import { Perf } from '@/components/Perf';import { ErrorBoundary } from '@/components/ErrorBoundary';import { dockApi } from '@/layout/dockApi';+import { t } from '@/i18n';const panel = (id: string, node: ReactNode) => (<Perf id={id}>@@ -68,12 +69,12 @@ export const LAYOUT_KEY = 'estella.editor.layout.v6';function buildDefaultLayout(api: DockviewReadyEvent['api']) {// Viewport is the anchor; the right column stacks Outliner over Details.- api.addPanel({ id: 'viewport', component: 'viewport', title: 'Viewport' });+ api.addPanel({ id: 'viewport', component: 'viewport', title: t('layout.panel.viewport') });api.addPanel({id: 'outliner',component: 'outliner',- title: 'World Outliner',+ title: t('layout.panel.worldOutliner'),position: { referencePanel: 'viewport', direction: 'right' },initialWidth: 366, // --w-rightdock});@@ -81,14 +82,14 @@ function buildDefaultLayout(api: DockviewReadyEvent['api']) {api.addPanel({id: 'details',component: 'details',- title: 'Details',+ title: t('layout.panel.details'),position: { referencePanel: 'outliner', direction: 'below' },});api.addPanel({id: 'content',component: 'content',- title: 'Content Browser',+ title: t('layout.panel.contentBrowser'),position: { referencePanel: 'viewport', direction: 'below' },initialHeight: 300,});@@ -97,7 +98,7 @@ function buildDefaultLayout(api: DockviewReadyEvent['api']) {api.addPanel({id: 'log',component: 'log',- title: 'Output Log',+ title: t('layout.panel.outputLog'),position: { referencePanel: 'content', direction: 'within' },});}@@ -109,8 +110,8 @@ function buildDefaultLayout(api: DockviewReadyEvent['api']) {// center document tabs on demand (dockApi.openDocument); only the timeline-shaped// Sequencer belongs in the bottom utility row (UE convention).const BOTTOM_TABS: { id: string; component: string; title: string; refs: string[] }[] = [- { id: 'sequencer', component: 'sequencer', title: 'Sequencer', refs: ['content', 'log'] },- { id: 'profiler', component: 'profiler', title: 'Profiler', refs: ['log', 'content'] },+ { id: 'sequencer', component: 'sequencer', title: t('layout.panel.sequencer'), refs: ['content', 'log'] },+ { id: 'profiler', component: 'profiler', title: t('layout.panel.profiler'), refs: ['log', 'content'] },];function ensureBottomTabs(api: DockviewReadyEvent['api']) {@@ -126,6 +127,35 @@ function ensureBottomTabs(api: DockviewReadyEvent['api']) {}}+// dockview persists panel TITLES inside the saved layout JSON, in whatever+// language wrote them — so a restored layout would pin the old language on+// every tab. All our panel ids are stable, so re-title the known ones from+// the live catalog after a restore. Ids not listed (game clients) are+// session-scoped and never usefully restored.+const PANEL_TITLES: Record<string, () => string> = {+ viewport: () => t('layout.panel.viewport'),+ outliner: () => t('layout.panel.worldOutliner'),+ details: () => t('layout.panel.details'),+ content: () => t('layout.panel.contentBrowser'),+ log: () => t('layout.panel.outputLog'),+ sequencer: () => t('layout.panel.sequencer'),+ profiler: () => t('layout.panel.profiler'),+ game: () => t('layout.panel.game'),+ tileset: () => t('tile.panelTileset'),+ tilemap: () => t('panel.tilemap'),+ 'ui-widgets': () => t('panel.uiWidgets'),+ materialgraph: () => t('mat.panelTitle'),+ statemachine: () => t('fsm.tabTitle'),+ behaviortree: () => t('bt.tabTitle'),+};++function retitleRestoredPanels(api: DockviewReadyEvent['api']) {+ for (const panel of api.panels) {+ const title = PANEL_TITLES[panel.id];+ if (title) panel.api.setTitle(title());+ }+}+// Custom tab content: title + the shared dirty dot (asset editors) + a close// button that only shows on hover / on the active tab, so the strip stays calm.function EstellaTab(props: IDockviewPanelHeaderProps) {@@ -143,8 +173,8 @@ function EstellaTab(props: IDockviewPanelHeaderProps) {<buttontype="button"className="tab-x"- title="Close"- aria-label={`Close ${title}`}+ title={t('ui.close')}+ aria-label={t('layout.closeTab', { title })}onPointerDown={(e) => e.stopPropagation()}onClick={(e) => {e.stopPropagation();@@ -173,8 +203,8 @@ function CollapseHeaderAction(props: IDockviewHeaderActionsProps) {<buttontype="button"className="dv-collapse"- title={collapsed ? 'Expand panel' : 'Collapse panel'}- aria-label={collapsed ? 'Expand panel' : 'Collapse panel'}+ title={collapsed ? t('layout.expandPanel') : t('layout.collapsePanel')}+ aria-label={collapsed ? t('layout.expandPanel') : t('layout.collapsePanel')}aria-expanded={!collapsed}onClick={() => dockApi.setGroupCollapsed(props.api, props.group.id, !collapsed)}>@@ -192,6 +222,7 @@ export function DockLayout() {if (saved) {try {api.fromJSON(JSON.parse(saved));+ retitleRestoredPanels(api);} catch {api.clear();buildDefaultLayout(api);diff --git a/desktop/src/layout/StatusBar.tsx b/desktop/src/layout/StatusBar.tsxindex cebcde789..7489208fb 100644--- a/desktop/src/layout/StatusBar.tsx+++ b/desktop/src/layout/StatusBar.tsx@@ -9,6 +9,7 @@ import { EngineHost } from '@/engine/EngineHost';import { SubsystemIndicator } from './SubsystemIndicator';import { Perf } from '@/components/Perf';import { version } from '../../package.json';+import { t } from '@/i18n';const formatMb = (bytes: number) => (bytes / (1024 * 1024)).toFixed(1);@@ -33,22 +34,22 @@ export function StatusBar() {<buttontype="button"className={`cb-btn${contentDrawer ? ' active' : ''}`}- title="Content Drawer (Ctrl+Space)"+ title={t('layout.contentDrawerTooltip')}onClick={toggleContentDrawer}><FolderOpen size={12} strokeWidth={1.9} />- Content Drawer+ {t('layout.contentDrawer')}</button><span className="sitem"><span className={`sdot${isPlaying ? ' live' : ''}`} />- {isPlaying ? 'Running' : 'Edit Mode'}+ {isPlaying ? t('layout.status.running') : t('layout.status.editMode')}</span><Perf id="statusbar.mods"><SubsystemIndicator /></Perf><span className="sitem">- {selectedIds.size ? `${selectedIds.size} selected` : 'No selection'}+ {selectedIds.size ? t('layout.status.selected', { count: selectedIds.size }) : t('layout.status.noSelection')}</span>{stats.selection && (- <span className="sitem mono" title="Selected transform (X, Y · rotation)">+ <span className="sitem mono" title={t('layout.status.selectionTooltip')}>{stats.selection.x}, {stats.selection.y}<span className="smute"> · {stats.selection.rot}°</span></span>@@ -65,12 +66,12 @@ export function StatusBar() {<Gauge size={11} strokeWidth={1.85} /> {stats.fps} fps</span><span className="sitem mono">- <Boxes size={11} strokeWidth={1.85} /> {stats.entities} entities+ <Boxes size={11} strokeWidth={1.85} /> {t('layout.status.entities', { count: stats.entities })}</span>{stats.vram && (<spanclassName="sitem mono"- title={`Resident texture memory / budget · ${stats.vram.evictable} cached (evictable) texture(s)`}+ title={t('layout.status.vramTooltip', { count: stats.vram.evictable })}><MemoryStick size={11} strokeWidth={1.85} />{formatMb(stats.vram.bytes)}@@ -79,7 +80,7 @@ export function StatusBar() {)}<spanclassName="sitem mono"- title="Active GPU backend — the device actually rendering (reflects any WebGL2 fallback). Change it in Settings → Renderer."+ title={t('layout.status.backendTooltip')}><Cpu size={11} strokeWidth={1.85} />{EngineHost.activeBackend === 'webgpu' ? 'WebGPU' : 'WebGL2'}diff --git a/desktop/src/layout/SubsystemIndicator.tsx b/desktop/src/layout/SubsystemIndicator.tsxindex 03817e7cc..237f1b7c5 100644--- a/desktop/src/layout/SubsystemIndicator.tsx+++ b/desktop/src/layout/SubsystemIndicator.tsx@@ -4,6 +4,7 @@ import { useSyncExternalStore, useState, useRef, useEffect } from 'react';import type { SubsystemStatus } from 'esengine';import { EngineHost } from '@/engine/EngineHost';import { PlayRealm } from '@/engine/PlayRealm';+import { t } from '@/i18n';// Status-bar indicator for engine subsystem (module) health. A single dot// summarizes the worst state; clicking opens a popover that lists each module@@ -14,13 +15,13 @@ type DotKind = 'ok' | 'idle' | 'busy' | 'err';/** Map a subsystem's phase + derived activity to a dot kind and a short label. */function present(s: SubsystemStatus): { dot: DotKind; text: string; run?: boolean } {- if (s.phase === 'error') return { dot: 'err', text: 'error' };- if (s.phase === 'initializing') return { dot: 'busy', text: 'loading…' };- if (s.phase === 'registered') return { dot: 'busy', text: 'registered' };+ if (s.phase === 'error') return { dot: 'err', text: t('layout.mods.error') };+ if (s.phase === 'initializing') return { dot: 'busy', text: t('layout.mods.loading') };+ if (s.phase === 'registered') return { dot: 'busy', text: t('layout.mods.registered') };// ready: distinguish actively stepping vs frozen vs never-probed- if (s.activity === 'stepping') return { dot: 'ok', text: 'running', run: true };- if (s.activity === 'idle') return { dot: 'idle', text: 'idle' };- return { dot: 'ok', text: 'ready' };+ if (s.activity === 'stepping') return { dot: 'ok', text: t('layout.mods.running'), run: true };+ if (s.activity === 'idle') return { dot: 'idle', text: t('layout.mods.idle') };+ return { dot: 'ok', text: t('layout.mods.ready') };}/** Worst-of summary for the trigger dot: error ▸ busy ▸ ok. */@@ -74,17 +75,17 @@ export function SubsystemIndicator() {<buttontype="button"className="sitem click"- title="Engine modules"+ title={t('layout.mods.tooltip')}onClick={() => setOpen((v) => !v)}><span className={`mdot ${dot}`} />- Modules+ {t('layout.mods.label')}</button>{open && (<div className="mods-pop" role="menu">- <h4>Engine Modules{inPlay ? ' · Play' : ''}</h4>+ <h4>{t('layout.mods.heading')}{inPlay ? t('layout.mods.playSuffix') : ''}</h4>{subsystems.length === 0 ? (- <div className="empty-line empty-line--sm">Engine not booted</div>+ <div className="empty-line empty-line--sm">{t('layout.mods.notBooted')}</div>) : (subsystems.map((s) => {const p = present(s);diff --git a/desktop/src/layout/Toolbar.tsx b/desktop/src/layout/Toolbar.tsxindex 78487defd..dbf2ee968 100644--- a/desktop/src/layout/Toolbar.tsx+++ b/desktop/src/layout/Toolbar.tsx@@ -28,12 +28,13 @@ import { ContextMenu } from '@/components/Menu';import { EditorHistory } from '@/engine/EditorHistory';import { commands, formatKeybinding } from '@/commands';import type { ToolMode } from '@/types';+import { t } from '@/i18n';const TOOLS: { mode: ToolMode; icon: LucideIcon; label: string }[] = [- { mode: 'select', icon: MousePointer2, label: 'Select' },- { mode: 'move', icon: Move, label: 'Move' },- { mode: 'rotate', icon: RotateCw, label: 'Rotate' },- { mode: 'scale', icon: Scale3d, label: 'Scale' },+ { mode: 'select', icon: MousePointer2, label: t('layout.tool.select') },+ { mode: 'move', icon: Move, label: t('layout.tool.move') },+ { mode: 'rotate', icon: RotateCw, label: t('layout.tool.rotate') },+ { mode: 'scale', icon: Scale3d, label: t('layout.tool.scale') },];/** Shortcut-hint suffix for a command's tooltip, derived from its keybinding. */@@ -83,7 +84,7 @@ export function Toolbar() {<div className="tgroup"><TBtnicon={Save}- label={`Save Scene${hint('project.save')}`}+ label={`${t('cmd.project.save')}${hint('project.save')}`}onClick={() => commands.run('project.save')}/></div>@@ -93,13 +94,13 @@ export function Toolbar() {<div className="tgroup"><TBtnicon={Undo2}- label={`${undoLabel ? `Undo ${undoLabel}` : 'Undo'}${hint('edit.undo')}`}+ label={`${undoLabel ? t('layout.undoWithLabel', { label: undoLabel }) : t('cmd.edit.undo')}${hint('edit.undo')}`}disabled={!commands.isEnabled('edit.undo')}onClick={() => commands.run('edit.undo')}/><TBtnicon={Redo2}- label={`${redoLabel ? `Redo ${redoLabel}` : 'Redo'}${hint('edit.redo')}`}+ label={`${redoLabel ? t('layout.redoWithLabel', { label: redoLabel }) : t('cmd.edit.redo')}${hint('edit.redo')}`}disabled={!commands.isEnabled('edit.redo')}onClick={() => commands.run('edit.redo')}/>@@ -107,14 +108,14 @@ export function Toolbar() {<span className="tdiv" />- <div className="tgroup" role="radiogroup" aria-label="Transform tool">- {TOOLS.map((t) => (+ <div className="tgroup" role="radiogroup" aria-label={t('layout.transformTool')}>+ {TOOLS.map((tb) => (<TBtn- key={t.mode}- icon={t.icon}- label={`${t.label}${hint(`tool.${t.mode}`)}`}- active={tool === t.mode}- onClick={() => commands.run(`tool.${t.mode}`)}+ key={tb.mode}+ icon={tb.icon}+ label={`${tb.label}${hint(`tool.${tb.mode}`)}`}+ active={tool === tb.mode}+ onClick={() => commands.run(`tool.${tb.mode}`)}/>))}</div>@@ -122,9 +123,9 @@ export function Toolbar() {<span className="tdiv" /><div className="tgroup">- <TBtn icon={Magnet} label="Snapping" active={snapping} onClick={() => commands.run('view.toggleSnapping')} />- <TBtn icon={Grid3x3} label="Show Grid" active={showGrid} onClick={() => commands.run('view.toggleGrid')} />- <TBtn icon={Sparkles} label="Preview FX" active={previewFx} onClick={() => commands.run('view.togglePreviewFx')} />+ <TBtn icon={Magnet} label={t('cmd.view.toggleSnapping')} active={snapping} onClick={() => commands.run('view.toggleSnapping')} />+ <TBtn icon={Grid3x3} label={t('cmd.view.toggleGrid')} active={showGrid} onClick={() => commands.run('view.toggleGrid')} />+ <TBtn icon={Sparkles} label={t('cmd.view.togglePreviewFx')} active={previewFx} onClick={() => commands.run('view.togglePreviewFx')} /></div><span className="tspacer" />@@ -134,22 +135,22 @@ export function Toolbar() {<buttontype="button"className="play-main"- title={isPlaying ? 'Restart' : `Play${hint('play.toggle')}`}+ title={isPlaying ? t('layout.restart') : `${t('cmd.play.toggle')}${hint('play.toggle')}`}onClick={() => commands.run('play.toggle')}><Play size={15} strokeWidth={1.9} fill="currentColor" />- {isPlaying ? 'Restart' : 'Play'}+ {isPlaying ? t('layout.restart') : t('cmd.play.toggle')}</button>- <button type="button" className="play-side" title="Pause" disabled={!isPlaying} onClick={togglePause}>+ <button type="button" className="play-side" title={t('layout.pause')} disabled={!isPlaying} onClick={togglePause}><Pause size={14} strokeWidth={1.9} fill="currentColor" /></button>- <button type="button" className="play-side" title="Stop" disabled={!isPlaying} onClick={stop}>+ <button type="button" className="play-side" title={t('cmd.play.stop')} disabled={!isPlaying} onClick={stop}><Stop size={12} strokeWidth={1.9} fill="currentColor" /></button><buttontype="button"className="play-side play-mode"- title={`Play in ${playTarget === 'viewport' ? 'Viewport' : 'New Window'}`}+ title={playTarget === 'viewport' ? t('layout.playInViewportTooltip') : t('layout.playInWindowTooltip')}disabled={isPlaying}onClick={(e) => {const r = e.currentTarget.getBoundingClientRect();@@ -166,15 +167,15 @@ export function Toolbar() {y={modeMenu.y}onClose={() => setModeMenu(null)}items={[- { label: 'Play In Viewport', checked: playTarget === 'viewport', onClick: () => setPlayTarget('viewport') },- { label: 'Play In New Window', checked: playTarget === 'window', onClick: () => setPlayTarget('window') },+ { label: t('layout.playInViewport'), checked: playTarget === 'viewport', onClick: () => setPlayTarget('viewport') },+ { label: t('layout.playInWindow'), checked: playTarget === 'window', onClick: () => setPlayTarget('window') },{ sep: true },// Multiplayer preview: 1 = plain play; N>1 boots a listen-server realm// (player 1) + N-1 client realms wired by in-editor replication.- { label: 'Single Player', checked: playPlayers <= 1, onClick: () => setPlayPlayers(1) },- { label: '2 Players (Listen Server)', checked: playPlayers === 2, onClick: () => setPlayPlayers(2) },- { label: '3 Players (Listen Server)', checked: playPlayers === 3, onClick: () => setPlayPlayers(3) },- { label: '4 Players (Listen Server)', checked: playPlayers === 4, onClick: () => setPlayPlayers(4) },+ { label: t('layout.singlePlayer'), checked: playPlayers <= 1, onClick: () => setPlayPlayers(1) },+ { label: t('layout.playersListenServer', { n: 2 }), checked: playPlayers === 2, onClick: () => setPlayPlayers(2) },+ { label: t('layout.playersListenServer', { n: 3 }), checked: playPlayers === 3, onClick: () => setPlayPlayers(3) },+ { label: t('layout.playersListenServer', { n: 4 }), checked: playPlayers === 4, onClick: () => setPlayPlayers(4) },]}/>)}@@ -182,10 +183,10 @@ export function Toolbar() {<span className="tspacer" /><div className="tgroup">- <TBtn icon={Eye} label="Show Gizmos" active={showGizmos} onClick={() => commands.run('view.toggleGizmos')} />- <button type="button" className="tbtn" title="Build project scripts" onClick={() => commands.run('build.scripts')}>+ <TBtn icon={Eye} label={t('cmd.view.toggleGizmos')} active={showGizmos} onClick={() => commands.run('view.toggleGizmos')} />+ <button type="button" className="tbtn" title={t('layout.buildScriptsTooltip')} onClick={() => commands.run('build.scripts')}><Hammer size={15} strokeWidth={1.85} />- <span className="lbl">Build</span>+ <span className="lbl">{t('layout.build')}</span></button></div></div>diff --git a/desktop/src/layout/WindowControls.tsx b/desktop/src/layout/WindowControls.tsxindex 44e2a10b7..0a91793e8 100644--- a/desktop/src/layout/WindowControls.tsx+++ b/desktop/src/layout/WindowControls.tsx@@ -8,6 +8,7 @@*/import { useEffect, useState } from 'react';import { Minus, Square, Copy, X } from 'lucide-react';+import { t } from '@/i18n';export function WindowControls() {const win = window.estella?.win;@@ -24,17 +25,17 @@ export function WindowControls() {return (<div className="winctl">- <button className="winctl__btn" title="Minimize" onClick={() => void win.minimize()}>+ <button className="winctl__btn" title={t('layout.minimize')} onClick={() => void win.minimize()}><Minus size={15} strokeWidth={1.8} /></button><buttonclassName="winctl__btn"- title={maximized ? 'Restore' : 'Maximize'}+ title={maximized ? t('layout.restore') : t('layout.maximize')}onClick={() => void win.toggleMaximize()}>{maximized ? <Copy size={12} strokeWidth={1.8} /> : <Square size={12} strokeWidth={1.8} />}</button>- <button className="winctl__btn winctl__btn--close" title="Close" onClick={() => void win.close()}>+ <button className="winctl__btn winctl__btn--close" title={t('ui.close')} onClick={() => void win.close()}><X size={16} strokeWidth={1.8} /></button></div>diff --git a/desktop/src/layout/dockApi.ts b/desktop/src/layout/dockApi.tsindex 155e953ef..b93e9cf56 100644--- a/desktop/src/layout/dockApi.ts+++ b/desktop/src/layout/dockApi.ts@@ -7,6 +7,7 @@* React. DockLayout sets it on ready; callers guard against null.*/import type { DockviewApi, DockviewGroupPanelApi } from 'dockview';+import { t } from '@/i18n';let api: DockviewApi | null = null;// Remembered pre-collapse sizes, per panel id (so a re-expand restores them).@@ -85,7 +86,7 @@ export const dockApi = {api.addPanel({id: 'game',component: 'game',- title: 'Game',+ title: t('layout.panel.game'),position: api.getPanel('viewport') ? { referencePanel: 'viewport', direction: 'within' } : undefined,});}@@ -106,7 +107,7 @@ export const dockApi = {api.addPanel({id,component: 'gameClient',- title: `Game P${realmId + 1}`,+ title: t('layout.panel.gamePlayer', { n: realmId + 1 }),params: { realmId },position: anchor ? { referencePanel: anchor.id, direction: 'right' } : undefined,});diff --git a/desktop/src/material/materialInspectorModel.ts b/desktop/src/material/materialInspectorModel.tsindex e6242e443..7052a05a1 100644--- a/desktop/src/material/materialInspectorModel.ts+++ b/desktop/src/material/materialInspectorModel.ts@@ -14,20 +14,21 @@*/import { BlendMode, CullMode, Material, type MaterialAssetData, type UniformValue } from 'esengine';import type { InspectorComponent, InspectorField, InspectorFieldType, EnumOption, GradientValue, CurveValue, DimensionValue } from '@/types';+import { t } from '@/i18n';import { MaterialDocument } from './MaterialDocument';import { reflectEsshader, type ShaderParam, type ShaderReflection } from './shaderReflect';const BLEND_OPTIONS: EnumOption[] = [- { label: 'Normal', value: BlendMode.Normal },- { label: 'Additive', value: BlendMode.Additive },- { label: 'Multiply', value: BlendMode.Multiply },- { label: 'Screen', value: BlendMode.Screen },- { label: 'Premultiplied', value: BlendMode.PremultipliedAlpha },+ { label: t('mat.blendNormal'), value: BlendMode.Normal },+ { label: t('mat.blendAdditive'), value: BlendMode.Additive },+ { label: t('mat.blendMultiply'), value: BlendMode.Multiply },+ { label: t('mat.blendScreen'), value: BlendMode.Screen },+ { label: t('mat.blendPremultiplied'), value: BlendMode.PremultipliedAlpha },];const CULL_OPTIONS: EnumOption[] = [- { label: 'None', value: CullMode.None },- { label: 'Back', value: CullMode.Back },- { label: 'Front', value: CullMode.Front },+ { label: t('mat.cullNone'), value: CullMode.None },+ { label: t('mat.cullBack'), value: CullMode.Back },+ { label: t('mat.cullFront'), value: CullMode.Front },];const ARITY: Record<string, number> = { float: 1, int: 1, vec2: 2, vec3: 3, vec4: 4, color: 4 };@@ -180,16 +181,16 @@ export function buildMaterialComponents(asset: MaterialAssetData, ctx: MaterialCconst out: InspectorComponent[] = [];const paramFields = ctx.reflection.params.map((p) => paramField(p, asset, ctx.inherited)).filter((f): f is InspectorField => f != null);- if (paramFields.length) out.push({ name: 'Parameters', label: 'Parameters', fields: paramFields });+ if (paramFields.length) out.push({ name: 'Parameters', label: t('mat.parameters'), fields: paramFields });out.push({name: 'Render State',- label: 'Render State',+ label: t('mat.renderState'),fields: [- { key: 'blendMode', label: 'Blend Mode', type: 'enum', options: BLEND_OPTIONS, value: asset.blendMode ?? BlendMode.Normal, defaultValue: BlendMode.Normal },- { key: 'depthTest', label: 'Depth Test', type: 'bool', value: asset.depthTest ?? false, defaultValue: false },- { key: 'depthWrite', label: 'Depth Write', type: 'bool', value: asset.depthWrite ?? true, defaultValue: true },- { key: 'cull', label: 'Cull', type: 'enum', options: CULL_OPTIONS, value: asset.cull ?? CullMode.None, defaultValue: CullMode.None },+ { key: 'blendMode', label: t('mat.blendMode'), type: 'enum', options: BLEND_OPTIONS, value: asset.blendMode ?? BlendMode.Normal, defaultValue: BlendMode.Normal },+ { key: 'depthTest', label: t('mat.depthTest'), type: 'bool', value: asset.depthTest ?? false, defaultValue: false },+ { key: 'depthWrite', label: t('mat.depthWrite'), type: 'bool', value: asset.depthWrite ?? true, defaultValue: true },+ { key: 'cull', label: t('mat.cull'), type: 'enum', options: CULL_OPTIONS, value: asset.cull ?? CullMode.None, defaultValue: CullMode.None },],});diff --git a/desktop/src/material/openMaterial.ts b/desktop/src/material/openMaterial.tsindex c5a9187d6..942af295d 100644--- a/desktop/src/material/openMaterial.ts+++ b/desktop/src/material/openMaterial.ts@@ -13,6 +13,7 @@ import { dockApi } from '@/layout/dockApi';import { useSelection } from '@/store/selectionStore';import { baseName } from '@/project/assetMeta';import { Toasts } from '@/store/Toasts';+import { t } from '@/i18n';/*** Open a `.esmaterial` for editing: select it so the unified Details inspector edits it inline@@ -42,7 +43,7 @@ async function writeMeta(rel: string): Promise<void> {export async function createMaterial(dir: string, templateId = 'sprite-unlit'): Promise<void> {const template = builtinShaderTemplate(templateId);if (!template) {- Toasts.push(`Unknown material template: ${templateId}`, 'error');+ Toasts.push(t('mat.unknownTemplate', { id: templateId }), 'error');return;}const folder = dir ? (dir.endsWith('/') ? dir : `${dir}/`) : '';@@ -66,11 +67,11 @@ export async function createMaterial(dir: string, templateId = 'sprite-unlit'):await window.estella.fs.write(matRel, JSON.stringify(asset, null, 2) + '\n');await writeMeta(matRel);} catch (e) {- Toasts.push(`Failed to create material: ${String(e)}`, 'error');+ Toasts.push(t('mat.createFailed', { error: String(e) }), 'error');return;}await ProjectStore.refreshAssets();- Toasts.push(`Created material: ${baseName(matRel)}`, 'info');+ Toasts.push(t('mat.created', { name: baseName(matRel) }), 'info');openMaterial(matRel);}@@ -92,10 +93,10 @@ export async function createMaterialInstance(parentPath: string): Promise<void>await window.estella.fs.write(matRel, JSON.stringify(asset, null, 2) + '\n');await writeMeta(matRel);} catch (e) {- Toasts.push(`Failed to create material instance: ${String(e)}`, 'error');+ Toasts.push(t('mat.createInstanceFailed', { error: String(e) }), 'error');return;}await ProjectStore.refreshAssets();- Toasts.push(`Created material instance: ${baseName(matRel)}`, 'info');+ Toasts.push(t('mat.createdInstance', { name: baseName(matRel) }), 'info');openMaterial(matRel);}diff --git a/desktop/src/material/openMaterialGraph.ts b/desktop/src/material/openMaterialGraph.tsindex 2f477aeea..9c2446af0 100644--- a/desktop/src/material/openMaterialGraph.ts+++ b/desktop/src/material/openMaterialGraph.ts@@ -14,6 +14,7 @@ import { ProjectStore } from '@/project/ProjectStore';import { dockApi } from '@/layout/dockApi';import { baseName } from '@/project/assetMeta';import { Toasts } from '@/store/Toasts';+import { t } from '@/i18n';const shaderPathOf = (graphPath: string) => graphPath.replace(/\.esmatgraph$/, '.esshader');@@ -22,9 +23,9 @@ export async function openMaterialGraph(path: string): Promise<void> {try {const text = await window.estella.fs.read(path);MaterialGraphDocument.openJson(JSON.parse(text), path);- dockApi.openDocument('materialgraph', 'materialgraph', 'Material Graph');+ dockApi.openDocument('materialgraph', 'materialgraph', t('mat.panelTitle'));} catch (e) {- Toasts.push(`Failed to open material graph: ${String(e)}`, 'error');+ Toasts.push(t('mat.openGraphFailed', { error: String(e) }), 'error');}}@@ -35,9 +36,9 @@ export async function saveMaterialGraph(path: string, graph: MaterialGraph): Proawait window.estella.fs.write(path, JSON.stringify(graph, null, 2) + '\n');await window.estella.fs.write(shaderPathOf(path), shader);MaterialGraphDocument.markSaved();- Toasts.push('Material graph saved', 'info', 1400);+ Toasts.push(t('mat.graphSaved'), 'info', 1400);} catch (e) {- Toasts.push(`Failed to save material graph: ${String(e)}`, 'error');+ Toasts.push(t('mat.saveGraphFailed', { error: String(e) }), 'error');}}@@ -58,10 +59,10 @@ export async function createMaterialGraph(dir: string): Promise<void> {JSON.stringify({ uuid: crypto.randomUUID(), version: '1.0', type: 'materialgraph', importer: { autoMigrate: true } }, null, 2) + '\n',);} catch (e) {- Toasts.push(`Failed to create material graph: ${String(e)}`, 'error');+ Toasts.push(t('mat.createGraphFailed', { error: String(e) }), 'error');return;}await ProjectStore.refreshAssets();- Toasts.push(`Created material graph: ${baseName(rel)}`, 'info');+ Toasts.push(t('mat.createdGraph', { name: baseName(rel) }), 'info');await openMaterialGraph(rel);}diff --git a/desktop/src/mode/resolutionPresets.ts b/desktop/src/mode/resolutionPresets.tsindex 1a46b526e..760b55314 100644--- a/desktop/src/mode/resolutionPresets.ts+++ b/desktop/src/mode/resolutionPresets.ts@@ -8,6 +8,7 @@* how the UI adapts on that device. Dimensions are portrait (w ≤ h); the* orientation toggle swaps them at render time.*/+import { t } from '@/i18n';export type DevicePresetId = 'design' | 'iphone' | 'ipad' | '1080p' | '720p';@@ -29,7 +30,7 @@ export interface DevicePreset {}export const RESOLUTION_PRESETS: DevicePreset[] = [- { id: 'design', label: 'Design', w: 0, h: 0 },+ { id: 'design', label: t('vp.devDesign'), w: 0, h: 0 },{ id: 'iphone', label: 'iPhone', w: 1170, h: 2532, safe: { top: 141, bottom: 102, left: 0, right: 0 } },{ id: 'ipad', label: 'iPad', w: 1640, h: 2360, safe: { top: 48, bottom: 48, left: 0, right: 0 } },{ id: '1080p', label: '1080p', w: 1080, h: 1920 },diff --git a/desktop/src/outliner/columns.tsx b/desktop/src/outliner/columns.tsxindex c5990e37a..5fbcfbf84 100644--- a/desktop/src/outliner/columns.tsx+++ b/desktop/src/outliner/columns.tsx@@ -11,6 +11,7 @@*/import type { ReactNode } from 'react';import { Eye, EyeOff, Lock, LockOpen } from 'lucide-react';+import { t } from '@/i18n';import type { EntityId, NodeKind } from '@/types';import type { OutlinerItem } from './OutlinerModel';@@ -34,21 +35,21 @@ export interface OutlinerColumn {/** Entity kind → the label shown in the Type column. */const KIND_TYPE: Record<NodeKind, string> = {- camera: 'Camera',- sprite: 'Sprite',- spine: 'Spine',- physics: 'Physics',- ui: 'UI',- audio: 'Audio',- group: 'Group',- light: 'Light',- empty: 'Entity',+ camera: t('out.kindCamera'),+ sprite: t('out.kindSprite'),+ spine: t('out.kindSpine'),+ physics: t('out.kindPhysics'),+ ui: t('out.kindUi'),+ audio: t('out.kindAudio'),+ group: t('out.kindGroup'),+ light: t('out.kindLight'),+ empty: t('out.kindEntity'),};/** Type / count column — prefab instances read "Prefab", others by kind + child count. */export const TYPE_COLUMN: OutlinerColumn = {id: 'type',- header: 'Type',+ header: t('out.colType'),width: 78,applies: () => true,render: (item, ctx) => {@@ -57,7 +58,7 @@ export const TYPE_COLUMN: OutlinerColumn = {label = item.count > 0 ? String(item.count) : '';} else {const childCount = item.node.children?.length ?? 0;- const base = ctx.isPrefab?.(item.id) ? 'Prefab' : (KIND_TYPE[item.node.kind] ?? 'Entity');+ const base = ctx.isPrefab?.(item.id) ? t('out.prefab') : (KIND_TYPE[item.node.kind] ?? t('out.kindEntity'));label = childCount > 0 ? `${base} · ${childCount}` : base;}return <span className="rtype">{label}</span>;@@ -76,7 +77,7 @@ export const LOCK_COLUMN: OutlinerColumn = {return (<spanclassName="rlock"- title={locked ? 'Unlock' : 'Lock'}+ title={locked ? t('out.unlock') : t('out.lock')}onClick={(e) => {e.stopPropagation();ctx.onToggleLock?.(item.id, !locked);@@ -100,7 +101,7 @@ export const VIS_COLUMN: OutlinerColumn = {return (<spanclassName="rvis"- title="Toggle visibility"+ title={t('out.toggleVisibility')}onClick={(e) => {e.stopPropagation();ctx.onToggleVisible?.(item.id, !visible);diff --git a/desktop/src/panels/BtTreeEditor.tsx b/desktop/src/panels/BtTreeEditor.tsxindex ec4c9c5e4..884674c3f 100644--- a/desktop/src/panels/BtTreeEditor.tsx+++ b/desktop/src/panels/BtTreeEditor.tsx@@ -18,6 +18,7 @@ import {type BtNode, type BtNodeType, type BtDefinition, type BtEdge,} from 'esengine';import { BtDocument } from '@/bt/BtDocument';+import { t } from '@/i18n';import { EditorHistory } from '@/engine/EditorHistory';import { NodeGraphCanvas, type CanvasNode, type MenuItem } from '@/components/NodeGraphCanvas';import { Select } from '@/components/Select';@@ -29,15 +30,15 @@ const NODE_W = 132;const NODE_H = 46;const BT_TYPES: Array<{ type: BtNodeType; label: string; cat: 'composite' | 'decorator' | 'leaf' }> = [- { type: 'sequence', label: 'Sequence', cat: 'composite' },- { type: 'selector', label: 'Selector', cat: 'composite' },- { type: 'parallel', label: 'Parallel', cat: 'composite' },- { type: 'inverter', label: 'Inverter', cat: 'decorator' },- { type: 'succeeder', label: 'Succeeder', cat: 'decorator' },- { type: 'repeater', label: 'Repeater', cat: 'decorator' },- { type: 'wait', label: 'Wait', cat: 'leaf' },- { type: 'action', label: 'Action', cat: 'leaf' },- { type: 'condition', label: 'Condition', cat: 'leaf' },+ { type: 'sequence', label: t('bt.typeSequence'), cat: 'composite' },+ { type: 'selector', label: t('bt.typeSelector'), cat: 'composite' },+ { type: 'parallel', label: t('bt.typeParallel'), cat: 'composite' },+ { type: 'inverter', label: t('bt.typeInverter'), cat: 'decorator' },+ { type: 'succeeder', label: t('bt.typeSucceeder'), cat: 'decorator' },+ { type: 'repeater', label: t('bt.typeRepeater'), cat: 'decorator' },+ { type: 'wait', label: t('bt.typeWait'), cat: 'leaf' },+ { type: 'action', label: t('bt.typeAction'), cat: 'leaf' },+ { type: 'condition', label: t('bt.typeCondition'), cat: 'leaf' },];const specOf = (t: BtNodeType) => BT_TYPES.find(s => s.type === t)!;const CAT_COLOR: Record<string, string> = { composite: '#7faf9c', decorator: '#8fa0c4', leaf: '#b0a080' };@@ -45,7 +46,7 @@ const CAT_COLOR: Record<string, string> = { composite: '#7faf9c', decorator: '#8function leafSummary(n: BtNode): string {switch (n.type) {case 'action':- case 'condition': return n.name || '(unnamed)';+ case 'condition': return n.name || t('bt.unnamed');case 'repeater': return `× ${(n.count ?? 0) || '∞'}`;case 'wait': return `${n.seconds ?? 0}s`;case 'parallel': return n.policy ?? 'all';@@ -64,7 +65,7 @@ export function BtTreeEditor() {const dragBefore = useRef<BtDefinition | null>(null);if (!def || !filePath) {- return <div className="panel ng-placeholder"><p>Open a <code>.esbt</code> from the Content Browser to edit it.</p></div>;+ return <div className="panel ng-placeholder"><p>{t('ng.openHintPre')}<code>.esbt</code>{t('ng.openHintPost')}</p></div>;}const nodes = btNodes(def).filter((n): n is BtCanvasNode => !!n.id);@@ -87,13 +88,13 @@ export function BtTreeEditor() {<span className="ng-doc-title">{filePath.split('/').pop()}{dirty && <DirtyDot />}</span><span style={{ flex: 1 }} />{selected && def.root.id !== selected && (- <button type="button" className="ng-btn" title="Delete node"+ <button type="button" className="ng-btn" title={t('bt.deleteNode')}onClick={() => { BtDocument.edit('Delete node', d => Object.assign(d, removeBtNode(d, selected))); setSelected(null); }}><Trash2 size={13} strokeWidth={1.9} /></button>)}<button type="button" className="ng-btn primary" disabled={!dirty} onClick={save}>- <Save size={13} strokeWidth={1.9} /> Save+ <Save size={13} strokeWidth={1.9} /> {t('ng.save')}</button></>);@@ -125,23 +126,23 @@ export function BtTreeEditor() {// Canvas → create an unconnected node (wire it by dragging a// parent's handle onto it). Node → add a child under it directly.if (target.kind === 'canvas') {- return BT_TYPES.map(spec => ({ label: `Add ${spec.label}`, onClick: () => BtDocument.edit('Add node', d => Object.assign(d, addBtOrphan(d, spec.type, target.x, target.y))) }));+ return BT_TYPES.map(spec => ({ label: t('bt.menuAdd', { type: spec.label }), onClick: () => BtDocument.edit('Add node', d => Object.assign(d, addBtOrphan(d, spec.type, target.x, target.y))) }));}const parentId = target.nodeId!;const parent = nodes.find(n => n.id === parentId);const full = !parent || (parent.children?.length ?? 0) >= maxChildren(parent.type);const items: MenuItem[] = [];if (parent && canHaveChildren(parent.type) && !full) {- for (const spec of BT_TYPES) items.push({ label: `Add child: ${spec.label}`, onClick: () => BtDocument.edit('Add node', d => Object.assign(d, addBtChild(d, parentId, spec.type, target.x, target.y))) });+ for (const spec of BT_TYPES) items.push({ label: t('bt.menuAddChild', { type: spec.label }), onClick: () => BtDocument.edit('Add node', d => Object.assign(d, addBtChild(d, parentId, spec.type, target.x, target.y))) });}if (def.root.id !== parentId) {if (items.length) items.push({ sep: true });- items.push({ label: 'Delete node', danger: true, onClick: () => { BtDocument.edit('Delete node', d => Object.assign(d, removeBtNode(d, parentId))); setSelected(null); } });+ items.push({ label: t('bt.deleteNode'), danger: true, onClick: () => { BtDocument.edit('Delete node', d => Object.assign(d, removeBtNode(d, parentId))); setSelected(null); } });}return items;}}toolbar={toolbar}- emptyHint="Drag from a node's handle to another to set parent → child."+ emptyHint={t('bt.emptyHint')}renderNode={(n, sel) => {const spec = specOf(n.type);return (@@ -156,10 +157,10 @@ export function BtTreeEditor() {{selNode && (<div className="ng-inspector">- <div className="ng-insp-title">Node</div>- <label className="ng-field">Type+ <div className="ng-insp-title">{t('bt.inspNodeTitle')}</div>+ <label className="ng-field">{t('bt.type')}<Select- ariaLabel="Node type"+ ariaLabel={t('bt.nodeType')}value={selNode.type}options={BT_TYPES.map(s => ({ value: s.type, label: s.label }))}onChange={v => patch(selNode.id, { type: v })}@@ -167,32 +168,32 @@ export function BtTreeEditor() {</label>{(selNode.type === 'action' || selNode.type === 'condition') && (- <label className="ng-field">Name+ <label className="ng-field">{t('ng.name')}<input className="ng-input" list="bt-names" defaultValue={selNode.name ?? ''} key={`${selNode.id}-name`}- placeholder={selNode.type === 'action' ? 'action name' : 'condition name'}+ placeholder={selNode.type === 'action' ? t('ng.phActionName') : t('ng.phConditionName')}onBlur={e => patch(selNode.id, { name: e.target.value.trim() || undefined })} /></label>)}{selNode.type === 'repeater' && (- <label className="ng-field">Count (0 = forever)+ <label className="ng-field">{t('bt.count')}<input className="ng-input" type="number" min={0} defaultValue={selNode.count ?? 0} key={`${selNode.id}-count`}onBlur={e => patch(selNode.id, { count: Number(e.target.value) || 0 })} /></label>)}{selNode.type === 'wait' && (- <label className="ng-field">Seconds+ <label className="ng-field">{t('bt.seconds')}<input className="ng-input" type="number" min={0} step={0.1} defaultValue={selNode.seconds ?? 0} key={`${selNode.id}-sec`}onBlur={e => patch(selNode.id, { seconds: Number(e.target.value) || 0 })} /></label>)}{selNode.type === 'parallel' && (- <label className="ng-field">Success policy+ <label className="ng-field">{t('bt.successPolicy')}<Select- ariaLabel="Success policy"+ ariaLabel={t('bt.successPolicy')}value={selNode.policy ?? 'all'}options={[- { value: 'all', label: 'all children' },- { value: 'one', label: 'any child' },+ { value: 'all', label: t('bt.policyAll') },+ { value: 'one', label: t('bt.policyOne') },]}onChange={v => patch(selNode.id, { policy: v })}/>@@ -201,16 +202,16 @@ export function BtTreeEditor() {{canHaveChildren(selNode.type) && (<>- <div className="ng-insp-sub">Add child</div>+ <div className="ng-insp-sub">{t('bt.addChildSub')}</div><div className="ng-row"><Select- ariaLabel="Child node type"+ ariaLabel={t('bt.childNodeType')}style={{ flex: 1 }}value={addType}options={BT_TYPES.map(s => ({ value: s.type, label: s.label }))}onChange={setAddType}/>- <button type="button" className="ng-btn" onClick={() => addChild(selNode.id, addType)}>+ Add</button>+ <button type="button" className="ng-btn" onClick={() => addChild(selNode.id, addType)}>{t('bt.addBtn')}</button></div></>)}diff --git a/desktop/src/panels/ContentBrowser.tsx b/desktop/src/panels/ContentBrowser.tsxindex e245a268e..b4bc8a643 100644--- a/desktop/src/panels/ContentBrowser.tsx+++ b/desktop/src/panels/ContentBrowser.tsx@@ -26,6 +26,7 @@ import { onAssetReveal } from '@/project/assetReveal';import { createBehaviorTree } from '@/bt/openBehaviorTree';import { createAnimationClip } from '@/timeline/openClip';import { fsRefresh } from '@/project/fsWatch';+import { t } from '@/i18n';import type { DirEntry } from '@/project/format';import type { AssetType } from '@/types';@@ -161,12 +162,12 @@ function AssetTipCard({ path, entry }: { path: string; entry: DirEntry }) {return (<><div className="cb-tip-name">{entry.name}</div>- <TipRow k="Type" v={entry.isDir ? 'Folder' : TYPE_CODE[type] || type} />- {dims && <TipRow k="Dimensions" v={dims} />}- {!entry.isDir && stat && <TipRow k="Size" v={formatBytes(stat.size)} />}- {stat && <TipRow k="Modified" v={new Date(stat.mtimeMs).toLocaleString()} />}- <TipRow k="Path" v={path} mono />- {assetReference && <TipRow k="Reference" v={assetReference} mono />}+ <TipRow k={t('cb.type')} v={entry.isDir ? t('cb.tipFolder') : TYPE_CODE[type] || type} />+ {dims && <TipRow k={t('cb.tipDimensions')} v={dims} />}+ {!entry.isDir && stat && <TipRow k={t('cb.tipSize')} v={formatBytes(stat.size)} />}+ {stat && <TipRow k={t('cb.tipModified')} v={new Date(stat.mtimeMs).toLocaleString()} />}+ <TipRow k={t('cb.tipPath')} v={path} mono />+ {assetReference && <TipRow k={t('cb.tipReference')} v={assetReference} mono />}</>);}@@ -200,13 +201,13 @@ function useNav() {// Always-visible type filter chips (each toggles a group of asset types). A chip// is active when all its types are in the filter set; "All" clears the filter.const CHIP_GROUPS: { label: string; types: AssetType[]; color: string }[] = [- { label: 'Image', types: ['texture', 'sprite'], color: assetTint('texture') },- { label: 'Prefab', types: ['prefab'], color: assetTint('prefab') },- { label: 'Scene', types: ['scene'], color: assetTint('scene') },- { label: 'Animation', types: ['animation'], color: assetTint('animation') },- { label: 'Script', types: ['script'], color: assetTint('script') },- { label: 'Audio', types: ['audio'], color: assetTint('audio') },- { label: 'Material', types: ['material'], color: assetTint('material') },+ { label: t('cb.chipImage'), types: ['texture', 'sprite'], color: assetTint('texture') },+ { label: t('cb.chipPrefab'), types: ['prefab'], color: assetTint('prefab') },+ { label: t('cb.chipScene'), types: ['scene'], color: assetTint('scene') },+ { label: t('cb.chipAnimation'), types: ['animation'], color: assetTint('animation') },+ { label: t('cb.chipScript'), types: ['script'], color: assetTint('script') },+ { label: t('cb.chipAudio'), types: ['audio'], color: assetTint('audio') },+ { label: t('cb.chipMaterial'), types: ['material'], color: assetTint('material') },];function FolderNode({@@ -433,7 +434,7 @@ export function ContentBrowser() {refreshFs();selectAsset(to);} catch (e) {- Toasts.push(`Undo failed: ${errMsg(e)}`, 'error');+ Toasts.push(t('cb.undoFailed', { error: errMsg(e) }), 'error');}};@@ -443,7 +444,7 @@ export function ContentBrowser() {const cur = path.slice(path.lastIndexOf('/') + 1);if (!name || name === cur) return;if (/[\\/]/.test(name)) {- Toasts.push('Name can’t contain slashes', 'error');+ Toasts.push(t('cb.nameNoSlashes'), 'error');return;}const dest = join(parentOf(path), name);@@ -451,9 +452,9 @@ export function ContentBrowser() {await window.estella.fs.rename(path, dest);refreshFs();selectAsset(dest);- Toasts.push(`Renamed to “${name}”`, 'info', 6000, { label: 'Undo', run: () => void undoMove(dest, path) });+ Toasts.push(t('cb.renamedTo', { name }), 'info', 6000, { label: t('cb.undo'), run: () => void undoMove(dest, path) });} catch (e) {- Toasts.push(`Rename failed: ${errMsg(e)}`, 'error');+ Toasts.push(t('cb.renameFailed', { error: errMsg(e) }), 'error');}};@@ -462,20 +463,20 @@ export function ContentBrowser() {const next = await window.estella.fs.duplicate(path);refreshFs();selectAsset(next);- Toasts.push(`Duplicated as “${next.split('/').pop()}”`, 'info', 6000, {- label: 'Undo',+ Toasts.push(t('cb.duplicatedAs', { name: next.split('/').pop() ?? next }), 'info', 6000, {+ label: t('cb.undo'),run: async () => {try {await window.estella.fs.trash(next);refreshFs();if (useSelection.getState().selectedAsset === next) selectAsset(null);} catch (e) {- Toasts.push(`Undo failed: ${errMsg(e)}`, 'error');+ Toasts.push(t('cb.undoFailed', { error: errMsg(e) }), 'error');}},});} catch (e) {- Toasts.push(`Duplicate failed: ${errMsg(e)}`, 'error');+ Toasts.push(t('cb.duplicateFailed', { error: errMsg(e) }), 'error');}};@@ -489,7 +490,10 @@ export function ContentBrowser() {const refs = referencingPaths(scan.index, path);if (refs.length) {const names = refs.slice(0, 3).map((p) => p.split('/').pop()).join(', ');- warn = `\n\nIt is referenced by ${refs.length} asset${refs.length > 1 ? 's' : ''} (${names}${refs.length > 3 ? ', …' : ''}); those references will break.`;+ warn = `\n\n${t(refs.length > 1 ? 'cb.deleteRefWarnMany' : 'cb.deleteRefWarnOne', {+ count: refs.length,+ names: names + (refs.length > 3 ? ', …' : ''),+ })}`;}} catch {// Best-effort: if the scan fails, confirm without the reference warning.@@ -505,7 +509,7 @@ export function ContentBrowser() {refreshFs();if (selected === target.path) selectAsset(null);} catch (e) {- Toasts.push(`Delete failed: ${errMsg(e)}`, 'error');+ Toasts.push(t('cb.deleteFailed', { error: errMsg(e) }), 'error');}};@@ -524,8 +528,8 @@ export function ContentBrowser() {return cols;};const onGridKey = (e: React.KeyboardEvent) => {- const t = e.target as HTMLElement;- if (t.tagName === 'INPUT' || renaming != null) return; // typing / inline rename+ const el = e.target as HTMLElement;+ if (el.tagName === 'INPUT' || renaming != null) return; // typing / inline renameconst idx = items.findIndex((it) => it.path === selected);const focusIndex = (i: number) => {const it = items[Math.max(0, Math.min(items.length - 1, i))];@@ -615,7 +619,7 @@ export function ContentBrowser() {selectAsset(path);setRenaming(path); // drop straight into rename, like UE5} catch (e) {- Toasts.push(`New folder failed: ${errMsg(e)}`, 'error');+ Toasts.push(t('cb.newFolderFailed', { error: errMsg(e) }), 'error');}};@@ -626,7 +630,7 @@ export function ContentBrowser() {selectAsset(path);setRenaming(path); // drop into rename, like New Folder} catch (e) {- Toasts.push(`New scene failed: ${errMsg(e)}`, 'error');+ Toasts.push(t('cb.newSceneFailed', { error: errMsg(e) }), 'error');}};@@ -637,7 +641,7 @@ export function ContentBrowser() {selectAsset(path); // unified inspector opens the input-map editorsetRenaming(path);} catch (e) {- Toasts.push(`New input map failed: ${errMsg(e)}`, 'error');+ Toasts.push(t('cb.newInputMapFailed', { error: errMsg(e) }), 'error');}};@@ -645,7 +649,7 @@ export function ContentBrowser() {try {await window.estella.shell.showItem(path);} catch (e) {- Toasts.push(`Couldn’t reveal: ${errMsg(e)}`, 'error');+ Toasts.push(t('cb.revealFailed', { error: errMsg(e) }), 'error');}};@@ -656,10 +660,12 @@ export function ContentBrowser() {refreshFs();if (res.imported.length) {selectAsset(res.imported[res.imported.length - 1]);- Toasts.push(`Imported ${res.imported.length} asset${res.imported.length > 1 ? 's' : ''}`, 'success');+ const n = res.imported.length;+ Toasts.push(t(n > 1 ? 'cb.importedMany' : 'cb.importedOne', { count: n }), 'success');}if (res.skipped.length) {- Toasts.push(`Skipped ${res.skipped.length} unsupported file${res.skipped.length > 1 ? 's' : ''}`, 'warn');+ const n = res.skipped.length;+ Toasts.push(t(n > 1 ? 'cb.skippedMany' : 'cb.skippedOne', { count: n }), 'warn');}};@@ -667,7 +673,7 @@ export function ContentBrowser() {try {applyImportResult(await window.estella.project.importAssets(cwd));} catch (e) {- Toasts.push(`Import failed: ${errMsg(e)}`, 'error');+ Toasts.push(t('cb.importFailed', { error: errMsg(e) }), 'error');}};@@ -722,7 +728,7 @@ export function ContentBrowser() {void window.estella.project.importFiles(cwd, sources).then(applyImportResult)- .catch((err) => Toasts.push(`Import failed: ${errMsg(err)}`, 'error'));+ .catch((err) => Toasts.push(t('cb.importFailed', { error: errMsg(err) }), 'error'));};// Move an asset into a folder (drag onto a folder tile / tree node). Rename moves@@ -737,12 +743,12 @@ export function ContentBrowser() {await window.estella.fs.rename(srcPath, dest);refreshFs();if (selected === srcPath) selectAsset(dest);- Toasts.push(`Moved “${name}” to ${folderPath || 'the project root'}`, 'info', 6000, {- label: 'Undo',+ Toasts.push(t('cb.movedTo', { name, dest: folderPath || t('cb.projectRoot') }), 'info', 6000, {+ label: t('cb.undo'),run: () => void undoMove(dest, srcPath),});} catch (e) {- Toasts.push(`Move failed: ${errMsg(e)}`, 'error');+ Toasts.push(t('cb.moveFailed', { error: errMsg(e) }), 'error');}};@@ -782,7 +788,7 @@ export function ContentBrowser() {// Breadcrumb segments: Project › folder › subfolder, each a jump target.const crumbs = useMemo(() => {- const out = [{ name: project?.name ?? 'Project', path: '' }];+ const out = [{ name: project?.name ?? t('cb.project'), path: '' }];let acc = '';for (const part of cwd ? cwd.split('/') : []) {acc = acc ? `${acc}/${part}` : part;@@ -826,24 +832,24 @@ export function ContentBrowser() {if (!ctx.target) {// Empty-space menu (acts on the current folder).return [- { label: 'Import…', icon: <Import size={14} />, onClick: () => void importAssets() },- { label: 'New Folder', icon: <FolderPlus size={14} />, onClick: () => void newFolder() },+ { label: t('cb.menuImport'), icon: <Import size={14} />, onClick: () => void importAssets() },+ { label: t('cb.menuNewFolder'), icon: <FolderPlus size={14} />, onClick: () => void newFolder() },{ sep: true },- { label: 'New Scene', onClick: () => void newScene() },- { label: 'New Animation', onClick: () => void createAnimationClip(cwd) },- { label: 'New Input Map', onClick: () => void newInputMap() },+ { label: t('cb.menuNewScene'), onClick: () => void newScene() },+ { label: t('cb.menuNewAnimation'), onClick: () => void createAnimationClip(cwd) },+ { label: t('cb.menuNewInputMap'), onClick: () => void newInputMap() },{- label: 'New Material',- children: BUILTIN_SHADER_TEMPLATES.map((t) => ({- label: t.label,- onClick: () => void createMaterial(cwd, t.id),+ label: t('cb.menuNewMaterial'),+ children: BUILTIN_SHADER_TEMPLATES.map((tpl) => ({+ label: tpl.label,+ onClick: () => void createMaterial(cwd, tpl.id),})),},- { label: 'New Material Graph', onClick: () => void createMaterialGraph(cwd) },- { label: 'New State Machine', onClick: () => void createStateMachine(cwd) },- { label: 'New Behavior Tree', onClick: () => void createBehaviorTree(cwd) },+ { label: t('cb.menuNewMaterialGraph'), onClick: () => void createMaterialGraph(cwd) },+ { label: t('cb.menuNewStateMachine'), onClick: () => void createStateMachine(cwd) },+ { label: t('cb.menuNewBehaviorTree'), onClick: () => void createBehaviorTree(cwd) },{ sep: true },- { label: 'Show in Explorer', onClick: () => void showInExplorer(cwd) },+ { label: t('cb.menuShowInExplorer'), onClick: () => void showInExplorer(cwd) },];}const { path, entry } = ctx.target;@@ -854,36 +860,36 @@ export function ContentBrowser() {const ref = entry.isDir ? null : ProjectStore.assetRef(path);return [...(entry.isDir || isScene || isMaterial- ? [{ label: 'Open', onClick: () => onOpen(path, entry.isDir, entry.name) }]+ ? [{ label: t('cb.menuOpen'), onClick: () => onOpen(path, entry.isDir, entry.name) }]: []),// The startup scene: what the editor opens, Play boots, and exports ship// first. One per project — the current one offers no redundant action,// and it can't be excluded from export (it IS the export's boot scene)....(isScene && path !== project?.defaultScene? [- { label: 'Set as Startup Scene', onClick: () => void ProjectStore.setDefaultScene(path) },+ { label: t('cb.menuSetStartupScene'), onClick: () => void ProjectStore.setDefaultScene(path) },project?.packaging?.excludeScenes?.includes(path)- ? { label: 'Include in Export', onClick: () => void ProjectStore.setSceneExcluded(path, false) }- : { label: 'Exclude from Export', onClick: () => void ProjectStore.setSceneExcluded(path, true) },+ ? { label: t('cb.menuIncludeInExport'), onClick: () => void ProjectStore.setSceneExcluded(path, false) }+ : { label: t('cb.menuExcludeFromExport'), onClick: () => void ProjectStore.setSceneExcluded(path, true) },]: []),...(isTexture- ? [{ label: 'Create Tileset', onClick: () => void createTilesetFromTexture(path) }]+ ? [{ label: t('cb.menuCreateTileset'), onClick: () => void createTilesetFromTexture(path) }]: []),...(isTileset- ? [{ label: 'Create Tilemap', onClick: () => void createTilemapFromTileset(path) }]+ ? [{ label: t('cb.menuCreateTilemap'), onClick: () => void createTilemapFromTileset(path) }]: []),...(isMaterial- ? [{ label: 'Create Material Instance', onClick: () => void createMaterialInstance(path) }]+ ? [{ label: t('cb.menuCreateMaterialInstance'), onClick: () => void createMaterialInstance(path) }]: []),- { label: 'Rename', onClick: () => setRenaming(path) },- { label: 'Duplicate', onClick: () => void duplicate(path) },+ { label: t('ui.rename'), onClick: () => setRenaming(path) },+ { label: t('cb.menuDuplicate'), onClick: () => void duplicate(path) },{ sep: true },- { label: 'Copy Path', onClick: () => copy(path, 'Copied path') },- ...(ref ? [{ label: 'Copy Reference', onClick: () => copy(ref, 'Copied reference') }] : []),- { label: 'Show in Explorer', onClick: () => void showInExplorer(path) },+ { label: t('cb.menuCopyPath'), onClick: () => copy(path, t('cb.copiedPath')) },+ ...(ref ? [{ label: t('cb.menuCopyReference'), onClick: () => copy(ref, t('cb.copiedReference')) }] : []),+ { label: t('cb.menuShowInExplorer'), onClick: () => void showInExplorer(path) },{ sep: true },- { label: 'Delete', danger: true, onClick: () => void remove(path, entry.name) },+ { label: t('ui.delete'), danger: true, onClick: () => void remove(path, entry.name) },];})();@@ -892,7 +898,7 @@ export function ContentBrowser() {<div className="panel"><div className="empty"><FolderOpen size={24} strokeWidth={1.4} />- <p>Open a project to browse its assets.</p>+ <p>{t('cb.openProjectPrompt')}</p></div></div>);@@ -904,10 +910,10 @@ export function ContentBrowser() {{/* ── Sources (left) ── */}<div className="cb-panel cb-src"><div className="phead cb-head">- <span className="pt">Sources</span>+ <span className="pt">{t('cb.sources')}</span></div>- <div className="cb-src-body" role="tree" aria-label="Folders">- <div className="cb-sec">Folders</div>+ <div className="cb-src-body" role="tree" aria-label={t('cb.folders')}>+ <div className="cb-sec">{t('cb.folders')}</div><FolderNode path="" name={project.name} depth={0} cwd={cwd} onSelect={go} folderDrop={folderDrop} dropPath={dropFolder} /></div></div>@@ -916,13 +922,13 @@ export function ContentBrowser() {<div className="cb-panel cb-main"><div className="phead cb-bar"><div className="cb-nav">- <button type="button" disabled={!canBack} onClick={back} title="Back">+ <button type="button" disabled={!canBack} onClick={back} title={t('cb.back')}><ArrowLeft size={15} strokeWidth={2} /></button>- <button type="button" disabled={!canForward} onClick={forward} title="Forward">+ <button type="button" disabled={!canForward} onClick={forward} title={t('cb.forward')}><ArrowRight size={15} strokeWidth={2} /></button>- <button type="button" disabled={!canUp} onClick={up} title="Up one level">+ <button type="button" disabled={!canUp} onClick={up} title={t('cb.upOneLevel')}><ArrowUp size={15} strokeWidth={2} /></button></div>@@ -940,11 +946,14 @@ export function ContentBrowser() {</Fragment>))}</div>- <SearchField className="cb-search" placeholder="Search (type:texture …)" value={query} onChange={setQuery} />+ <SearchField className="cb-search" placeholder={t('cb.searchPlaceholder')} value={query} onChange={setQuery} /><IconButtonsize="lg"variant="outline"- title={`Sort by ${sort === 'name' ? 'name' : 'type'} — click to sort by ${sort === 'name' ? 'type' : 'name'}`}+ title={t('cb.sortTitle', {+ current: t(sort === 'name' ? 'cb.sortName' : 'cb.sortType'),+ next: t(sort === 'name' ? 'cb.sortType' : 'cb.sortName'),+ })}onClick={() => setSort((s) => (s === 'name' ? 'type' : 'name'))}><ArrowDownUp size={14} strokeWidth={2} />@@ -952,17 +961,17 @@ export function ContentBrowser() {<Segmentedvalue={view}onChange={setView}- ariaLabel="View"+ ariaLabel={t('cb.view')}options={[- { value: 'grid', icon: <LayoutGrid size={13} strokeWidth={1.9} />, title: 'Grid view' },- { value: 'list', icon: <List size={13} strokeWidth={1.9} />, title: 'List view' },+ { value: 'grid', icon: <LayoutGrid size={13} strokeWidth={1.9} />, title: t('cb.gridView') },+ { value: 'list', icon: <List size={13} strokeWidth={1.9} />, title: t('cb.listView') },]}/>- <IconButton size="lg" variant="outline" title="New Folder" onClick={() => void newFolder()}>+ <IconButton size="lg" variant="outline" title={t('cb.menuNewFolder')} onClick={() => void newFolder()}><FolderPlus size={13} strokeWidth={1.9} /></IconButton>- <button type="button" className="cb-add" title="Import assets" onClick={() => void importAssets()}>- <Import size={13} strokeWidth={1.9} /> Import+ <button type="button" className="cb-add" title={t('cb.importAssets')} onClick={() => void importAssets()}>+ <Import size={13} strokeWidth={1.9} /> {t('cb.import')}</button></div>@@ -972,7 +981,7 @@ export function ContentBrowser() {className={`chip${filters.size === 0 ? ' on' : ''}`}onClick={() => setFilters(new Set())}>- All+ {t('cb.chipAll')}</button>{CHIP_GROUPS.map((g) => {const active = g.types.every((t) => filters.has(t));@@ -1049,12 +1058,12 @@ export function ContentBrowser() {)}{!it.isDir && TYPE_CODE[type] && <span className="badge">{TYPE_CODE[type]}</span>}{path === project?.defaultScene && (- <span className="badge start" title="Startup scene">+ <span className="badge start" title={t('cb.startupScene')}><Play size={9} strokeWidth={2.5} /></span>)}{project?.packaging?.excludeScenes?.includes(path) && (- <span className="badge excluded" title="Excluded from export">+ <span className="badge excluded" title={t('cb.excludedFromExport')}><EyeOff size={9} strokeWidth={2.5} /></span>)}@@ -1078,15 +1087,15 @@ export function ContentBrowser() {})}{!listLoading && items.length === 0 && (<div className="empty-line cb-empty" style={{ gridColumn: '1 / -1' }}>- {q ? 'No assets match.' : 'Empty folder — drag files here or use Import.'}+ {q ? t('cb.noMatch') : t('cb.emptyFolder')}</div>)}</div>) : (<div className="cb-list"><div className="lh">- <span>Name</span>- <span>Type</span>+ <span>{t('cb.name')}</span>+ <span>{t('cb.type')}</span></div>{listLoading &&Array.from({ length: 8 }, (_, i) => (@@ -1122,10 +1131,10 @@ export function ContentBrowser() {<span className="t">{it.name}</span>)}{path === project?.defaultScene && (- <Play className="start-mark" size={11} strokeWidth={2.5} aria-label="Startup scene" />+ <Play className="start-mark" size={11} strokeWidth={2.5} aria-label={t('cb.startupScene')} />)}{project?.packaging?.excludeScenes?.includes(path) && (- <EyeOff className="excluded-mark" size={11} strokeWidth={2.5} aria-label="Excluded from export" />+ <EyeOff className="excluded-mark" size={11} strokeWidth={2.5} aria-label={t('cb.excludedFromExport')} />)}</span><span className="c">{it.isDir ? '' : TYPE_CODE[type] || type}</span>@@ -1133,7 +1142,7 @@ export function ContentBrowser() {);})}{!listLoading && items.length === 0 && (- <div className="empty-line cb-empty">{q ? 'No assets match.' : 'Empty folder — drag files here or use Import.'}</div>+ <div className="empty-line cb-empty">{q ? t('cb.noMatch') : t('cb.emptyFolder')}</div>)}</div>)}@@ -1141,13 +1150,13 @@ export function ContentBrowser() {<div className="cb-foot"><span>- {items.length} items{selected ? ' · 1 selected' : ''}+ {t(selected ? 'cb.footItemsSelected' : 'cb.footItems', { count: items.length })}</span><span className="sp" />{view === 'grid' && (<inputtype="range"- title="Thumbnail size"+ title={t('cb.thumbSize')}min={TILE_MIN}max={TILE_MAX}step={4}@@ -1163,10 +1172,10 @@ export function ContentBrowser() {{ctx && <ContextMenu x={ctx.x} y={ctx.y} items={ctxItems} onClose={() => setCtx(null)} />}{confirmDel && (<ConfirmDialog- title="Delete asset"+ title={t('cb.deleteTitle')}danger- confirmLabel="Delete"- body={`Delete “${confirmDel.name}”? It will be moved to the trash.${confirmDel.warn}`}+ confirmLabel={t('ui.delete')}+ body={t('cb.deleteBody', { name: confirmDel.name }) + confirmDel.warn}onConfirm={() => void doRemove()}onCancel={() => setConfirmDel(null)}/>diff --git a/desktop/src/panels/Details.tsx b/desktop/src/panels/Details.tsxindex 61f61bc86..dbb9239e2 100644--- a/desktop/src/panels/Details.tsx+++ b/desktop/src/panels/Details.tsx@@ -105,15 +105,15 @@ function componentIcon(name: string): LucideIcon {}const KIND_LABEL: Record<NodeKind, string> = {- camera: 'Camera',- sprite: 'Sprite',- spine: 'Spine',- physics: 'Physics',- ui: 'UI',- audio: 'Audio',- group: 'Group',- light: 'Light',- empty: 'Entity',+ camera: t('det.kindCamera'),+ sprite: t('det.kindSprite'),+ spine: t('det.kindSpine'),+ physics: t('det.kindPhysics'),+ ui: t('det.kindUi'),+ audio: t('det.kindAudio'),+ group: t('det.kindGroup'),+ light: t('det.kindLight'),+ empty: t('det.kindEntity'),};// The gesture contract, scrub hook, and NumField are the shared numeric-input@@ -225,7 +225,7 @@ export function EnumControl({{pop.anchor && (<Popover anchor={pop.anchor} width={Math.max(pop.anchor.width, 150)} onClose={close}>{searchable && (- <SearchField flush className="dd-search" iconSize={12} autoFocus placeholder="Search" value={q} onChange={setQ} />+ <SearchField flush className="dd-search" iconSize={12} autoFocus placeholder={t('ui.search')} value={q} onChange={setQ} />)}<div className="dd-list">{filtered.map((o) => (@@ -242,7 +242,7 @@ export function EnumControl({{o.value === value && !mixed && <Check size={12} strokeWidth={2.4} />}</button>))}- {filtered.length === 0 && <div className="empty-line empty-line--sm">No match</div>}+ {filtered.length === 0 && <div className="empty-line empty-line--sm">{t('det.noMatch')}</div>}</div></Popover>)}@@ -269,9 +269,9 @@ function FlagsControl({const summary = mixed? '—': active.length === 0- ? 'None'+ ? t('det.none'): active.length === bits.length && bits.length >= 4- ? 'Everything'+ ? t('det.everything'): active.map((o) => prettyLabel(o.label)).join(' | ');const close = () => {pop.close();@@ -293,10 +293,10 @@ function FlagsControl({{bits.length >= 6 && (<div className="dd-allnone"><button type="button" onClick={() => onChange(all)}>- Everything+ {t('det.everything')}</button><button type="button" onClick={() => onChange(0)}>- Nothing+ {t('det.nothing')}</button></div>)}@@ -447,7 +447,7 @@ export function DimControl({<Selectvariant="field"value={String(value.unit)}- ariaLabel="unit"+ ariaLabel={t('det.unitAria')}options={[{ value: String(DimensionUnit.Px), label: 'px' },{ value: String(DimensionUnit.Percent), label: '%' },@@ -602,7 +602,7 @@ function GradientControl({<buttontype="button"className="grad-del"- title="Remove stop"+ title={t('det.removeStop')}onClick={() => {onBegin?.();commit(stops.filter((_, j) => j !== sel));@@ -691,7 +691,7 @@ function CurveControl({<buttontype="button"className="grad-del"- title="Remove key"+ title={t('det.removeKey')}onClick={() => {onBegin?.();commit(keys.filter((_, j) => j !== sel));@@ -736,7 +736,7 @@ export function AssetControl({// Reject a wrong-typed drop (the picker popover already filters; this guards the// drag-drop hole so a font can't land in a texture slot).if (!ProjectStore.assetTypeAllowed(assetType, path)) {- Toasts.push(`This field only accepts ${assetType} assets`, 'error');+ Toasts.push(t('det.wrongAssetType', { type: assetType ?? '' }), 'error');return;}onBegin?.();@@ -785,7 +785,7 @@ export function AssetControl({<buttontype="button"className="loc"- title={info ? `Locate ${info.path} in the Content Browser` : undefined}+ title={info ? t('det.locateInBrowser', { path: info.path }) : undefined}disabled={!info}onMouseDown={(e) => e.stopPropagation()}onClick={() => info && revealAsset(info.path)}@@ -797,16 +797,16 @@ export function AssetControl({<Box size={11} strokeWidth={1.7} />)}</span>- <span className="an">{info ? info.name : 'None'}</span>+ <span className="an">{info ? info.name : t('det.none')}</span></button>- <button type="button" className="pk" title="Pick asset" onMouseDown={(e) => e.stopPropagation()} onClick={openPick}>+ <button type="button" className="pk" title={t('det.pickAsset')} onMouseDown={(e) => e.stopPropagation()} onClick={openPick}><Search size={11} strokeWidth={2} /></button>{info && (<buttontype="button"className="pk"- title="Clear"+ title={t('det.clear')}onClick={() => {onBegin?.();onChange(empty);@@ -818,13 +818,13 @@ export function AssetControl({)}{pop.anchor && (<Popover anchor={pop.anchor} width={Math.max(pop.anchor.width, 240)} onClose={close}>- <SearchField flush className="dd-search" iconSize={12} autoFocus placeholder="Search assets" value={q} onChange={setQ} />+ <SearchField flush className="dd-search" iconSize={12} autoFocus placeholder={t('det.searchAssets')} value={q} onChange={setQ} /><div className="asset-grid"><button type="button" className={`asset-opt${!info ? ' on' : ''}`} onClick={() => pick(empty)}><span className="th"><X size={13} strokeWidth={2} /></span>- <span className="an">None</span>+ <span className="an">{t('det.none')}</span></button>{assets.map((a) => (<button key={a.ref} type="button" className={`asset-opt${a.ref === value ? ' on' : ''}`} title={a.path} onClick={() => pick(a.ref)}>@@ -838,7 +838,7 @@ export function AssetControl({<span className="an">{a.name}</span></button>))}- {assets.length === 0 && <div className="empty-line empty-line--sm">No matching assets</div>}+ {assets.length === 0 && <div className="empty-line empty-line--sm">{t('det.noMatchingAssets')}</div>}</div></Popover>)}@@ -905,7 +905,7 @@ function FieldRow({ entities, comp, field, write }: { entities: EntityId[]; compvalue={cur}ariaLabel={field.key}options={[- ...(dynOpts.includes(cur) ? [] : [{ value: cur, label: cur || '(none)' }]),+ ...(dynOpts.includes(cur) ? [] : [{ value: cur, label: cur || t('det.noneOption') }]),...dynOpts.map((o) => ({ value: o })),]}onChange={(v) => {@@ -1043,7 +1043,7 @@ function FieldRow({ entities, comp, field, write }: { entities: EntityId[]; comptype="button"className={`prop-reset${modified ? ' show' : ''}`}tabIndex={-1}- title="Reset to default"+ title={t('det.resetToDefault')}onClick={modified ? reset : undefined}><RotateCcw size={11} strokeWidth={2} />@@ -1055,13 +1055,13 @@ function FieldRow({ entities, comp, field, write }: { entities: EntityId[]; componClose={() => setFctx(null)}items={[{- label: 'Copy',+ label: t('det.copy'),icon: <Copy size={13} strokeWidth={1.9} />,disabled: mixed,onClick: () => InspectorClipboard.copyField(comp, field.key, field.type, field.value),},{- label: 'Paste',+ label: t('det.paste'),icon: <ClipboardPaste size={13} strokeWidth={1.9} />,disabled: pasteValue == null,onClick: doPaste,@@ -1109,8 +1109,8 @@ function textBoxAction(comp: InspectorComponent, sourceId: EntityId): { label: sconst e = SceneModel.entityBySource(sourceId);if (!e || e.components.some((c) => c.type === 'UINode')) return undefined;return {- label: 'Add layout box',- title: 'Add a UINode and place this Text under a Canvas so align / vertical align resolve within a fixed box.',+ label: t('det.addLayoutBox'),+ title: t('det.addLayoutBoxTip'),run: () => void addTextLayoutBox(sourceId),};}@@ -1141,16 +1141,16 @@ function uiNodeCanvasAction(ids: EntityId[], comp: InspectorComponent): { label:const orphans = ids.filter((id) => !hasCanvasAncestor(id));if (orphans.length === 0) return undefined;return {- label: 'Place under a Canvas',- title: "This UI element isn't under a Canvas, so it can't lay out or be moved. Adds/attaches a Canvas and places it inside.",+ label: t('det.placeUnderCanvas'),+ title: t('det.placeUnderCanvasTip'),run: () => void placeUnderCanvas(orphans),};}-const ANCHOR_H = { [AnchorAxis.Start]: 'Left', [AnchorAxis.Center]: 'Center', [AnchorAxis.End]: 'Right', [AnchorAxis.Stretch]: 'Stretch H' };-const ANCHOR_V = { [AnchorAxis.Start]: 'Top', [AnchorAxis.Center]: 'Middle', [AnchorAxis.End]: 'Bottom', [AnchorAxis.Stretch]: 'Stretch V' };+const ANCHOR_H = { [AnchorAxis.Start]: t('det.anchorLeft'), [AnchorAxis.Center]: t('det.anchorCenter'), [AnchorAxis.End]: t('det.anchorRight'), [AnchorAxis.Stretch]: t('det.anchorStretchH') };+const ANCHOR_V = { [AnchorAxis.Start]: t('det.anchorTop'), [AnchorAxis.Center]: t('det.anchorMiddle'), [AnchorAxis.End]: t('det.anchorBottom'), [AnchorAxis.Stretch]: t('det.anchorStretchV') };const anchorTitle = (h: AnchorAxis, v: AnchorAxis) =>- h === AnchorAxis.Stretch && v === AnchorAxis.Stretch ? 'Stretch' : `${ANCHOR_V[v]} · ${ANCHOR_H[h]}`;+ h === AnchorAxis.Stretch && v === AnchorAxis.Stretch ? t('det.anchorStretch') : `${ANCHOR_V[v]} · ${ANCHOR_H[h]}`;// The widget rect (in a 24×24 cell viewBox) a preset draws: a small rounded box for// a pinned corner/edge/centre, stretched along a Stretch axis, filling the frame@@ -1168,29 +1168,29 @@ function anchorWidgetRect(h: AnchorAxis, v: AnchorAxis) {}const H_ANCHOR_OPTS = [- { value: String(AnchorAxis.Start), label: 'Left' },- { value: String(AnchorAxis.Center), label: 'Center' },- { value: String(AnchorAxis.End), label: 'Right' },- { value: String(AnchorAxis.Stretch), label: 'Stretch' },+ { value: String(AnchorAxis.Start), label: t('det.anchorLeft') },+ { value: String(AnchorAxis.Center), label: t('det.anchorCenter') },+ { value: String(AnchorAxis.End), label: t('det.anchorRight') },+ { value: String(AnchorAxis.Stretch), label: t('det.anchorStretch') },];const V_ANCHOR_OPTS = [- { value: String(AnchorAxis.Start), label: 'Top' },- { value: String(AnchorAxis.Center), label: 'Middle' },- { value: String(AnchorAxis.End), label: 'Bottom' },- { value: String(AnchorAxis.Stretch), label: 'Stretch' },+ { value: String(AnchorAxis.Start), label: t('det.anchorTop') },+ { value: String(AnchorAxis.Center), label: t('det.anchorMiddle') },+ { value: String(AnchorAxis.End), label: t('det.anchorBottom') },+ { value: String(AnchorAxis.Stretch), label: t('det.anchorStretch') },];const POSITION_MODE_OPTS = [- { value: String(UIPositionType.Relative), label: 'In Layout' },- { value: String(UIPositionType.Absolute), label: 'Absolute' },+ { value: String(UIPositionType.Relative), label: t('det.inLayout') },+ { value: String(UIPositionType.Absolute), label: t('det.absolute') },];// alignSelf enum: 0 Auto · 1 Start · 2 Center · 3 End · 4 Stretch (matches the SDK).const ALIGN_SELF_OPTS = [- { value: '0', label: 'Auto' },- { value: '1', label: 'Start' },- { value: '2', label: 'Center' },- { value: '3', label: 'End' },- { value: '4', label: 'Stretch' },+ { value: '0', label: t('det.alignAuto') },+ { value: '1', label: t('det.alignStart') },+ { value: '2', label: t('det.alignCenter') },+ { value: '3', label: t('det.alignEnd') },+ { value: '4', label: t('det.alignStretch') },];/** The UINode fields the Layout block owns, so the generic field flow skips them —@@ -1229,8 +1229,8 @@ function AnchorPicker({ entities, comp }: { entities: EntityId[]; comp: Inspectoreturn (<><div className="anchor-head">- <span className="anchor-t">Anchor</span>- <em className="anchor-cur">{active ? anchorTitle(active.h, active.v) : 'Custom'}</em>+ <span className="anchor-t">{t('det.anchor')}</span>+ <em className="anchor-cur">{active ? anchorTitle(active.h, active.v) : t('det.anchorCustom')}</em></div><div className="anchor-body"><div className={`anchor-preview${active ? '' : ' custom'}`} aria-hidden="true">@@ -1241,20 +1241,20 @@ function AnchorPicker({ entities, comp }: { entities: EntityId[]; comp: Inspecto</div><div className="anchor-axes"><label className="anchor-axis">- <span>Horizontal</span>+ <span>{t('det.horizontal')}</span><Segmentedgrow- ariaLabel="Horizontal anchor"+ ariaLabel={t('det.horizontalAnchorAria')}value={active ? String(active.h) : ''}options={H_ANCHOR_OPTS}onChange={(val) => SceneCommands.setUINodeAnchor(entities, { h: Number(val), v: curV })}/></label><label className="anchor-axis">- <span>Vertical</span>+ <span>{t('det.vertical')}</span><Segmentedgrow- ariaLabel="Vertical anchor"+ ariaLabel={t('det.verticalAnchorAria')}value={active ? String(active.v) : ''}options={V_ANCHOR_OPTS}onChange={(val) => SceneCommands.setUINodeAnchor(entities, { h: curH, v: Number(val) })}@@ -1283,12 +1283,12 @@ function FlowLayoutControls({ entities, comp }: { entities: EntityId[]; comp: In<div className="anchor-body"><div className="anchor-axes"><label className="anchor-axis">- <span>Align Self</span>- <Segmented grow ariaLabel="Align self" value={value} options={ALIGN_SELF_OPTS} onChange={set} />+ <span>{t('det.alignSelf')}</span>+ <Segmented grow ariaLabel={t('det.alignSelfAria')} value={value} options={ALIGN_SELF_OPTS} onChange={set} /></label></div></div>- <div className="anchor-hint">Placed by the parent’s layout · Align Self overrides the cross-axis.</div>+ <div className="anchor-hint">{t('det.flowHint')}</div></>);}@@ -1310,10 +1310,10 @@ function UILayoutControl({ entities, comp }: { entities: EntityId[]; comp: Inspereturn (<div className="anchor-block"><div className="ui-mode-row">- <span className="anchor-t">Position</span>+ <span className="anchor-t">{t('det.position')}</span><Segmentedgrow- ariaLabel="Position mode"+ ariaLabel={t('det.positionModeAria')}value={posField?.mixed ? '' : String(absolute ? UIPositionType.Absolute : UIPositionType.Relative)}options={POSITION_MODE_OPTS}onChange={setMode}@@ -1373,9 +1373,9 @@ function BoxSide({y={ctx.y}onClose={() => setCtx(null)}items={[- { label: 'Copy', icon: <Copy size={13} strokeWidth={1.9} />, disabled: mixed, onClick: () => InspectorClipboard.copyField(comp, field.key, field.type, field.value) },- { label: 'Paste', icon: <ClipboardPaste size={13} strokeWidth={1.9} />, disabled: pasteValue == null, onClick: () => { if (pasteValue == null) return; begin(); apply(pasteValue as never); end(); } },- { label: 'Reset', icon: <RotateCcw size={13} strokeWidth={1.9} />, disabled: !modified, onClick: reset },+ { label: t('det.copy'), icon: <Copy size={13} strokeWidth={1.9} />, disabled: mixed, onClick: () => InspectorClipboard.copyField(comp, field.key, field.type, field.value) },+ { label: t('det.paste'), icon: <ClipboardPaste size={13} strokeWidth={1.9} />, disabled: pasteValue == null, onClick: () => { if (pasteValue == null) return; begin(); apply(pasteValue as never); end(); } },+ { label: t('ui.reset'), icon: <RotateCcw size={13} strokeWidth={1.9} />, disabled: !modified, onClick: reset },]}/>)}@@ -1501,7 +1501,7 @@ function ComponentSection({className={`comp-chk${on ? ' on' : ''}${enable?.mixed ? ' mixed' : ''}`}role={enable ? 'checkbox' : undefined}aria-checked={enable ? (enable.mixed ? 'mixed' : enable.value) : undefined}- title={enable ? (enable.value ? 'Disable component' : 'Enable component') : undefined}+ title={enable ? (enable.value ? t('det.disableComponent') : t('det.enableComponent')) : undefined}onClick={enable ? toggleEnable : (e) => e.stopPropagation()}>{on && <Check size={9} strokeWidth={3.2} />}@@ -1514,7 +1514,7 @@ function ComponentSection({<buttontype="button"className="comp-menu"- title="Component options"+ title={t('det.componentOptions')}onClick={(e) => {e.stopPropagation();onMore(e, comp.name);@@ -1544,7 +1544,7 @@ function ComponentSection({</Fold>))}{advancedFields.length > 0 && (- <Fold label="Advanced" open={isOpen(ADVANCED_FOLD)} onToggle={() => toggleFold(ADVANCED_FOLD)}>+ <Fold label={t('det.advanced')} open={isOpen(ADVANCED_FOLD)} onToggle={() => toggleFold(ADVANCED_FOLD)}>{advancedFields.map(row)}</Fold>)}@@ -1580,10 +1580,10 @@ function GameDetails() {return (<div className="insp">- <div className="game-live">● Playing — live values (revert on Stop)</div>+ <div className="game-live">{t('det.playingLive')}</div>{selection == null || !info ? (<div className="empty">- <p>Select a running entity in the Outliner to inspect + tweak it live.</p>+ <p>{t('det.gameSelectHint')}</p></div>) : (<>@@ -1682,7 +1682,7 @@ function MaterialAssetInspector({ path }: { path: string }) {return (<div className="insp"><div className="insp-empty" style={{ flex: 1 }}>- <div className="et">Loading material…</div>+ <div className="et">{t('det.loadingMaterial')}</div></div></div>);@@ -1697,9 +1697,9 @@ function MaterialAssetInspector({ path }: { path: string }) {try {await window.estella.fs.write(path, JSON.stringify(asset, null, 2) + '\n');MaterialDocument.markSaved();- Toasts.push('Material saved', 'info', 1400);+ Toasts.push(t('det.materialSaved'), 'info', 1400);} catch (e) {- Toasts.push(`Failed to save material: ${String(e)}`, 'error');+ Toasts.push(t('det.materialSaveFailed', { error: String(e) }), 'error');}};@@ -1708,16 +1708,16 @@ function MaterialAssetInspector({ path }: { path: string }) {<div className="ent-head"><div className="ent-row1"><div className="ent-name">{baseName(path)}</div>- <button type="button" className="primary" disabled={!dirty} onClick={() => void save()} title="Save material">- <Save size={13} strokeWidth={1.9} /> Save+ <button type="button" className="primary" disabled={!dirty} onClick={() => void save()} title={t('det.saveMaterialTip')}>+ <Save size={13} strokeWidth={1.9} /> {t('det.save')}</button></div><div className="ent-meta"><span className="pill">- <span className="pk">Material</span>- {isInstance ? 'Instance' : ctx?.reflection.domain ?? 'Unlit2D'}+ <span className="pk">{t('det.material')}</span>+ {isInstance ? t('det.instance') : ctx?.reflection.domain ?? 'Unlit2D'}</span>- {dirty && <span className="pill">Unsaved</span>}+ {dirty && <span className="pill">{t('det.unsaved')}</span>}</div></div>{MaterialDocument.liveHandle > 0 && (@@ -1727,8 +1727,8 @@ function MaterialAssetInspector({ path }: { path: string }) {)}<div className="mat-sync">{MaterialDocument.liveHandle- ? 'Edits preview live in the viewport.'- : 'Not in the current scene — edits apply on Save.'}+ ? t('det.livePreview')+ : t('det.notInScene')}</div><div className="insp-body">{components.map((comp) => (@@ -1742,7 +1742,7 @@ function MaterialAssetInspector({ path }: { path: string }) {/>))}{ctx && components.length === 1 && (- <div className="mat-hint">This material's shader declares no parameters.</div>+ <div className="mat-hint">{t('det.noShaderParams')}</div>)}</div></div>@@ -1752,13 +1752,13 @@ function MaterialAssetInspector({ path }: { path: string }) {// Asset view of the unified inspector — shown when an asset (not an entity) is// selected (in the content browser). A material is edited inline (reflection-drivenconst BINDING_KINDS: Array<{ kind: Binding['kind']; label: string }> = [- { kind: 'key', label: 'Key' },- { kind: 'keys1d', label: 'Keys · 1D axis' },- { kind: 'keys2d', label: 'Keys · 2D axis' },- { kind: 'mouse', label: 'Mouse button' },- { kind: 'gpButton', label: 'Gamepad button' },- { kind: 'gpAxis', label: 'Gamepad axis' },- { kind: 'stick', label: 'Gamepad stick' },+ { kind: 'key', label: t('det.bindKey') },+ { kind: 'keys1d', label: t('det.bindKeys1d') },+ { kind: 'keys2d', label: t('det.bindKeys2d') },+ { kind: 'mouse', label: t('det.bindMouse') },+ { kind: 'gpButton', label: t('det.bindGpButton') },+ { kind: 'gpAxis', label: t('det.bindGpAxis') },+ { kind: 'stick', label: t('det.bindStick') },];function defaultBinding(kind: Binding['kind']): Binding {@@ -1784,20 +1784,20 @@ function BindingRow({ binding, onChange, onRemove }: { binding: Binding; onChang);let fields: React.ReactNode = null;switch (binding.kind) {- case 'key': fields = txt('code', 'Code (e.g. Space, KeyW)'); break;+ case 'key': fields = txt('code', t('det.bindCodePh')); break;case 'keys1d': fields = <>{txt('neg', '−')}{txt('pos', '+')}</>; break;- case 'keys2d': fields = <>{txt('up', 'Up')}{txt('down', 'Down')}{txt('left', 'Left')}{txt('right', 'Right')}</>; break;+ case 'keys2d': fields = <>{txt('up', t('det.bindUp'))}{txt('down', t('det.bindDown'))}{txt('left', t('det.bindLeft'))}{txt('right', t('det.bindRight'))}</>; break;case 'mouse': case 'gpButton': fields = num('button'); break;case 'gpAxis': fields = num('axis'); break;case 'stick':fields = (<SelectclassName="im-in"- ariaLabel="Stick"+ ariaLabel={t('det.stickAria')}value={b.stick === 'right' ? 'right' : 'left'}options={[- { value: 'left', label: 'Left' },- { value: 'right', label: 'Right' },+ { value: 'left', label: t('det.bindLeft') },+ { value: 'right', label: t('det.bindRight') },]}onChange={(v) => set({ stick: v })}/>@@ -1808,13 +1808,13 @@ function BindingRow({ binding, onChange, onRemove }: { binding: Binding; onChang<div className="im-binding"><SelectclassName="im-in kind"- ariaLabel="Binding kind"+ ariaLabel={t('det.bindingKindAria')}value={binding.kind}options={BINDING_KINDS.map((k) => ({ value: k.kind, label: k.label }))}onChange={(v) => onChange(defaultBinding(v))}/>{fields}- <button type="button" className="im-x" onClick={onRemove} title="Remove binding">×</button>+ <button type="button" className="im-x" onClick={onRemove} title={t('det.removeBinding')}>×</button></div>);}@@ -1841,7 +1841,7 @@ function InputMapAssetInspector({ path }: { path: string }) {};}, [path]);- if (!map) return <div className="insp"><div className="empty-line">Loading…</div></div>;+ if (!map) return <div className="insp"><div className="empty-line">{t('det.loading')}</div></div>;const commit = (next: InputMapAsset) => {setMap(next);@@ -1857,10 +1857,10 @@ function InputMapAssetInspector({ path }: { path: string }) {return (<div className="insp input-map"><div className="im-head">- <span>Input Actions</span>- <button type="button" className="im-add" onClick={() => commit(imap.addAction(map, uniqueName()))}>+ Action</button>+ <span>{t('det.inputActions')}</span>+ <button type="button" className="im-add" onClick={() => commit(imap.addAction(map, uniqueName()))}>{t('det.addAction')}</button></div>- {actions.length === 0 && <div className="empty-line">No actions yet — add one to bind keys / buttons / axes.</div>}+ {actions.length === 0 && <div className="empty-line">{t('det.noActions')}</div>}{actions.map(([name, def]) => (<div className="im-action" key={name}><div className="im-action-head">@@ -1874,16 +1874,16 @@ function InputMapAssetInspector({ path }: { path: string }) {/><SelectclassName="im-in"- ariaLabel="Action type"+ ariaLabel={t('det.actionTypeAria')}value={def.type}options={[- { value: 'button', label: 'Button' },- { value: 'axis', label: 'Axis' },- { value: 'axis2d', label: 'Axis 2D' },+ { value: 'button', label: t('det.actButton') },+ { value: 'axis', label: t('det.actAxis') },+ { value: 'axis2d', label: t('det.actAxis2d') },]}onChange={(v) => commit(imap.setActionType(map, name, v as ActionType))}/>- <button type="button" className="im-x" onClick={() => commit(imap.removeAction(map, name))} title="Remove action">×</button>+ <button type="button" className="im-x" onClick={() => commit(imap.removeAction(map, name))} title={t('det.removeAction')}>×</button></div>{def.bindings.map((bnd, i) => (<BindingRow@@ -1893,7 +1893,7 @@ function InputMapAssetInspector({ path }: { path: string }) {onRemove={() => commit(imap.removeBinding(map, name, i))}/>))}- <button type="button" className="im-addb" onClick={() => commit(imap.addBinding(map, name, defaultBinding('key')))}>+ Binding</button>+ <button type="button" className="im-addb" onClick={() => commit(imap.addBinding(map, name, defaultBinding('key')))}>{t('det.addBinding')}</button></div>))}</div>@@ -2002,9 +2002,9 @@ function GenericAssetInspector({ path }: { path: string }) {// Push filter/wrap to the live gl handle so the edit viewport updates now// (no scene reload); a no-op for types/assets without a live texture.if (type === 'texture' || type === 'sprite') ProjectStore.applyLiveTextureSettings(path);- Toasts.push('Import settings saved', 'info', 1400);+ Toasts.push(t('det.importSaved'), 'info', 1400);} catch (e) {- Toasts.push(`Failed to save import settings: ${String(e)}`, 'error');+ Toasts.push(t('det.importSaveFailed', { error: String(e) }), 'error');}};@@ -2019,18 +2019,18 @@ function GenericAssetInspector({ path }: { path: string }) {className="primary"disabled={!dirty}onClick={() => void save()}- title="Save import settings"+ title={t('det.saveImportTip')}>- <Save size={13} strokeWidth={1.9} /> Save+ <Save size={13} strokeWidth={1.9} /> {t('det.save')}</button>)}</div><div className="ent-meta"><span className="pill">- <span className="pk">Type</span>+ <span className="pk">{t('det.type')}</span>{type}</span>- {dirty && <span className="pill">Unsaved</span>}+ {dirty && <span className="pill">{t('det.unsaved')}</span>}</div></div>@@ -2052,24 +2052,24 @@ function GenericAssetInspector({ path }: { path: string }) {{comp ? (<ComponentSectionentities={[]}- comp={comp}+ comp={{ ...comp, label: t('det.importSettings') }}collapsed={collapsed}onToggle={() => setCollapsed((c) => !c)}write={write}/>) : (<div className="insp-empty" style={{ padding: '14px 12px' }}>- <div className="es">This asset type has no import settings.</div>+ <div className="es">{t('det.noImportSettings')}</div></div>)}<div className="cb-meta" style={{ padding: '8px 10px 0' }}>- <MetaRow k="Path" v={path} mono />- {dims && <MetaRow k="Dimensions" v={dims} />}- {stat && <MetaRow k="Size" v={formatBytes(stat.size)} />}- {stat && <MetaRow k="Modified" v={new Date(stat.mtimeMs).toLocaleString()} />}- {assetRef && <MetaRow k="UUID" v={assetRef} mono />}- {refCount != null && <MetaRow k="References" v={String(refCount)} />}+ <MetaRow k={t('det.metaPath')} v={path} mono />+ {dims && <MetaRow k={t('det.metaDimensions')} v={dims} />}+ {stat && <MetaRow k={t('det.metaSize')} v={formatBytes(stat.size)} />}+ {stat && <MetaRow k={t('det.metaModified')} v={new Date(stat.mtimeMs).toLocaleString()} />}+ {assetRef && <MetaRow k={t('det.metaUuid')} v={assetRef} mono />}+ {refCount != null && <MetaRow k={t('det.metaReferences')} v={String(refCount)} />}</div></div>@@ -2082,7 +2082,7 @@ function GenericAssetInspector({ path }: { path: string }) {if (await confirmDiscard(t('discard.openScene', { name: baseName(path) }))) void ProjectStore.openScene(path);}}>- <FolderOpen size={13} strokeWidth={1.85} /> Open Scene+ <FolderOpen size={13} strokeWidth={1.85} /> {t('det.openScene')}</button>)}<button@@ -2090,10 +2090,10 @@ function GenericAssetInspector({ path }: { path: string }) {className="ghost"onClick={() => {void navigator.clipboard?.writeText(path);- Toasts.push('Copied path', 'info', 1600);+ Toasts.push(t('det.copiedPath'), 'info', 1600);}}>- <Copy size={13} strokeWidth={1.85} /> Copy Path+ <Copy size={13} strokeWidth={1.85} /> {t('det.copyPath')}</button></div></div>@@ -2114,11 +2114,11 @@ function FolderInspector({ path }: { path: string }) {</div><div className="ent-meta"><span className="pill">- <span className="pk">Folder</span>+ <span className="pk">{t('det.folder')}</span>{path}</span><span className="pill">- <span className="pk">Items</span>+ <span className="pk">{t('det.items')}</span>{count}</span></div>@@ -2127,8 +2127,8 @@ function FolderInspector({ path }: { path: string }) {<div className="ei"><FolderOpen size={22} strokeWidth={1.4} /></div>- <div className="et">{count === 1 ? '1 entity' : `${count} entities`} in this folder</div>- <div className="es">Folders organize the outliner; they aren't part of the scene.</div>+ <div className="et">{count === 1 ? t('det.folderOneEntity') : t('det.folderEntities', { count })}</div>+ <div className="es">{t('det.folderHint')}</div></div></div>);@@ -2213,8 +2213,8 @@ function EditorDetails() {<div className="ei"><Box size={22} strokeWidth={1.4} /></div>- <div className="et">No selection</div>- <div className="es">Select an entity in the scene, or an asset in the Content Browser.</div>+ <div className="et">{t('det.noSelection')}</div>+ <div className="es">{t('det.noSelectionHint')}</div></div></div>);@@ -2233,12 +2233,12 @@ function EditorDetails() {return (<div className="insp"><div className="phead insp-head">- <SearchField placeholder="Search" value={query} onChange={setQuery} />+ <SearchField placeholder={t('ui.search')} value={query} onChange={setQuery} /><IconButtonsize="lg"variant="outline"active={filtOn}- title="Filter properties"+ title={t('det.filterProps')}onClick={() => setFiltOn((v) => !v)}><Filter size={14} strokeWidth={1.9} />@@ -2248,7 +2248,7 @@ function EditorDetails() {<div className="ent-head"><div className="ent-row1">{multi ? (- <div className="ent-name ent-multi">{ids.length} entities selected</div>+ <div className="ent-name ent-multi">{t('det.entitiesSelected', { count: ids.length })}</div>) : (<inputkey={selectedId}@@ -2262,17 +2262,17 @@ function EditorDetails() {<div className="ent-meta">{multi ? (<span className="pill">- <span className="pk">Editing</span>- {ids.length} entities · shared components+ <span className="pk">{t('det.editing')}</span>+ {t('det.editingShared', { count: ids.length })}</span>) : (<><span className="pill">- <span className="pk">Type</span>+ <span className="pk">{t('det.type')}</span>{KIND_LABEL[entity.kind]}</span><span className="pill">- <span className="pk">ID</span>+ <span className="pk">{t('det.id')}</span>{selectedId}</span></>@@ -2287,27 +2287,27 @@ function EditorDetails() {<span className="pacts"><buttontype="button"- title="Select the prefab asset in the Content Browser"+ title={t('det.prefabSelectTip')}onClick={() => {const info = prefabRef ? ProjectStore.assetInfo(prefabRef) : null;if (info) useSelection.getState().selectAsset(info.path);}}>- <FolderOpen size={12} strokeWidth={1.9} /> Select+ <FolderOpen size={12} strokeWidth={1.9} /> {t('det.prefabSelect')}</button><buttontype="button"- title="Apply this instance's overrides to the prefab asset (updates the base for all instances)"+ title={t('det.prefabApplyTip')}onClick={() => void ProjectStore.applyPrefabInstance(selectedId)}>- <Upload size={12} strokeWidth={1.9} /> Apply+ <Upload size={12} strokeWidth={1.9} /> {t('det.prefabApply')}</button><buttontype="button"- title="Revert all overrides — re-sync this instance to the prefab"+ title={t('det.prefabRevertTip')}onClick={() => void ProjectStore.revertPrefabInstance(selectedId)}>- <RotateCcw size={12} strokeWidth={1.9} /> Revert+ <RotateCcw size={12} strokeWidth={1.9} /> {t('det.prefabRevert')}</button></span></div>@@ -2315,9 +2315,9 @@ function EditorDetails() {</div><div className="insp-addrow">- <button type="button" className="insp-add" title="Add Component" onClick={() => setAddOpen(true)}>+ <button type="button" className="insp-add" title={t('det.addComponent')} onClick={() => setAddOpen(true)}><Plus size={13} strokeWidth={2.4} />- Add Component+ {t('det.addComponent')}</button></div>@@ -2342,7 +2342,7 @@ function EditorDetails() {/>))}{query && visible.length === 0 && (- <div className="empty-line">No components match “{query}”.</div>+ <div className="empty-line">{t('det.noComponentsMatch', { query })}</div>)}</div>@@ -2358,7 +2358,7 @@ function EditorDetails() {const pasteData = InspectorClipboard.componentData(comp);return [{- label: 'Copy Values',+ label: t('det.copyValues'),icon: <Copy size={13} strokeWidth={1.9} />,disabled: !data,onClick: () => {@@ -2366,7 +2366,7 @@ function EditorDetails() {},},{- label: 'Paste Values',+ label: t('det.pasteValues'),icon: <ClipboardPaste size={13} strokeWidth={1.9} />,disabled: !pasteData,onClick: () => {@@ -2374,13 +2374,13 @@ function EditorDetails() {},},{- label: 'Reset to Defaults',+ label: t('det.resetDefaults'),icon: <RotateCcw size={13} strokeWidth={1.9} />,onClick: () => SceneCommands.resetComponentMany(ids, comp),},{ sep: true },{- label: ids.length > 1 ? `Remove Component (${ids.length})` : 'Remove Component',+ label: ids.length > 1 ? t('det.removeComponentN', { count: ids.length }) : t('det.removeComponent'),danger: true,icon: <Trash2 size={13} strokeWidth={1.9} />,onClick: () => SceneCommands.removeComponentMany(ids, comp),diff --git a/desktop/src/panels/GamePanel.tsx b/desktop/src/panels/GamePanel.tsxindex 97ce96049..7e04486ca 100644--- a/desktop/src/panels/GamePanel.tsx+++ b/desktop/src/panels/GamePanel.tsx@@ -1,6 +1,7 @@// SPDX-License-Identifier: Apache-2.0// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Teamimport { useEffect, useRef, useSyncExternalStore } from 'react';+import { t } from '@/i18n';import { PlayRealm, PlayRealms } from '@/engine/PlayRealm';import { useEditorStore } from '@/store/editorStore';@@ -11,11 +12,11 @@ import { useEditorStore } from '@/store/editorStore';function overlayFor(snap: { playing: boolean; ready: boolean; error: string | null }): string | null {return snap.error- ? `Play failed: ${snap.error}`+ ? t('vp.playFailed', { error: snap.error }): !snap.playing- ? 'Press Play to run the game.'+ ? t('vp.pressPlay'): !snap.ready- ? 'Starting…'+ ? t('vp.starting'): null;}@@ -67,7 +68,7 @@ export function GameClientPanel({ realmId }: { realmId: number }) {realm ? realm.getSnapshot : NO_SNAPSHOT,);- const overlay = snap ? overlayFor(snap) : 'No multiplayer session.';+ const overlay = snap ? overlayFor(snap) : t('vp.noMpSession');return (<div className="game-panel"><div className="game-panel__host" ref={hostRef} />diff --git a/desktop/src/panels/MaterialGraphEditor.tsx b/desktop/src/panels/MaterialGraphEditor.tsxindex 29048a301..19be26579 100644--- a/desktop/src/panels/MaterialGraphEditor.tsx+++ b/desktop/src/panels/MaterialGraphEditor.tsx@@ -26,6 +26,7 @@ import {type GraphNodeType,type GraphType,} from 'esengine';+import { t } from '@/i18n';import { MaterialGraphDocument } from '@/material/MaterialGraphDocument';import { saveMaterialGraph } from '@/material/openMaterialGraph';import { EditorHistory } from '@/engine/EditorHistory';@@ -88,7 +89,7 @@ export function MaterialGraphEditor() {const canvas = useRef<NodeGraphCanvasApi>(null);if (!graph || !filePath) {- return <div className="panel ng-placeholder"><p>Open a <code>.esmatgraph</code> from the Content Browser to edit it.</p></div>;+ return <div className="panel ng-placeholder"><p>{t('mat.openHintPrefix')}<code>.esmatgraph</code>{t('mat.openHintSuffix')}</p></div>;}const nodes = graph.nodes as MatCanvasNode[];@@ -117,23 +118,23 @@ export function MaterialGraphEditor() {<buttontype="button"className="ng-btn"- title="Add node"+ title={t('mat.addNode')}onClick={(e) => {const r = e.currentTarget.getBoundingClientRect();canvas.current?.openMenuAt(r.left, r.bottom + 2);}}>- <Plus size={13} strokeWidth={2} /> Add+ <Plus size={13} strokeWidth={2} /> {t('mat.add')}</button>{selected && (- <button type="button" className="ng-btn" title="Delete selected" onClick={() => deleteNode(selected)}>+ <button type="button" className="ng-btn" title={t('mat.deleteSelected')} onClick={() => deleteNode(selected)}><Trash2 size={13} strokeWidth={1.9} /></button>)}<span className="ng-doc-title">{filePath.split('/').pop()}{dirty && <DirtyDot />}</span><span style={{ flex: 1 }} /><button type="button" className="ng-btn primary" disabled={!dirty} onClick={() => void saveMaterialGraph(filePath, graph)}>- <Save size={13} strokeWidth={1.9} /> Save+ <Save size={13} strokeWidth={1.9} /> {t('mat.save')}</button></>);@@ -181,15 +182,15 @@ export function MaterialGraphEditor() {}}menuItems={(target) =>target.kind === 'node'- ? [{ label: 'Delete node', danger: true, onClick: () => deleteNode(target.nodeId!) }]+ ? [{ label: t('mat.deleteNode'), danger: true, onClick: () => deleteNode(target.nodeId!) }]: (Object.keys(NODE_SPECS) as GraphNodeType[])- .filter((t) => NODE_SPECS[t].addable)- .map((t) => ({- label: `Add ${NODE_SPECS[t].label}`,- onClick: () => MaterialGraphDocument.edit(`Add ${t}`, (d) => Object.assign(d, addNode(d, t, target.x, target.y).graph)),+ .filter((nt) => NODE_SPECS[nt].addable)+ .map((nt) => ({+ label: t('mat.addNodeType', { label: NODE_SPECS[nt].label }),+ onClick: () => MaterialGraphDocument.edit(`Add ${nt}`, (d) => Object.assign(d, addNode(d, nt, target.x, target.y).graph)),}))}toolbar={toolbar}- emptyHint="Right-click to add a node, then drag from an output port into a typed input."+ emptyHint={t('mat.emptyHint')}renderNode={(n, sel) => {const spec = NODE_SPECS[n.type];return (diff --git a/desktop/src/panels/Outliner.tsx b/desktop/src/panels/Outliner.tsxindex f5d4b421f..7770acae7 100644--- a/desktop/src/panels/Outliner.tsx+++ b/desktop/src/panels/Outliner.tsx@@ -14,7 +14,8 @@ import { ProjectStore } from '@/project/ProjectStore';import { ContextMenu, type MenuItem } from '@/components/Menu';import { formatKeybinding } from '@/commands/keybinding';import { VirtualTree } from '@/components/VirtualTree';-import { buildOutlinerItems, collectExpandableKeys, entityKey, folderKey, parseQuery, type OutlinerItem } from '@/outliner/OutlinerModel';+import { t } from '@/i18n';+import { buildOutlinerItems, collectExpandableKeys, entityKey, folderKey, parseQuery, type OutlinerItem, type SortMode } from '@/outliner/OutlinerModel';import { useOutliner } from '@/outliner/OutlinerController';import { OutlinerRow } from '@/outliner/OutlinerRow';import { OUTLINER_COLUMNS, TYPE_COLUMN, type OutlinerColumnContext } from '@/outliner/columns';@@ -35,6 +36,14 @@ const gameOnClick = (item: OutlinerItem) => {if (item.kind === 'entity') PlayInspect.select(item.id);};+const SORT_MODE_LABEL: Record<SortMode, string> = {+ manual: t('out.sortManual'),+ name: t('out.sortName'),+ type: t('out.sortType'),+};+// Menu labels for the icon-only columns (their `header` is empty).+const COL_ID_LABEL: Record<string, string> = { lock: t('out.colLock'), vis: t('out.colVis') };+const entityIds = (items: OutlinerItem[]): EntityId[] =>items.filter((i): i is Extract<OutlinerItem, { kind: 'entity' }> => i.kind === 'entity').map((i) => i.id);@@ -50,7 +59,7 @@ function GameTree() {<div className="pbody"><div className="empty"><Search size={22} strokeWidth={1.4} />- <p>Waiting for the running game…</p>+ <p>{t('out.waitingGame')}</p></div></div>);@@ -495,24 +504,24 @@ export function Outliner() {if (!ctx.item) {// Empty-space (scene) menu.return [- { label: 'Add Entity', onClick: addEntity },- { label: 'Create…', onClick: () => setCreateFor({ parent: null }) },- { label: 'New Folder', onClick: () => newFolder('', null) },+ { label: t('out.addEntity'), onClick: addEntity },+ { label: t('out.createTemplate'), onClick: () => setCreateFor({ parent: null }) },+ { label: t('out.newFolder'), onClick: () => newFolder('', null) },{ sep: true },- { label: 'Expand All', onClick: expandAll },- { label: 'Collapse All', onClick: () => useOutliner.getState().setExpanded([]) },+ { label: t('out.expandAll'), onClick: expandAll },+ { label: t('out.collapseAll'), onClick: () => useOutliner.getState().setExpanded([]) },];}if (ctx.item.kind === 'folder') {const path = ctx.item.path;const sel = [...useSelection.getState().selectedIds];return [- { label: 'Rename', shortcut: 'F2', onClick: () => setRenaming(folderKey(path)) },- { label: 'New Subfolder', onClick: () => newFolder(path, null) },- ...(sel.length ? [{ label: 'Move Selection Here', onClick: () => SceneCommands.moveToFolder(sel, path) } as MenuItem] : []),+ { label: t('ui.rename'), shortcut: 'F2', onClick: () => setRenaming(folderKey(path)) },+ { label: t('out.newSubfolder'), onClick: () => newFolder(path, null) },+ ...(sel.length ? [{ label: t('out.moveSelectionHere'), onClick: () => SceneCommands.moveToFolder(sel, path) } as MenuItem] : []),{ sep: true },{- label: 'Delete Folder',+ label: t('out.deleteFolder'),onClick: () => {SceneCommands.deleteFolder(path);if (useOutliner.getState().selectedFolder === path) useOutliner.getState().selectFolder(null);@@ -523,18 +532,18 @@ export function Outliner() {const id = ctx.item.id;const { visible, locked } = ctx.item.node;return [- { label: 'Rename', shortcut: 'F2', onClick: () => setRenaming(entityKey(id)) },+ { label: t('ui.rename'), shortcut: 'F2', onClick: () => setRenaming(entityKey(id)) },{- label: 'Duplicate',+ label: t('out.duplicate'),shortcut: formatKeybinding('mod+d'),onClick: () => {const d = SceneCommands.duplicateEntity(id);if (d != null) select(d);},},- { label: 'Create Prefab', onClick: () => void ProjectStore.createPrefabFromEntity(id) },+ { label: t('out.createPrefab'), onClick: () => void ProjectStore.createPrefabFromEntity(id) },{- label: 'Delete',+ label: t('ui.delete'),shortcut: formatKeybinding('delete'),onClick: () => {selectionOrTarget(id).forEach((i) => SceneCommands.deleteEntity(i));@@ -542,15 +551,15 @@ export function Outliner() {},},{ sep: true },- { label: visible ? 'Hide' : 'Show', onClick: () => selectionOrTarget(id).forEach((i) => SceneCommands.setEntityVisible(i, !visible)) },- { label: locked ? 'Unlock' : 'Lock', onClick: () => selectionOrTarget(id).forEach((i) => SceneCommands.setEntityLocked(i, !locked)) },+ { label: visible ? t('out.hide') : t('out.show'), onClick: () => selectionOrTarget(id).forEach((i) => SceneCommands.setEntityVisible(i, !visible)) },+ { label: locked ? t('out.unlock') : t('out.lock'), onClick: () => selectionOrTarget(id).forEach((i) => SceneCommands.setEntityLocked(i, !locked)) },{ sep: true },- { label: 'New Folder from Selection', onClick: () => newFolder('', selectionOrTarget(id)) },- { label: 'Move to Root', onClick: () => SceneCommands.moveToFolder(selectionOrTarget(id), null) },- { label: 'Unparent', onClick: () => selectionOrTarget(id).forEach((i) => SceneCommands.setParent(i, null)) },+ { label: t('out.newFolderFromSelection'), onClick: () => newFolder('', selectionOrTarget(id)) },+ { label: t('out.moveToRoot'), onClick: () => SceneCommands.moveToFolder(selectionOrTarget(id), null) },+ { label: t('out.unparent'), onClick: () => selectionOrTarget(id).forEach((i) => SceneCommands.setParent(i, null)) },{ sep: true },- { label: 'Add Entity', onClick: addEntity },- { label: 'Create…', onClick: () => setCreateFor({ parent: id }) },+ { label: t('out.addEntity'), onClick: addEntity },+ { label: t('out.createTemplate'), onClick: () => setCreateFor({ parent: id }) },];// eslint-disable-next-line react-hooks/exhaustive-deps}, [ctx]);@@ -610,11 +619,11 @@ export function Outliner() {<div className="world-pick"><Segmentedgrow- ariaLabel="Inspected world"+ ariaLabel={t('out.inspectedWorld')}value={gameMode ? 'game' : 'editor'}options={[- { value: 'editor', label: 'Editor' },- { value: 'game', label: 'Game' },+ { value: 'editor', label: t('out.worldEditor') },+ { value: 'game', label: t('out.worldGame') },]}onChange={(v) => setInspectWorld(v)}/>@@ -625,11 +634,11 @@ export function Outliner() {) : (<><div className="phead">- <SearchField placeholder="Search · type: comp:" value={query} onChange={setQuery} />+ <SearchField placeholder={t('out.searchPlaceholder')} value={query} onChange={setQuery} /><buttontype="button"className={`pbtn${sortMode !== 'manual' ? ' on' : ''}`}- title={`Sort: ${sortMode}`}+ title={t('out.sortLabel', { mode: SORT_MODE_LABEL[sortMode] })}onClick={(e) => {const r = e.currentTarget.getBoundingClientRect();setSortMenu({ x: r.left, y: r.bottom + 2 });@@ -637,23 +646,23 @@ export function Outliner() {><ArrowDownUp size={14} strokeWidth={2} /></button>- <button type="button" className="pbtn" title="New folder" onClick={() => newFolder('', null)}>+ <button type="button" className="pbtn" title={t('out.newFolderTip')} onClick={() => newFolder('', null)}><FolderPlus size={15} strokeWidth={2} /></button>- <button type="button" className="pbtn" title="Add entity" onClick={addEntity}>+ <button type="button" className="pbtn" title={t('out.addEntityTip')} onClick={addEntity}><Plus size={15} strokeWidth={2} /></button></div>{sceneCount > 0 && (<divclassName="outliner-cols"- title="Right-click to show/hide columns"+ title={t('out.columnsTip')}onContextMenu={(e) => {e.preventDefault();setColsMenu({ x: e.clientX, y: e.clientY });}}>- <span className="c-name">Name</span>+ <span className="c-name">{t('out.colName')}</span>{activeColumns.map((col) => (<span key={col.id} className="c-col" style={{ width: col.width }}>{col.header}@@ -665,15 +674,15 @@ export function Outliner() {<div className="pbody" onDragOver={onBodyDragOver} onDrop={onBodyDrop} onContextMenu={onBodyContextMenu}><div className="empty"><Search size={22} strokeWidth={1.4} />- <p>{engine.status === 'ready' ? 'No entities in scene.' : 'Waiting for engine…'}</p>- {engine.status === 'ready' && <small>Right-click here or use the + button to add one.</small>}+ <p>{engine.status === 'ready' ? t('out.emptyScene') : t('out.waitingEngine')}</p>+ {engine.status === 'ready' && <small>{t('out.emptyHint')}</small>}</div></div>) : items.length === 0 ? (<div className="pbody" onDragOver={onBodyDragOver} onDrop={onBodyDrop} onContextMenu={onBodyContextMenu}><div className="empty"><Search size={22} strokeWidth={1.4} />- <p>No entities match “{query}”.</p>+ <p>{t('out.noMatch', { query })}</p></div></div>) : (@@ -708,7 +717,7 @@ export function Outliner() {y={sortMenu.y}onClose={() => setSortMenu(null)}items={(['manual', 'name', 'type'] as const).map((m) => ({- label: `Sort: ${m[0].toUpperCase()}${m.slice(1)}`,+ label: t('out.sortLabel', { mode: SORT_MODE_LABEL[m] }),onClick: () => useOutliner.getState().setSortMode(m),}))}/>@@ -719,7 +728,7 @@ export function Outliner() {y={colsMenu.y}onClose={() => setColsMenu(null)}items={OUTLINER_COLUMNS.map((col) => ({- label: `${hiddenColumns.has(col.id) ? ' ' : '✓ '}${col.header || col.id}`,+ label: `${hiddenColumns.has(col.id) ? ' ' : '✓ '}${col.header || COL_ID_LABEL[col.id] || col.id}`,onClick: () => useOutliner.getState().toggleColumn(col.id),}))}/>diff --git a/desktop/src/panels/OutputLog.tsx b/desktop/src/panels/OutputLog.tsxindex bcc38967f..e0ef495d0 100644--- a/desktop/src/panels/OutputLog.tsx+++ b/desktop/src/panels/OutputLog.tsx@@ -14,9 +14,10 @@ import { LogStore, type LogLevel, type LogEntry } from '@/store/LogStore';import { ContextMenu, type MenuItem } from '@/components/Menu';import { SearchField } from '@/components/SearchField';import { Toasts } from '@/store/Toasts';+import { t } from '@/i18n';type Filter = 'all' | LogLevel;-const NO_CAT = '(no category)';+const NO_CAT = t('log.noCategory');const TIME_KEY = 'estella.log.showTime';// Plain-text rendering of a row for copy / save — always carries the full record@@ -35,7 +36,7 @@ function saveLog(rows: LogEntry[]): void {a.download = `OutputLog-${new Date().toISOString().slice(0, 19).replace(/[:T]/g, '-')}.txt`;a.click();URL.revokeObjectURL(url);- Toasts.push(`Saved ${rows.length} lines`, 'info', 1800);+ Toasts.push(t('log.savedLines', { count: rows.length }), 'info', 1800);}// A stay-open category filter popover (UE5's "Categories" submenu): toggling one@@ -97,14 +98,14 @@ function CategoryMenu({><div className="lc-head"><button type="button" className="lc-act" onClick={onShowAll}>- Show All+ {t('log.showAll')}</button><button type="button" className="lc-act" onClick={onHideAll}>- Hide All+ {t('log.hideAll')}</button></div><div className="ctx-sep" />- {categories.length === 0 && <div className="lc-none">No categories yet</div>}+ {categories.length === 0 && <div className="lc-none">{t('log.noCategoriesYet')}</div>}{categories.map(([src, count]) => (<button key={src || NO_CAT} type="button" className="ctx-item" onClick={() => onToggle(src)}><span className="ci">{!hidden.has(src) ? <Check size={13} strokeWidth={2.4} /> : null}</span>@@ -193,19 +194,19 @@ export function OutputLog() {const ctxItems: MenuItem[] = ctx? [{- label: 'Copy',+ label: t('log.copy'),disabled: !ctx.selection,onClick: () => void navigator.clipboard?.writeText(ctx.selection),},{- label: 'Copy All',+ label: t('log.copyAll'),disabled: visible.length === 0,onClick: () => void navigator.clipboard?.writeText(visible.map(formatEntry).join('\n')),},{ sep: true },- { label: 'Save Log…', disabled: entries.length === 0, onClick: () => saveLog(entries) },+ { label: t('log.saveLog'), disabled: entries.length === 0, onClick: () => saveLog(entries) },{ sep: true },- { label: 'Clear', danger: true, onClick: () => LogStore.clear() },+ { label: t('log.clear'), danger: true, onClick: () => LogStore.clear() },]: [];@@ -225,16 +226,16 @@ export function OutputLog() {<div className="panel"><div className="phead"><div className="log-chips">- <Chip id="all" label="All" />- <Chip id="info" label="Info" />- <Chip id="warn" label="Warnings" count={counts.warn} />- <Chip id="error" label="Errors" count={counts.error} />+ <Chip id="all" label={t('log.all')} />+ <Chip id="info" label={t('log.info')} />+ <Chip id="warn" label={t('log.warnings')} count={counts.warn} />+ <Chip id="error" label={t('log.errors')} count={counts.error} /></div>- <SearchField className="log-search" iconSize={12} placeholder="Filter" value={query} onChange={setQuery} />+ <SearchField className="log-search" iconSize={12} placeholder={t('log.filterPlaceholder')} value={query} onChange={setQuery} /><buttontype="button"className={`pbtn${hidden.size > 0 ? ' on' : ''}`}- title="Categories"+ title={t('log.categories')}onClick={(e) => {const r = e.currentTarget.getBoundingClientRect();setCatAnchor((a) => (a ? null : { left: r.left, top: r.bottom + 4 }));@@ -245,15 +246,15 @@ export function OutputLog() {<buttontype="button"className={`pbtn${showTime ? ' on' : ''}`}- title="Show timestamps"+ title={t('log.showTimestamps')}onClick={() => setShowTime((s) => !s)}><Clock size={14} strokeWidth={1.85} /></button>- <button type="button" className="pbtn" title="Scroll to bottom" onClick={scrollToBottom}>+ <button type="button" className="pbtn" title={t('log.scrollToBottom')} onClick={scrollToBottom}><ArrowDownToLine size={14} strokeWidth={1.85} /></button>- <button type="button" className="pbtn" title="Clear log" onClick={() => LogStore.clear()}>+ <button type="button" className="pbtn" title={t('log.clearLog')} onClick={() => LogStore.clear()}><Trash2 size={14} strokeWidth={1.85} /></button></div>@@ -268,7 +269,7 @@ export function OutputLog() {))}{visible.length === 0 && (<div className="empty-line">- {entries.length === 0 ? 'No log output yet — engine and script logs appear here.' : 'No entries match the filter.'}+ {entries.length === 0 ? t('log.emptyNoOutput') : t('log.emptyNoMatch')}</div>)}</div>diff --git a/desktop/src/panels/ProfilerPanel.tsx b/desktop/src/panels/ProfilerPanel.tsxindex 73ef88c73..2031f910e 100644--- a/desktop/src/panels/ProfilerPanel.tsx+++ b/desktop/src/panels/ProfilerPanel.tsx@@ -6,6 +6,7 @@import { useSyncExternalStore, useRef, useEffect, useCallback, useState } from 'react';import type { MouseEvent as ReactMouseEvent } from 'react';import { PerfMonitor } from '@/engine/PerfMonitor';+import { t } from '@/i18n';const BUDGET_MS = 1000 / 60; // 60 Hz frame budget (16.6ms)const BUDGET_30 = 1000 / 30; // 30 Hz (33.3ms) — the hitch threshold@@ -34,12 +35,12 @@ function downloadSession(): void {}const GROUPS = [- { id: 'frame', label: 'Frame' },- { id: 'unit', label: 'CPU/GPU' },- { id: 'render', label: 'Render' },- { id: 'counters', label: 'Counters' },- { id: 'memory', label: 'Memory' },- { id: 'systems', label: 'Systems' },+ { id: 'frame', label: t('prof.groupFrame') },+ { id: 'unit', label: t('prof.groupUnit') },+ { id: 'render', label: t('prof.groupRender') },+ { id: 'counters', label: t('prof.groupCounters') },+ { id: 'memory', label: t('prof.groupMemory') },+ { id: 'systems', label: t('prof.groupSystems') },] as const;const GROUPS_KEY = 'estella.profiler.hiddenGroups';@@ -169,7 +170,7 @@ function FrameGraph({ frames, pinnedId }: { frames: number[]; pinnedId: number |PerfMonitor.pin(samples[i].id);}, []);- return <canvas ref={ref} className="prof-graph" title="Click a frame to inspect it" onClick={onClick} />;+ return <canvas ref={ref} className="prof-graph" title={t('prof.clickToInspect')} onClick={onClick} />;}/** One "Frame = a + b + …" bar segment, width ∝ its share of the frame. */@@ -209,7 +210,7 @@ export function ProfilerPanel() {// A near-budget frame's leftover is just the browser idle-waiting for vsync — not// a hot spot. Only on a spike is the leftover genuinely unattributed work.const isIdle = v.frameMs <= BUDGET_MS * 1.25;- const presentLabel = isIdle ? 'idle' : 'present';+ const presentLabel = isIdle ? t('prof.idle') : t('prof.present');// The long tasks that hit the pinned frame + its measured phases, ranked.const longTasks = pinned ? PerfMonitor.getFrameLongTasks(pinned.id) : [];@@ -234,30 +235,30 @@ export function ProfilerPanel() {type="button"className={`prof-btn${s.frozen ? ' on' : ''}`}onClick={() => PerfMonitor.toggleFrozen()}- title={s.frozen ? 'Resume live capture' : 'Freeze capture to inspect frames'}+ title={s.frozen ? t('prof.resumeLiveTitle') : t('prof.freezeTitle')}>- {s.frozen ? 'Live' : 'Pause'}+ {s.frozen ? t('prof.live') : t('prof.pause')}</button><label className="prof-check"><input type="checkbox" checked={s.autoHitch} onChange={(e) => PerfMonitor.setAutoHitch(e.target.checked)} />- Pause on hitch+ {t('prof.pauseOnHitch')}</label><buttontype="button"className={`prof-btn${s.recording ? ' rec' : ''}`}onClick={() => PerfMonitor.toggleRecording()}- title={s.recording ? 'Stop recording' : 'Record a session for export'}+ title={s.recording ? t('prof.stopRecTitle') : t('prof.recordTitle')}>- {s.recording ? `● ${s.recordedFrames}` : 'Rec'}+ {s.recording ? `● ${s.recordedFrames}` : t('prof.rec')}</button>- <button type="button" className="prof-btn" onClick={downloadSession} title="Export the recorded session (or the live window) as JSON">- Export+ <button type="button" className="prof-btn" onClick={downloadSession} title={t('prof.exportTitle')}>+ {t('prof.export')}</button><span className="prof-spacer" />{pinned ? (- <span className="prof-pinned">frame #{pinned.id} · {pinned.dt}ms</span>+ <span className="prof-pinned">{t('prof.pinnedFrame', { id: pinned.id, ms: pinned.dt })}</span>) : (- <span className="prof-live">live</span>+ <span className="prof-live">{t('prof.liveBadge')}</span>)}</div>@@ -277,13 +278,13 @@ export function ProfilerPanel() {{/* Frame timing — history graph + percentiles (live) or the pinned frame. */}{show('frame') && (<section className="prof-sec">- <h4>Frame</h4>+ <h4>{t('prof.groupFrame')}</h4><FrameGraph frames={s.frames} pinnedId={s.pinnedId} />{pinned ? (<div className="prof-budget">- inspecting frame #{pinned.id} · {pinned.dt}ms- {pinned.dt >= BUDGET_30 ? <span className="prof-warn"> · hitch</span> : null}- {' · '}<button type="button" className="prof-link" onClick={() => PerfMonitor.resumeLive()}>back to live</button>+ {t('prof.inspectingFrame', { id: pinned.id, ms: pinned.dt })}+ {pinned.dt >= BUDGET_30 ? <span className="prof-warn"> · {t('prof.hitch')}</span> : null}+ {' · '}<button type="button" className="prof-link" onClick={() => PerfMonitor.resumeLive()}>{t('prof.backToLive')}</button></div>) : (<>@@ -294,9 +295,9 @@ export function ProfilerPanel() {<div><span>p99</span><b style={{ color: p99Bad ? 'var(--warn)' : undefined }}>{s.p99}<i>ms</i></b></div></div><div className="prof-budget">- budget {BUDGET_MS.toFixed(1)}ms · {s.longFrames} long frame{s.longFrames === 1 ? '' : 's'}- {s.worstMs > 0 ? <> · worst {s.worstMs}ms <em>({s.worstPhase ?? 'other'})</em></> : null}- {s.longTaskMs > 0 ? <span className="prof-warn"> · long task {s.longTaskMs}ms (GC/JS)</span> : null}+ {t('prof.budget', { ms: BUDGET_MS.toFixed(1) })} · {s.longFrames === 1 ? t('prof.longFrameOne', { count: s.longFrames }) : t('prof.longFrames', { count: s.longFrames })}+ {s.worstMs > 0 ? <> · {t('prof.worst', { ms: s.worstMs })} <em>({s.worstPhase ?? t('prof.other')})</em></> : null}+ {s.longTaskMs > 0 ? <span className="prof-warn"> · {t('prof.longTaskStat', { ms: s.longTaskMs })}</span> : null}</div></>)}@@ -306,16 +307,16 @@ export function ProfilerPanel() {{/* Frame = engine + editor + present; GPU is a parallel track. */}{show('unit') && (<section className="prof-sec">- <h4>Unit <span className="prof-realm">· {s.realm}</span></h4>- <Seg label="engine" ms={v.engineMs} frame={frame} color="var(--run, #46a04a)" />- <Seg label="editor" ms={v.editorMs} frame={frame} color="var(--star, #2f88d6)" />+ <h4>{t('prof.unitHeader')} <span className="prof-realm">· {s.realm}</span></h4>+ <Seg label={t('prof.engine')} ms={v.engineMs} frame={frame} color="var(--run, #46a04a)" />+ <Seg label={t('prof.editor')} ms={v.editorMs} frame={frame} color="var(--star, #2f88d6)" /><Seg label={presentLabel} ms={other} frame={frame} color="var(--text-mute, #696a71)" />{v.gpuMs >= 0 ? (<Seg label="gpu" ms={v.gpuMs} frame={frame} color={GPU_COLOR} />) : (<div className="prof-row"><span className="prof-key">gpu</span>- <span className="prof-val prof-na">n/a</span>+ <span className="prof-val prof-na">{t('prof.na')}</span><span className="prof-bar" /></div>)}@@ -324,18 +325,18 @@ export function ProfilerPanel() {{show('render') && (<section className="prof-sec">- <h4>Render</h4>+ <h4>{t('prof.groupRender')}</h4><div className="prof-stat-grid">- <div><span>draw calls</span><b>{v.drawCalls}</b></div>- <div><span>triangles</span><b>{kfmt(v.triangles)}</b></div>- <div><span>entities</span><b>{v.entities}</b></div>+ <div><span>{t('prof.drawCalls')}</span><b>{v.drawCalls}</b></div>+ <div><span>{t('prof.triangles')}</span><b>{kfmt(v.triangles)}</b></div>+ <div><span>{t('prof.entities')}</span><b>{v.entities}</b></div></div></section>)}{show('counters') && counterRows.length > 0 && (<section className="prof-sec">- <h4>Counters</h4>+ <h4>{t('prof.groupCounters')}</h4>{counterRows.map(([name, val]) => (<div className="prof-brk" key={name}><span className="prof-brk-name" title={name}>{name}</span>@@ -347,14 +348,14 @@ export function ProfilerPanel() {{show('memory') && (<section className="prof-sec">- <h4>Memory</h4>+ <h4>{t('prof.groupMemory')}</h4><MemGraph hist={s.memHist} /><div className="prof-stat-grid"><div><span style={{ color: 'var(--warn)' }}>wasm</span><b>{s.wasmMB}<i>MB</i></b></div>- <div><span style={{ color: 'var(--star)' }}>js heap</span><b>{s.jsHeapMB || '—'}<i>{s.jsHeapMB ? 'MB' : ''}</i></b></div>+ <div><span style={{ color: 'var(--star)' }}>{t('prof.jsHeap')}</span><b>{s.jsHeapMB || '—'}<i>{s.jsHeapMB ? 'MB' : ''}</i></b></div><div><span style={{ color: GPU_COLOR }}>vram</span><b>{s.vramMB}<i>MB</i></b></div></div>- {s.jsHeapLimitMB ? <div className="prof-budget">js heap limit {s.jsHeapLimitMB}MB</div> : null}+ {s.jsHeapLimitMB ? <div className="prof-budget">{t('prof.jsHeapLimit', { mb: s.jsHeapLimitMB })}</div> : null}</section>)}@@ -362,14 +363,14 @@ export function ProfilerPanel() {cause the phases can't name) + every measured phase, ranked. */}{pinned ? (<section className="prof-sec">- <h4>Breakdown · frame #{pinned.id}</h4>+ <h4>{t('prof.breakdownHeader', { id: pinned.id })}</h4>{longTasks.map((lt, i) => {// The dominant same-frame zone that plausibly IS this long task.const cause = breakdown.find(([, ms]) => ms >= lt.ms * 0.5);return (<div className="prof-brk prof-lt" key={`lt${i}`}><span className="prof-brk-name" title={lt.name}>- ⚠ long task {cause ? <>→ <b>{cause[0]}</b></> : '· GC / uninstrumented JS'}+ {t('prof.longTaskLabel')} {cause ? <>→ <b>{cause[0]}</b></> : t('prof.gcUninstrumented')}</span><span className="prof-brk-val">{lt.ms}ms</span></div>@@ -382,9 +383,9 @@ export function ProfilerPanel() {</div>))}<div className="prof-budget">- measured {measuredMs.toFixed(1)}ms of {pinned.dt}ms+ {t('prof.measured', { measured: measuredMs.toFixed(1), total: pinned.dt })}{unattributedMs >= 1 ? (- <em> · {unattributedMs.toFixed(1)}ms unattributed{longTasks.length ? '' : ' · browser paint / GC'}</em>+ <em> · {t('prof.unattributed', { ms: unattributedMs.toFixed(1) })}{longTasks.length ? '' : ` · ${t('prof.browserPaintGc')}`}</em>) : null}</div></section>@@ -393,7 +394,7 @@ export function ProfilerPanel() {{/* Costliest engine systems — windowed max (live) or this frame's cost (pinned). */}{show('systems') && (<section className="prof-sec">- <h4>Systems{pinned ? ' · this frame' : ''}</h4>+ <h4>{t('prof.groupSystems')}{pinned ? ` · ${t('prof.thisFrame')}` : ''}</h4>{v.systems.length ? (<table className="prof-sys"><tbody>@@ -406,7 +407,7 @@ export function ProfilerPanel() {</tbody></table>) : (- <p className="prof-empty">No system timings yet.</p>+ <p className="prof-empty">{t('prof.noSystemTimings')}</p>)}</section>)}diff --git a/desktop/src/panels/Sequencer.tsx b/desktop/src/panels/Sequencer.tsxindex 5d95322df..7e5adbfe2 100644--- a/desktop/src/panels/Sequencer.tsx+++ b/desktop/src/panels/Sequencer.tsx@@ -18,6 +18,7 @@ import {Play, Pause, Repeat, Magnet, Plus, ChevronDown, Eye, EyeOff, Diamond, Film, Link2, Save, Trash2, Settings2,} from 'lucide-react';import { evaluateChannel, InterpType, WrapMode } from 'esengine';+import { t } from '@/i18n';import { animatableFieldsFor } from '@/engine/schema';import { TimelineDocument } from '@/timeline/TimelineDocument';import { createAnimationClip } from '@/timeline/openClip';@@ -37,16 +38,16 @@ import {// Interpolation choices shown in the keyframe popover (subset of InterpType).const INTERP_OPTIONS: [InterpType, string][] = [- [InterpType.Hermite, 'Auto (smooth)'],- [InterpType.Linear, 'Linear'],- [InterpType.Step, 'Step (constant)'],- [InterpType.EaseInOut, 'Ease in-out'],+ [InterpType.Hermite, t('seq.interp.auto')],+ [InterpType.Linear, t('seq.interp.linear')],+ [InterpType.Step, t('seq.interp.step')],+ [InterpType.EaseInOut, t('seq.interp.easeInOut')],];const WRAP_OPTIONS: [WrapMode, string][] = [- [WrapMode.Once, 'Once'],- [WrapMode.Loop, 'Loop'],- [WrapMode.PingPong, 'Ping-pong'],+ [WrapMode.Once, t('seq.wrap.once')],+ [WrapMode.Loop, t('seq.wrap.loop')],+ [WrapMode.PingPong, t('seq.wrap.pingPong')],];function getNested(obj: unknown, path: string): number {@@ -88,15 +89,15 @@ function EmptyState() {return (<div className="seq-empty"><Film size={30} strokeWidth={1.3} />- <div className="seq-empty__title">No animation open</div>- <div className="seq-empty__hint">Create a new animation, or double-click an existing .esanim in the Content Browser.</div>+ <div className="seq-empty__title">{t('seq.empty.title')}</div>+ <div className="seq-empty__hint">{t('seq.empty.hint')}</div><button type="button" className="seq-btn seq-btn--text on" onClick={() => void createAnimationClip('')}>- <Plus size={14} /><span>New animation</span>+ <Plus size={14} /><span>{t('seq.empty.new')}</span></button><ol className="seq-empty__steps">- <li>Select an object in the scene, then click Bind in the toolbar to attach the preview to it</li>- <li>Turn on Record, then move/rotate it or edit properties — keyframes are recorded automatically</li>- <li>Drag the playhead to preview, then click Save to write back to the file</li>+ <li>{t('seq.empty.step1')}</li>+ <li>{t('seq.empty.step2')}</li>+ <li>{t('seq.empty.step3')}</li></ol></div>);@@ -346,65 +347,65 @@ function SequencerBody() {<div className="phead seq-bar"><span className="seq-meta"><Film size={13} className="seq-meta__icon" />- <b>{TimelineDocument.meta.filePath?.split('/').pop() ?? 'Unnamed'}</b>- <span className="seq-meta__dim">· {totalFrames} frames · {fps}fps · {loop ? 'Loop' : 'Once'}</span>+ <b>{TimelineDocument.meta.filePath?.split('/').pop() ?? t('seq.unnamed')}</b>+ <span className="seq-meta__dim">{t('seq.metaSummary', { frames: totalFrames, fps, wrap: t(loop ? 'seq.wrap.loop' : 'seq.wrap.once') })}</span></span><buttontype="button"className={`seq-btn seq-btn--text${rootName ? ' on' : ''}`}- title="Bind preview to the selected entity"+ title={t('seq.bindTitle')}onClick={() => TimelineDocument.setRootEntity(useSelection.getState().selectedId)}>- <Link2 size={13} /><span>{rootName ?? 'Unbound'}</span>+ <Link2 size={13} /><span>{rootName ?? t('seq.unbound')}</span></button><span className="seq-div" /><buttontype="button"className={`seq-btn seq-btn--rec${recording ? ' on' : ''}`}- title="Record: property edits auto-key"+ title={t('seq.recordTitle')}onClick={() => useSequencerStore.getState().toggleRecording()}><Circle size={12} fill="currentColor" /></button><span className="seq-div" />- <IconButton size="md" title="Jump to start" onClick={() => setTime(0)}><ChevronFirst size={15} /></IconButton>- <IconButton size="md" title="Previous keyframe" onClick={() => jumpKey(-1)}><ChevronLeft size={15} /></IconButton>+ <IconButton size="md" title={t('seq.jumpStart')} onClick={() => setTime(0)}><ChevronFirst size={15} /></IconButton>+ <IconButton size="md" title={t('seq.prevKeyframe')} onClick={() => jumpKey(-1)}><ChevronLeft size={15} /></IconButton><buttontype="button"className="seq-btn seq-btn--play"- title="Play / pause (Space)"+ title={t('seq.playPause')}onClick={() => useSequencerStore.getState().togglePlay()}>{playing ? <Pause size={14} fill="currentColor" /> : <Play size={14} fill="currentColor" />}</button>- <IconButton size="md" title="Next keyframe" onClick={() => jumpKey(1)}><ChevronRight size={15} /></IconButton>- <IconButton size="md" title="Jump to end" onClick={() => setTime(duration)}><ChevronLast size={15} /></IconButton>+ <IconButton size="md" title={t('seq.nextKeyframe')} onClick={() => jumpKey(1)}><ChevronRight size={15} /></IconButton>+ <IconButton size="md" title={t('seq.jumpEnd')} onClick={() => setTime(duration)}><ChevronLast size={15} /></IconButton><IconButtonsize="md"active={loop}- title="Loop"+ title={t('seq.wrap.loop')}onClick={() => useSequencerStore.getState().toggleLoop()}><Repeat size={14} /></IconButton><span className="seq-div" />- <span className="seq-frame">Frame <strong>{frame}</strong> / {totalFrames}</span>+ <span className="seq-frame">{t('seq.frameWord')} <strong>{frame}</strong> / {totalFrames}</span><span className="seq-spacer" /><div className="seq-tabs">- <button type="button" className={`seq-tab${view === 'sheet' ? ' active' : ''}`} onClick={() => useSequencerStore.getState().setView('sheet')}>Sheet</button>- <button type="button" className={`seq-tab${view === 'curve' ? ' active' : ''}`} onClick={() => useSequencerStore.getState().setView('curve')}>Curves</button>+ <button type="button" className={`seq-tab${view === 'sheet' ? ' active' : ''}`} onClick={() => useSequencerStore.getState().setView('sheet')}>{t('seq.tabSheet')}</button>+ <button type="button" className={`seq-tab${view === 'curve' ? ' active' : ''}`} onClick={() => useSequencerStore.getState().setView('curve')}>{t('seq.tabCurves')}</button></div><IconButtonsize="md"active={snap}- title="Snap to frame"+ title={t('seq.snapTitle')}onClick={() => useSequencerStore.getState().toggleSnap()}><Magnet size={14} /></IconButton><IconButtonsize="md"- title="Clip settings (duration / fps / loop)"+ title={t('seq.settingsTitle')}onClick={(e) => setSettingsOpen(popoverAt(e))}><Settings2 size={14} />@@ -412,26 +413,26 @@ function SequencerBody() {<buttontype="button"className="seq-btn seq-btn--text"- title="Add track"+ title={t('seq.addTrack')}disabled={root == null}onClick={(e) => setPickerOpen(popoverAt(e))}>- <Plus size={14} /><span>Track</span>+ <Plus size={14} /><span>{t('seq.trackBtn')}</span></button><buttontype="button"className={`seq-btn seq-btn--text${TimelineDocument.meta.dirty ? ' on' : ''}`}- title="Save animation"+ title={t('seq.saveTitle')}onClick={() => void TimelineCommands.save()}>- <Save size={14} /><span>Save{TimelineDocument.meta.dirty && <DirtyDot />}</span>+ <Save size={14} /><span>{t('seq.save')}{TimelineDocument.meta.dirty && <DirtyDot />}</span></button></div>{/* body: track list + timeline */}<div className="seq-body"><div className="seq-tracks">- <div className="seq-track-head">Tracks</div>+ <div className="seq-track-head">{t('seq.tracksHead')}</div><div className="seq-rows">{shown.map((row) => (<TrackRow@@ -471,17 +472,17 @@ function SequencerBody() {key={row.id}className={`seq-lane seq-lane--${row.kind}${row.ref && mutedTracks.has(muteKey(row.ref)) ? ' muted' : ''}`}>- {row.keyframes.map((t) => {- const isDrag = dragKey?.rowId === row.id && Math.abs(dragKey.fromTime - t) < 1e-4;- const at = isDrag ? dragKey!.time : t;- const sel = selectedKey === `${row.id}@${t}`;+ {row.keyframes.map((kt) => {+ const isDrag = dragKey?.rowId === row.id && Math.abs(dragKey.fromTime - kt) < 1e-4;+ const at = isDrag ? dragKey!.time : kt;+ const sel = selectedKey === `${row.id}@${kt}`;return (<div- key={t}+ key={kt}className={`seq-key${sel ? ' sel' : ''}${isDrag ? ' drag' : ''}`}style={{ left: `${timeToPct(at, duration)}%` }}- title={`Frame ${Math.round(at * fps)}`}- onPointerDown={row.ref ? (e) => onKeyPointerDown(e, row.ref!, row.id, t) : undefined}+ title={t('seq.frameTip', { frame: Math.round(at * fps) })}+ onPointerDown={row.ref ? (e) => onKeyPointerDown(e, row.ref!, row.id, kt) : undefined}/>);})}@@ -511,9 +512,9 @@ function SequencerBody() {<><div className="seq-pop-scrim" onPointerDown={() => setPickerOpen(null)} /><div className="seq-picker" style={{ left: pickerOpen.x, top: pickerOpen.y }}>- <div className="seq-interp__title">Add track</div>+ <div className="seq-interp__title">{t('seq.addTrack')}</div>{addTrackItems.length === 0 ? (- <div className="empty-line empty-line--sm">No animatable properties to add</div>+ <div className="empty-line empty-line--sm">{t('seq.noAnimatable')}</div>) : (addTrackItems.map((it) => (<button@@ -539,17 +540,17 @@ function SequencerBody() {<><div className="seq-pop-scrim" onPointerDown={() => setSettingsOpen(null)} /><div className="seq-settings" style={{ left: settingsOpen.x, top: settingsOpen.y }}>- <div className="seq-interp__title">Clip settings</div>+ <div className="seq-interp__title">{t('seq.clipSettings')}</div><label className="seq-settings__row">- <span>Duration (s)</span>+ <span>{t('seq.durationS')}</span><NumField value={duration} onCommit={(n) => TimelineCommands.setDuration(Math.max(0, n))} /></label><label className="seq-settings__row">- <span>Frame rate (fps)</span>+ <span>{t('seq.frameRateFps')}</span><NumField value={fps} onCommit={(n) => TimelineDocument.setFps(Math.max(1, Math.round(n)))} /></label><div className="seq-settings__row">- <span>Loop</span>+ <span>{t('seq.wrap.loop')}</span><div className="seq-settings__wrap">{WRAP_OPTIONS.map(([mode, label]) => (<button@@ -575,7 +576,7 @@ function SequencerBody() {items={[{- label: 'Delete track',+ label: t('seq.deleteTrack'),onClick: () => {TimelineCommands.removeChannel(rowCtx.ref);useSequencerStore.getState().selectKey(null);@@ -592,7 +593,7 @@ function SequencerBody() {<><div className="seq-pop-scrim" onPointerDown={() => setInterpPopover(null)} /><div className="seq-interp" style={{ left: interp.x, top: interp.y }}>- <div className="seq-interp__title">Interpolation</div>+ <div className="seq-interp__title">{t('seq.interpTitle')}</div>{INTERP_OPTIONS.map(([mode, label]) => (<buttonkey={mode}@@ -616,7 +617,7 @@ function SequencerBody() {setInterpPopover(null);}}>- <Trash2 size={12} /> Delete keyframe+ <Trash2 size={12} /> {t('seq.deleteKeyframe')}</button></div></>@@ -625,9 +626,9 @@ function SequencerBody() {{/* status strip */}<div className="seq-foot"><span className="seq-foot__dot" />- <span>{recording ? '● Recording' : 'Animation edit'}</span>+ <span>{recording ? t('seq.footRecording') : t('seq.footIdle')}</span><span className="seq-spacer" />- <span><strong>{keyCount}</strong> keys · {trackCount} tracks</span>+ <span><strong>{keyCount}</strong> {t('seq.keysUnit')} · {trackCount} {t('seq.tracksUnit')}</span></div></div>);@@ -674,7 +675,7 @@ function TrackRow({<buttontype="button"className="seq-row__btn"- title="Key at playhead"+ title={t('seq.keyAtPlayhead')}onClick={(e) => {e.stopPropagation();onAddKey(row.ref!);@@ -685,7 +686,7 @@ function TrackRow({<buttontype="button"className={`seq-row__btn${muted ? ' on' : ''}`}- title={muted ? 'Unmute track' : 'Mute track'}+ title={muted ? t('seq.unmuteTrack') : t('seq.muteTrack')}onClick={(e) => {e.stopPropagation();useSequencerStore.getState().toggleMute(muteKey(row.ref!));diff --git a/desktop/src/panels/StateMachineEditor.tsx b/desktop/src/panels/StateMachineEditor.tsxindex 5dabc3730..62d43568c 100644--- a/desktop/src/panels/StateMachineEditor.tsx+++ b/desktop/src/panels/StateMachineEditor.tsx@@ -21,6 +21,7 @@ import {type FsmDefinition, type FsmState, type FsmEdge, type CompareOp,} from 'esengine';import { FsmGraphDocument } from '@/fsm/FsmGraphDocument';+import { t } from '@/i18n';import { EditorHistory } from '@/engine/EditorHistory';import { NodeGraphCanvas, type CanvasNode } from '@/components/NodeGraphCanvas';import { Select } from '@/components/Select';@@ -34,18 +35,18 @@ const HOOKS: Array<'onEnter' | 'onUpdate' | 'onExit'> = ['onEnter', 'onUpdate',const OPS: CompareOp[] = ['==', '!=', '<', '<=', '>', '>=', 'truthy', 'falsy'];/** A short human summary of a transition's enabling condition, for the edge label. */-function edgeSummary(t: { trigger?: string; condition?: string; guard?: unknown }): string {+function edgeSummary(tr: { trigger?: string; condition?: string; guard?: unknown }): string {const parts: string[] = [];- if (t.trigger) parts.push(`⚡${t.trigger}`);- if (t.condition) parts.push(`?${t.condition}`);- const g = t.guard;+ if (tr.trigger) parts.push(`⚡${tr.trigger}`);+ if (tr.condition) parts.push(`?${tr.condition}`);+ const g = tr.guard;if (g && !Array.isArray(g)) {const gg = g as { key: string; op: string; value?: unknown };parts.push(gg.op === 'truthy' || gg.op === 'falsy' ? `${gg.key} ${gg.op}` : `${gg.key}${gg.op}${gg.value ?? ''}`);} else if (Array.isArray(g) && g.length) {- parts.push(`${g.length} guards`);+ parts.push(t('fsm.guardCount', { count: g.length }));}- return parts.join(' ') || '(always)';+ return parts.join(' ') || t('fsm.always');}export function StateMachineEditor() {@@ -59,7 +60,7 @@ export function StateMachineEditor() {const dragBefore = useRef<FsmDefinition | null>(null);if (!def || !filePath) {- return <div className="panel ng-placeholder"><p>Open a <code>.esfsm</code> from the Content Browser to edit it.</p></div>;+ return <div className="panel ng-placeholder"><p>{t('ng.openHintPre')}<code>.esfsm</code>{t('ng.openHintPost')}</p></div>;}const nodes: FsmCanvasNode[] = def.states.map(s => ({ ...s, id: s.name }));@@ -82,11 +83,11 @@ export function StateMachineEditor() {const toolbar = (<>- <button type="button" className="ng-btn" onClick={addStateAt} title="Add state"><Plus size={13} strokeWidth={2} /> State</button>- {(selState || selEdge) && <button type="button" className="ng-btn" title="Delete selected" onClick={deleteSelected}><Trash2 size={13} strokeWidth={1.9} /></button>}+ <button type="button" className="ng-btn" onClick={addStateAt} title={t('fsm.addStateTip')}><Plus size={13} strokeWidth={2} /> {t('fsm.stateBtn')}</button>+ {(selState || selEdge) && <button type="button" className="ng-btn" title={t('ng.deleteSelected')} onClick={deleteSelected}><Trash2 size={13} strokeWidth={1.9} /></button>}<span className="ng-doc-title">{filePath.split('/').pop()}{dirty && <DirtyDot />}</span><span style={{ flex: 1 }} />- <button type="button" className="ng-btn primary" disabled={!dirty} onClick={save}><Save size={13} strokeWidth={1.9} /> Save</button>+ <button type="button" className="ng-btn primary" disabled={!dirty} onClick={save}><Save size={13} strokeWidth={1.9} /> {t('ng.save')}</button></>);@@ -114,14 +115,14 @@ export function StateMachineEditor() {onDeleteNode={id => { FsmGraphDocument.edit('Delete state', d => Object.assign(d, removeState(d, id))); setSelState(null); }}onDeleteEdge={id => { const p = parseEdgeId(id); if (p) FsmGraphDocument.edit('Delete transition', d => Object.assign(d, removeTransition(d, p.from, p.index))); setSelEdge(null); }}menuItems={target => target.kind === 'canvas'- ? [{ label: 'Add State', onClick: () => { const name = uniqueName(def, 'State'); FsmGraphDocument.edit('Add state', d => Object.assign(d, addState(d, name, target.x, target.y))); setSelState(name); setSelEdge(null); } }]+ ? [{ label: t('fsm.menuAddState'), onClick: () => { const name = uniqueName(def, 'State'); FsmGraphDocument.edit('Add state', d => Object.assign(d, addState(d, name, target.x, target.y))); setSelState(name); setSelEdge(null); } }]: [- { label: 'Set as initial', disabled: def.initial === target.nodeId, onClick: () => FsmGraphDocument.edit('Set initial', d => Object.assign(d, setInitial(d, target.nodeId!))) },+ { label: t('fsm.menuSetInitial'), disabled: def.initial === target.nodeId, onClick: () => FsmGraphDocument.edit('Set initial', d => Object.assign(d, setInitial(d, target.nodeId!))) },{ sep: true },- { label: 'Delete state', danger: true, onClick: () => { FsmGraphDocument.edit('Delete state', d => Object.assign(d, removeState(d, target.nodeId!))); setSelState(null); } },+ { label: t('fsm.menuDeleteState'), danger: true, onClick: () => { FsmGraphDocument.edit('Delete state', d => Object.assign(d, removeState(d, target.nodeId!))); setSelState(null); } },]}toolbar={toolbar}- emptyHint="Add a state, then drag from its handle to another to add a transition."+ emptyHint={t('fsm.emptyHint')}renderEdgeLabel={e => <>{edgeSummary(e.transition)}</>}renderNode={(n, sel) => {const isInitial = def.initial === n.name;@@ -129,10 +130,10 @@ export function StateMachineEditor() {return (<div className={`ng-node-box${sel ? ' sel' : ''}`} style={!sel && isInitial ? { borderColor: 'var(--run)' } : undefined}><div className="ng-node-head">- {isInitial && <span title="Initial state" className="ng-node-badge" style={{ color: 'var(--run)' }}>▶</span>}+ {isInitial && <span title={t('fsm.initialState')} className="ng-node-badge" style={{ color: 'var(--run)' }}>▶</span>}<span className="ng-node-name">{n.name}</span></div>- <div className="ng-node-sub">{setHooks || <span style={{ opacity: 0.4 }}>no actions</span>}</div>+ <div className="ng-node-sub">{setHooks || <span style={{ opacity: 0.4 }}>{t('fsm.noActions')}</span>}</div></div>);}}@@ -155,20 +156,20 @@ function StateInspector({ def, state, onRename }: { def: FsmDefinition; state: Fconst isInitial = def.initial === state.name;return (<div>- <div className="ng-insp-title">State</div>- <label className="ng-field">Name+ <div className="ng-insp-title">{t('fsm.inspStateTitle')}</div>+ <label className="ng-field">{t('ng.name')}<input className="ng-input" defaultValue={state.name} key={state.name}onBlur={(e) => { const v = e.target.value.trim(); if (v && v !== state.name) { FsmGraphDocument.edit('Rename state', (d) => Object.assign(d, renameState(d, state.name, v))); onRename(v); } }} /></label><label className="ng-check-row"><input type="checkbox" checked={isInitial} disabled={isInitial}onChange={() => FsmGraphDocument.edit('Set initial', (d) => Object.assign(d, setInitial(d, state.name)))} />- Initial state+ {t('fsm.initialState')}</label>{HOOKS.map((h) => (<label className="ng-field" key={h}>{h}<input className="ng-input" list="fsm-actions" defaultValue={state[h] ?? ''} key={`${state.name}-${h}-${state[h] ?? ''}`}- placeholder="action name"+ placeholder={t('ng.phActionName')}onBlur={(e) => { const v = e.target.value.trim(); if (v !== (state[h] ?? '')) FsmGraphDocument.edit(`Set ${h}`, (d) => Object.assign(d, setStateHook(d, state.name, h, v))); }} /></label>))}@@ -181,41 +182,41 @@ function TransitionInspector({ def, edgeId }: { def: FsmDefinition; edgeId: striconst parsed = parseEdgeId(edgeId);if (!parsed) return null;const src = def.states.find((s) => s.name === parsed.from);- const t = src?.transitions?.[parsed.index];- if (!t) return null;+ const tr = src?.transitions?.[parsed.index];+ if (!tr) return null;const conditions = aiRegistry.conditionNames();- const g = (t.guard && !Array.isArray(t.guard) ? t.guard : undefined) as { key: string; op: CompareOp; value?: number | string | boolean } | undefined;- const patch = (p: Partial<typeof t>) => FsmGraphDocument.edit('Edit transition', (d) => Object.assign(d, updateTransition(d, parsed.from, parsed.index, p)));+ const g = (tr.guard && !Array.isArray(tr.guard) ? tr.guard : undefined) as { key: string; op: CompareOp; value?: number | string | boolean } | undefined;+ const patch = (p: Partial<typeof tr>) => FsmGraphDocument.edit('Edit transition', (d) => Object.assign(d, updateTransition(d, parsed.from, parsed.index, p)));const patchGuard = (gp: Partial<NonNullable<typeof g>>) => {const next = { key: g?.key ?? '', op: g?.op ?? '==', value: g?.value, ...gp };patch({ guard: next.key ? next : undefined });};return (<div>- <div className="ng-insp-title">Transition</div>- <label className="ng-field">Target+ <div className="ng-insp-title">{t('fsm.inspTransitionTitle')}</div>+ <label className="ng-field">{t('fsm.target')}<Select- ariaLabel="Target state"- value={t.to}+ ariaLabel={t('fsm.targetState')}+ value={tr.to}options={def.states.map((s) => ({ value: s.name }))}onChange={(v) => patch({ to: v })}/></label>- <label className="ng-field">Trigger (event)- <input className="ng-input" defaultValue={t.trigger ?? ''} key={`trg-${edgeId}`} placeholder="event name"+ <label className="ng-field">{t('fsm.trigger')}+ <input className="ng-input" defaultValue={tr.trigger ?? ''} key={`trg-${edgeId}`} placeholder={t('fsm.phEventName')}onBlur={(e) => patch({ trigger: e.target.value.trim() || undefined })} /></label>- <label className="ng-field">Condition- <input className="ng-input" list="fsm-conditions" defaultValue={t.condition ?? ''} key={`cnd-${edgeId}`} placeholder="condition name"+ <label className="ng-field">{t('fsm.condition')}+ <input className="ng-input" list="fsm-conditions" defaultValue={tr.condition ?? ''} key={`cnd-${edgeId}`} placeholder={t('ng.phConditionName')}onBlur={(e) => patch({ condition: e.target.value.trim() || undefined })} /></label><datalist id="fsm-conditions">{conditions.map((c) => <option key={c} value={c} />)}</datalist>- <div className="ng-insp-sub">Guard (blackboard)</div>+ <div className="ng-insp-sub">{t('fsm.guardSub')}</div><div className="ng-row">- <input className="ng-input" style={{ flex: 1 }} defaultValue={g?.key ?? ''} key={`gk-${edgeId}`} placeholder="key"+ <input className="ng-input" style={{ flex: 1 }} defaultValue={g?.key ?? ''} key={`gk-${edgeId}`} placeholder={t('fsm.phKey')}onBlur={(e) => patchGuard({ key: e.target.value.trim() })} /><Select- ariaLabel="Guard operator"+ ariaLabel={t('fsm.guardOp')}style={{ width: 62 }}value={g?.op ?? '=='}options={OPS.map((op) => ({ value: op }))}@@ -223,8 +224,8 @@ function TransitionInspector({ def, edgeId }: { def: FsmDefinition; edgeId: stri/></div>{g && g.op !== 'truthy' && g.op !== 'falsy' && (- <label className="ng-field">Value- <input className="ng-input" defaultValue={String(g?.value ?? '')} key={`gv-${edgeId}`} placeholder="value"+ <label className="ng-field">{t('fsm.value')}+ <input className="ng-input" defaultValue={String(g?.value ?? '')} key={`gv-${edgeId}`} placeholder={t('fsm.phValue')}onBlur={(e) => patchGuard({ value: coerce(e.target.value) })} /></label>)}diff --git a/desktop/src/panels/TilemapPainter.tsx b/desktop/src/panels/TilemapPainter.tsxindex e291a8404..17b5746cf 100644--- a/desktop/src/panels/TilemapPainter.tsx+++ b/desktop/src/panels/TilemapPainter.tsx@@ -29,16 +29,17 @@ import { loadTilesetAsset } from '@/tileset/loadTileset';import { createTilemapFromTileset } from '@/tilemap/createTilemap';import { AnimPreview, tileThumbStyle, type TileAtlas } from '@/tools/tileThumb';import { IconButton } from '@/components/IconButton';+import { t } from '@/i18n';const TOOLS: { id: PaintTool; icon: typeof Brush; label: string }[] = [- { id: 'brush', icon: Brush, label: 'Brush' },- { id: 'erase', icon: Eraser, label: 'Eraser' },- { id: 'rect', icon: Square, label: 'Rect' },- { id: 'line', icon: Slash, label: 'Line' },- { id: 'bucket', icon: PaintBucket, label: 'Bucket' },- { id: 'select', icon: BoxSelect, label: `Select (${MOD_LABEL}C/X/V copy/cut/paste)` },- { id: 'eyedropper', icon: Pipette, label: 'Eyedropper' },- { id: 'terrain', icon: Mountain, label: 'Terrain' },+ { id: 'brush', icon: Brush, label: t('tile.tool.brush') },+ { id: 'erase', icon: Eraser, label: t('tile.tool.eraser') },+ { id: 'rect', icon: Square, label: t('tile.tool.rect') },+ { id: 'line', icon: Slash, label: t('tile.tool.line') },+ { id: 'bucket', icon: PaintBucket, label: t('tile.tool.bucket') },+ { id: 'select', icon: BoxSelect, label: t('tile.tool.select', { mod: MOD_LABEL }) },+ { id: 'eyedropper', icon: Pipette, label: t('tile.tool.eyedropper') },+ { id: 'terrain', icon: Mountain, label: t('tile.tool.terrain') },];/** Resolve the .estileset ref(s) a selected TilemapLayer references — the `tilesetAssets`@@ -213,8 +214,8 @@ export function TilemapPainter() {if (!hasTilemap) {return (<div className="tp-empty">- <p>No tilemap selected</p>- <p className="tp-hint">Right-click an .estileset in the Content Browser → Create Tilemap, or select a tilemap entity in the Outliner</p>+ <p>{t('tile.noTilemap')}</p>+ <p className="tp-hint">{t('tile.noTilemapHint')}</p></div>);}@@ -358,15 +359,15 @@ export function TilemapPainter() {thumb={(t) => tileThumbStyle(atlas, t, tw)}/>)}- {meta?.collision && <span className="tp-badge tp-badge-col" title="Has collision" />}+ {meta?.collision && <span className="tp-badge tp-badge-col" title={t('tile.badgeCollision')} />}{ter != null && (<spanclassName="tp-badge tp-badge-ter"style={{ background: TERRAIN_COLORS[ter.set % TERRAIN_COLORS.length] }}- title="Terrain member"+ title={t('tile.badgeTerrain')}/>)}- {anim && anim.length > 0 && <span className="tp-badge tp-badge-anim" title="Animated" />}+ {anim && anim.length > 0 && <span className="tp-badge tp-badge-anim" title={t('tile.badgeAnimated')} />}</div>,);}@@ -377,32 +378,32 @@ export function TilemapPainter() {<div className="tp-panel">{layers.length > 0 && (<div className="tp-layers">- <IconButton size="sm" title="New layer on this tileset" disabled={!tilesetPath} onClick={addLayer}>+ <IconButton size="sm" title={t('tile.newLayerTip')} disabled={!tilesetPath} onClick={addLayer}><Plus size={14} /></IconButton>{layers.map((L) => (<span key={L.id} className={'tp-layer' + (L.id === selectedId ? ' is-active' : '')}><button- type="button" className="tp-layer-vis" title={L.hidden ? 'Show' : 'Hide'}+ type="button" className="tp-layer-vis" title={L.hidden ? t('tile.show') : t('tile.hide')}onClick={() => SceneCommands.setEntityVisible(L.id, L.hidden)}>{L.hidden ? <EyeOff size={12} /> : <Eye size={12} />}</button><button- type="button" className="tp-layer-name" title={`Paint on "${L.name}"`}+ type="button" className="tp-layer-name" title={t('tile.paintOn', { name: L.name })}onClick={() => useSelection.getState().select(L.id)}>{L.name}</button><inputclassName="tp-layer-op" type="range" min={0} max={1} step={0.05} value={L.opacity}- title={`Opacity ${Math.round(L.opacity * 100)}%`}+ title={t('tile.opacityPct', { pct: Math.round(L.opacity * 100) })}onPointerDown={() => SceneCommands.beginGesture('Layer opacity')}onChange={(e) => setLayerOpacity(L.id, Number(e.target.value))}onPointerUp={() => SceneCommands.endGesture()}/><button- type="button" className="tp-layer-lock" title={L.locked ? 'Unlock' : 'Lock'}+ type="button" className="tp-layer-lock" title={L.locked ? t('tile.unlock') : t('tile.lock')}onClick={() => SceneCommands.setEntityLocked(L.id, !L.locked)}>{L.locked ? <Lock size={11} /> : <Unlock size={11} />}@@ -416,7 +417,7 @@ export function TilemapPainter() {variant="outline"size="lg"active={tool === null}- title="Select / transform (Q · Esc to exit painting)"+ title={t('tile.tool.exit')}onClick={() => exitTilePaint('select')}><MousePointer2 size={15} />@@ -435,27 +436,27 @@ export function TilemapPainter() {</IconButton>))}<span className="tp-sep" />- <IconButton variant="outline" size="lg" title="Flip horizontal (H)" onClick={() => flipH()}>+ <IconButton variant="outline" size="lg" title={t('tile.flipH')} onClick={() => flipH()}><FlipHorizontal size={15} /></IconButton>- <IconButton variant="outline" size="lg" title="Flip vertical (V)" onClick={() => flipV()}>+ <IconButton variant="outline" size="lg" title={t('tile.flipV')} onClick={() => flipV()}><FlipVertical size={15} /></IconButton>- <IconButton variant="outline" size="lg" title="Rotate 90° (R)" onClick={() => rotateCW()}>+ <IconButton variant="outline" size="lg" title={t('tile.rotate')} onClick={() => rotateCW()}><RotateCw size={15} /></IconButton><IconButtonvariant="outline"size="lg"active={randomBrush}- title="Random: each painted cell samples one tile from the selection"+ title={t('tile.randomTip')}onClick={() => toggleRandomBrush()}><Dices size={15} /></IconButton><span className="tp-grow" /><span className="tp-brush">- {tool === 'terrain' ? 'Terrain brush' : (+ {tool === 'terrain' ? t('tile.terrainBrush') : (<><BrushThumbnail stamp={stamp} atlas={localAtlas} />{stamp.w}×{stamp.h}@@ -472,23 +473,23 @@ export function TilemapPainter() {title={`${ts.path} (gid ${ts.firstId}+)`}><button type="button" className="tp-tsbtn" onClick={() => setActiveTileset(i)}>- {ts.path.split(/[\\/]/).pop()?.replace(/\.estileset$/, '') ?? `Tileset ${i + 1}`}+ {ts.path.split(/[\\/]/).pop()?.replace(/\.estileset$/, '') ?? t('tile.tilesetN', { n: i + 1 })}</button>{tilesets.length > 1 && (- <button type="button" className="tp-tsx" title="Remove tileset" onClick={() => removeTilesetAt(i)}>+ <button type="button" className="tp-tsx" title={t('tile.removeTileset')} onClick={() => removeTilesetAt(i)}><X size={11} /></button>)}</span>))}<div className="tp-tsadd-wrap" onPointerDown={(e) => e.stopPropagation()}>- <button type="button" className="tp-tsadd" title="Add tileset" onClick={() => setAddOpen((o) => !o)}>+ <button type="button" className="tp-tsadd" title={t('tile.addTileset')} onClick={() => setAddOpen((o) => !o)}><Plus size={13} /></button>{addOpen && (<div className="tp-tsmenu">{addable.length === 0 ? (- <div className="empty-line empty-line--sm">No tilesets to add</div>+ <div className="empty-line empty-line--sm">{t('tile.noTilesetsToAdd')}</div>) : (addable.map((a) => (<button key={a.ref} type="button" className="tp-tsmenu-item" onClick={() => addTileset(a.ref)}>@@ -504,7 +505,7 @@ export function TilemapPainter() {{tool === 'terrain' ? (<div className="tp-terrains">{(asset?.terrains ?? []).length === 0 ? (- <div className="tp-warn">No terrains (create and tag tiles in the Tileset Editor's Terrain mode)</div>+ <div className="tp-warn">{t('tile.noTerrains')}</div>) : ((asset?.terrains ?? []).map((t, i) => (<button@@ -523,14 +524,14 @@ export function TilemapPainter() {<>{texUrl && (<div className="tp-palbar">- <button type="button" className="tp-zbtn" title="Zoom out" onClick={() => setZoom((z) => clamp(z / 1.25, 0.25, 8))}>+ <button type="button" className="tp-zbtn" title={t('tile.zoomOut')} onClick={() => setZoom((z) => clamp(z / 1.25, 0.25, 8))}><ZoomOut size={13} /></button><span className="tp-zpct">{Math.round(zoom * 100)}%</span>- <button type="button" className="tp-zbtn" title="Zoom in" onClick={() => setZoom((z) => clamp(z * 1.25, 0.25, 8))}>+ <button type="button" className="tp-zbtn" title={t('tile.zoomIn')} onClick={() => setZoom((z) => clamp(z * 1.25, 0.25, 8))}><ZoomIn size={13} /></button>- <button type="button" className="tp-zbtn" title="Fit width" onClick={fitZoom}>+ <button type="button" className="tp-zbtn" title={t('tile.fitWidth')} onClick={fitZoom}><Maximize2 size={13} /></button></div>@@ -539,13 +540,13 @@ export function TilemapPainter() {className="tp-palette"ref={paletteRef}tabIndex={0}- aria-label="Tile palette"+ aria-label={t('tile.paletteAria')}onKeyDown={onPaletteKey}onPointerUp={endDrag}onPointerLeave={endDrag}>{!texUrl ? (- <div className="tp-warn">No palette (the tilemap references no .estileset)</div>+ <div className="tp-warn">{t('tile.noPalette')}</div>) : (<div className="tp-atlas-sizer" style={{ width: (natural?.w ?? 0) * zoom, height: (natural?.h ?? 0) * zoom }}><divdiff --git a/desktop/src/panels/TilesetEditor.tsx b/desktop/src/panels/TilesetEditor.tsxindex b6640f67f..1f230e49d 100644--- a/desktop/src/panels/TilesetEditor.tsx+++ b/desktop/src/panels/TilesetEditor.tsx@@ -30,6 +30,7 @@ import { TilesetCommands } from '@/tileset/TilesetCommands';import { ProjectStore } from '@/project/ProjectStore';import { colsFor, rowsFor, TERRAIN_COLORS } from '@/tools/tileMath';import { AnimPreview, tileThumbStyle, type TileAtlas } from '@/tools/tileThumb';+import { t } from '@/i18n';/** A grid-geometry number field that commits on blur/Enter (one undo step per edit). */function GridField(props: { label: string; value: number; min?: number; onCommit: (n: number) => void }) {@@ -55,14 +56,14 @@ function GridField(props: { label: string; value: number; min?: number; onCommit// Peering zones in the cell's 3×3 grid; center (membership) is handled separately.const ZONES: { gx: number; gy: number; bit: number; corner: boolean; dir: string }[] = [- { gx: 1, gy: 0, bit: TB_N, corner: false, dir: 'north' },- { gx: 2, gy: 0, bit: TB_NE, corner: true, dir: 'north-east' },- { gx: 2, gy: 1, bit: TB_E, corner: false, dir: 'east' },- { gx: 2, gy: 2, bit: TB_SE, corner: true, dir: 'south-east' },- { gx: 1, gy: 2, bit: TB_S, corner: false, dir: 'south' },- { gx: 0, gy: 2, bit: TB_SW, corner: true, dir: 'south-west' },- { gx: 0, gy: 1, bit: TB_W, corner: false, dir: 'west' },- { gx: 0, gy: 0, bit: TB_NW, corner: true, dir: 'north-west' },+ { gx: 1, gy: 0, bit: TB_N, corner: false, dir: t('tile.dir.north') },+ { gx: 2, gy: 0, bit: TB_NE, corner: true, dir: t('tile.dir.northEast') },+ { gx: 2, gy: 1, bit: TB_E, corner: false, dir: t('tile.dir.east') },+ { gx: 2, gy: 2, bit: TB_SE, corner: true, dir: t('tile.dir.southEast') },+ { gx: 1, gy: 2, bit: TB_S, corner: false, dir: t('tile.dir.south') },+ { gx: 0, gy: 2, bit: TB_SW, corner: true, dir: t('tile.dir.southWest') },+ { gx: 0, gy: 1, bit: TB_W, corner: false, dir: t('tile.dir.west') },+ { gx: 0, gy: 0, bit: TB_NW, corner: true, dir: t('tile.dir.northWest') },];/** A focused per-tile collision-polygon editor: a magnified tile + click-to-add /@@ -107,10 +108,10 @@ function PolygonEditor(props: {<div className="ts-pe-backdrop" onPointerDown={(e) => { if (e.target === e.currentTarget) onClose(); }}><div className="ts-pe"><div className="ts-pe-head">- <span>Collision polygon · #{tileId}</span>+ <span>{t('tile.pe.title', { id: tileId })}</span><span className="ts-grow" />- <button type="button" onClick={() => commit([])}>Clear</button>- <button type="button" onClick={onClose}>Done</button>+ <button type="button" onClick={() => commit([])}>{t('tile.pe.clear')}</button>+ <button type="button" onClick={onClose}>{t('tile.done')}</button></div><divclassName="ts-pe-stage"@@ -134,7 +135,7 @@ function PolygonEditor(props: {))}</svg></div>- <div className="ts-pe-hint">Click to add a vertex · click a vertex to delete · takes effect at ≥3 points</div>+ <div className="ts-pe-hint">{t('tile.pe.hint')}</div></div></div>);@@ -166,8 +167,8 @@ export function TilesetEditor() {if (!asset) {return (<div className="ts-empty">- <p>No tileset open</p>- <p className="ts-hint">Double-click an .estileset in the Content Browser, or right-click a texture → Create Tileset</p>+ <p>{t('tile.noOpen')}</p>+ <p className="ts-hint">{t('tile.noOpenHint')}</p></div>);}@@ -236,7 +237,7 @@ export function TilesetEditor() {key={id}className={'ts-cell ts-pcell' + (hasPolygon(id) ? ' is-poly' : '')}style={{ left, top, width: w, height: h }}- title={`#${id} — click to edit collision polygon`}+ title={t('tile.cell.polyTip', { id })}onPointerDown={(e) => { e.preventDefault(); setPolyTile(id); }}/>,);@@ -264,7 +265,7 @@ export function TilesetEditor() {key={id}className={'ts-cell ts-acell' + (hasAnim ? ' has-anim' : '') + (animTile === id ? ' is-target' : '')}style={{ left, top, width: w, height: h }}- title={animTile == null ? `#${id} — click to edit its animation` : `#${id} — click to append as a frame`}+ title={animTile == null ? t('tile.cell.animEditTip', { id }) : t('tile.cell.animAppendTip', { id })}onPointerDown={(e) => {e.preventDefault();if (animTile == null) setAnimTile(id);@@ -288,7 +289,7 @@ export function TilesetEditor() {><buttontype="button" className="ts-zone ts-zone-c"- title="Tile belongs to this terrain"+ title={t('tile.zone.member')}onClick={() => toggleMember(id)}/>{showZones && terrain && ZONES.filter((z) => terrain.mode === 'corner' || !z.corner).map((z) => {@@ -299,8 +300,8 @@ export function TilesetEditor() {type="button"className={'ts-zone' + (on ? ' is-on' : '') + (z.corner ? ' is-corner' : '')}style={{ left: `${z.gx * 33.34}%`, top: `${z.gy * 33.34}%` }}- aria-label={`${z.dir} peering zone`}- title={`Peer with the ${z.dir} neighbor`}+ aria-label={t('tile.zone.aria', { dir: z.dir })}+ title={t('tile.zone.peerTip', { dir: z.dir })}onClick={() => toggleBit(id, z.bit)}/>);@@ -317,51 +318,51 @@ export function TilesetEditor() {return (<div className="ts-editor"><div className="ts-toolbar">- <GridField label="Tile W" value={tw} min={1} onCommit={(n) => editGrid({ tileWidth: n })} />- <GridField label="Tile H" value={th} min={1} onCommit={(n) => editGrid({ tileHeight: n })} />- <GridField label="Margin" value={mg} onCommit={(n) => editGrid({ margin: n })} />- <GridField label="Spacing" value={sp} onCommit={(n) => editGrid({ spacing: n })} />+ <GridField label={t('tile.field.tileW')} value={tw} min={1} onCommit={(n) => editGrid({ tileWidth: n })} />+ <GridField label={t('tile.field.tileH')} value={th} min={1} onCommit={(n) => editGrid({ tileHeight: n })} />+ <GridField label={t('tile.field.margin')} value={mg} onCommit={(n) => editGrid({ margin: n })} />+ <GridField label={t('tile.field.spacing')} value={sp} onCommit={(n) => editGrid({ spacing: n })} /><span className="ts-sep" /><Segmentedvalue={mode}onChange={setMode}- ariaLabel="Edit mode"+ ariaLabel={t('tile.mode.aria')}options={[- { value: 'collision', label: 'Collision' },- { value: 'terrain', label: 'Terrain' },- { value: 'animation', label: 'Animation' },+ { value: 'collision', label: t('tile.mode.collision') },+ { value: 'terrain', label: t('tile.mode.terrain') },+ { value: 'animation', label: t('tile.mode.animation') },]}/>{mode === 'collision' && (<Segmentedvalue={shape}onChange={setShape}- ariaLabel="Collision shape"+ ariaLabel={t('tile.shape.aria')}options={[- { value: 'box', label: 'Box' },- { value: 'polygon', label: 'Polygon' },+ { value: 'box', label: t('tile.shape.box') },+ { value: 'polygon', label: t('tile.shape.polygon') },]}/>)}<span className="ts-sep" /><label className="ts-field">- <span>Zoom</span>+ <span>{t('tile.field.zoom')}</span><input type="range" min={1} max={8} step={1} value={zoom}onChange={(e) => setZoom(Number(e.target.value))} /></label><span className="ts-grow" /><span className="ts-stat">- {cols}×{rows}{mode === 'collision' ? ` · ${solidCount} solid` : ''}+ {cols}×{rows}{mode === 'collision' ? ` · ${t('tile.solidCount', { count: solidCount })}` : ''}</span><button type="button" className="ts-save" onClick={() => void TilesetCommands.save()} disabled={!meta.dirty}>- <Save size={13} /> Save{meta.dirty && <DirtyDot />}+ <Save size={13} /> {t('tile.save')}{meta.dirty && <DirtyDot />}</button></div>{mode === 'animation' && (<div className="ts-anims">{animTile == null ? (- <span className="ts-ahint">Click a tile in the atlas to edit its animation — animated tiles carry a ▶ mark</span>+ <span className="ts-ahint">{t('tile.anim.pickHint')}</span>) : (<><AnimPreview frames={animFrames} fallback={animTile} thumb={thumb} className="ts-fthumb ts-apreview" />@@ -374,7 +375,7 @@ export function TilesetEditor() {key={`${animTile}-${i}-${f.durationMs}`}className="ts-fdur"defaultValue={f.durationMs}- title="Frame duration (ms)"+ title={t('tile.anim.durTip')}spellCheck={false}onBlur={(e) => {const n = parseInt(e.target.value, 10);@@ -386,7 +387,7 @@ export function TilesetEditor() {}}/><button- type="button" className="ts-fx" title="Remove frame"+ type="button" className="ts-fx" title={t('tile.anim.removeFrame')}onClick={() => setFrames(animFrames.filter((_, j) => j !== i))}><X size={11} strokeWidth={2.2} />@@ -394,15 +395,15 @@ export function TilesetEditor() {</span>))}<span className="ts-ahint">- {animFrames.length === 0 ? 'Click atlas tiles to add frames' : 'Click atlas tiles to append frames'}+ {animFrames.length === 0 ? t('tile.anim.addFrames') : t('tile.anim.appendFrames')}</span><span className="ts-grow" />{animFrames.length > 0 && (- <button type="button" className="ts-trm" title="Clear animation" onClick={() => setFrames([])}>+ <button type="button" className="ts-trm" title={t('tile.anim.clear')} onClick={() => setFrames([])}><Trash2 size={13} /></button>)}- <button type="button" className="ts-terrain" onClick={() => setAnimTile(null)}>Done</button>+ <button type="button" className="ts-terrain" onClick={() => setAnimTile(null)}>{t('tile.done')}</button></>)}</div>@@ -410,7 +411,7 @@ export function TilesetEditor() {{mode === 'terrain' && (<div className="ts-terrains">- {terrains.map((t, i) => (+ {terrains.map((ter, i) => (<buttonkey={i}type="button"@@ -418,11 +419,11 @@ export function TilesetEditor() {onClick={() => setActiveSet(i)}><span className="ts-tswatch" style={{ background: TERRAIN_COLORS[i % TERRAIN_COLORS.length] }} />- {t.name}- <span className="ts-tmode">{t.mode === 'corner' ? 'Corner' : 'Edge'}</span>+ {ter.name}+ <span className="ts-tmode">{ter.mode === 'corner' ? t('tile.terrain.cornerShort') : t('tile.terrain.edgeShort')}</span></button>))}- <button type="button" className="ts-terrain ts-add" title="New terrain"+ <button type="button" className="ts-terrain ts-add" title={t('tile.terrain.new')}onClick={() => { TilesetCommands.addTerrain('', 'edge'); setActiveSet(terrains.length); setMode('terrain'); }}><Plus size={13} /></button>@@ -433,15 +434,15 @@ export function TilesetEditor() {onChange={(e) => TilesetCommands.updateTerrain(activeSet, { name: e.target.value })}/><Select- ariaLabel="Terrain mode"+ ariaLabel={t('tile.terrain.modeAria')}value={terrain.mode}options={[- { value: 'edge', label: 'Edge (4-bit)' },- { value: 'corner', label: 'Corner (blob)' },+ { value: 'edge', label: t('tile.terrain.edge4') },+ { value: 'corner', label: t('tile.terrain.cornerBlob') },]}onChange={(v) => TilesetCommands.updateTerrain(activeSet, { mode: v })}/>- <button type="button" className="ts-trm" title="Delete terrain"+ <button type="button" className="ts-trm" title={t('tile.terrain.delete')}onClick={() => { TilesetCommands.removeTerrain(activeSet); setActiveSet(0); }}><Trash2 size={13} /></button>@@ -453,7 +454,7 @@ export function TilesetEditor() {<div className="ts-canvas" onPointerUp={mode === 'collision' ? commitDrag : undefined}onPointerLeave={mode === 'collision' ? commitDrag : undefined}>{!texUrl ? (- <div className="ts-warn">Texture not found (ref {String(asset.texture) || 'empty'})</div>+ <div className="ts-warn">{t('tile.texNotFound', { ref: String(asset.texture) || t('tile.refEmpty') })}</div>) : (<div className="ts-stage" style={{ width: (natural?.w ?? 0) * zoom, height: (natural?.h ?? 0) * zoom }}><imgdiff --git a/desktop/src/panels/UIWidgetsPanel.tsx b/desktop/src/panels/UIWidgetsPanel.tsxindex 44eeffabc..3af0b3692 100644--- a/desktop/src/panels/UIWidgetsPanel.tsx+++ b/desktop/src/panels/UIWidgetsPanel.tsx@@ -9,6 +9,7 @@* here for free with its registry label + icon.*/import { ENTITY_SOURCES, createFromSource, SOURCE_DND_MIME, type EntitySource } from '@/engine/entitySources';+import { t } from '@/i18n';import { useSelection } from '@/store/selectionStore';const UI_SOURCES = ENTITY_SOURCES.filter((s) => s.category === 'UI');@@ -21,7 +22,7 @@ export function UIWidgetsPanel() {};return (<div className="ui-palette">- <div className="ui-palette-hint">Drag onto the canvas, or click to add under the Canvas.</div>+ <div className="ui-palette-hint">{t('uiw.hint')}</div><div className="ui-palette-grid">{UI_SOURCES.map((s) => {const Icon = s.icon;diff --git a/desktop/src/panels/Viewport.tsx b/desktop/src/panels/Viewport.tsxindex be8a96a7e..2952fc8bd 100644--- a/desktop/src/panels/Viewport.tsx+++ b/desktop/src/panels/Viewport.tsx@@ -6,6 +6,7 @@ import {MousePointer2, Move, RotateCw, Scale3d, Grid3x3, Eye, Frame,Camera, Check, ChevronDown, Loader2, TriangleAlert, Lightbulb, Sparkles, Globe, Crosshair, Smartphone, Monitor, type LucideIcon,} from 'lucide-react';+import { t } from '@/i18n';import { useEditorStore } from '@/store/editorStore';import { useSelection } from '@/store/selectionStore';import { useTilemapPaint, type PaintTool } from '@/store/tilemapPaintStore';@@ -307,10 +308,10 @@ function GizmoOverlay({ tool, active }: { tool: ToolMode; active: GizmoAxis | nu}const TOOLS: { mode: ToolMode; icon: LucideIcon; label: string; key: string }[] = [- { mode: 'select', icon: MousePointer2, label: 'Select', key: 'Q' },- { mode: 'move', icon: Move, label: 'Move', key: 'W' },- { mode: 'rotate', icon: RotateCw, label: 'Rotate', key: 'E' },- { mode: 'scale', icon: Scale3d, label: 'Scale', key: 'R' },+ { mode: 'select', icon: MousePointer2, label: t('vp.tool.select'), key: 'Q' },+ { mode: 'move', icon: Move, label: t('vp.tool.move'), key: 'W' },+ { mode: 'rotate', icon: RotateCw, label: t('vp.tool.rotate'), key: 'E' },+ { mode: 'scale', icon: Scale3d, label: t('vp.tool.scale'), key: 'R' },];// Increments offered by the viewport Snap dropdown: move (world units), rotate@@ -321,29 +322,29 @@ const SNAP_SCALES = [0.1, 0.25, 0.5];// One-line hint shown under the coord readout, reflecting the active tool.const TOOL_HINT: Record<ToolMode, string> = {- select: 'Click to select · Shift adds · drag empty to box-select',- move: 'Drag a gizmo axis or the body · Alt-drag duplicates · arrows nudge',- rotate: 'Drag the ring to rotate the selection',- scale: 'Drag a handle for per-axis scale · center for uniform',+ select: t('vp.hint.select'),+ move: t('vp.hint.move'),+ rotate: t('vp.hint.rotate'),+ scale: t('vp.hint.scale'),};// Hint shown while painting a tilemap — replaces TOOL_HINT so the viewport speaks the// paint vocabulary (and always points at Q/Esc as the way back to select/transform).const TILE_HINT: Record<PaintTool, string> = {- brush: 'Drag to paint · H/V flips · R rotates the brush · I eyedropper · Q/Esc exits',- erase: 'Drag to erase (brush-sized) · Q/Esc exits',- rect: 'Drag a rectangle to fill · Q/Esc exits',- line: 'Drag a straight line · Q/Esc exits',- bucket: 'Click to fill the connected region · Q/Esc exits',- select: `Box-select · ${MOD_LABEL}C/X copies/cuts · Del clears · ${MOD_LABEL}V pastes as brush · Q/Esc exits`,- eyedropper: 'Click to pick a tile into the brush · Q/Esc exits',- terrain: 'Drag to paint terrain (auto-transitions) · Q/Esc exits',+ brush: t('vp.tileHint.brush'),+ erase: t('vp.tileHint.erase'),+ rect: t('vp.tileHint.rect'),+ line: t('vp.tileHint.line'),+ bucket: t('vp.tileHint.bucket'),+ select: t('vp.tileHint.select', { mod: MOD_LABEL }),+ eyedropper: t('vp.tileHint.eyedropper'),+ terrain: t('vp.tileHint.terrain'),};// Label for the mode badge — the paint tool's short name.const TILE_TOOL_LABEL: Record<PaintTool, string> = {- brush: 'Brush', erase: 'Erase', rect: 'Rect', line: 'Line',- bucket: 'Bucket', select: 'Select', eyedropper: 'Eyedropper', terrain: 'Terrain',+ brush: t('vp.tileTool.brush'), erase: t('vp.tileTool.erase'), rect: t('vp.tileTool.rect'), line: t('vp.tileTool.line'),+ bucket: t('vp.tileTool.bucket'), select: t('vp.tileTool.select'), eyedropper: t('vp.tileTool.eyedropper'), terrain: t('vp.tileTool.terrain'),};function OvTool({@@ -477,11 +478,11 @@ function ViewportHud({ ready, selCount, zoomPct, tool, paintHint }: {</div><div className="ps" /><div className="pr">- <span className="k">Frame</span>+ <span className="k">{t('vp.hud.frame')}</span><span className="v">{stats.fps > 0 ? (1000 / stats.fps).toFixed(1) : '—'} ms</span></div><div className="pr">- <span className="k">Entities</span>+ <span className="k">{t('vp.hud.entities')}</span><span className="v">{stats.entities}</span></div></div>@@ -489,7 +490,7 @@ function ViewportHud({ ready, selCount, zoomPct, tool, paintHint }: {<div className="vp-coord"><div className="ro"><HudCursor />- Sel <strong>{selCount}</strong> · {zoomPct}%+ {t('vp.hud.sel')} <strong>{selCount}</strong> · {zoomPct}%</div><div className="hint">{paintHint ?? TOOL_HINT[tool]}</div></div>@@ -1296,34 +1297,34 @@ export function Viewport() {{/* Top-left: view menus (UE5 layout) — Show Flags dropdown + Frame. */}<div className="ov ov-tl"><div className="ov-cluster">- <OvDropdown icon={Eye} label="Show" title="Show Flags">- <div className="ovmenu-lbl">Show Flags</div>- <DdCheck on={showGrid} label="Grid" onClick={() => commands.run('view.toggleGrid')} />- <DdCheck on={showGizmos} label="Gizmos" onClick={() => commands.run('view.toggleGizmos')} />- <DdCheck on={showColliders} label="Colliders" onClick={() => commands.run('view.toggleColliders')} />- <DdCheck on={previewFx} label="Preview FX" onClick={() => commands.run('view.togglePreviewFx')} />- <DdCheck on={perfVisible} label="Perf" onClick={() => PerfMonitor.toggleOverlay()} />+ <OvDropdown icon={Eye} label={t('vp.show')} title={t('vp.showFlags')}>+ <div className="ovmenu-lbl">{t('vp.showFlags')}</div>+ <DdCheck on={showGrid} label={t('vp.flag.grid')} onClick={() => commands.run('view.toggleGrid')} />+ <DdCheck on={showGizmos} label={t('vp.flag.gizmos')} onClick={() => commands.run('view.toggleGizmos')} />+ <DdCheck on={showColliders} label={t('vp.flag.colliders')} onClick={() => commands.run('view.toggleColliders')} />+ <DdCheck on={previewFx} label={t('vp.flag.previewFx')} onClick={() => commands.run('view.togglePreviewFx')} />+ <DdCheck on={perfVisible} label={t('vp.flag.perf')} onClick={() => PerfMonitor.toggleOverlay()} /></OvDropdown><span className="ov-divider" />- <OvTool icon={Frame} label="Frame Selected (F)" kbd="F" onClick={() => commands.run('view.frameSelected')} />+ <OvTool icon={Frame} label={`${t('vp.frameSelected')} (F)`} kbd="F" onClick={() => commands.run('view.frameSelected')} /><span className="ov-divider" /><buttontype="button"className={`ovbtn${coordSpace === 'local' ? ' active' : ''}`}- title="Gizmo axes: World / Local (the active object's own axes)"+ title={t('vp.coordSpaceTitle')}onClick={() => commands.run('view.toggleCoordSpace')}><Globe size={13} strokeWidth={1.9} />- <span className="val">{coordSpace === 'local' ? 'Local' : 'World'}</span>+ <span className="val">{coordSpace === 'local' ? t('vp.coord.local') : t('vp.coord.world')}</span></button><buttontype="button"className={`ovbtn${pivotMode === 'pivot' ? ' active' : ''}`}- title="Gizmo pivot: Center of selection / the active object's Pivot"+ title={t('vp.pivotTitle')}onClick={() => commands.run('view.togglePivotMode')}><Crosshair size={13} strokeWidth={1.9} />- <span className="val">{pivotMode === 'pivot' ? 'Pivot' : 'Center'}</span>+ <span className="val">{pivotMode === 'pivot' ? t('vp.pivot.pivot') : t('vp.pivot.center')}</span></button>{mode.overlays?.designFrame && (<>@@ -1332,9 +1333,9 @@ export function Viewport() {<OvDropdownicon={Monitor}label={<span className="val">{sceneCanvas.x}×{sceneCanvas.y}</span>}- title="Design resolution — the canvas you author against. Picking a preset writes Canvas.designResolution (undoable)."+ title={t('vp.designResTitle')}>- <div className="ovmenu-lbl">Design Resolution</div>+ <div className="ovmenu-lbl">{t('vp.designRes')}</div>{DESIGN_RESOLUTION_PRESETS.map((p) => (<DdRadiokey={p.label}@@ -1346,31 +1347,31 @@ export function Viewport() {}}/>))}- <div className="ovmenu-lbl">Exact values: select the Canvas → Inspector</div>+ <div className="ovmenu-lbl">{t('vp.designResExact')}</div></OvDropdown>)}<OvDropdownicon={Smartphone}label={<span className="val">{RESOLUTION_PRESET_BY_ID[device].label}</span>}- title="Preview device — simulates a target screen (does NOT change the design resolution)"+ title={t('vp.deviceTitle')}>- <div className="ovmenu-lbl">Device</div>+ <div className="ovmenu-lbl">{t('vp.device')}</div>{RESOLUTION_PRESETS.map((p) => (<DdRadio key={p.id} on={device === p.id} label={p.label} onClick={() => useEditorMode.getState().setDevice(p.id)} />))}- <div className="ovmenu-lbl">Orientation</div>+ <div className="ovmenu-lbl">{t('vp.orientation')}</div><DdRadioon={orientation === 'landscape'}- label="Landscape"+ label={t('vp.landscape')}onClick={() => orientation !== 'landscape' && useEditorMode.getState().toggleOrientation()}/><DdRadioon={orientation === 'portrait'}- label="Portrait"+ label={t('vp.portrait')}onClick={() => orientation !== 'portrait' && useEditorMode.getState().toggleOrientation()}/>- <div className="ovmenu-lbl">Overlay</div>- <DdCheck on={showSafeArea} label="Safe area" onClick={() => useEditorMode.getState().toggleSafeArea()} />+ <div className="ovmenu-lbl">{t('vp.overlay')}</div>+ <DdCheck on={showSafeArea} label={t('vp.safeArea')} onClick={() => useEditorMode.getState().toggleSafeArea()} /></OvDropdown></>)}@@ -1393,11 +1394,11 @@ export function Viewport() {<span className="ov-divider" /><OvDropdownicon={Grid3x3}- label={<span className="val">{snapping ? snapStep : 'Off'}</span>}- title="Grid Snap"+ label={<span className="val">{snapping ? snapStep : t('vp.snapOff')}</span>}+ title={t('vp.gridSnap')}>- <DdRadio on={!snapping} label="Off" onClick={() => useEditorStore.setState({ snapping: false })} />- <div className="ovmenu-lbl">Move (units)</div>+ <DdRadio on={!snapping} label={t('vp.snapOff')} onClick={() => useEditorStore.setState({ snapping: false })} />+ <div className="ovmenu-lbl">{t('vp.snapMove')}</div>{SNAP_STEPS.map((s) => (<DdRadiokey={s}@@ -1406,7 +1407,7 @@ export function Viewport() {onClick={() => useEditorStore.getState().setSnapStep(s)}/>))}- <div className="ovmenu-lbl">Rotate (°)</div>+ <div className="ovmenu-lbl">{t('vp.snapRotate')}</div>{SNAP_ANGLES.map((a) => (<DdRadiokey={a}@@ -1415,7 +1416,7 @@ export function Viewport() {onClick={() => useEditorStore.setState({ snapping: true, snapAngle: a })}/>))}- <div className="ovmenu-lbl">Scale (×)</div>+ <div className="ovmenu-lbl">{t('vp.snapScale')}</div>{SNAP_SCALES.map((s) => (<DdRadiokey={s}@@ -1611,16 +1612,16 @@ export function Viewport() {<div className="viewport__play-host" ref={playHostRef} />{(!realm.ready || realm.error) && (<div className={`viewport__play-status${realm.error ? ' error' : ''}`}>- {realm.error ? `Play failed: ${realm.error}` : 'Starting game…'}+ {realm.error ? t('vp.playFailed', { error: realm.error }) : t('vp.startingGame')}</div>)}<buttontype="button"className="viewport__play-stop"- title="Stop (Esc)"+ title={t('vp.stopTitle')}onClick={() => useEditorStore.getState().stop()}>- ● Playing · Stop+ {t('vp.playingStop')}</button></div>)}@@ -1683,14 +1684,14 @@ export function Viewport() {<div className="viewport__status-card viewport__status-card--error"><TriangleAlert size={22} strokeWidth={1.6} /><div>- <strong>Engine failed to start</strong>+ <strong>{t('vp.engineFailed')}</strong><p className="mono">{engine.error}</p></div></div>) : (<div className="viewport__status-card"><Loader2 size={20} strokeWidth={2} className="spin" />- <span>Booting esengine…</span>+ <span>{t('vp.booting')}</span></div>)}</div>@@ -1711,7 +1712,7 @@ export function Viewport() {{inTilePaint && paintTool ? ` · ${TILE_TOOL_LABEL[paintTool]}` : ''}</div>)}- {isPlaying && <div className="viewport__playflag">● PLAY</div>}+ {isPlaying && <div className="viewport__playflag">{t('vp.playFlag')}</div>}</div>);}diff --git a/desktop/src/project/ProjectStore.ts b/desktop/src/project/ProjectStore.tsindex 0cfd72f22..ebd9e4813 100644--- a/desktop/src/project/ProjectStore.ts+++ b/desktop/src/project/ProjectStore.ts@@ -185,7 +185,7 @@ class ProjectStoreImpl {await this.adopted(opened);return true;} catch (e) {- Toasts.push(`Could not open project: ${e instanceof Error ? e.message : String(e)}`, 'error');+ Toasts.push(t('proj.openFailed', { message: e instanceof Error ? e.message : String(e) }), 'error');return false;}}@@ -198,7 +198,7 @@ class ProjectStoreImpl {await this.adopted(await bridge.project.open(root));return true;} catch (e) {- Toasts.push(`Could not open project: ${e instanceof Error ? e.message : String(e)}`, 'error');+ Toasts.push(t('proj.openFailed', { message: e instanceof Error ? e.message : String(e) }), 'error');return false;}}@@ -539,7 +539,7 @@ class ProjectStoreImpl {const ref = UUID_PREFIX + uuid;const prefab = await this.loadPrefabAsset(ref);if (!prefab) {- Toasts.push(`Could not load prefab: ${path.split('/').pop() ?? path}`, 'error');+ Toasts.push(t('proj.prefabLoadFailed', { name: path.split('/').pop() ?? path }), 'error');return null;}const rootId = SceneCommands.instantiatePrefab(prefab, ref, parent, position);@@ -569,7 +569,7 @@ class ProjectStoreImpl {build: async () => {const p = await this.loadPrefabAsset(ref);if (!p) {- Toasts.push(`Could not load prefab: ${name}`, 'error');+ Toasts.push(t('proj.prefabLoadFailed', { name }), 'error');throw new Error('prefab load failed');}return p;@@ -628,7 +628,7 @@ class ProjectStoreImpl {if (!info) return null;const oldPrefab = await this.loadPrefabAsset(ref);if (!oldPrefab) {- Toasts.push(`Could not load prefab: ${info.path.split('/').pop() ?? info.path}`, 'error');+ Toasts.push(t('proj.prefabLoadFailed', { name: info.path.split('/').pop() ?? info.path }), 'error');return null;}@@ -654,7 +654,7 @@ class ProjectStoreImpl {const overrides = diffAgainstSource(oldPrefab, processed).overrides.filter((o) => o.type !== 'metadata_set' && o.type !== 'metadata_removed');if (overrides.length === 0) {- Toasts.push('No overrides to apply', 'info');+ Toasts.push(t('proj.noOverrides'), 'info');return instanceRoot;}const newPrefab = applyOverridesToSource(oldPrefab, overrides);@@ -662,7 +662,7 @@ class ProjectStoreImpl {try {await window.estella.fs.write(info.path, JSON.stringify(newPrefab, null, 2) + '\n');} catch (err) {- Toasts.push(`Apply failed: could not write ${info.path.split('/').pop() ?? info.path}`, 'error');+ Toasts.push(t('proj.applyWriteFailed', { name: info.path.split('/').pop() ?? info.path }), 'error');return null;}this.prefabCache.set(ref, newPrefab);@@ -670,7 +670,13 @@ class ProjectStoreImpl {// Re-sync this instance to the updated base so its (now-applied) overrides// clear — reuses the proven delete + re-instantiate path.const newRoot = await this.revertPrefabInstance(instanceRoot);- Toasts.push(`Applied ${overrides.length} override${overrides.length === 1 ? '' : 's'} to ${info.path.split('/').pop() ?? info.path}`, 'success');+ Toasts.push(+ t(overrides.length === 1 ? 'proj.appliedOverride' : 'proj.appliedOverrides', {+ count: overrides.length,+ name: info.path.split('/').pop() ?? info.path,+ }),+ 'success',+ );return newRoot;}@@ -733,12 +739,12 @@ class ProjectStoreImpl {);} catch (err) {console.warn('[project] prefab write failed', rel, err);- Toasts.push(`Failed to create prefab: ${base}`, 'error');+ Toasts.push(t('proj.prefabCreateFailed', { name: base }), 'error');return null;}await this.buildAssetRegistry(); // re-scan so the new prefab is tracked + draggable- Toasts.push(`Created prefab: ${rel.split('/').pop()}`, 'info');+ Toasts.push(t('proj.prefabCreated', { name: rel.split('/').pop() ?? rel }), 'info');return UUID_PREFIX + uuid;}@@ -873,7 +879,7 @@ class ProjectStoreImpl {raw.features = { ...((raw.features as Record<string, unknown>) ?? {}), rendering };await window.estella.fs.write(PROJECT_MANIFEST_FILE, JSON.stringify(raw, null, 2) + '\n');} catch (e) {- Toasts.push('Failed to save sorting layers', 'error');+ Toasts.push(t('proj.saveSortingLayersFailed'), 'error');console.error('[project] setRendering write failed', e);}}@@ -896,7 +902,7 @@ class ProjectStoreImpl {raw.designResolution = designResolution;await window.estella.fs.write(PROJECT_MANIFEST_FILE, JSON.stringify(raw, null, 2) + '\n');} catch (e) {- Toasts.push('Failed to save design resolution', 'error');+ Toasts.push(t('proj.saveDesignResolutionFailed'), 'error');console.error('[project] setDisplay write failed', e);}}@@ -922,7 +928,7 @@ class ProjectStoreImpl {raw.packaging = packaging;await window.estella.fs.write(PROJECT_MANIFEST_FILE, JSON.stringify(raw, null, 2) + '\n');} catch (e) {- Toasts.push('Failed to save packaging settings', 'error');+ Toasts.push(t('proj.savePackagingFailed'), 'error');console.error('[project] setPackaging write failed', e);}}@@ -948,7 +954,7 @@ class ProjectStoreImpl {raw.packaging = packaging;await window.estella.fs.write(PROJECT_MANIFEST_FILE, JSON.stringify(raw, null, 2) + '\n');} catch (e) {- Toasts.push('Failed to save platform settings', 'error');+ Toasts.push(t('proj.savePlatformFailed'), 'error');console.error('[project] setPlatformPackaging write failed', e);}}@@ -971,7 +977,7 @@ class ProjectStoreImpl {raw.features = { ...(raw.features as Record<string, unknown> ?? {}), physics };await window.estella.fs.write(PROJECT_MANIFEST_FILE, JSON.stringify(raw, null, 2) + '\n');} catch (e) {- Toasts.push('Failed to save physics setting', 'error');+ Toasts.push(t('proj.savePhysicsFailed'), 'error');console.error('[project] setPhysics write failed', e);}}@@ -1000,9 +1006,9 @@ class ProjectStoreImpl {raw.packaging = rawPkg;}await window.estella.fs.write(PROJECT_MANIFEST_FILE, JSON.stringify(raw, null, 2) + '\n');- Toasts.push(`Startup scene: ${path.split('/').pop()}`, 'info');+ Toasts.push(t('proj.startupScene', { name: path.split('/').pop() ?? path }), 'info');} catch (e) {- Toasts.push('Failed to save startup scene', 'error');+ Toasts.push(t('proj.saveStartupSceneFailed'), 'error');console.error('[project] setDefaultScene write failed', e);}}@@ -1041,10 +1047,10 @@ class ProjectStoreImpl {else delete rawPkg.excludeScenes;raw.packaging = rawPkg;await window.estella.fs.write(PROJECT_MANIFEST_FILE, JSON.stringify(raw, null, 2) + '\n');- const leaf = path.split('/').pop();- Toasts.push(excluded ? `Excluded from export: ${leaf}` : `Included in export: ${leaf}`, 'info');+ const leaf = path.split('/').pop() ?? path;+ Toasts.push(t(excluded ? 'proj.excludedFromExport' : 'proj.includedInExport', { name: leaf }), 'info');} catch (e) {- Toasts.push('Failed to save export exclusion', 'error');+ Toasts.push(t('proj.saveExclusionFailed'), 'error');console.error('[project] setSceneExcluded write failed', e);}}@@ -1143,7 +1149,7 @@ class ProjectStoreImpl {if (!this.state) return;await this.persistLastScene(relPath);await this.loadCurrentScene();- Toasts.push(`Opened ${relPath.split('/').pop() ?? relPath}`, 'info', 1600);+ Toasts.push(t('proj.openedScene', { name: relPath.split('/').pop() ?? relPath }), 'info', 1600);}/** True if the changed paths include the open scene document. */@@ -1203,7 +1209,7 @@ class ProjectStoreImpl {await this.writeScene(st.currentScene, await this.serializeCurrent());await this.persistLastScene(st.currentScene);EditorHistory.markSaved();- Toasts.push(`Saved ${st.currentScene.split('/').pop()}`, 'success');+ Toasts.push(t('proj.savedScene', { name: st.currentScene.split('/').pop() ?? st.currentScene }), 'success');void this.captureThumbnail();}@@ -1213,7 +1219,7 @@ class ProjectStoreImpl {await this.writeScene(relPath, await this.serializeCurrent());await this.persistLastScene(relPath);EditorHistory.markSaved();- Toasts.push(`Saved ${relPath.split('/').pop()}`, 'success');+ Toasts.push(t('proj.savedScene', { name: relPath.split('/').pop() ?? relPath }), 'success');void this.captureThumbnail();}diff --git a/desktop/src/tilemap/createTilemap.ts b/desktop/src/tilemap/createTilemap.tsindex ca26acf7f..499a38f3f 100644--- a/desktop/src/tilemap/createTilemap.ts+++ b/desktop/src/tilemap/createTilemap.ts@@ -17,6 +17,7 @@ import { useTilemapPaint } from '@/store/tilemapPaintStore';import { ProjectStore } from '@/project/ProjectStore';import { dockApi } from '@/layout/dockApi';import { Toasts } from '@/store/Toasts';+import { t } from '@/i18n';/*** An EntitySource for a specific .estileset: cellSize is seeded from the tileset's tile@@ -38,8 +39,8 @@ function tilesetSource(tilesetPath: string, tilesetRef: string, tileWidth: numbeuseTilemapPaint.getState().setTool('brush');// Dock the painter to the side so the Viewport stays visible (a center tab would// hide what you paint on).- dockApi.openSidePanel('tilemap', 'tilemap', 'Tilemap', 'left', 300);- Toasts.push('Created tilemap — pick a brush to paint in the viewport', 'info');+ dockApi.openSidePanel('tilemap', 'tilemap', t('panel.tilemap'), 'left', 300);+ Toasts.push(t('tile.toast.created'), 'info');},};}@@ -48,14 +49,14 @@ function tilesetSource(tilesetPath: string, tilesetRef: string, tileWidth: numbeexport async function createTilemapFromTileset(tilesetPath: string): Promise<void> {const tilesetRef = ProjectStore.assetRef(tilesetPath); // .estileset → @uuidif (!tilesetRef) {- Toasts.push('Tileset is not tracked by the project', 'error');+ Toasts.push(t('tile.toast.untracked'), 'error');return;}let asset;try {asset = parseTileset(JSON.parse(await window.estella.fs.read(tilesetPath)));} catch (e) {- Toasts.push(`Failed to read tileset: ${String(e)}`, 'error');+ Toasts.push(t('tile.toast.readFailed', { error: String(e) }), 'error');return;}await createFromSource(tilesetSource(tilesetPath, tilesetRef, asset.tileWidth, asset.tileHeight), { parent: null });diff --git a/desktop/src/tileset/TilesetCommands.ts b/desktop/src/tileset/TilesetCommands.tsindex a46594be0..3e533dec4 100644--- a/desktop/src/tileset/TilesetCommands.ts+++ b/desktop/src/tileset/TilesetCommands.ts@@ -11,6 +11,7 @@ import { serializeTileset } from 'esengine';import type { TilesetAsset, TilesetTerrain, TerrainMode, TilesetAnimFrame } from 'esengine';import { TilesetDocument } from './TilesetDocument';import { Toasts } from '@/store/Toasts';+import { t } from '@/i18n';type GridPatch = Partial<Pick<TilesetAsset, 'tileWidth' | 'tileHeight' | 'margin' | 'spacing' | 'columns'>>;@@ -144,9 +145,9 @@ export const TilesetCommands = {try {await window.estella.fs.write(path, JSON.stringify(serializeTileset(asset), null, 2) + '\n');TilesetDocument.markSaved();- Toasts.push('Tileset saved', 'info');+ Toasts.push(t('tile.toast.saved'), 'info');} catch (e) {- Toasts.push(`Failed to save tileset: ${String(e)}`, 'error');+ Toasts.push(t('tile.toast.saveFailed', { error: String(e) }), 'error');}},};diff --git a/desktop/src/tileset/openTileset.ts b/desktop/src/tileset/openTileset.tsindex 5f6c5c3fb..7171f1d78 100644--- a/desktop/src/tileset/openTileset.ts+++ b/desktop/src/tileset/openTileset.ts@@ -13,15 +13,16 @@ import { ProjectStore } from '@/project/ProjectStore';import { dockApi } from '@/layout/dockApi';import { baseName } from '@/project/assetMeta';import { Toasts } from '@/store/Toasts';+import { t } from '@/i18n';/** Open an existing .estileset into the Tileset editor and reveal the panel. */export async function openTileset(path: string): Promise<void> {try {const text = await window.estella.fs.read(path);TilesetDocument.openJson(JSON.parse(text), path);- dockApi.openDocument('tileset', 'tileset', 'Tileset');+ dockApi.openDocument('tileset', 'tileset', t('tile.panelTileset'));} catch (e) {- Toasts.push(`Failed to open tileset: ${String(e)}`, 'error');+ Toasts.push(t('tile.toast.openFailed', { error: String(e) }), 'error');}}@@ -29,7 +30,7 @@ export async function openTileset(path: string): Promise<void> {export async function createTilesetFromTexture(texturePath: string): Promise<void> {const ref = ProjectStore.assetRef(texturePath);if (!ref) {- Toasts.push('Texture is not tracked by the project — cannot create tileset', 'error');+ Toasts.push(t('tile.toast.texUntracked'), 'error');return;}const dir = texturePath.includes('/') ? texturePath.slice(0, texturePath.lastIndexOf('/') + 1) : '';@@ -46,10 +47,10 @@ export async function createTilesetFromTexture(texturePath: string): Promise<voiJSON.stringify({ uuid, version: '1.0', type: 'tileset', importer: { autoMigrate: true } }, null, 2) + '\n',);} catch (e) {- Toasts.push(`Failed to create tileset: ${String(e)}`, 'error');+ Toasts.push(t('tile.toast.createFailed', { error: String(e) }), 'error');return;}await ProjectStore.refreshAssets(); // re-scan so the new tileset is tracked- Toasts.push(`Created tileset: ${rel.split('/').pop()}`, 'info');+ Toasts.push(t('tile.toast.createdTileset', { name: rel.split('/').pop() ?? rel }), 'info');await openTileset(rel);}diff --git a/desktop/src/timeline/TimelineCommands.ts b/desktop/src/timeline/TimelineCommands.tsindex a7f0ca02a..f1abf1196 100644--- a/desktop/src/timeline/TimelineCommands.ts+++ b/desktop/src/timeline/TimelineCommands.ts@@ -22,6 +22,7 @@ import {type PropertyChannel,type PropertyTrack,} from 'esengine';+import { t } from '@/i18n';import { TimelineDocument } from './TimelineDocument';import { findChannel, upsertKeyframe, type ChannelRef } from './timelineView';import { Toasts } from '@/store/Toasts';@@ -165,15 +166,15 @@ class TimelineCommandsImpl {const { filePath } = TimelineDocument.meta;if (!asset) return;if (!filePath) {- Toasts.push('Animation has no file (sample clips cannot be saved)', 'error');+ Toasts.push(t('seq.toast.noFile'), 'error');return;}try {await window.estella.fs.write(filePath, serializeTimelineToJson(asset) + '\n');TimelineDocument.markSaved();- Toasts.push('Animation saved', 'success', 1500);+ Toasts.push(t('seq.toast.saved'), 'success', 1500);} catch (e) {- Toasts.push(`Failed to save: ${String(e)}`, 'error');+ Toasts.push(t('seq.toast.saveFailed', { error: String(e) }), 'error');}}}diff --git a/desktop/src/timeline/openClip.ts b/desktop/src/timeline/openClip.tsindex 950ef2a59..caad5d7a1 100644--- a/desktop/src/timeline/openClip.ts+++ b/desktop/src/timeline/openClip.ts@@ -11,6 +11,7 @@*/import { parseAnimationClip } from 'esengine';+import { t } from '@/i18n';import { TimelineDocument } from './TimelineDocument';import { useSequencerStore } from '@/store/sequencerStore';import { useSelection } from '@/store/selectionStore';@@ -29,7 +30,7 @@ export async function openAnimationClip(path: string): Promise<void> {useSequencerStore.getState().resetForClip();dockApi.revealAndExpand('sequencer');} catch (e) {- Toasts.push(`Failed to open animation: ${String(e)}`, 'error');+ Toasts.push(t('seq.toast.openFailed', { error: String(e) }), 'error');}}@@ -49,10 +50,10 @@ export async function createAnimationClip(dir: string): Promise<void> {JSON.stringify({ uuid: crypto.randomUUID(), version: '1.0', type: 'animation', importer: { autoMigrate: true } }, null, 2) + '\n',);} catch (e) {- Toasts.push(`Failed to create animation: ${String(e)}`, 'error');+ Toasts.push(t('seq.toast.createFailed', { error: String(e) }), 'error');return;}await ProjectStore.refreshAssets();- Toasts.push(`Created animation: ${baseName(rel)}`, 'info');+ Toasts.push(t('seq.toast.created', { name: baseName(rel) }), 'info');await openAnimationClip(rel);}diff --git a/desktop/src/timeline/timelineView.ts b/desktop/src/timeline/timelineView.tsindex 3d6a13104..4e81ec59e 100644--- a/desktop/src/timeline/timelineView.ts+++ b/desktop/src/timeline/timelineView.ts@@ -20,6 +20,7 @@ import {type PropertyChannel,type InterpType,} from 'esengine';+import { t } from '@/i18n';/** Addresses one animatable channel: entity (childPath) + component + property. */export interface ChannelRef {@@ -140,7 +141,7 @@ export function buildTimelineRows(asset: TimelineAsset | null): SeqRow[] {rows.push({id: entityKey,kind: 'entity',- label: childPath || 'Root entity',+ label: childPath || t('seq.rootEntity'),depth: 0,groupKey: entityKey,parentGroups: [],diff --git a/desktop/src/tools/tileThumb.tsx b/desktop/src/tools/tileThumb.tsxindex 8841be38a..1e77b44a5 100644--- a/desktop/src/tools/tileThumb.tsx+++ b/desktop/src/tools/tileThumb.tsx@@ -8,6 +8,7 @@*/import { useEffect, useState, type CSSProperties } from 'react';import type { TilesetAnimFrame } from 'esengine';+import { t } from '@/i18n';/** The atlas layout a tile is cropped from (a parsed `.estileset`'s grid). */export interface TileAtlas {@@ -74,5 +75,5 @@ export function AnimPreview({};}, [frames]);const tile = frames.length ? frames[Math.min(i, frames.length - 1)].tile : fallback;- return <span className={className} style={thumb(tile)} title="Preview" />;+ return <span className={className} style={thumb(tile)} title={t('tile.preview')} />;}diff --git a/desktop/src/tools/tileTools.ts b/desktop/src/tools/tileTools.tsindex d15da97cc..87761d51e 100644--- a/desktop/src/tools/tileTools.ts+++ b/desktop/src/tools/tileTools.ts@@ -18,6 +18,7 @@ import { ViewportController } from '@/engine/ViewportController';import { SceneCommands, type TilePaint } from '@/engine/SceneCommands';import { SceneModel } from '@/engine/SceneModel';import { Toasts } from '@/store/Toasts';+import { t } from '@/i18n';import { useSelection } from '@/store/selectionStore';import { useTilemapPaint, type PaintTool } from '@/store/tilemapPaintStore';import { TilePaintPreview } from './tilePreview';@@ -357,7 +358,7 @@ const bucketTool: EditorTool = {}}if (edits.length > 0) SceneCommands.paintTiles(selId, edits);- if (capped) Toasts.push(`Bucket fill hit the ${BUCKET_CAP}-cell cap — filled partially`, 'warn');+ if (capped) Toasts.push(t('tile.toast.bucketCap', { cap: BUCKET_CAP }), 'warn');return false; // one-shot, no drag},onPointerMove() {},diff --git a/desktop/src/tools/transformTools.ts b/desktop/src/tools/transformTools.tsindex ac677cc2f..e8749a357 100644--- a/desktop/src/tools/transformTools.ts+++ b/desktop/src/tools/transformTools.ts@@ -33,6 +33,7 @@ import {} from './gizmo';import { Marquee } from './marquee';import { Toasts } from '@/store/Toasts';+import { t } from '@/i18n';import type { EditorTool, PointerInput } from './EditorTool';type Kind = 'move' | 'rotate' | 'scale';@@ -131,7 +132,7 @@ function captureTargets(ids: readonly EntityId[], kind: Kind = 'move'): Target[]kept = kept.filter((id) => !isOrphanUINode(id));if (Date.now() - canvasHintAt > 4000) {canvasHintAt = Date.now();- Toasts.push('This UI element has no Canvas, so it can’t be positioned — add one via Details ▸ “Place under a Canvas”.', 'info');+ Toasts.push(t('vp.orphanUiHint'), 'info');}}// A flow (Relative) node's position is owned by the layout — moving it does@@ -142,7 +143,7 @@ function captureTargets(ids: readonly EntityId[], kind: Kind = 'move'): Target[]kept = kept.filter((id) => !isFlowUINode(id));if (Date.now() - flowHintAt > 4000) {flowHintAt = Date.now();- Toasts.push('This UI node is Relative (flow-positioned) — set Position to Absolute to move it freely.', 'info');+ Toasts.push(t('vp.flowUiHint'), 'info');}}}