Skip to content

armgit / SOMA

Public Imported from GitHub
0

Desktop app for designing parametric 3D models in CadQuery together with the coding agent of your choice

App auf Englisch: Oberfläche, Skills, Vorlage und Tests (E73)

Kai-Jungsthoefel1e6aac15bd76
diff --git a/app/resources/skills/3d-druck.md b/app/resources/skills/3d-druck.md
index 6518366..08952b2 100644
--- a/app/resources/skills/3d-druck.md
+++ b/app/resources/skills/3d-druck.md
@@ -1,22 +1,22 @@
---
-title: 3D-Druck (FDM)
+title: 3D printing (FDM)
name: 3D printing (FDM)
-summary: Druckbare Wandstärken, Überhänge bis {{overhang}}°, Spiel für Passungen, Ausrichtung auf dem Druckbett, Gewinde über Einschmelzmuttern.
+summary: Printable wall thicknesses, overhangs up to {{overhang}}°, clearance for fits, orientation on the print bed, threads with heat-set inserts.
order: 10
-category: Fertigungsverfahren
+category: Manufacturing
default: on-demand
when: the parts will be 3D printed on a filament printer (FDM)
-topics: Drucker und Material; Wände und kleine Details; Überhänge und Brücken; Ausrichtung und Bauraum; Spiel und Passungen; Schrauben und Gewinde; Prüfen und Export
+topics: Printer and material; Walls and small features; Overhangs and bridges; Orientation and build volume; Clearances and fits; Screws and threads; Checks and export
var material: PLA | | Material | PLA, PETG, ABS, ASA, TPU
-var nozzle: 0.4 | mm | Düse | 0.1..1.2
-var layer: 0.2 | mm | Schichthöhe | 0.04..0.8
-var bed_x: 220 | mm | Bauraum X | 30..2000
-var bed_y: 220 | mm | Bauraum Y | 30..2000
-var bed_z: 250 | mm | Bauraum Z | 30..2000
-var overhang: 45 | ° | Max. Überhangwinkel | 10..85
-var bridge: 10 | mm | Max. Brücke ohne Stütze | 0..200
-var min_wall: 1.2 | mm | Mindestwand | 0.2..20
-var clearance: 0.3 | mm | Spiel je Seite (Gleitpassung) | 0..3
+var nozzle: 0.4 | mm | Nozzle | 0.1..1.2
+var layer: 0.2 | mm | Layer height | 0.04..0.8
+var bed_x: 220 | mm | Build volume X | 30..2000
+var bed_y: 220 | mm | Build volume Y | 30..2000
+var bed_z: 250 | mm | Build volume Z | 30..2000
+var overhang: 45 | ° | Max. overhang angle | 10..85
+var bridge: 10 | mm | Max. bridge without support | 0..200
+var min_wall: 1.2 | mm | Minimum wall | 0.2..20
+var clearance: 0.3 | mm | Clearance per side (sliding fit) | 0..3
---
# Skill: 3D printing (FDM)
diff --git a/app/resources/skills/analyse.md b/app/resources/skills/analyse.md
index 5feedd3..13d4ec2 100644
--- a/app/resources/skills/analyse.md
+++ b/app/resources/skills/analyse.md
@@ -1,17 +1,17 @@
---
-title: Analyse
+title: Analysis
name: Analysis
-summary: Überhang, Wandstärke und Spalt zwischen Teilen als Wert an jeder Stelle der Oberfläche (soma analyze), als Text und farbiges Bild.
+summary: Overhang, wall thickness and gaps between parts as a value at every spot of the surface (soma analyze), as text and as a colored picture.
order: 30
-category: Prüfen und Zeigen
+category: Check and present
default: on-demand
when: you check printability, wall thickness or gaps between parts, or the user asks for an analysis
-topics: Auswertungen; Ablauf; Grenzen; Rückmeldung
+topics: Analyses; Workflow; Limits; Feedback
---
# Skill: Analysis
`soma analyze` computes a value at every spot of the surface, prints a summary per part and writes
-`.soma/results/<name>.glb`. The user sees it in colour in the app (Analyse), you see it with `soma render --result`.
+`.soma/results/<name>.glb`. The user sees it in colour in the app (Analysis), you see it with `soma render --result`.
| Command | Value | Critical by default |
|---|---|---|
@@ -47,5 +47,5 @@ accuracy of the threshold count as exactly at the threshold, not critical (a 45
## Feedback from the user
-`[Ergebnis: "Wandstärke" (.soma/results/thickness.glb, Grenzwert 1.20 mm), Bauteil "Lid": 0.80 mm bei (12.0, -5.0,
-26.0) mm]`: the user clicked that spot. A marking may say `zeigt das Ergebnis „Wandstärke“`: it shows the colours.
+`[Result: "Wall thickness" (.soma/results/thickness.glb, limit 1.20 mm), part "Lid": 0.80 mm at (12.0, -5.0, 26.0)
+mm]`: the user clicked that spot. A markup may say `shows the result "Wall thickness"`: it shows the colours.
diff --git a/app/resources/skills/animation.md b/app/resources/skills/animation.md
index 0754f5c..6990629 100644
--- a/app/resources/skills/animation.md
+++ b/app/resources/skills/animation.md
@@ -1,12 +1,12 @@
---
-title: Animation und Video
+title: Animation and video
name: Animation and video
-summary: Bewegungen, Kamerafahrten und Texte in animations/*.py, auf Kollisionen prüfen, als Standbilder ansehen, als MP4 ausgeben.
+summary: Motions, camera moves and texts in animations/*.py, checked for collisions, viewed as stills, exported as MP4.
order: 31
-category: Prüfen und Zeigen
+category: Check and present
default: on-demand
when: the user wants to see parts move, an assembly sequence, a camera flight, a video or a presentation of the model
-topics: Datei und Aufbau; Gelenke und Zeitleiste; Kamera; Texte; Bauen, prüfen, ansehen; Rückmeldung
+topics: File and structure; Joints and timeline; Camera; Texts; Build, check, view; Feedback
---
# Skill: Animation and video
@@ -67,6 +67,6 @@ Captions: one short sentence in the language the user speaks, about what moves a
## Feedback from the user
-`[Animation: "Name" (animations/x.py) bei 1.50 s]` and `[Video: renders/x.mp4 bei 00:03.20]` point to a moment. A
-marking may say `gezeichnet auf renders/x.mp4 bei 00:03.20` or `Animation „Name“ bei 1.50 s`: the picture shows that
+`[Animation: "Name" (animations/x.py) at 1.50 s]` and `[Video: renders/x.mp4 at 00:03.20]` point to a moment. A
+markup may say `drawn on renders/x.mp4 at 00:03.20` or `animation "Name" at 1.50 s`: the picture shows that
moment. Render it yourself (`soma render --anim "Name" --at 1.5`) before you change something.
diff --git a/app/resources/skills/baugruppen.md b/app/resources/skills/baugruppen.md
index 7af4ff1..399bfad 100644
--- a/app/resources/skills/baugruppen.md
+++ b/app/resources/skills/baugruppen.md
@@ -1,13 +1,13 @@
---
-title: Baugruppen und Bewegung
+title: Assemblies and motion
name: Assemblies and motion
-summary: Teile in Einbaulage aus gemeinsamen Bezügen, Schnittstellen nur einmal definiert, Montierbarkeit, bewegliche Teile über den ganzen Weg prüfen ({{motion_gap}} mm Abstand), Stückliste.
+summary: Parts in assembled position from shared references, interfaces defined only once, ease of assembly, moving parts checked over their whole travel ({{motion_gap}} mm gap), parts list.
order: 24
-category: Konstruktionswissen
+category: Design knowledge
default: on-demand
when: several parts are assembled or move against each other
-topics: Bezüge und Einbaulage; Schnittstellen; Montierbarkeit; Bewegliche Teile; Stückliste
-var motion_gap: 1 | mm | Mindestabstand bewegter Teile | 0..20
+topics: References and assembled position; Interfaces; Ease of assembly; Moving parts; Parts list
+var motion_gap: 1 | mm | Minimum gap between moving parts | 0..20
---
# Skill: Assemblies and motion
diff --git a/app/resources/skills/blech.md b/app/resources/skills/blech.md
index b501759..3f211a0 100644
--- a/app/resources/skills/blech.md
+++ b/app/resources/skills/blech.md
@@ -1,16 +1,16 @@
---
-title: Blech
+title: Sheet metal
name: Sheet metal
-summary: {{material}}, {{thickness}} mm, Innenradius {{bend_radius}} mm: Biegungen modellieren, Schenkel, Freistiche, Abstände zur Biegung, Abwicklung mit K-Faktor {{k_factor}}.
+summary: {{material}}, {{thickness}} mm, inner radius {{bend_radius}} mm: modeling bends, flanges, relief notches, distances to the bend, flat pattern with K-factor {{k_factor}}.
order: 14
-category: Fertigungsverfahren
+category: Manufacturing
default: on-demand
when: parts will be made from bent sheet metal
-topics: Material und Dicke; Biegungen modellieren; Schenkel, Löcher, Freistiche; Abwicklung; Gewinde und Verbindungen
-var material: steel | | Material | steel=Stahl (DC01), stainless steel=Edelstahl, aluminium=Aluminium
-var thickness: 1.5 | mm | Blechdicke | 0.3..10
-var bend_radius: 1.5 | mm | Innenradius der Biegung | 0..30
-var k_factor: 0.4 | | K-Faktor | 0.2..0.5
+topics: Material and thickness; Modeling bends; Flanges, holes, relief notches; Flat pattern; Threads and joints
+var material: steel | | Material | steel=Steel (DC01), stainless steel=Stainless steel, aluminium=Aluminium
+var thickness: 1.5 | mm | Sheet thickness | 0.3..10
+var bend_radius: 1.5 | mm | Inner bend radius | 0..30
+var k_factor: 0.4 | | K-factor | 0.2..0.5
---
# Skill: Sheet metal
diff --git a/app/resources/skills/cadquery.md b/app/resources/skills/cadquery.md
index abb35de..4fcd310 100644
--- a/app/resources/skills/cadquery.md
+++ b/app/resources/skills/cadquery.md
@@ -1,12 +1,12 @@
---
-title: Sauber modellieren (CadQuery)
+title: Clean modeling (CadQuery)
name: Clean CadQuery modeling
-summary: Parameter oben, ein Teil je Funktion, feste Reihenfolge der Schritte, robuste Selektoren, typische Fehler vermeiden, jedes Teil prüfen.
+summary: Parameters at the top, one function per part, a fixed order of operations, robust selectors, avoiding typical errors, checking every part.
order: 2
-category: Arbeitsweise
+category: Way of working
default: always
when: you write or restructure CadQuery code
-topics: Parameter und Aufbau; Reihenfolge der Schritte; Selektoren; Typische Fehler; Jedes Teil prüfen
+topics: Parameters and structure; Order of operations; Selectors; Typical errors; Check every part
---
# Skill: Clean CadQuery modeling
diff --git a/app/resources/skills/cnc.md b/app/resources/skills/cnc.md
index 516981e..0273df4 100644
--- a/app/resources/skills/cnc.md
+++ b/app/resources/skills/cnc.md
@@ -1,15 +1,15 @@
---
-title: CNC-Fräsen und Drehen
+title: CNC milling and turning
name: CNC milling and turning
-summary: {{material}}, kleinster Fräser Ø {{tool_d}} mm, {{axes}}: Innenradien, Taschentiefen, Zugänglichkeit, Bohrungen und Gewinde, Drehteile.
+summary: {{material}}, smallest end mill Ø {{tool_d}} mm, {{axes}}: inner radii, pocket depths, access, holes and threads, turned parts.
order: 12
-category: Fertigungsverfahren
+category: Manufacturing
default: on-demand
when: parts will be CNC milled or turned
-topics: Material und Maschine; Innenecken und Taschen; Zugänglichkeit und Aufspannungen; Wände, Bohrungen, Gewinde; Drehteile; Angaben für die Fertigung
-var material: aluminium | | Material | aluminium=Aluminium, steel=Stahl, stainless steel=Edelstahl, brass=Messing, POM=POM, plastic=anderer Kunststoff
-var tool_d: 6 | mm | Kleinster Fräser Ø | 0.5..25
-var axes: 3 | | Maschine | 3=3-Achs, 3+2=3+2-Achs (5 Seiten), 5=5-Achs simultan
+topics: Material and machine; Inner corners and pockets; Access and setups; Walls, holes, threads; Turned parts; Information for the shop
+var material: aluminium | | Material | aluminium=Aluminium, steel=Steel, stainless steel=Stainless steel, brass=Brass, POM=POM, plastic=Other plastic
+var tool_d: 6 | mm | Smallest end mill Ø | 0.5..25
+var axes: 3 | | Machine | 3=3-axis, 3+2=3+2-axis (5 sides), 5=5-axis simultaneous
---
# Skill: CNC milling and turning
diff --git a/app/resources/skills/fem.md b/app/resources/skills/fem.md
index 21de7ed..dffe17b 100644
--- a/app/resources/skills/fem.md
+++ b/app/resources/skills/fem.md
@@ -1,13 +1,13 @@
---
-title: Festigkeit mit FEM
+title: Strength with FEM
name: Strength with FEM
-summary: Spannungen, Sicherheit und Verformung unter Last mit der Finite-Elemente-Methode (soma analyze fem), Lastfall als Python-Datei, Ergebnis farbig in der App.
+summary: Stresses, safety factor and deformation under load with the finite element method (soma analyze fem), load case as a Python file, colored result in the app.
order: 32
-category: Prüfen und Zeigen
+category: Check and present
default: on-demand
when: a part carries a real load and the user wants to know whether it holds, where it is weakest or how far it bends
-topics: Lastfall; Rechnen und lesen; Ergebnis prüfen; Grenzen; Rückmeldung
-var safety: 2 | | Sicherheitsfaktor | 1..10
+topics: Load case; Compute and read; Check the result; Limits; Feedback
+var safety: 2 | | Safety factor | 1..10
---
# Skill: Strength with FEM
@@ -63,7 +63,7 @@ face the hand, the shelf or the shaft touches, not on a whole side.
## Check the result
-- **Support forces** must carry the loads ("im Gleichgewicht"). If a support force is far from what you expect, the
+- **Support forces** must carry the loads ("in equilibrium"). If a support force is far from what you expect, the
wrong faces are held.
- **Mesh check:** every run computes a second time with a coarser mesh. If the highest stress changes by more than 15 %,
it says so: the peak sits at a sharp inner corner or at the edge of a support or load. There the value grows without
@@ -82,6 +82,6 @@ face the hand, the shelf or the shaft touches, not on a whole side.
## Feedback from the user
-`[Ergebnis: "Bracket, 5 kg on the arm" (.soma/results/bracket.glb, Grenzwert 2.00), Bauteil "Bracket": Sicherheit
-0.90 (22.2 MPa, Verschiebung 0.412 mm) bei (12.0, -5.0, 26.0) mm]`: the user clicked that spot. The point is in the
+`[Result: "Bracket, 5 kg on the arm" (.soma/results/bracket.glb, limit 2.00), part "Bracket": safety factor 0.90
+(22.2 MPa, displacement 0.412 mm) at (12.0, -5.0, 26.0) mm]`: the user clicked that spot. The point is in the
undeformed model.
diff --git a/app/resources/skills/festigkeit.md b/app/resources/skills/festigkeit.md
index dcf8a3f..e7fdfde 100644
--- a/app/resources/skills/festigkeit.md
+++ b/app/resources/skills/festigkeit.md
@@ -1,13 +1,13 @@
---
-title: Festigkeit und Steifigkeit
+title: Strength and stiffness
name: Strength and stiffness
-summary: Gestaltungsregeln ohne Simulation: Kerben vermeiden, Rippen statt Masse, kurzer Kraftfluss, Überschlagsrechnung mit Sicherheit {{safety}}, Werkstoffwerte, Gewicht.
+summary: Design rules without simulation: avoid notches, ribs instead of mass, short load paths, rough calculation with safety factor {{safety}}, material values, weight.
order: 23
-category: Konstruktionswissen
+category: Design knowledge
default: on-demand
when: a part carries load or must be stiff, strong or light
-topics: Gestaltungsregeln; Überschlagsrechnung; Werkstoffwerte; Gewicht
-var safety: 2 | | Sicherheitsfaktor | 1..10
+topics: Design rules; Rough calculation; Material values; Weight
+var safety: 2 | | Safety factor | 1..10
---
# Skill: Strength and stiffness
diff --git a/app/resources/skills/harz-pulver.md b/app/resources/skills/harz-pulver.md
index a1e3513..ba71102 100644
--- a/app/resources/skills/harz-pulver.md
+++ b/app/resources/skills/harz-pulver.md
@@ -1,15 +1,15 @@
---
-title: 3D-Druck Harz und Pulver (SLA, SLS)
+title: Resin and powder printing (SLA, SLS)
name: Resin and powder 3D printing (SLA, SLS, MJF)
-summary: {{process}}: Wände ab {{min_wall}} mm, Spiel {{clearance}} mm je Seite, Hohlkörper mit Ablauflöchern, Ausrichtung und Stützen.
+summary: {{process}}: walls from {{min_wall}} mm, clearance {{clearance}} mm per side, hollow parts with escape holes, orientation and supports.
order: 11
-category: Fertigungsverfahren
+category: Manufacturing
default: on-demand
when: the parts will be printed in resin (SLA, DLP) or powder (SLS, MJF)
-topics: Verfahren: {{process}}; Wände und Details; Hohlkörper; Ausrichtung und Stützen; Spiel und Gewinde; Prüfen und Export
-var process: SLA | | Verfahren | SLA=Harz (SLA, DLP), SLS=Pulver (SLS, MJF)
-var min_wall: 1 | mm | Mindestwand | 0.3..10
-var clearance: 0.2 | mm | Spiel je Seite (Gleitpassung) | 0..2
+topics: Process: {{process}}; Walls and details; Hollow parts; Orientation and support; Fits and threads; Checks and export
+var process: SLA | | Process | SLA=Resin (SLA, DLP), SLS=Powder (SLS, MJF)
+var min_wall: 1 | mm | Minimum wall | 0.3..10
+var clearance: 0.2 | mm | Clearance per side (sliding fit) | 0..2
---
# Skill: Resin and powder 3D printing
diff --git a/app/resources/skills/konstruktionsablauf.md b/app/resources/skills/konstruktionsablauf.md
index a795fd9..8b4a95f 100644
--- a/app/resources/skills/konstruktionsablauf.md
+++ b/app/resources/skills/konstruktionsablauf.md
@@ -1,14 +1,14 @@
---
-title: Konstruktionsablauf
+title: Design workflow
name: Design workflow
-summary: Erst Anforderungen klären, dann vom Groben ins Feine, in kleinen Schritten, mit kurzem Bericht. Fehlende Angaben: {{ask}}. Detailgrad: {{detail}}.
+summary: Clarify the requirements first, then from coarse to fine, in small steps, with a short report. Missing information: {{ask}}. Level of detail: {{detail}}.
order: 1
-category: Arbeitsweise
+category: Way of working
default: always
when: you start a new design or a larger change
-topics: Anforderungen klären; Vom Groben ins Feine; Kleine Schritte; Bericht am Ende
-var ask: ask | | Fehlende Angaben | ask=erst fragen, assume=annehmen und notieren
-var detail: prototype | | Detailgrad | concept=Konzept, prototype=Prototyp, production=fertigungsreif
+topics: Clarify requirements; Coarse to fine; Small steps; Report at the end
+var ask: ask | | Missing information | ask=ask first, assume=assume and note it
+var detail: prototype | | Level of detail | concept=Concept, prototype=Prototype, production=Ready for production
---
# Skill: Design workflow
diff --git a/app/resources/skills/laser.md b/app/resources/skills/laser.md
index b03292a..51460d1 100644
--- a/app/resources/skills/laser.md
+++ b/app/resources/skills/laser.md
@@ -1,15 +1,15 @@
---
-title: Laserschneiden
+title: Laser cutting
name: Laser cutting
-summary: Teile aus {{material}}, {{thickness}} mm: Steckverbindungen mit Schnittbreite {{kerf}} mm, Mindeststege, Zusammenbau in 3D, DXF je Platte.
+summary: {{material}}, {{thickness}} mm: tab and slot joints with kerf {{kerf}} mm, minimum webs, assembly in 3D, one DXF per plate.
order: 13
-category: Fertigungsverfahren
+category: Manufacturing
default: on-demand
when: parts will be laser cut from flat sheets (plywood, MDF, acrylic)
-topics: Material und Plattenstärke; Schnittbreite und Steckverbindungen; Stege, Löcher, Ecken; Aufbau im Modell; Prüfen und Export als DXF
-var material: plywood | | Material | plywood=Sperrholz, MDF=MDF, acrylic=Acryl (PMMA), cardboard=Karton
-var thickness: 3 | mm | Plattenstärke | 0.5..25
-var kerf: 0.15 | mm | Schnittbreite | 0..1
+topics: Material and sheet thickness; Kerf and joints; Webs, holes, corners; Structure in the model; Checks and export as DXF
+var material: plywood | | Material | plywood=Plywood, MDF=MDF, acrylic=Acrylic (PMMA), cardboard=Cardboard
+var thickness: 3 | mm | Sheet thickness | 0.5..25
+var kerf: 0.15 | mm | Kerf | 0..1
---
# Skill: Laser cutting
diff --git a/app/resources/skills/normteile.md b/app/resources/skills/normteile.md
index 7a20047..9f47784 100644
--- a/app/resources/skills/normteile.md
+++ b/app/resources/skills/normteile.md
@@ -1,12 +1,12 @@
---
-title: Normteile
+title: Standard parts
name: Standard parts
-summary: Schrauben, Muttern, Scheiben und Gewindeeinsätze aus soma.fasteners mit passenden Bohrungen, Mutternfallen, Maße von Kugellagern, Passstiften und Alu-Profilen.
+summary: Screws, nuts, washers and threaded inserts from soma.fasteners with matching holes, nut traps, sizes of ball bearings, dowel pins and aluminium extrusions.
order: 22
-category: Konstruktionswissen
+category: Design knowledge
default: always
when: the model needs screws, nuts, washers, threaded inserts, bearings, dowel pins or profiles
-topics: Schrauben, Muttern, Scheiben und Einsätze mit soma.fasteners; Lage und Bohrungen; Mutternfallen; Kugellager; Passstifte und Profile; Normteile im Modell
+topics: Screws, nuts, washers and inserts with soma.fasteners; Position and holes; Nut traps; Ball bearings; Pins and profiles; Standard parts in the model
---
# Skill: Standard parts
diff --git a/app/resources/skills/toleranzen.md b/app/resources/skills/toleranzen.md
index 51561f0..561acae 100644
--- a/app/resources/skills/toleranzen.md
+++ b/app/resources/skills/toleranzen.md
@@ -1,15 +1,15 @@
---
-title: Toleranzen und Passungen
+title: Tolerances and fits
name: Tolerances and fits
-summary: Spiel als benannte Konstanten, Kollisionsprüfung im Code, Durchgangs- und Kernlöcher, Senkungen für Zylinderschrauben, ISO-Passungen.
+summary: Clearances as named constants, interference checks in code, clearance holes and tap drills, counterbores for socket head screws, ISO fits.
order: 20
-category: Konstruktionswissen
+category: Design knowledge
default: on-demand
when: parts must fit together: clearances, holes for screws, sliding or press fits
-topics: Fertigung: {{process}}; Spiel als benannte Konstanten; Kollisionen und Abstände im Code prüfen; Durchgangslöcher ({{hole_fit}}) und Kernlöcher; Senkungen für Zylinderschrauben; ISO-Passungen für gefertigte Teile
-var process: unknown | | Fertigung | unknown=noch offen (Agent fragt), 3D printing=3D-Druck, CNC milling=CNC-Fräsen, laser cutting=Laserschneiden, sheet metal=Blech
-var hole_fit: medium | | Durchgangslöcher nach ISO 273 | fine=fein, medium=mittel, coarse=grob
-var min_gap: 0.2 | mm | Mindestabstand zwischen Teilen | 0..5
+topics: Manufacturing: {{process}}; Clearances as named constants; Checking interference and gaps in code; Clearance holes ({{hole_fit}}) and tap drills; Counterbores for socket head screws; ISO fits for machined parts
+var process: unknown | | Manufacturing | unknown=not decided yet (agent asks), 3D printing=3D printing, CNC milling=CNC milling, laser cutting=Laser cutting, sheet metal=Sheet metal
+var hole_fit: medium | | Clearance holes to ISO 273 | fine=fine, medium=medium, coarse=coarse
+var min_gap: 0.2 | mm | Minimum gap between parts | 0..5
---
# Skill: Tolerances and fits
diff --git a/app/resources/skills/verbindungen.md b/app/resources/skills/verbindungen.md
index bb50d5a..3f43fc3 100644
--- a/app/resources/skills/verbindungen.md
+++ b/app/resources/skills/verbindungen.md
@@ -1,13 +1,13 @@
---
-title: Verbindungen
+title: Joints
name: Joints and fasteners
-summary: Schrauben (bevorzugt {{screw}}) mit Einschraubtiefe und Randabstand, Schnapphaken, Scharniere, Stifte und Formschluss, Magnete, Kleben.
+summary: Screws (preferably {{screw}}) with thread engagement and edge distance, snap fits, hinges, pins and positive locking, magnets, glue.
order: 21
-category: Konstruktionswissen
+category: Design knowledge
default: on-demand
when: parts are joined: screws, snap fits, hinges, pins, magnets or glue
-topics: Schrauben; Schnapphaken; Scharniere; Stifte und Formschluss; Magnete und Kleben
-var screw: M3 | | Bevorzugte Schraube | M2, M2.5, M3, M4, M5, M6, M8
+topics: Screws; Snap fits; Hinges; Pins and positive locking; Magnets and glue
+var screw: M3 | | Preferred screw | M2, M2.5, M3, M4, M5, M6, M8
---
# Skill: Joints and fasteners
diff --git a/app/resources/template/AGENTS.md b/app/resources/template/AGENTS.md
index 8c8da2e..194fa23 100644
--- a/app/resources/template/AGENTS.md
+++ b/app/resources/template/AGENTS.md
@@ -38,7 +38,7 @@ Run them in this terminal. They work without the app.
| `soma build` | Runs `model.py`, writes `output/model.step` and the viewer cache. **Run it after every change and read the result.** On errors it prints the file, line and message |
| `soma export <Part> --format stl` | Exports one part (formats: step, stl, 3mf, amf, brep, iges, obj, vrml, glb, gltf, dxf, svg) |
| `soma export --all --format step` | Exports all parts except references |
-| `soma render` | Saves a picture of the current model to `renders/ansicht-iso.png` (`--view top`, `--size 1280x800`, `--out`). **Open the picture and look at it** to check your work. Works only in the terminals of the app, it renders with the app's viewer |
+| `soma render` | Saves a picture of the current model to `renders/view-iso.png` (`--view top`, `--size 1280x800`, `--out`). **Open the picture and look at it** to check your work. Works only in the terminals of the app, it renders with the app's viewer |
| `soma analyze overhang` (or `thickness`, `clearance`) | Value at every spot of the surface with a summary per part. Details in the skill for analysis |
| `soma analyze fem analyses/x.py` | Stresses, safety and deflection under a load case described in `analyses/x.py`. Details in the skill for FEM |
| `soma anim build`, `soma anim info "Name"` | Animations from `animations/`. Details in the skill for animation |
@@ -50,7 +50,7 @@ If `soma build` fails, fix the error before doing anything else. Keep the model
This folder is a git repository, and the `git` on your PATH is the one the app uses. The app shows the commits as a timeline under the 3D view, so the user can look at earlier versions and restore them.
- After every meaningful iteration that **builds successfully** (`soma build` says "Build ok"), commit it: `git add -A`, then `git commit -m "<short description>"`. Write the message in the language the user speaks. Build first, so `output/model.step` in the commit matches the code.
-- Do not rewrite history: no `git reset`, `rebase`, `commit --amend` or `push --force`, no new branches, no `checkout` or `switch` to old commits. To go back to an earlier version, tell the user to use "Restore version" in the app.
+- Do not rewrite history: no `git reset`, `rebase`, `commit --amend` or `push --force`, no new branches, no `checkout` or `switch` to old commits. To go back to an earlier version, tell the user to open it in the timeline of the app and click "Restore".
- Do not delete or re-create `.git` and do not remove `.gitignore`.
## Environment
@@ -65,11 +65,11 @@ This folder is a git repository, and the `git` on your PATH is the one the app u
The app pastes short notes into your input. The user adds their own words and sends them:
-- `[Markierung: .soma/feedback/markierung-20260930-1405.png]`: a picture of the 3D view (or a blank sketch) with the user's drawings: arrows, circles, handwritten text, often with dimensions. **Open the image file and look at it**, compare it with the model, then change the code. If the note says `zeigt den älteren Stand <hash>`, the picture shows that older commit, not the current code (`git show <hash>:model.py`). Leave the images where they are.
-- `[Auswahl: Bauteil "…", model.py Zeile …]`: the part the user clicked, with the lines of its `add_part` call and the clicked face.
-- `[Build-Fehler: …]`: the message of the last failed build.
-- `[Animation: "Name" (animations/x.py) bei 1.50 s]`, `[Video: renders/x.mp4 bei 00:03.20]`: a moment in an animation or a video. A marking can name it too (`gezeichnet auf renders/x.mp4 bei 00:03.20`).
-- `[Ergebnis: "Wandstärke" (.soma/results/…), Bauteil "…": 0.80 mm bei (x, y, z) mm]`: a spot in the colours of an analysis.
+- `[Markup: .soma/feedback/markup-20260930-1405.png]`: a picture of the 3D view (or a blank sketch) with the user's drawings: arrows, circles, handwritten text, often with dimensions. **Open the image file and look at it**, compare it with the model, then change the code. If the note says `shows the older version <hash>`, the picture shows that older commit, not the current code (`git show <hash>:model.py`). Leave the images where they are.
+- `[Selection: part "…", model.py line …]`: the part the user clicked, with the lines of its `add_part` call and the clicked face.
+- `[Build error: …]`: the message of the last failed build.
+- `[Animation: "Name" (animations/x.py) at 1.50 s]`, `[Video: renders/x.mp4 at 00:03.20]`: a moment in an animation or a video. A markup can name it too (`drawn on renders/x.mp4 at 00:03.20`).
+- `[Result: "Wall thickness" (.soma/results/…), part "…": 0.80 mm at (x, y, z) mm]`: a spot in the colours of an analysis.
- `[Skill: .soma/skills/<name>.md]`: the user points you to this rule set, switched it on or changed its settings (the note may list them, they are already written into the file). Read the file again now and follow it from here on. When the user switches a skill off, it disappears from the list below: stop applying it.
The user can also edit files directly in the app's editor. Read a file again right before you change it, do not rely on an older copy.
diff --git a/app/src/main/animations.ts b/app/src/main/animations.ts
index 6cca2e6..dd65834 100644
--- a/app/src/main/animations.ts
+++ b/app/src/main/animations.ts
@@ -87,7 +87,7 @@ export class AnimBuilder {
const errors: string[] = [];
for (const f of files ?? [null]) {
const r = await runSoma(['anim', 'build', ...(f ? [f] : []), '--project', this.dir, '--json'], this.dir, 5 * 60 * 1000);
- if (!r.out.trim().startsWith('{')) errors.push((r.err || r.out).trim().split(/\r?\n/).slice(-3).join('\n') || 'soma anim build ohne Ergebnis');
+ if (!r.out.trim().startsWith('{')) errors.push((r.err || r.out).trim().split(/\r?\n/).slice(-3).join('\n') || 'soma anim build returned no result');
}
res = { ...readAnimList(this.dir), ok: errors.length === 0, ...(errors.length ? { error: errors.join('\n') } : {}) };
} catch (e) {
@@ -131,28 +131,28 @@ export function listResults(dir: string): ResultEntry[] {
*/
export async function rerunResult(dir: string, id: string): Promise<{ ok: boolean; error?: string }> {
const r = listResults(dir).find((x) => x.id === id);
- if (!r) return { ok: false, error: `Kein Ergebnis „${id}“.` };
+ if (!r) return { ok: false, error: `No result “${id}”.` };
const cmd = Array.isArray(r.command) ? r.command.map(String) : [];
- if (cmd[0] !== 'analyze' || !KINDS.has(cmd[1])) return { ok: false, error: 'Unbekannte Auswertung in der Datei.' };
+ if (cmd[0] !== 'analyze' || !KINDS.has(cmd[1])) return { ok: false, error: 'Unknown analysis in the file.' };
const args = ['analyze', cmd[1]];
let rest = cmd.slice(2);
if (cmd[1] === 'fem') {
// Die Datei mit dem Lastfall: relativ, im Projekt, eine .py-Datei
const study = rest[0] ?? '';
- if (!STUDY.test(study) || study.startsWith('-') || study.includes('..')) return { ok: false, error: `Unerwartete Studie in der Datei: ${study.slice(0, 60)}` };
- try { resolveInside(dir, study); } catch { return { ok: false, error: 'Die Studie liegt außerhalb des Projekts.' }; }
+ if (!STUDY.test(study) || study.startsWith('-') || study.includes('..')) return { ok: false, error: `Unexpected study in the file: ${study.slice(0, 60)}` };
+ try { resolveInside(dir, study); } catch { return { ok: false, error: 'The study is outside the project.' }; }
args.push(study);
rest = rest.slice(1);
}
for (const a of rest) {
// Immer als --schalter=wert: Werte wie -z oder -0.5 sind dann keine Schalter für argparse
const m = /^(--parts|--threshold|--up|--name)=(.{1,400})$/s.exec(a);
- if (!m) return { ok: false, error: `Unerwartete Angabe in der Datei: ${a.slice(0, 60)}` };
+ if (!m) return { ok: false, error: `Unexpected argument in the file: ${a.slice(0, 60)}` };
args.push(a);
}
const res = await runSoma([...args, '--project', dir, '--json'], dir, 5 * 60 * 1000);
if (res.ok) return { ok: true };
- return { ok: false, error: (res.err || res.out).trim().split(/\r?\n/).slice(-3).join('\n') || 'Auswertung fehlgeschlagen' };
+ return { ok: false, error: (res.err || res.out).trim().split(/\r?\n/).slice(-3).join('\n') || 'Analysis failed' };
}
/** Gleicher Ordner? Unter Windows ohne Groß- und Kleinschreibung, Kurznamen (NAME~1) aufgelöst. */
diff --git a/app/src/main/bridge.ts b/app/src/main/bridge.ts
index 6c13e85..94dae69 100644
--- a/app/src/main/bridge.ts
+++ b/app/src/main/bridge.ts
@@ -19,7 +19,7 @@ export function startBridge(handler: BridgeHandler): Promise<void> {
if (server) return Promise.resolve();
return new Promise((resolve) => {
const srv = http.createServer((req, res) => void serve(req, res, handler));
- srv.on('error', (e) => { console.error('[soma] Verbindung für soma render nicht verfügbar:', e); server = null; port = 0; resolve(); });
+ srv.on('error', (e) => { console.error('[soma] Connection for soma render not available:', e); server = null; port = 0; resolve(); });
// Port 0: das System vergibt einen freien (ein fester Port kann schon belegt sein)
srv.listen(0, '127.0.0.1', () => {
const a = srv.address();
@@ -47,17 +47,17 @@ async function serve(req: http.IncomingMessage, res: http.ServerResponse, handle
try {
const given = String(req.headers['x-soma-token'] ?? '');
const ok = given.length === token.length && crypto.timingSafeEqual(Buffer.from(given), Buffer.from(token));
- if (!ok) { reply(res, 403, { ok: false, error: 'Falscher Schlüssel. Nur die Terminals der App dürfen die App ansprechen.' }); return; }
- if (req.method !== 'POST' || !req.url?.startsWith('/v1/')) { reply(res, 404, { ok: false, error: 'Unbekannte Anfrage' }); return; }
+ if (!ok) { reply(res, 403, { ok: false, error: 'Wrong key. Only the terminals of the app may talk to the app.' }); return; }
+ if (req.method !== 'POST' || !req.url?.startsWith('/v1/')) { reply(res, 404, { ok: false, error: 'Unknown request' }); return; }
const chunks: Buffer[] = [];
let size = 0;
for await (const c of req) {
size += (c as Buffer).length;
- if (size > MAX_BODY) { reply(res, 413, { ok: false, error: 'Anfrage zu groß' }); return; }
+ if (size > MAX_BODY) { reply(res, 413, { ok: false, error: 'Request too large' }); return; }
chunks.push(c as Buffer);
}
let body: unknown;
- try { body = JSON.parse(Buffer.concat(chunks).toString('utf8')); } catch { reply(res, 400, { ok: false, error: 'Kein gültiges JSON' }); return; }
+ try { body = JSON.parse(Buffer.concat(chunks).toString('utf8')); } catch { reply(res, 400, { ok: false, error: 'Not valid JSON' }); return; }
const r = await handler(req.url.slice(4), body);
reply(res, r.status, r.body);
} catch (e) {
diff --git a/app/src/main/build.ts b/app/src/main/build.ts
index 9dd0c9e..5bb6ac0 100644
--- a/app/src/main/build.ts
+++ b/app/src/main/build.ts
@@ -50,14 +50,14 @@ export class BuildManager extends EventEmitter {
if (file && this.proc && this.status.startedAt) {
try { if (fs.statSync(file).mtimeMs <= this.status.startedAt) return; } catch { /* Datei weg: normal weiter */ }
}
- if (this.autoBuild) this.schedule('Dateiänderung');
+ if (this.autoBuild) this.schedule('file changed');
else if (!this.status.stale) this.setStatus({ ...this.status, stale: true });
}
/** Auto-Build umschalten. Wird er eingeschaltet, während der Stand veraltet ist, baut er gleich nach. */
setAuto(on: boolean): void {
this.autoBuild = on;
- if (on && this.status.stale) this.schedule('Auto-Build eingeschaltet', 0);
+ if (on && this.status.stale) this.schedule('auto build switched on', 0);
}
schedule(reason: string, delay = DEBOUNCE_MS): void {
@@ -66,7 +66,7 @@ export class BuildManager extends EventEmitter {
}
/** Sofort bauen (Knopf oder Agent-Aufruf ueber die App). Laeuft schon ein Build, wird ein weiterer eingereiht. */
- start(reason = 'manuell'): void {
+ start(reason = 'manual'): void {
if (this.disposed) return;
if (this.timer) { clearTimeout(this.timer); this.timer = null; }
if (this.installing) { // ohne die Pakete scheiterte der Build nur am Import
@@ -95,7 +95,7 @@ export class BuildManager extends EventEmitter {
this.proc = null;
if (this.disposed) return;
this.setStatus({ state: result.status === 'ok' ? 'ok' : 'error', result, seconds: (Date.now() - startedAt) / 1000, builtAt: Date.now() });
- if (this.rerun) { this.rerun = false; this.start('Änderung während des Builds'); }
+ if (this.rerun) { this.rerun = false; this.start('change during the build'); }
};
// Das Ergebnis gilt, sobald seine Zeile vollständig da ist; auf das Prozessende muss niemand warten
@@ -104,10 +104,10 @@ export class BuildManager extends EventEmitter {
try { finish(JSON.parse(l) as BuildResult); } catch { /* keine Ergebniszeile */ }
};
for (const l of w.lines) w.onLine(l);
- w.onError = (e) => finish(errorResult('PythonStart', `Python konnte nicht gestartet werden (${pythonExe()}): ${e.message}`));
+ w.onError = (e) => finish(errorResult('PythonStart', `Could not start Python (${pythonExe()}): ${e.message}`));
w.onClose = (code) => {
- if (killedByTimeout) return finish(errorResult('Timeout', `Der Build wurde nach ${TIMEOUT_MS / 1000} s abgebrochen (Zeitlimit).`));
- finish(errorResult('NoResult', `Der Build lieferte kein Ergebnis (Exit-Code ${code}).\n${(w.err || w.out).slice(-2000)}`));
+ if (killedByTimeout) return finish(errorResult('Timeout', `The build was stopped after ${TIMEOUT_MS / 1000} s (time limit).`));
+ finish(errorResult('NoResult', `The build returned no result (exit code ${code}).\n${(w.err || w.out).slice(-2000)}`));
};
}
@@ -120,7 +120,7 @@ export class BuildManager extends EventEmitter {
const result: BuildResult = { status: 'ok', parts: last.parts, timings: last.timings, warnings: last.warnings };
const seconds = typeof last.started === 'number' && typeof last.finished === 'number' ? Math.max(0, last.finished - last.started) : undefined;
const builtAt = typeof last.finished === 'number' ? last.finished * 1000 : undefined;
- this.setStatus({ state: 'ok', result, reason: 'letzter Build', seconds, builtAt });
+ this.setStatus({ state: 'ok', result, reason: 'last build', seconds, builtAt });
}
/**
@@ -140,7 +140,7 @@ export class BuildManager extends EventEmitter {
this.packageError = error;
const { queued: _q, ...rest } = this.status;
this.setStatus(rest);
- if (this.afterInstall) { this.afterInstall = false; this.start('Pakete installiert'); }
+ if (this.afterInstall) { this.afterInstall = false; this.start('packages installed'); }
}
/** Die Projektumgebung ließ sich nicht einrichten (E67): Die Oberfläche zeigt es als Hinweis. */
diff --git a/app/src/main/dialogs.ts b/app/src/main/dialogs.ts
index e1bef71..e082b46 100644
--- a/app/src/main/dialogs.ts
+++ b/app/src/main/dialogs.ts
@@ -12,19 +12,19 @@ export const setTestAnswers = (a: unknown[]) => { answers.length = 0; answers.pu
export const pendingTestAnswers = () => answers.length;
function nextAnswer<T>(what: string): T {
- if (!answers.length) throw new Error(`Testmodus: Für den Dialog „${what}“ ist keine Antwort vorbereitet.`);
+ if (!answers.length) throw new Error(`Test mode: no answer is prepared for the dialog “${what}”.`);
return answers.shift() as T;
}
export async function choosePath(win: BrowserWindow | null, kind: 'save' | 'open', defaultName: string): Promise<string | null> {
- if (testMode()) return nextAnswer<string | null>(`${kind}-Pfad`);
- const filters = [{ name: 'SOMA-Modell (ZIP)', extensions: ['zip'] }];
+ if (testMode()) return nextAnswer<string | null>(`${kind} path`);
+ const filters = [{ name: 'SOMA model (ZIP)', extensions: ['zip'] }];
const defaultPath = path.join(app.getPath('documents'), defaultName);
if (kind === 'save') {
- const r = win ? await dialog.showSaveDialog(win, { title: 'Modell speichern', defaultPath, filters }) : await dialog.showSaveDialog({ title: 'Modell speichern', defaultPath, filters });
+ const r = win ? await dialog.showSaveDialog(win, { title: 'Save model', defaultPath, filters }) : await dialog.showSaveDialog({ title: 'Save model', defaultPath, filters });
return r.canceled || !r.filePath ? null : r.filePath;
}
- const opts = { title: 'Modell öffnen', filters, properties: ['openFile' as const] };
+ const opts = { title: 'Open model', filters, properties: ['openFile' as const] };
const r = win ? await dialog.showOpenDialog(win, opts) : await dialog.showOpenDialog(opts);
return r.canceled || !r.filePaths[0] ? null : r.filePaths[0];
}
@@ -36,11 +36,11 @@ export async function choosePath(win: BrowserWindow | null, kind: 'save' | 'open
export async function chooseExportTarget(win: BrowserWindow | null, o: { kind: 'file' | 'dir'; title: string; defaultPath: string; ext?: string; label?: string }): Promise<string | null> {
if (testMode()) return nextAnswer<string | null>(o.title);
if (o.kind === 'file') {
- const opts = { title: o.title, defaultPath: o.defaultPath, filters: o.ext ? [{ name: o.label ?? o.ext.toUpperCase(), extensions: [o.ext] }, { name: 'Alle Dateien', extensions: ['*'] }] : undefined };
+ const opts = { title: o.title, defaultPath: o.defaultPath, filters: o.ext ? [{ name: o.label ?? o.ext.toUpperCase(), extensions: [o.ext] }, { name: 'All files', extensions: ['*'] }] : undefined };
const r = win ? await dialog.showSaveDialog(win, opts) : await dialog.showSaveDialog(opts);
return r.canceled || !r.filePath ? null : r.filePath;
}
- const opts = { title: o.title, defaultPath: o.defaultPath, buttonLabel: 'Hierhin exportieren', properties: ['openDirectory' as const, 'createDirectory' as const] };
+ const opts = { title: o.title, defaultPath: o.defaultPath, buttonLabel: 'Export here', properties: ['openDirectory' as const, 'createDirectory' as const] };
const r = win ? await dialog.showOpenDialog(win, opts) : await dialog.showOpenDialog(opts);
return r.canceled || !r.filePaths[0] ? null : r.filePaths[0];
}
diff --git a/app/src/main/files.ts b/app/src/main/files.ts
index 2c51400..5044275 100644
--- a/app/src/main/files.ts
+++ b/app/src/main/files.ts
@@ -22,12 +22,12 @@ export function importInputs(root: string, sources: string[]): ImportResult {
const base = path.basename(src);
try {
const st = fs.lstatSync(src);
- if (st.isSymbolicLink()) { res.errors.push(`${base}: Verknüpfungen werden nicht übernommen.`); continue; }
- if (!st.isFile() && !st.isDirectory()) { res.errors.push(`${base}: weder Datei noch Ordner, nicht übernommen.`); continue; }
+ if (st.isSymbolicLink()) { res.errors.push(`${base}: links are not copied.`); continue; }
+ if (!st.isFile() && !st.isDirectory()) { res.errors.push(`${base}: neither a file nor a folder, not copied.`); continue; }
const dest = resolveInside(root, 'inputs');
fs.mkdirSync(dest, { recursive: true });
if (st.isFile()) {
- if (st.size > MAX_IMPORT_BYTES) { res.errors.push(`${base}: größer als 500 MB, nicht übernommen.`); continue; }
+ if (st.size > MAX_IMPORT_BYTES) { res.errors.push(`${base}: larger than 500 MB, not copied.`); continue; }
const ext = path.extname(base), stem = base.slice(0, base.length - ext.length);
let name = base;
for (let i = 2; fs.existsSync(path.join(dest, name)); i++) name = `${stem} (${i})${ext}`;
@@ -37,7 +37,7 @@ export function importInputs(root: string, sources: string[]): ImportResult {
} else {
// Erst ganz durchsehen, dann kopieren: Ist der Ordner zu groß, landet gar nichts statt einer halben Kopie
const scan = scanFolder(src);
- if (scan.tooBig) { res.errors.push(`${base}: ${scan.tooBig}, nicht übernommen.`); continue; }
+ if (scan.tooBig) { res.errors.push(`${base}: ${scan.tooBig}, not copied.`); continue; }
let name = base;
for (let i = 2; fs.existsSync(path.join(dest, name)); i++) name = `${base} (${i})`;
const target = resolveInside(root, `inputs/${name}`);
@@ -74,15 +74,15 @@ function scanFolder(src: string): FolderScan {
if (scan.tooBig) return;
const childRel = rel ? path.join(rel, e.name) : e.name;
const shown = childRel.split(path.sep).join('/');
- if (e.isSymbolicLink()) scan.skipped.push(`${shown}: Verknüpfung, nicht übernommen.`);
- else if (e.isDirectory() && e.name === '.git') scan.skipped.push(`${shown}: eigener Git-Verlauf, nicht übernommen.`);
+ if (e.isSymbolicLink()) scan.skipped.push(`${shown}: link, not copied.`);
+ else if (e.isDirectory() && e.name === '.git') scan.skipped.push(`${shown}: its own Git history, not copied.`);
else if (e.isDirectory()) { scan.dirs.push(childRel); walk(childRel); }
else if (e.isFile()) {
scan.files.push(childRel);
bytes += fs.statSync(path.join(src, childRel)).size;
- if (bytes > MAX_IMPORT_BYTES) scan.tooBig = 'zusammen größer als 500 MB';
- else if (scan.files.length > MAX_IMPORT_FILES) scan.tooBig = `mehr als ${MAX_IMPORT_FILES} Dateien`;
- } else scan.skipped.push(`${shown}: weder Datei noch Ordner, nicht übernommen.`);
+ if (bytes > MAX_IMPORT_BYTES) scan.tooBig = 'larger than 500 MB in total';
+ else if (scan.files.length > MAX_IMPORT_FILES) scan.tooBig = `more than ${MAX_IMPORT_FILES} files`;
+ } else scan.skipped.push(`${shown}: neither a file nor a folder, not copied.`);
}
};
walk('');
@@ -103,13 +103,13 @@ const errMsg = (e: unknown) => (e instanceof Error ? e.message : String(e));
/** Fehler im Namen einer neuen oder umbenannten Datei, sonst null. Nur ein Name, kein Pfad. */
export function nameError(name: string): string | null {
- if (!name.trim()) return 'Der Name ist leer.';
- if (name !== name.trim()) return 'Der Name beginnt oder endet mit einem Leerzeichen.';
- if (/[\\/:*?"<>|\x00-\x1f]/.test(name)) return 'Diese Zeichen gehen in Namen nicht: \\ / : * ? " < > |';
- if (name === '.' || name === '..') return 'Dieser Name geht nicht.';
- if (/\.$/.test(name)) return 'Der Name darf nicht mit einem Punkt enden.';
- if (RESERVED.test(name)) return `„${name}“ ist unter Windows ein reservierter Name.`;
- if (name.length > 200) return 'Der Name ist zu lang.';
+ if (!name.trim()) return 'The name is empty.';
+ if (name !== name.trim()) return 'The name starts or ends with a space.';
+ if (/[\\/:*?"<>|\x00-\x1f]/.test(name)) return 'These characters are not allowed in names: \\ / : * ? " < > |';
+ if (name === '.' || name === '..') return 'This name is not allowed.';
+ if (/\.$/.test(name)) return 'The name must not end with a dot.';
+ if (RESERVED.test(name)) return `“${name}” is a reserved name on Windows.`;
+ if (name.length > 200) return 'The name is too long.';
return null;
}
@@ -118,7 +118,7 @@ function cleanRel(rel: string): string {
// normalize nimmt „./“ vorne schon weg. Nur „.“ allein ist der Projektordner, „.soma“ bleibt „.soma“.
const p = path.posix.normalize(String(rel).replace(/\\/g, '/')).replace(/\/$/, '');
if (p === '.' || p === '') return '';
- if (p === '..' || p.startsWith('../') || path.posix.isAbsolute(p) || /^[a-z]:/i.test(p)) throw new Error(`Pfad liegt ausserhalb des Projekts: ${rel}`);
+ if (p === '..' || p.startsWith('../') || path.posix.isAbsolute(p) || /^[a-z]:/i.test(p)) throw new Error(`Path is outside the project: ${rel}`);
return p;
}
@@ -132,15 +132,15 @@ export function createEntry(root: string, parent: string, name: string, dir: boo
if (bad) return { ok: false, error: bad };
const rel = joinRel(base, name);
const block = fileOpBlockReason(base, 'create') ?? fileOpBlockReason(rel, 'create');
- if (block) return { ok: false, error: `Hier lässt sich nichts anlegen. ${block}` };
+ if (block) return { ok: false, error: `Nothing can be created here. ${block}` };
const parentAbs = resolveInside(root, base || '.');
- if (!fs.statSync(parentAbs).isDirectory()) return { ok: false, error: `${base} ist kein Ordner.` };
+ if (!fs.statSync(parentAbs).isDirectory()) return { ok: false, error: `${base} is not a folder.` };
const abs = resolveInside(root, rel);
// Ohne recursive bzw. mit „wx“: Entsteht der Name gleichzeitig, schlägt das fehl statt zu überschreiben
if (dir) fs.mkdirSync(abs); else fs.writeFileSync(abs, '', { flag: 'wx' });
return { ok: true, path: rel };
} catch (e) {
- if ((e as NodeJS.ErrnoException).code === 'EEXIST') return { ok: false, error: `„${name}“ gibt es dort schon.` };
+ if ((e as NodeJS.ErrnoException).code === 'EEXIST') return { ok: false, error: `“${name}” already exists there.` };
return { ok: false, error: errMsg(e) };
}
}
@@ -150,20 +150,20 @@ export function renameEntry(root: string, rel: string, name: string): FileOpResu
try {
const from = cleanRel(rel);
const block = fileOpBlockReason(from, 'rename');
- if (block) return { ok: false, error: `${from} lässt sich nicht umbenennen. ${block}` };
+ if (block) return { ok: false, error: `${from} cannot be renamed. ${block}` };
const bad = nameError(name);
if (bad) return { ok: false, error: bad };
const old = path.posix.basename(from);
const to = joinRel(path.posix.dirname(from) === '.' ? '' : path.posix.dirname(from), name);
if (name === old) return { ok: true, path: from };
const blockTo = fileOpBlockReason(to, 'create');
- if (blockTo) return { ok: false, error: `Dieser Name geht hier nicht. ${blockTo}` };
+ if (blockTo) return { ok: false, error: `This name is not allowed here. ${blockTo}` };
const abs = resolveInside(root, from);
- if (fs.lstatSync(abs).isSymbolicLink()) return { ok: false, error: 'Verknüpfungen lassen sich hier nicht umbenennen.' };
+ if (fs.lstatSync(abs).isSymbolicLink()) return { ok: false, error: 'Links cannot be renamed here.' };
const target = resolveInside(root, to);
// Windows und macOS unterscheiden Groß und klein nicht: „Teil.py“ → „teil.py“ findet sich selbst als vorhanden
const caseOnly = name.toLowerCase() === old.toLowerCase();
- if (!caseOnly && exists(target)) return { ok: false, error: `„${name}“ gibt es dort schon.` };
+ if (!caseOnly && exists(target)) return { ok: false, error: `“${name}” already exists there.` };
fs.renameSync(abs, target);
return { ok: true, path: to };
} catch (e) { return { ok: false, error: errMsg(e) }; }
@@ -177,10 +177,10 @@ export async function trashEntry(root: string, rel: string, trash: (abs: string)
try {
const p = cleanRel(rel);
const block = fileOpBlockReason(p, 'delete');
- if (block) return { ok: false, error: `${p} lässt sich nicht löschen. ${block}` };
+ if (block) return { ok: false, error: `${p} cannot be deleted. ${block}` };
const abs = resolveInside(root, p);
fs.lstatSync(abs);
- try { await trash(abs); } catch (e) { return { ok: false, error: `${p} ließ sich nicht in den Papierkorb verschieben, es wurde nichts gelöscht: ${errMsg(e)}` }; }
+ try { await trash(abs); } catch (e) { return { ok: false, error: `Could not move ${p} to the Recycle Bin, nothing was deleted: ${errMsg(e)}` }; }
return { ok: true, path: p };
} catch (e) { return { ok: false, error: errMsg(e) }; }
}
@@ -191,7 +191,7 @@ export function entryPath(root: string, rel: string, forOpen: boolean): { abs?:
const p = cleanRel(rel);
const abs = resolveInside(root, p || '.');
const st = fs.statSync(abs);
- if (forOpen && st.isFile() && RUNNABLE.test(p)) return { error: `${path.posix.basename(p)} könnte beim Öffnen ein Programm starten. SOMA öffnet solche Dateien nicht, „Im Explorer zeigen“ geht.` };
+ if (forOpen && st.isFile() && RUNNABLE.test(p)) return { error: `${path.posix.basename(p)} could start a program when opened. SOMA does not open such files, “Show in Explorer” works.` };
return { abs };
} catch (e) { return { error: errMsg(e) }; }
}
@@ -202,10 +202,10 @@ export function entryPath(root: string, rel: string, forOpen: boolean): { abs?:
*/
export function saveFeedbackImage(root: string, png: unknown, when = new Date()): FeedbackResult {
const bytes = png instanceof Uint8Array ? png : png instanceof ArrayBuffer ? new Uint8Array(png) : null;
- if (!bytes || bytes.length < PNG_SIGNATURE.length || !PNG_SIGNATURE.equals(bytes.subarray(0, PNG_SIGNATURE.length))) return { ok: false, error: 'Das ist kein PNG-Bild.' };
- if (bytes.length > MAX_FEEDBACK_BYTES) return { ok: false, error: 'Das Bild ist größer als 64 MB.' };
+ if (!bytes || bytes.length < PNG_SIGNATURE.length || !PNG_SIGNATURE.equals(bytes.subarray(0, PNG_SIGNATURE.length))) return { ok: false, error: 'This is not a PNG image.' };
+ if (bytes.length > MAX_FEEDBACK_BYTES) return { ok: false, error: 'The image is larger than 64 MB.' };
const two = (n: number) => String(n).padStart(2, '0');
- const stem = `markierung-${when.getFullYear()}${two(when.getMonth() + 1)}${two(when.getDate())}-${two(when.getHours())}${two(when.getMinutes())}`;
+ const stem = `markup-${when.getFullYear()}${two(when.getMonth() + 1)}${two(when.getDate())}-${two(when.getHours())}${two(when.getMinutes())}`;
try {
fs.mkdirSync(resolveInside(root, '.soma/feedback'), { recursive: true });
for (let i = 1; ; i++) {
@@ -229,7 +229,7 @@ export function writeProjectText(root: string, rel: string, text: string, base:
const abs = resolveInside(root, rel);
const clean = path.relative(fs.realpathSync(root), path.join(fs.realpathSync(path.dirname(abs)), path.basename(abs)));
const locked = readOnlyReason(clean);
- if (locked) return { ok: false, error: `${rel} lässt sich hier nicht bearbeiten. ${locked}` };
+ if (locked) return { ok: false, error: `${rel} cannot be edited here. ${locked}` };
let disk: string | null = null;
try { disk = fs.readFileSync(abs, 'utf8'); } catch (e) { if ((e as NodeJS.ErrnoException).code !== 'ENOENT') throw e; }
if (disk !== base && !force) return { ok: false, conflict: true, disk };
@@ -271,7 +271,7 @@ const exists = (p: string) => { try { fs.lstatSync(p); return true; } catch { re
export function resolveInside(root: string, rel: string): string {
const abs = path.resolve(root, rel);
const inside = (p: string, r: string) => p === r || p.startsWith(r + path.sep);
- const outside = () => new Error(`Pfad liegt ausserhalb des Projekts: ${rel}`);
+ const outside = () => new Error(`Path is outside the project: ${rel}`);
if (!inside(abs, path.resolve(root))) throw outside();
// Gibt es das Ziel noch nicht, zählt der nächste vorhandene Ordner darüber. Sonst könnte ein Verweis weiter oben
// (etwa .soma als Verknüpfung nach außen) neue Dateien außerhalb des Projekts landen lassen.
diff --git a/app/src/main/git.ts b/app/src/main/git.ts
index c8fe13d..02eb182 100644
--- a/app/src/main/git.ts
+++ b/app/src/main/git.ts
@@ -11,8 +11,9 @@ export interface GitStatus { dirty: boolean; changed: number; head: string | nul
* Markiert Commits der App, damit die Verlaufsleiste sie von Commits des Agenten unterscheiden kann. Der Autor taugt dafür
* nicht: Agent und App committen mit derselben Git-Identität. Ältere Projekte ohne Trailer erkennt die Leiste am Betreff.
*/
-const APP_TRAILER = ['--trailer', 'Erstellt-von: SOMA'];
-const APP_SUBJECT = /^(Neues Modell angelegt|Automatischer Snapshot beim Speichern|Sicherung vor Wiederherstellung|Stand wiederhergestellt: )/;
+const APP_TRAILER = ['--trailer', 'Created-by: SOMA'];
+// Ältere Projekte haben deutsche Betreffe und den Trailer `Erstellt-von` (vor E73), beide gelten weiter
+const APP_SUBJECT = /^(New model created|Automatic snapshot on save|Backup before restore|Restored version: |Neues Modell angelegt|Automatischer Snapshot beim Speichern|Sicherung vor Wiederherstellung|Stand wiederhergestellt: )/;
/** Gilt für jeden Aufruf: UTF-8-Pfade lesbar, keine Zeilenenden-Umwandlung (ZIPs wandern zwischen Systemen). */
const COMMON = ['-c', 'core.quotepath=false', '-c', 'core.autocrlf=false'];
@@ -82,13 +83,13 @@ export class GitRepo {
if (!missing.length) return;
fs.mkdirSync(path.dirname(file), { recursive: true });
const head = have && !have.endsWith('\n') ? '\n' : '';
- fs.appendFileSync(file, `${head}# SOMA: Zwischenergebnisse der App (neue Projekte haben sie in der .gitignore)\n${missing.join('\n')}\n`);
+ fs.appendFileSync(file, `${head}# SOMA: intermediate results of the app (new projects have them in .gitignore)\n${missing.join('\n')}\n`);
} catch { /* nächster Versuch beim nächsten Öffnen */ }
}
private async mustRun(args: string[], write = false): Promise<string> {
const r = await this.run(args, write);
- if (!r.ok) throw new Error(`git ${args[0]} fehlgeschlagen: ${(r.err || r.out).trim().slice(0, 400)}`);
+ if (!r.ok) throw new Error(`git ${args[0]} failed: ${(r.err || r.out).trim().slice(0, 400)}`);
return r.out;
}
@@ -142,7 +143,7 @@ export class GitRepo {
/** Verlauf, älteste zuerst. Ein kaputtes oder leeres Repository liefert eine leere Liste. */
async log(limit = 500): Promise<Commit[]> {
- const fmt = '--format=%H%x1f%h%x1f%an%x1f%aI%x1f%s%x1f%(trailers:key=Erstellt-von,valueonly,separator=%x2c)%x1e';
+ const fmt = '--format=%H%x1f%h%x1f%an%x1f%aI%x1f%s%x1f%(trailers:key=Created-by,key=Erstellt-von,valueonly,separator=%x2c)%x1e';
const r = await this.run(['log', `-n${limit}`, fmt, 'HEAD']);
if (!r.ok) return [];
return r.out.split('\x1e').map((e) => e.trim()).filter(Boolean).map((e) => {
@@ -153,7 +154,7 @@ export class GitRepo {
/** Schreibt eine Datei eines Standes in `outFile` (binärsicher, Arbeitsordner bleibt unberührt). */
exportFile(hash: string, rel: string, outFile: string): Promise<void> {
- if (!HASH.test(hash)) return Promise.reject(new Error('Ungültiger Commit'));
+ if (!HASH.test(hash)) return Promise.reject(new Error('Invalid commit'));
return new Promise((resolve, reject) => {
fs.mkdirSync(path.dirname(outFile), { recursive: true });
const child = spawn([...COMMON, 'show', `${hash}:${rel}`], this.dir, { env: { GIT_OPTIONAL_LOCKS: '0' } });
@@ -164,7 +165,7 @@ export class GitRepo {
child.on('error', reject);
child.on('close', (code) => {
out.end();
- if (code === 0) resolve(); else { fs.rmSync(outFile, { force: true }); reject(new Error(err.trim() || `git show endete mit Code ${code}`)); }
+ if (code === 0) resolve(); else { fs.rmSync(outFile, { force: true }); reject(new Error(err.trim() || `git show ended with code ${code}`)); }
});
});
}
@@ -174,17 +175,17 @@ export class GitRepo {
* Vorher wird ein ungesicherter Arbeitsstand als eigener Commit gesichert, damit nichts verloren geht.
*/
async restore(hash: string): Promise<{ commit: string | null; safety: string | null }> {
- if (!HASH.test(hash)) throw new Error('Ungültiger Commit');
+ if (!HASH.test(hash)) throw new Error('Invalid commit');
return this.serial(async () => {
const type = await this.run(['cat-file', '-t', hash]);
- if (!type.ok || type.out.trim() !== 'commit') throw new Error('Dieser Stand existiert im Verlauf nicht mehr.');
+ if (!type.ok || type.out.trim() !== 'commit') throw new Error('This version no longer exists in the history.');
const subject = (await this.mustRun(['log', '-1', '--format=%s', hash])).trim();
const short = (await this.mustRun(['rev-parse', '--short', hash])).trim();
let safety: string | null = null;
if ((await this.status()).dirty) {
await this.addAll();
- await this.mustRun(['commit', '--no-verify', '-m', 'Sicherung vor Wiederherstellung', ...APP_TRAILER], true);
+ await this.mustRun(['commit', '--no-verify', '-m', 'Backup before restore', ...APP_TRAILER], true);
safety = (await this.mustRun(['rev-parse', 'HEAD'])).trim();
}
const target = new Set((await this.mustRun(['ls-tree', '-r', '-z', '--name-only', hash])).split('\0').filter(Boolean));
@@ -196,19 +197,19 @@ export class GitRepo {
await this.addAll();
const diff = await this.run(['diff', '--cached', '--quiet']);
if (diff.ok) return { commit: null, safety }; // Stand war schon identisch
- await this.mustRun(['commit', '--no-verify', '-m', `Stand wiederhergestellt: ${subject} (${short})`, ...APP_TRAILER], true);
+ await this.mustRun(['commit', '--no-verify', '-m', `Restored version: ${subject} (${short})`, ...APP_TRAILER], true);
return { commit: (await this.mustRun(['rev-parse', 'HEAD'])).trim(), safety };
});
}
/** Auffälligkeiten im Verlauf. Nur melden, nichts reparieren (E28). */
async problems(): Promise<string[]> {
- if (!(await this.isRepo())) return ['Kein Git-Verlauf gefunden (.git fehlt oder ist unlesbar). Der Verlauf ist nicht verfügbar, Speichern als ZIP geht weiter.'];
+ if (!(await this.isRepo())) return ['No Git history found (.git is missing or unreadable). The history is not available, saving as ZIP still works.'];
const out: string[] = [];
- if (!(await this.head())) out.push('Der Git-Verlauf hat noch keinen Commit.');
+ if (!(await this.head())) out.push('The Git history has no commit yet.');
const branch = await this.run(['symbolic-ref', '-q', '--short', 'HEAD']);
- if (!branch.ok) out.push('Git steht auf einem losen Stand (detached HEAD). Neue Commits gehören auf den Branch main.');
- else if (branch.out.trim() !== 'main') out.push(`Git steht auf dem Branch „${branch.out.trim()}“ statt main.`);
+ if (!branch.ok) out.push('Git is on a detached HEAD. New commits belong on the branch main.');
+ else if (branch.out.trim() !== 'main') out.push(`Git is on the branch “${branch.out.trim()}” instead of main.`);
return out;
}
diff --git a/app/src/main/main.ts b/app/src/main/main.ts
index c9aa646..00e307b 100644
--- a/app/src/main/main.ts
+++ b/app/src/main/main.ts
@@ -49,7 +49,7 @@ function registerIpc(ctl: ProjectController): void {
ipcMain.handle('versions:preview', (_e, hash: string) => ctl.preview(hash));
ipcMain.handle('versions:restore', (_e, hash: string) => ctl.restore(hash));
- ipcMain.handle('build:run', () => ctl.need().builds.start('manuell'));
+ ipcMain.handle('build:run', () => ctl.need().builds.start('manual'));
ipcMain.handle('build:cancel', () => ctl.need().builds.cancel());
ipcMain.handle('build:setAuto', (_e, on: boolean) => ctl.need().builds.setAuto(!!on));
ipcMain.handle('build:status', () => ctl.need().builds.status);
@@ -65,14 +65,14 @@ function registerIpc(ctl: ProjectController): void {
if (!r.abs) return { ok: false, error: r.error };
// Gesperrtes gar nicht erst zur Rückfrage bringen (trashEntry prüft danach noch einmal mit bereinigtem Pfad)
const block = fileOpBlockReason(String(rel), 'delete');
- if (block) return { ok: false, error: `${rel} lässt sich nicht löschen. ${block}` };
+ if (block) return { ok: false, error: `${rel} cannot be deleted. ${block}` };
const isDir = fs.statSync(r.abs).isDirectory();
// Die Rückfrage stellt der Hauptprozess: So beantworten Tests sie wie alle anderen Dialoge (dialogs.ts)
const c = await choose(win, {
- title: 'Löschen',
- message: isDir ? `Den Ordner „${path.basename(r.abs)}“ mit allem darin in den Papierkorb verschieben?` : `„${path.basename(r.abs)}“ in den Papierkorb verschieben?`,
- detail: 'Aus dem Papierkorb lässt es sich wiederherstellen. Gespeicherte Stände im Verlauf bleiben ohnehin erhalten.',
- buttons: ['In den Papierkorb', 'Abbrechen'],
+ title: 'Delete',
+ message: isDir ? `Move the folder “${path.basename(r.abs)}” and everything in it to the Recycle Bin?` : `Move “${path.basename(r.abs)}” to the Recycle Bin?`,
+ detail: 'It can be restored from the Recycle Bin. Saved versions in the history are kept anyway.',
+ buttons: ['Move to Recycle Bin', 'Cancel'],
});
if (c !== 0) return { ok: false, canceled: true };
return trashEntry(root, String(rel), (abs) => trashItem(abs));
@@ -93,7 +93,7 @@ function registerIpc(ctl: ProjectController): void {
// Links aus Markdown-Dateien (E51). Nur Web und Mail: file:, Programme und eigene Protokolle könnten etwas ausführen.
ipcMain.handle('app:openUrl', async (_e, url: unknown): Promise<FileOpResult> => {
const u = String(url ?? '');
- if (!/^(https?:\/\/|mailto:)/i.test(u)) return { ok: false, error: `Nur Web- und Mail-Adressen lassen sich öffnen: ${u.slice(0, 100)}` };
+ if (!/^(https?:\/\/|mailto:)/i.test(u)) return { ok: false, error: `Only web and mail addresses can be opened: ${u.slice(0, 100)}` };
if (process.env.SOMA_TEST === '1') return { ok: true, path: u };
try { await shell.openExternal(u); return { ok: true, path: u }; } catch (e) { return { ok: false, error: e instanceof Error ? e.message : String(e) }; }
});
@@ -102,13 +102,13 @@ function registerIpc(ctl: ProjectController): void {
const s = ctl.session;
// Späte Eingabe aus einem schon gewechselten Modell: nicht ins falsche Projekt schreiben, aber auch nicht verlieren
if (!s || s.id !== id) {
- if (!isProjectId(String(id))) return { ok: false, error: 'Unbekanntes Modell.' };
- return { ok: false, error: `Das Modell wurde inzwischen gewechselt. Die Änderung liegt als Sicherung unter ${backupText(editBackupsDir(id), String(rel), String(text))}` };
+ if (!isProjectId(String(id))) return { ok: false, error: 'Unknown model.' };
+ return { ok: false, error: `The model has been switched in the meantime. The change is kept as a backup in ${backupText(editBackupsDir(id), String(rel), String(text))}` };
}
return writeProjectText(s.dir, String(rel), String(text), base == null ? null : String(base), !!force, editBackupsDir(s.id));
});
ipcMain.handle('fs:backupText', (_e, id: string, rel: string, text: string) => {
- if (!isProjectId(String(id))) throw new Error('Unbekanntes Modell.');
+ if (!isProjectId(String(id))) throw new Error('Unknown model.');
return backupText(editBackupsDir(String(id)), String(rel), String(text));
});
ipcMain.handle('fs:readText', (_e, rel: string) => fs.readFileSync(resolveInside(dir(), rel), 'utf8'));
@@ -159,13 +159,13 @@ function registerIpc(ctl: ProjectController): void {
}
function onRendererGone(wc: WebContents, reason: string, exitCode: number): void {
- console.error(`[soma] Renderer-Prozess beendet: Grund=${reason} Code=${exitCode}`);
+ console.error(`[soma] Renderer process ended: reason=${reason} code=${exitCode}`);
if (reason === 'launch-failed' && process.env.SOMA_HIDDEN !== '1') {
// Häufigste Ursache unter Windows: das Programm liegt auf einem Netzlaufwerk. Die sandboxed Prozesse laufen mit
// eingeschränktem Token, verlieren dort den Zugriff und starten nicht. Ohne Meldung bliebe nur ein schwarzes Fenster.
- dialog.showErrorBox('SOMA kann die Oberfläche nicht starten',
- `Der Anzeigeprozess ließ sich nicht starten (Code ${exitCode}).\n\nHäufige Ursache: Das Programm liegt auf einem Netzlaufwerk. ` +
- 'Installiere oder starte es von einer lokalen Platte (z. B. C:).');
+ dialog.showErrorBox('SOMA cannot start its user interface',
+ `The display process could not be started (code ${exitCode}).\n\nA common cause: the program is on a network drive. ` +
+ 'Install or start it from a local disk (for example C:).');
app.quit();
}
void wc;
@@ -212,7 +212,7 @@ function createWindow(): void {
registerIpc(ctl);
// Stürzt der Anzeigeprozess ab, steht der Grund im Protokoll (sonst bliebe nur ein schwarzes Fenster).
wc.on('render-process-gone', (_e, d) => onRendererGone(wc, d.reason, d.exitCode));
- wc.on('unresponsive', () => console.error('[soma] Renderer reagiert nicht'));
+ wc.on('unresponsive', () => console.error('[soma] Renderer is not responding'));
wc.on('console-message', (_e, level, message, line, source) => { if (level >= 2) console.error(`[renderer] ${message} (${source}:${line})`); });
wc.once('did-finish-load', () => {
// Die App beginnt auf der Startseite, dort stehen die zuletzt geöffneten Modelle (E69). Ein Arbeitsstand von vor einem
@@ -220,7 +220,7 @@ function createWindow(): void {
if (process.env.SOMA_TEST !== '1' || process.env.SOMA_TEST_START === 'home') return;
void (async () => {
try { await ctl.open(getLastProject() ?? (await createProject()).id); }
- catch (e) { console.error('[soma] Projekt konnte nicht geöffnet werden:', e); }
+ catch (e) { console.error('[soma] Could not open the project:', e); }
})();
});
win.loadFile(path.join(__dirname, '..', 'renderer', 'index.html'));
@@ -250,9 +250,9 @@ app.whenReady().then(async () => {
warmUp();
sweepDiscarded(); // Reste verworfener Modelle (E69) vom letzten Mal
await startBridge(async (route, body) => {
- if (!controller) return { status: 503, body: { ok: false, error: 'Die App hat gerade kein Fenster.' } };
+ if (!controller) return { status: 503, body: { ok: false, error: 'The app has no window right now.' } };
if (route === 'render') return controller.renderForAgent(body);
- return { status: 404, body: { ok: false, error: `Unbekannte Anfrage: ${route}` } };
+ return { status: 404, body: { ok: false, error: `Unknown request: ${route}` } };
});
createWindow();
});
diff --git a/app/src/main/measure.ts b/app/src/main/measure.ts
index df113f2..a598eb2 100644
--- a/app/src/main/measure.ts
+++ b/app/src/main/measure.ts
@@ -30,9 +30,9 @@ export class MeasureService {
/** Den Dienst starten, ohne etwas zu messen (der Messmodus startet ihn beim Einschalten). */
async warm(): Promise<MeasurePrepared> {
- if (this.disposed) return { ok: false, error: 'Das Modell ist geschlossen.' };
+ if (this.disposed) return { ok: false, error: 'The model is closed.' };
try { await this.start(); return { ok: true }; }
- catch (e) { return { ok: false, error: `Der Messdienst ließ sich nicht starten: ${e instanceof Error ? e.message : String(e)}` }; }
+ catch (e) { return { ok: false, error: `Could not start the measuring service: ${e instanceof Error ? e.message : String(e)}` }; }
}
/** Einen Stand vorab laden. Der Dienst arbeitet der Reihe nach: Messungen danach warten, bis er geladen ist. */
@@ -45,10 +45,10 @@ export class MeasureService {
const warm = await this.warm();
if (!warm.ok) return warm;
const proc = this.proc;
- if (!proc?.stdin) return { ok: false, error: 'Der Messdienst läuft nicht.' };
+ if (!proc?.stdin) return { ok: false, error: 'The measuring service is not running.' };
const id = ++this.seq;
return new Promise((resolve) => {
- const timer = setTimeout(() => { this.pending.delete(id); resolve({ ok: false, error: 'Der Messdienst antwortet nicht (Zeitlimit).' }); }, timeoutMs);
+ const timer = setTimeout(() => { this.pending.delete(id); resolve({ ok: false, error: 'The measuring service does not answer (time limit).' }); }, timeoutMs);
this.pending.set(id, { resolve, timer });
proc.stdin!.write(JSON.stringify({ ...payload, id }) + '\n');
});
@@ -57,7 +57,7 @@ export class MeasureService {
stop(): void {
this.disposed = true;
this.proc?.kill();
- this.fail('Das Modell ist geschlossen.');
+ this.fail('The model is closed.');
}
private start(): Promise<void> {
@@ -70,7 +70,7 @@ export class MeasureService {
this.proc = child;
let err = '';
this.ready = new Promise<void>((resolve, reject) => {
- const timer = setTimeout(() => { reject(new Error('Zeitlimit beim Start')); child.kill(); }, START_TIMEOUT_MS);
+ const timer = setTimeout(() => { reject(new Error('Time limit at start')); child.kill(); }, START_TIMEOUT_MS);
child.stdout!.setEncoding('utf8');
child.stdout!.on('data', (d: string) => {
this.buf += d;
@@ -94,8 +94,8 @@ export class MeasureService {
child.on('exit', (code) => {
clearTimeout(timer);
if (this.proc === child) { this.proc = null; this.ready = null; }
- reject(new Error(`beendet mit Code ${code}. ${err.trim().split('\n').pop() ?? ''}`));
- this.fail(`Der Messdienst wurde beendet (Code ${code}). Die nächste Messung startet ihn neu.`);
+ reject(new Error(`ended with code ${code}. ${err.trim().split('\n').pop() ?? ''}`));
+ this.fail(`The measuring service ended (code ${code}). The next measurement starts it again.`);
});
});
this.ready.catch(() => { /* wird bei der Anfrage gemeldet */ });
diff --git a/app/src/main/packages.ts b/app/src/main/packages.ts
index c6d0c77..3dfce20 100644
--- a/app/src/main/packages.ts
+++ b/app/src/main/packages.ts
@@ -55,7 +55,7 @@ function run(exe: string, args: string[], cwd: string, timeoutMs: number): Promi
try {
child = spawn(exe, args, { cwd, windowsHide: true, env: { ...process.env, PIP_PYTHON: undefined, PYTHONUTF8: '1', PYTHONIOENCODING: 'utf-8' } });
} catch (e) { resolve({ code: null, out, err: e instanceof Error ? e.message : String(e) }); return; }
- const timer = setTimeout(() => { err += '\nZeitlimit überschritten.'; child.kill(); }, timeoutMs);
+ const timer = setTimeout(() => { err += '\nTime limit exceeded.'; child.kill(); }, timeoutMs);
child.stdout?.on('data', (d: Buffer) => { out += d.toString('utf8'); });
child.stderr?.on('data', (d: Buffer) => { err += d.toString('utf8'); });
child.on('error', (e) => { clearTimeout(timer); resolve({ code: null, out, err: err + e.message }); });
@@ -78,7 +78,7 @@ export async function ensureEnv(dir: string): Promise<string | null> {
if (res.ok) return null;
if (res.error) return res.error;
} catch { /* kein Ergebnis: unten mit der Fehlerausgabe melden */ }
- return `Die Projektumgebung ließ sich nicht anlegen (${pythonExe()}): ${(r.err || r.out).trim().split('\n').slice(-3).join(' ')}`;
+ return `Could not create the project environment (${pythonExe()}): ${(r.err || r.out).trim().split('\n').slice(-3).join(' ')}`;
}
const norm = (name: string) => name.replace(/[-_.]+/g, '-').toLowerCase();
@@ -153,10 +153,10 @@ export async function installMissing(dir: string): Promise<string | null> {
try { options = parseRequirements(fs.readFileSync(path.join(dir, 'requirements.txt'), 'utf8')).filter((r) => !r.name).map((r) => r.line); } catch { /* nur die Pakete */ }
const list = path.join(env, 'restore-requirements.txt');
try { fs.writeFileSync(list, [...options, ...missing.map((r) => r.line)].join('\n') + '\n'); } catch (e) {
- return `Die Paketliste ließ sich nicht schreiben: ${e instanceof Error ? e.message : String(e)}`;
+ return `Could not write the package list: ${e instanceof Error ? e.message : String(e)}`;
}
const r = await run(python, ['-m', 'pip', 'install', '-r', list], dir, INSTALL_TIMEOUT_MS);
if (r.code === 0) return null;
const tail = (r.err || r.out).trim().split(/\r?\n/).filter((l) => l.trim()).slice(-4).join('\n');
- return `Pakete aus requirements.txt ließen sich nicht installieren (${missing.map((m) => m.line).join(', ')}).\n${tail}`;
+ return `Could not install packages from requirements.txt (${missing.map((m) => m.line).join(', ')}).\n${tail}`;
}
diff --git a/app/src/main/projects.ts b/app/src/main/projects.ts
index 25e3c86..1a1b596 100644
--- a/app/src/main/projects.ts
+++ b/app/src/main/projects.ts
@@ -48,7 +48,7 @@ interface Session {
}
const POLL_MS = 2000;
-const safeFileName = (n: string) => n.replace(/[<>:"/\\|?*\x00-\x1f]/g, '_').trim() || 'Modell';
+const safeFileName = (n: string) => n.replace(/[<>:"/\\|?*\x00-\x1f]/g, '_').trim() || 'Model';
/**
* Das offene Projekt und alles, was mit Speichern, Öffnen und Verlauf zu tun hat.
@@ -64,7 +64,7 @@ export class ProjectController {
constructor(private readonly getWin: () => BrowserWindow | null, private readonly wc: WebContents) {}
private send(channel: string, ...args: unknown[]) { if (!this.wc.isDestroyed()) this.wc.send(channel, ...args); }
- need(): Session { if (!this.session) throw new Error('Kein Projekt geöffnet'); return this.session; }
+ need(): Session { if (!this.session) throw new Error('No project open'); return this.session; }
// ---- Sitzung ----------------------------------------------------------------------------------------------------
@@ -100,7 +100,7 @@ export class ProjectController {
const shells = untouched ? s.terminals.killAllAndWait() : null;
this.close();
if (shells) await shells;
- if (untouched && !(await discardWorkspace(s.id))) console.error(`[soma] Unverändertes Modell ${s.id} ließ sich nicht verwerfen (Ordner in Benutzung), es bleibt.`);
+ if (untouched && !(await discardWorkspace(s.id))) console.error(`[soma] Could not discard the unchanged model ${s.id} (folder in use), it stays.`);
}
async open(id: string): Promise<ProjectInfo> {
@@ -129,7 +129,7 @@ export class ProjectController {
// erster Build direkt beim Öffnen, damit der Viewer nicht leer ist (der Nutzer kann Auto-Build danach abschalten).
const last = currentBuild(dir);
// Fehlen Pakete aus requirements.txt (ZIP von einem anderen Rechner), erst installieren, dann bauen
- if (!this.installPackages(session, !last) && !last) builds.start('Projekt geöffnet');
+ if (!this.installPackages(session, !last) && !last) builds.start('project opened');
const info = this.info();
this.send('project:changed', info);
// Erst nach project:changed: Das Fenster räumt beim Projektwechsel den Viewer leer und lädt danach das Modell
@@ -220,12 +220,12 @@ export class ProjectController {
*/
async exportModel(format: string, part: string | null): Promise<ExportResult> {
const s = this.need();
- if (!/^[a-z0-9]{2,5}$/.test(format)) return { ok: false, files: [], error: `Unbekanntes Format: ${format}` };
+ if (!/^[a-z0-9]{2,5}$/.test(format)) return { ok: false, files: [], error: `Unknown format: ${format}` };
const last = getAppState(s.id).exportDir;
const startDir = last && fs.existsSync(last) ? last : documentsDir();
const target = await chooseExportTarget(this.getWin(), part
- ? { kind: 'file', title: `„${part}“ exportieren`, defaultPath: path.join(startDir, `${safeFileName(part)}.${format}`), ext: format }
- : { kind: 'dir', title: 'Ordner für den Export wählen', defaultPath: startDir });
+ ? { kind: 'file', title: `Export “${part}”`, defaultPath: path.join(startDir, `${safeFileName(part)}.${format}`), ext: format }
+ : { kind: 'dir', title: 'Choose a folder for the export', defaultPath: startDir });
if (!target) return { ok: false, files: [], cancelled: true };
let tmp: string | null = null;
try {
@@ -235,12 +235,12 @@ export class ProjectController {
const r = await runSoma(args, s.dir, 5 * 60 * 1000);
if (!r.ok) {
const msg = (r.err || r.out).trim().split(/\r?\n/).slice(-3).join('\n');
- return { ok: false, files: [], error: msg || 'Export fehlgeschlagen' };
+ return { ok: false, files: [], error: msg || 'Export failed' };
}
// Alles aus dem Ordner übernehmen, nicht nur die gemeldeten Dateien (glTF kann eine .bin daneben schreiben)
const dir = tmp;
const made = fs.readdirSync(dir).filter((n) => fs.statSync(path.join(dir, n)).isFile());
- if (!made.length) return { ok: false, files: [], error: 'soma hat keine Datei geschrieben.' };
+ if (!made.length) return { ok: false, files: [], error: 'soma did not write a file.' };
const plan: [string, string][] = [];
if (part) {
const main = made.find((n) => n.toLowerCase().endsWith(`.${format}`)) ?? made[0];
@@ -252,8 +252,8 @@ export class ProjectController {
const exists = plan.filter(([, d], i) => !(part && i === 0) && fs.existsSync(d)).map(([, d]) => path.basename(d));
if (exists.length) {
const c = await choose(this.getWin(), {
- title: 'Exportieren', message: exists.length === 1 ? 'Diese Datei gibt es im Ordner schon:' : `Diese ${exists.length} Dateien gibt es im Ordner schon:`,
- detail: `${exists.slice(0, 10).join('\n')}${exists.length > 10 ? `\n… und ${exists.length - 10} weitere` : ''}`, buttons: ['Ersetzen', 'Abbrechen'],
+ title: 'Export', message: exists.length === 1 ? 'This file already exists in the folder:' : `These ${exists.length} files already exist in the folder:`,
+ detail: `${exists.slice(0, 10).join('\n')}${exists.length > 10 ? `\n… and ${exists.length - 10} more` : ''}`, buttons: ['Replace', 'Cancel'],
});
if (c !== 0) return { ok: false, files: [], cancelled: true };
}
@@ -265,7 +265,7 @@ export class ProjectController {
patchAppState(s.id, { exportDir: part ? path.dirname(dest) : target });
return { ok: true, files: plan.map(([, d]) => d), target: dest };
} catch (e) {
- return { ok: false, files: [], error: `Export fehlgeschlagen: ${e instanceof Error ? e.message : String(e)}` };
+ return { ok: false, files: [], error: `Export failed: ${e instanceof Error ? e.message : String(e)}` };
} finally {
if (tmp) fs.rmSync(tmp, { recursive: true, force: true });
}
@@ -279,7 +279,7 @@ export class ProjectController {
if (zipPath && !fs.existsSync(path.dirname(zipPath))) zipPath = undefined; // Zielordner weg (z. B. USB-Stick ab): neu fragen
if (!zipPath) {
const pj = readProjectJson(s.id);
- const chosen = await choosePath(this.getWin(), 'save', `${safeFileName(pj?.name ?? 'Modell')}.zip`);
+ const chosen = await choosePath(this.getWin(), 'save', `${safeFileName(pj?.name ?? 'Model')}.zip`);
if (!chosen) return { cancelled: true };
zipPath = /\.zip$/i.test(chosen) ? chosen : `${chosen}.zip`;
renameProject(s.id, path.basename(zipPath).replace(/\.zip$/i, '')); // der Modellname folgt dem Dateinamen
@@ -287,16 +287,16 @@ export class ProjectController {
const warnings: string[] = [];
try {
// Die ZIP soll das aktuelle Ergebnis enthalten: laufenden Build abwarten, veralteten vorher nachholen.
- if (!s.builds.busy && buildIsStale(s.dir)) s.builds.start('vor dem Speichern');
+ if (!s.builds.busy && buildIsStale(s.dir)) s.builds.start('before saving');
await s.builds.whenIdle();
- if (s.builds.status.state === 'error') warnings.push('Der letzte Build ist fehlgeschlagen. Die ZIP enthält den letzten erfolgreichen Stand von output/model.step.');
+ if (s.builds.status.state === 'error') warnings.push('The last build failed. The ZIP contains the last successful version of output/model.step.');
stampAppVersion(s.id); // mit welcher Version zuletzt gespeichert (E68), steht so auch im Snapshot
let snapshot: string | null = null;
if (await s.git.isRepo()) {
- try { snapshot = await s.git.snapshot('Automatischer Snapshot beim Speichern'); }
- catch (e) { warnings.push(`Snapshot im Verlauf nicht möglich: ${e instanceof Error ? e.message : String(e)}`); }
- } else warnings.push('Kein Git-Verlauf vorhanden: Es wurde kein Snapshot angelegt.');
+ try { snapshot = await s.git.snapshot('Automatic snapshot on save'); }
+ catch (e) { warnings.push(`Could not add a snapshot to the history: ${e instanceof Error ? e.message : String(e)}`); }
+ } else warnings.push('No Git history: no snapshot was created.');
const head = await s.git.head();
const pj = readProjectJson(s.id);
@@ -307,7 +307,7 @@ export class ProjectController {
this.send('versions:changed');
return { cancelled: false, zipPath, snapshot, files: r.files, bytes: r.bytes, warnings };
} catch (e) {
- return { cancelled: false, error: `Speichern fehlgeschlagen: ${e instanceof Error ? e.message : String(e)}` };
+ return { cancelled: false, error: `Saving failed: ${e instanceof Error ? e.message : String(e)}` };
}
}
@@ -326,20 +326,20 @@ export class ProjectController {
async openZipFile(zipPath: string): Promise<OpenResult> {
let texts: Record<string, string | null>;
try { texts = await readZipTexts(zipPath, ['.soma/project.json', ZIP_INFO_PATH]); }
- catch (e) { return { cancelled: false, error: `Die ZIP lässt sich nicht lesen: ${e instanceof Error ? e.message : String(e)}` }; }
+ catch (e) { return { cancelled: false, error: `Cannot read the ZIP: ${e instanceof Error ? e.message : String(e)}` }; }
let id: string;
let info: ZipInfo | null = null;
try {
id = (JSON.parse(texts['.soma/project.json'] ?? '') as { id?: string }).id ?? '';
if (texts[ZIP_INFO_PATH]) info = JSON.parse(texts[ZIP_INFO_PATH]!) as ZipInfo;
} catch { id = ''; }
- if (!isProjectId(id)) return { cancelled: false, error: 'Das ist keine SOMA-Datei (.soma/project.json fehlt oder ist ungültig).' };
+ if (!isProjectId(id)) return { cancelled: false, error: 'This is not a SOMA file (.soma/project.json is missing or invalid).' };
const dir = projectDir(id);
const remember = () => patchAppState(id, { zipPath, savedHead: info?.head ?? null, savedAt: Date.now() });
if (!fs.existsSync(dir)) {
- try { await extractProject(zipPath, id); } catch (e) { return { cancelled: false, error: `Entpacken fehlgeschlagen: ${e instanceof Error ? e.message : String(e)}` }; }
+ try { await extractProject(zipPath, id); } catch (e) { return { cancelled: false, error: `Unpacking failed: ${e instanceof Error ? e.message : String(e)}` }; }
remember();
await this.open(id);
return { cancelled: false, opened: true };
@@ -355,16 +355,16 @@ export class ProjectController {
return { cancelled: false, opened: true };
}
let why: string;
- if (st.dirty) why = 'Der Arbeitsordner enthält ungespeicherte Änderungen.';
- else if (info?.head && wsHead && (await git.isAncestor(info.head, wsHead))) why = 'Der Arbeitsordner ist neuer als die ZIP.';
- else if (info?.head && wsHead && (await git.isAncestor(wsHead, info.head))) why = 'Die ZIP ist neuer als der Arbeitsordner.';
- else why = 'Arbeitsordner und ZIP haben verschiedene Stände.';
+ if (st.dirty) why = 'The working folder has unsaved changes.';
+ else if (info?.head && wsHead && (await git.isAncestor(info.head, wsHead))) why = 'The working folder is newer than the ZIP.';
+ else if (info?.head && wsHead && (await git.isAncestor(wsHead, info.head))) why = 'The ZIP is newer than the working folder.';
+ else why = 'The working folder and the ZIP have different versions.';
const choice = await choose(this.getWin(), {
- title: 'Arbeitsordner und ZIP weichen ab',
- message: `${why} Was soll geöffnet werden?`,
- detail: 'Arbeitsstand behalten: Das Modell wird so geöffnet, wie es auf diesem Rechner liegt.\n' +
- 'ZIP laden: Der Stand aus der ZIP wird geöffnet. Der bisherige Arbeitsordner wird gesichert, nichts wird gelöscht.',
- buttons: ['Arbeitsstand behalten', 'ZIP laden', 'Abbrechen'],
+ title: 'Working folder and ZIP differ',
+ message: `${why} What do you want to open?`,
+ detail: 'Keep current work: the model opens as it is on this computer.\n' +
+ 'Load ZIP: the version from the ZIP opens. The previous working folder is backed up, nothing is deleted.',
+ buttons: ['Keep current work', 'Load ZIP', 'Cancel'],
});
if (choice === 0) { patchAppState(id, { zipPath }); await this.open(id); return { cancelled: false, opened: true }; }
if (choice !== 1) return { cancelled: true };
@@ -372,7 +372,7 @@ export class ProjectController {
if (this.session?.id === id) this.close(); // offene Handles würden das Umbenennen blockieren
await backupWorkspace(id);
await extractProject(zipPath, id);
- } catch (e) { return { cancelled: false, error: `ZIP laden fehlgeschlagen: ${e instanceof Error ? e.message : String(e)}` }; }
+ } catch (e) { return { cancelled: false, error: `Loading the ZIP failed: ${e instanceof Error ? e.message : String(e)}` }; }
remember();
await this.open(id);
return { cancelled: false, opened: true };
@@ -393,7 +393,7 @@ export class ProjectController {
async preview(hash: string): Promise<PreviewResult> {
const s = this.need();
const empty = { commit: null, glb: new ArrayBuffer(0), map: { version: 0, parts: [] } as ModelMap };
- if (!/^[0-9a-f]{7,40}$/.test(hash)) return { ...empty, error: 'Ungültiger Stand' };
+ if (!/^[0-9a-f]{7,40}$/.test(hash)) return { ...empty, error: 'Invalid version' };
const commit = (await s.git.log()).find((c) => c.hash === hash) ?? null;
const dir = path.join(previewsDir(), s.id, hash);
try {
@@ -402,7 +402,7 @@ export class ProjectController {
const step = path.join(dir, 'model.step');
await s.git.exportFile(hash, 'output/model.step', step);
const r = await runSoma(['glb', step, '--out', dir], s.dir);
- if (!r.ok) throw new Error((r.err || r.out).trim().split('\n').pop() || 'Umwandlung fehlgeschlagen');
+ if (!r.ok) throw new Error((r.err || r.out).trim().split('\n').pop() || 'Conversion failed');
}
const glb = fs.readFileSync(path.join(dir, 'model.glb'));
const map = JSON.parse(fs.readFileSync(path.join(dir, 'model.map.json'), 'utf8')) as ModelMap;
@@ -411,7 +411,7 @@ export class ProjectController {
fs.rmSync(dir, { recursive: true, force: true });
const msg = e instanceof Error ? e.message : String(e);
return { ...empty, commit, error: /exists on disk, but not in|does not exist|Path .* does not exist|invalid object/i.test(msg)
- ? 'Dieser Stand enthält kein output/model.step (noch nicht gebaut).' : `Vorschau nicht möglich: ${msg}` };
+ ? 'This version contains no output/model.step (not built yet).' : `Preview not possible: ${msg}` };
}
}
@@ -422,7 +422,7 @@ export class ProjectController {
async measure(source: unknown, req: unknown): Promise<MeasureResponse> {
const s = this.need();
const folder = this.measureFolder(s, source);
- if (!folder) return { ok: false, error: 'Unbekannte Quelle für die Messung.' };
+ if (!folder) return { ok: false, error: 'Unknown source for the measurement.' };
const r = req as { build?: unknown; a?: unknown; b?: unknown } | null;
const ent = (v: unknown): MeasureEntity | null => {
const e = v as { part?: unknown; kind?: unknown; id?: unknown; point?: unknown; check?: unknown } | null;
@@ -431,7 +431,7 @@ export class ProjectController {
return { part: e.part, kind: e.kind, id: e.id as number, point: pt, check: Number.isFinite(e.check) ? (e.check as number) : undefined };
};
const a = ent(r?.a), b = r?.b == null ? undefined : ent(r.b);
- if (!a || b === null || typeof r?.build !== 'string') return { ok: false, error: 'Ungültige Messanfrage.' };
+ if (!a || b === null || typeof r?.build !== 'string') return { ok: false, error: 'Invalid measurement request.' };
const clean: MeasureRequest = { build: r.build, a, ...(b ? { b } : {}) };
return s.measure.request(folder, clean);
}
@@ -453,31 +453,31 @@ export class ProjectController {
async measurePrepare(source: unknown, build: unknown): Promise<MeasurePrepared> {
const s = this.need();
const folder = this.measureFolder(s, source);
- if (!folder || typeof build !== 'string') return { ok: false, error: 'Ungültige Messanfrage.' };
+ if (!folder || typeof build !== 'string') return { ok: false, error: 'Invalid measurement request.' };
return s.measure.prepare(folder, build);
}
async restore(hash: string): Promise<RestoreResult> {
const s = this.need();
const commit = (await s.git.log()).find((c) => c.hash === hash);
- if (!commit) return { cancelled: false, error: 'Dieser Stand existiert im Verlauf nicht mehr.' };
+ if (!commit) return { cancelled: false, error: 'This version no longer exists in the history.' };
const c = await choose(this.getWin(), {
- title: 'Stand wiederherstellen',
- message: `„${commit.subject}“ (${commit.short}) wiederherstellen?`,
- detail: 'Die Dateien dieses Standes werden in den Arbeitsordner kopiert und als neuer Stand im Verlauf abgelegt. ' +
- 'Ungesicherte Änderungen werden vorher als eigener Stand gesichert. Der Verlauf bleibt vollständig.',
- buttons: ['Wiederherstellen', 'Abbrechen'],
+ title: 'Restore version',
+ message: `Restore “${commit.subject}” (${commit.short})?`,
+ detail: 'The files of this version are copied into the working folder and added to the history as a new version. ' +
+ 'Unsaved changes are first kept as a version of their own. The history stays complete.',
+ buttons: ['Restore', 'Cancel'],
});
if (c !== 0) return { cancelled: true };
try {
const r = await s.git.restore(hash);
// Ein alter Stand kann andere Zusatzpakete brauchen (E67)
- if (!this.installPackages(s, true)) s.builds.start('Stand wiederhergestellt');
+ if (!this.installPackages(s, true)) s.builds.start('version restored');
this.send('versions:changed');
this.send('save:state', await this.saveState());
return { cancelled: false, ...r };
} catch (e) {
- return { cancelled: false, error: `Wiederherstellen fehlgeschlagen: ${e instanceof Error ? e.message : String(e)}` };
+ return { cancelled: false, error: `Restoring failed: ${e instanceof Error ? e.message : String(e)}` };
}
}
@@ -492,7 +492,7 @@ export class ProjectController {
animBuild(file: unknown): Promise<AnimBuildResult> {
const s = this.need();
const f = file == null ? null : String(file).replace(/\\/g, '/');
- if (f !== null && !affectsAnimation(f)) return Promise.resolve({ ...readAnimList(s.dir), ok: false, error: 'Keine Animationsdatei (animations/*.py).' });
+ if (f !== null && !affectsAnimation(f)) return Promise.resolve({ ...readAnimList(s.dir), ok: false, error: 'Not an animation file (animations/*.py).' });
return s.anims.request(f);
}
@@ -520,8 +520,8 @@ export class ProjectController {
const s = this.need();
await s.builds.whenIdle();
const warnings: string[] = [];
- if (s.builds.status.state === 'error') warnings.push('Der letzte Build ist fehlgeschlagen. Zu sehen ist der letzte erfolgreiche Stand.');
- else if (s.builds.status.stale) warnings.push('Der Code ist neuer als der letzte Build (Auto-Build ist aus). Zu sehen ist der letzte Build.');
+ if (s.builds.status.state === 'error') warnings.push('The last build failed. The last successful version is shown.');
+ else if (s.builds.status.stale) warnings.push('The code is newer than the last build (auto build is off). The last build is shown.');
const r = await this.renders.run(s.dir, req, (f) => this.send('render:progress', f));
const res = { ...r, warnings: [...warnings, ...r.warnings] };
this.send('render:notice', { ...res, kind: req.kind, byAgent });
@@ -532,10 +532,10 @@ export class ProjectController {
/** Auftrag von `soma render` aus einem Terminal der App (über bridge.ts). */
async renderForAgent(body: unknown): Promise<{ status: number; body: unknown }> {
const s = this.session;
- if (!s) return { status: 409, body: { ok: false, error: 'In der App ist kein Modell offen.' } };
+ if (!s) return { status: 409, body: { ok: false, error: 'No model is open in the app.' } };
const project = String((body as { project?: unknown } | null)?.project ?? '');
if (!project || !samePath(project, s.dir)) {
- return { status: 409, body: { ok: false, error: 'Dieser Ordner ist nicht das Modell, das in der App offen ist. soma render läuft nur im offenen Modell.' } };
+ return { status: 409, body: { ok: false, error: 'This folder is not the model that is open in the app. soma render only works in the open model.' } };
}
const req = checkRequest(s.dir, body);
if (typeof req === 'string') return { status: 400, body: { ok: false, error: req } };
@@ -547,12 +547,12 @@ export class ProjectController {
async renderVideo(animId: unknown): Promise<RenderResult> {
const s = this.need();
let entry = readAnimList(s.dir).animations.find((a) => a.id === animId);
- if (!entry) return { ok: false, files: [], warnings: [], error: 'Diese Animation gibt es nicht (mehr).' };
+ if (!entry) return { ok: false, files: [], warnings: [], error: 'This animation does not exist (any more).' };
if (entry.stale) {
const file = entry.file;
const b = await s.anims.request(file);
entry = b.animations.find((a) => a.id === animId);
- if (!entry) return { ok: false, files: [], warnings: [], error: b.errors.find((e) => e.file === file)?.message ?? b.error ?? 'Die Animation ließ sich nicht neu bauen.' };
+ if (!entry) return { ok: false, files: [], warnings: [], error: b.errors.find((e) => e.file === file)?.message ?? b.error ?? 'The animation could not be rebuilt.' };
}
return this.render({ kind: 'video', size: [1280, 720], view: null, at: 0, grid: [3, 3], fps: 30, anim: entry.glb, result: null, out: `renders/${entry.id}.mp4` }, false);
}
@@ -575,8 +575,8 @@ export class ProjectController {
this.need();
const list = () => this.skills();
const b = isSkillId(skill) ? bundledSkill(skillsDir(), skill) : undefined;
- if (!b) return { ok: false, error: 'Diesen Skill bringt die App nicht mit. Neue Modelle können ihn nicht bekommen.', skills: list() };
- if (!isSkillMode(mode)) return { ok: false, error: `Unbekannte Stufe „${String(mode)}“.`, skills: list() };
+ if (!b) return { ok: false, error: 'The app does not include this skill. New models cannot get it.', skills: list() };
+ if (!isSkillMode(mode)) return { ok: false, error: `Unknown level “${String(mode)}”.`, skills: list() };
try {
setSkillDefault(b.id, mode, b.defaultMode);
return { ok: true, skills: list() };
@@ -600,9 +600,9 @@ export class ProjectController {
const s = this.need();
const modes = readSkillModes(s.id);
const list = () => this.skills();
- if (!isSkillId(skill)) return { ok: false, error: 'Unbekannter Skill.', skills: list() };
- if (!isSkillMode(mode)) return { ok: false, error: `Unbekannte Stufe „${String(mode)}“.`, skills: list() };
- if (!modes) return { ok: false, error: '.soma/project.json fehlt oder ist unlesbar. Ohne sie lässt sich kein Skill umstellen.', skills: list() };
+ if (!isSkillId(skill)) return { ok: false, error: 'Unknown skill.', skills: list() };
+ if (!isSkillMode(mode)) return { ok: false, error: `Unknown level “${String(mode)}”.`, skills: list() };
+ if (!modes) return { ok: false, error: '.soma/project.json is missing or unreadable. Without it no skill can be switched.', skills: list() };
try {
const values = this.skillValues(s.id, skill);
const was = modeOf(modes, skill);
@@ -627,15 +627,15 @@ export class ProjectController {
const s = this.need();
const list = () => this.skills();
const b = isSkillId(skill) ? bundledSkill(skillsDir(), skill) : undefined;
- if (!isSkillId(skill) || !b) return { ok: false, error: 'Diesen Skill bringt die App nicht mit, er lässt sich nicht einstellen.', skills: list() };
+ if (!isSkillId(skill) || !b) return { ok: false, error: 'The app does not include this skill, it cannot be configured.', skills: list() };
const pj = readProjectJson(s.id);
- if (!pj) return { ok: false, error: '.soma/project.json fehlt oder ist unlesbar. Ohne sie lässt sich nichts einstellen.', skills: list() };
- if (!values || typeof values !== 'object') return { ok: false, error: 'Keine Werte.', skills: list() };
+ if (!pj) return { ok: false, error: '.soma/project.json is missing or unreadable. Without it nothing can be configured.', skills: list() };
+ if (!values || typeof values !== 'object') return { ok: false, error: 'No values.', skills: list() };
const prev = this.skillValues(s.id, skill);
const next: SkillValues = { ...prev };
for (const [name, raw] of Object.entries(values as Record<string, unknown>)) {
const v = b.vars.find((x) => x.name === name);
- if (!v) return { ok: false, error: `Der Skill hat keine Einstellung „${name}“.`, skills: list() };
+ if (!v) return { ok: false, error: `The skill has no setting “${name}”.`, skills: list() };
if (raw === null) { delete next[name]; continue; }
const r = checkValue(v, raw);
if ('error' in r) return { ok: false, error: r.error, skills: list() };
@@ -658,12 +658,12 @@ export class ProjectController {
if (!editor.dirty.length && (await isUntouched(this.session.id))) return true;
const st = await this.saveState();
if (!st.unsaved && !editor.dirty.length) return true;
- const inEditor = editor.dirty.length ? `Im Editor noch nicht gespeichert: ${editor.dirty.join(', ')}. ` : '';
+ const inEditor = editor.dirty.length ? `Not yet saved in the editor: ${editor.dirty.join(', ')}. ` : '';
const c = await choose(this.getWin(), {
- title: 'SOMA beenden',
- message: 'Das Modell hat ungespeicherte Änderungen.',
- detail: `${inEditor}Der Arbeitsstand bleibt auf diesem Rechner erhalten, die Startseite zeigt ihn unter den zuletzt geöffneten Modellen. Die ZIP-Datei wird nur beim Speichern aktualisiert.`,
- buttons: ['Speichern', 'Nicht speichern', 'Abbrechen'],
+ title: 'Quit SOMA',
+ message: 'The model has unsaved changes.',
+ detail: `${inEditor}Your current work stays on this computer, the start page shows it among the recent models. The ZIP file is only updated when you save.`,
+ buttons: ['Save', 'Don’t save', 'Cancel'],
});
if (c === 2) return false;
if (c === 0) {
@@ -681,8 +681,8 @@ export class ProjectController {
* Modell geht ohne Rückfrage. Das gerade geöffnete Modell nicht (erst ein anderes öffnen).
*/
async remove(id: string): Promise<RemoveResult> {
- if (!isProjectId(id) || !fs.existsSync(projectDir(id))) return { removed: false, error: 'Dieses Modell gibt es auf diesem Rechner nicht mehr.' };
- if (this.session?.id === id) return { removed: false, error: 'Das geöffnete Modell lässt sich nicht entfernen. Öffne zuerst ein anderes.' };
+ if (!isProjectId(id) || !fs.existsSync(projectDir(id))) return { removed: false, error: 'This model no longer exists on this computer.' };
+ if (this.session?.id === id) return { removed: false, error: 'The open model cannot be removed. Open another one first.' };
const dir = projectDir(id);
if (!(await isUntouched(id))) {
const name = readProjectJson(id)?.name ?? id.slice(0, 8);
@@ -691,21 +691,21 @@ export class ProjectController {
const st = (await git.isRepo()) ? await git.status() : null;
const zip = app.zipPath && fs.existsSync(app.zipPath) ? app.zipPath : null;
const inZip = !!zip && !!st && !st.dirty && st.head === (app.savedHead ?? null);
- const where = 'Der Arbeitsordner auf diesem Rechner kommt in den Papierkorb, dort lässt er sich wiederherstellen.';
+ const where = 'The working folder on this computer goes to the Recycle Bin, where it can be restored.';
const c = await choose(this.getWin(), {
- title: 'Modell entfernen',
- message: inZip ? `„${name}“ von diesem Rechner entfernen?` : zip ? `„${name}“ hat Änderungen, die nicht in der ZIP-Datei stehen.` : `„${name}“ wurde nie gespeichert.`,
- detail: inZip ? `${where} Die ZIP-Datei bleibt (${zip}), Öffnen holt das Modell zurück.`
- : zip ? `${where} Die ZIP-Datei (${zip}) bleibt, ihr fehlen die Änderungen seit dem letzten Speichern.`
- : `${where} Wird er dort gelöscht, ist das Modell verloren.`,
- buttons: ['Entfernen', 'Abbrechen'],
+ title: 'Remove model',
+ message: inZip ? `Remove “${name}” from this computer?` : zip ? `“${name}” has changes that are not in the ZIP file.` : `“${name}” was never saved.`,
+ detail: inZip ? `${where} The ZIP file stays (${zip}), opening it brings the model back.`
+ : zip ? `${where} The ZIP file (${zip}) stays, but it lacks the changes since the last save.`
+ : `${where} If it is deleted there, the model is lost.`,
+ buttons: ['Remove', 'Cancel'],
});
if (c !== 0) return { removed: false, cancelled: true };
}
// Ein eben verlassenes Modell hält seine beendete Shell unter Windows noch einige Sekunden fest: mehrere Versuche
for (let attempt = 0; ; attempt++) {
try { await trashItem(dir); break; } catch (e) {
- if (attempt >= 20) return { removed: false, error: `Der Arbeitsordner ließ sich nicht in den Papierkorb verschieben (noch in Benutzung?), es wurde nichts entfernt: ${e instanceof Error ? e.message : String(e)}` };
+ if (attempt >= 20) return { removed: false, error: `Could not move the working folder to the Recycle Bin (still in use?), nothing was removed: ${e instanceof Error ? e.message : String(e)}` };
await new Promise((r) => setTimeout(r, 500));
}
}
diff --git a/app/src/main/render.ts b/app/src/main/render.ts
index 0f2f4b0..fae0b3f 100644
--- a/app/src/main/render.ts
+++ b/app/src/main/render.ts
@@ -30,34 +30,34 @@ const IDLE_MS = 60_000;
export function checkRequest(root: string, raw: unknown): RenderRequest | string {
const r = (raw ?? {}) as Record<string, unknown>;
const kind = r.kind;
- if (kind !== 'still' && kind !== 'sheet' && kind !== 'video') return 'Unbekannte Art (still, sheet oder video).';
+ if (kind !== 'still' && kind !== 'sheet' && kind !== 'video') return 'Unknown kind (still, sheet or video).';
const size = Array.isArray(r.size) ? r.size.map(Number) : [];
- if (size.length !== 2 || !size.every((v) => Number.isInteger(v) && v >= 64 && v <= MAX_SIDE)) return `Größe zwischen 64 und ${MAX_SIDE} Pixeln.`;
+ if (size.length !== 2 || !size.every((v) => Number.isInteger(v) && v >= 64 && v <= MAX_SIDE)) return `Size between 64 and ${MAX_SIDE} pixels.`;
const grid = Array.isArray(r.grid) ? r.grid.map(Number) : [3, 3];
- if (grid.length !== 2 || !grid.every((v) => Number.isInteger(v) && v >= 1 && v <= 6)) return 'Übersicht: 1 bis 6 Spalten und Zeilen.';
+ if (grid.length !== 2 || !grid.every((v) => Number.isInteger(v) && v >= 1 && v <= 6)) return 'Contact sheet: 1 to 6 columns and rows.';
const view = r.view == null ? null : String(r.view);
- if (view && !VIEWS.includes(view)) return `Unbekannte Ansicht ${view}.`;
+ if (view && !VIEWS.includes(view)) return `Unknown view ${view}.`;
const at = r.at == null ? 0 : Number(r.at);
const fps = r.fps == null ? 30 : Number(r.fps);
- if (!Number.isFinite(at) || at < 0) return 'Ungültiger Zeitpunkt.';
- if (!Number.isInteger(fps) || fps < 1 || fps > 60) return 'Bilder je Sekunde zwischen 1 und 60.';
+ if (!Number.isFinite(at) || at < 0) return 'Invalid time.';
+ if (!Number.isInteger(fps) || fps < 1 || fps > 60) return 'Frames per second between 1 and 60.';
const file = (v: unknown, dir: string, what: string): string | null | Error => {
if (v == null) return null;
const p = String(v).replace(/\\/g, '/');
- if (!p.startsWith(dir) || !p.endsWith('.glb') || p.includes('..')) return new Error(`${what} muss in ${dir} liegen.`);
- try { if (!fs.statSync(resolveInside(root, p)).isFile()) throw new Error(); } catch { return new Error(`${what} ${p} gibt es nicht.`); }
+ if (!p.startsWith(dir) || !p.endsWith('.glb') || p.includes('..')) return new Error(`${what} must be in ${dir}.`);
+ try { if (!fs.statSync(resolveInside(root, p)).isFile()) throw new Error(); } catch { return new Error(`${what} ${p} does not exist.`); }
return p;
};
- const anim = file(r.anim, '.soma/anim/', 'Die Animation');
- const result = file(r.result, '.soma/results/', 'Das Ergebnis');
+ const anim = file(r.anim, '.soma/anim/', 'The animation');
+ const result = file(r.result, '.soma/results/', 'The result');
if (anim instanceof Error) return anim.message;
if (result instanceof Error) return result.message;
- if ((kind === 'sheet' || kind === 'video') && !anim) return 'Übersicht und Video brauchen eine Animation.';
+ if ((kind === 'sheet' || kind === 'video') && !anim) return 'Contact sheet and video need an animation.';
const out = String(r.out ?? '').replace(/\\/g, '/');
const ext = kind === 'video' ? '.mp4' : '.png';
- if (!out.toLowerCase().endsWith(ext)) return `Das Ziel muss auf ${ext} enden.`;
- if (/^(\.git|\.soma)(\/|$)/i.test(out) || out.split('/').includes('..') || path.isAbsolute(out)) return 'Das Ziel muss im Projektordner liegen, nicht in .git/ oder .soma/.';
- try { resolveInside(root, out); } catch { return 'Das Ziel liegt nicht im Projektordner.'; }
+ if (!out.toLowerCase().endsWith(ext)) return `The target must end in ${ext}.`;
+ if (/^(\.git|\.soma)(\/|$)/i.test(out) || out.split('/').includes('..') || path.isAbsolute(out)) return 'The target must be in the project folder, not in .git/ or .soma/.';
+ try { resolveInside(root, out); } catch { return 'The target is not in the project folder.'; }
return { kind, size: [size[0], size[1]], view, at, grid: [grid[0], grid[1]], fps, anim, result, out };
}
@@ -92,7 +92,7 @@ export class RenderService {
try {
const read = (rel: string) => { const b = fs.readFileSync(resolveInside(dir, rel)); return b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength) as ArrayBuffer; };
let model: ArrayBuffer;
- try { model = read('.soma/model.glb'); } catch { return { ok: false, files: [], warnings: [], error: 'Noch kein gebautes Modell (soma build).' }; }
+ try { model = read('.soma/model.glb'); } catch { return { ok: false, files: [], warnings: [], error: 'No built model yet (soma build).' }; }
const id = this.nextId++;
const [w, h] = req.kind === 'video' ? [req.size[0] & ~1, req.size[1] & ~1] : req.size; // H.264 braucht gerade Maße
const job: RenderJob = {
@@ -102,11 +102,11 @@ export class RenderService {
const win = await this.window();
const timeoutMs = req.kind === 'video' ? 20 * 60_000 : 2 * 60_000;
const out = await new Promise<RenderOutput>((resolve) => {
- const timer = setTimeout(() => { this.waiting.delete(id); resolve({ ok: false, error: 'Zeitlimit beim Rendern überschritten.' }); }, timeoutMs);
+ const timer = setTimeout(() => { this.waiting.delete(id); resolve({ ok: false, error: 'Time limit exceeded while rendering.' }); }, timeoutMs);
this.waiting.set(id, { resolve: (o) => { clearTimeout(timer); resolve(o); }, progress });
win.webContents.send('render:job', job);
});
- if (!out.ok) return { ok: false, files: [], warnings: out.warnings ?? [], error: out.error ?? 'Rendern fehlgeschlagen.' };
+ if (!out.ok) return { ok: false, files: [], warnings: out.warnings ?? [], error: out.error ?? 'Rendering failed.' };
const files: string[] = [];
const write = (rel: string, data: ArrayBuffer | string) => {
const abs = resolveInside(dir, rel);
@@ -118,13 +118,13 @@ export class RenderService {
files.push(rel);
};
if (req.kind === 'video') {
- if (!out.mp4) return { ok: false, files: [], warnings: [], error: 'Das Video ist leer.' };
+ if (!out.mp4) return { ok: false, files: [], warnings: [], error: 'The video is empty.' };
write(req.out, out.mp4);
const stem = req.out.replace(/\.mp4$/i, '');
if (out.vtt) write(`${stem}.vtt`, out.vtt);
- if (out.sheet) write(`${stem}-uebersicht.png`, out.sheet);
+ if (out.sheet) write(`${stem}-sheet.png`, out.sheet);
} else {
- if (!out.png) return { ok: false, files: [], warnings: [], error: 'Das Bild ist leer.' };
+ if (!out.png) return { ok: false, files: [], warnings: [], error: 'The image is empty.' };
write(req.out, out.png);
}
return { ok: true, files, warnings: out.warnings ?? [] };
@@ -148,15 +148,15 @@ export class RenderService {
this.win = win;
win.webContents.on('console-message', (_e, level, message) => { if (level >= 2) console.error(`[render] ${message}`); });
win.webContents.on('render-process-gone', (_e, d) => {
- console.error(`[soma] Render-Fenster beendet: ${d.reason}`);
- for (const [, w] of this.waiting) w.resolve({ ok: false, error: `Das Render-Fenster ist abgestürzt (${d.reason}).` });
+ console.error(`[soma] Render window ended: ${d.reason}`);
+ for (const [, w] of this.waiting) w.resolve({ ok: false, error: `The render window crashed (${d.reason}).` });
this.waiting.clear();
this.close();
});
this.ready = new Promise<void>((resolve, reject) => {
const onReady = (e: Electron.IpcMainEvent) => { if (e.sender === win.webContents) { ipcMain.removeListener('render:ready', onReady); resolve(); } };
ipcMain.on('render:ready', onReady);
- win.webContents.once('did-fail-load', (_e, code, desc) => { ipcMain.removeListener('render:ready', onReady); reject(new Error(`Render-Fenster lädt nicht: ${desc} (${code})`)); });
+ win.webContents.once('did-fail-load', (_e, code, desc) => { ipcMain.removeListener('render:ready', onReady); reject(new Error(`Render window does not load: ${desc} (${code})`)); });
});
// Lädt es nicht, beim nächsten Auftrag ein neues versuchen statt ewig am alten zu scheitern
this.ready.catch(() => { if (this.win === win) this.close(); });
diff --git a/app/src/main/skills.ts b/app/src/main/skills.ts
index 835e64b..ae32efc 100644
--- a/app/src/main/skills.ts
+++ b/app/src/main/skills.ts
@@ -36,7 +36,7 @@ const PLACEHOLDER = /\{\{\s*([a-z][a-z0-9_]{0,30})\s*\}\}/g;
/** Stufen, in denen ein Skill im Projekt liegt. */
export type OnMode = Exclude<SkillMode, 'off'>;
const ON_MODES: OnMode[] = ['always', 'demand'];
-const MODE_LABEL: Record<SkillMode, string> = { off: 'Aus', demand: 'Bei Bedarf', always: 'Immer' };
+const MODE_LABEL: Record<SkillMode, string> = { off: 'Off', demand: 'On demand', always: 'Always' };
/**
* Stufen eines Modells laut project.json: `skills` (Immer, so hieß die Liste schon vor E55) und `skills_on_demand`
@@ -147,12 +147,12 @@ function sortSkills<T extends { category: string; order: number; title: string }
const first = new Map<string, number>();
for (const s of list) if (s.category) first.set(s.category, Math.min(first.get(s.category) ?? Infinity, s.order));
const rank = (s: T) => (s.category ? first.get(s.category)! : Infinity);
- return [...list].sort((a, b) => rank(a) - rank(b) || a.category.localeCompare(b.category, 'de') || a.order - b.order || a.title.localeCompare(b.title, 'de'));
+ return [...list].sort((a, b) => rank(a) - rank(b) || a.category.localeCompare(b.category, 'en') || a.order - b.order || a.title.localeCompare(b.title, 'en'));
}
/** Zahl für den Agenten: Punkt als Dezimalzeichen, ohne Rundungsreste. */
const agentNum = (v: number) => String(+v.toFixed(6));
-const showNum = (v: number) => v.toLocaleString('de-DE', { maximumFractionDigits: 6 });
+const showNum = (v: number) => v.toLocaleString('en-US', { maximumFractionDigits: 6, useGrouping: false });
/**
* Prüft einen Wert gegen seine Variable. Zahlen dürfen als Text mit Komma kommen. Rückgabe: der saubere Wert oder ein
@@ -161,14 +161,15 @@ const showNum = (v: number) => v.toLocaleString('de-DE', { maximumFractionDigits
export function checkValue(v: VarDef, input: unknown): { value: SkillValue } | { error: string } {
if (v.kind === 'choice') {
const s = typeof input === 'string' ? input.trim() : '';
- return v.options!.some((o) => o.value === s) ? { value: s } : { error: `${v.label}: „${String(input)}“ steht nicht zur Auswahl.` };
+ return v.options!.some((o) => o.value === s) ? { value: s } : { error: `${v.label}: “${String(input)}” is not one of the choices.` };
}
const n = typeof input === 'number' ? input : typeof input === 'string' ? Number(input.trim().replace('−', '-').replace(',', '.')) : NaN;
- if (typeof input === 'string' && !input.trim()) return { error: `${v.label}: Bitte eine Zahl eingeben.` };
- if (!Number.isFinite(n)) return { error: `${v.label}: „${String(input)}“ ist keine Zahl.` };
+ if (typeof input === 'string' && !input.trim()) return { error: `${v.label}: please enter a number.` };
+ if (!Number.isFinite(n)) return { error: `${v.label}: “${String(input)}” is not a number.` };
const unit = v.unit ? (v.unit === '°' ? '°' : ` ${v.unit}`) : '';
if ((v.min != null && n < v.min) || (v.max != null && n > v.max)) {
- return { error: `${v.label}: erlaubt sind ${showNum(v.min ?? -Infinity)} bis ${showNum(v.max ?? Infinity)}${unit}.` };
+ const range = v.min != null && v.max != null ? `between ${showNum(v.min)} and ${showNum(v.max)}` : v.min != null ? `at least ${showNum(v.min)}` : `at most ${showNum(v.max!)}`;
+ return { error: `${v.label}: must be ${range}${unit}.` };
}
return { value: +n.toFixed(6) };
}
@@ -208,7 +209,7 @@ function demandNote(vars: VarDef[], values: SkillValues): string {
: '> The values in this file are defaults of the app, the user has not',
'> chosen them: say which ones you rely on, or ask when one matters.');
}
- lines.push('> In the app, the user can switch this skill to "Immer" (always) and change its settings.');
+ lines.push('> In the app, the user can switch this skill to "Always" and change its settings.');
return lines.join('\n');
}
@@ -329,15 +330,15 @@ export function listSkills(root: string, bundledDir: string, modes: SkillModes |
problems: [],
};
const rel = relOf(id);
- if (mode !== 'off' && copy == null) info.problems.push(`Steht auf „${MODE_LABEL[mode]}“, aber ${rel} fehlt oder ist unlesbar. Der Agent findet die Regeln nicht.`);
- if (mode === 'off' && copy != null) info.problems.push(`Aus, aber ${rel} liegt noch im Projekt.`);
+ if (mode !== 'off' && copy == null) info.problems.push(`Set to “${MODE_LABEL[mode]}”, but ${rel} is missing or unreadable. The agent does not find the rules.`);
+ if (mode === 'off' && copy != null) info.problems.push(`Off, but ${rel} is still in the project.`);
if (mode !== 'off' && agents != null && !agents[mode].includes(rel)) {
const other: OnMode = mode === 'always' ? 'demand' : 'always';
info.problems.push(agents[other].includes(rel)
- ? `AGENTS.md führt diesen Skill unter „${MODE_LABEL[other]}“, eingestellt ist „${MODE_LABEL[mode]}“.`
- : 'AGENTS.md nennt diesen Skill nicht. Ein Agent erfährt nichts davon.');
+ ? `AGENTS.md lists this skill under “${MODE_LABEL[other]}”, but it is set to “${MODE_LABEL[mode]}”.`
+ : 'AGENTS.md does not name this skill. An agent learns nothing about it.');
}
- if (!b && mode !== 'off') info.problems.push('Diese App bringt den Skill nicht mit. Die Kopie im Projekt gilt weiter.');
+ if (!b && mode !== 'off') info.problems.push('This app does not include the skill. The copy in the project still applies.');
return info;
});
return sortSkills(out);
@@ -366,7 +367,7 @@ export function applyDefaultSkills(root: string, bundledDir: string, backupDir:
const done: SkillModes = { always: [], demand: [] };
for (const mode of ON_MODES) {
for (const id of want[mode]) {
- try { copySkill(root, bundledDir, id, backupDir, {}, mode); done[mode].push(id); } catch (e) { console.error(`[soma] Skill „${id}“ ließ sich nicht einschalten:`, e); }
+ try { copySkill(root, bundledDir, id, backupDir, {}, mode); done[mode].push(id); } catch (e) { console.error(`[soma] Could not switch on skill “${id}”:`, e); }
}
}
if (done.always.length || done.demand.length) {
@@ -374,7 +375,7 @@ export function applyDefaultSkills(root: string, bundledDir: string, backupDir:
try {
const warning = writeAgentsList(root, agentsEntries(root, bundledDir, done));
if (warning) console.error('[soma]', warning);
- } catch (e) { console.error('[soma] AGENTS.md ließ sich nicht schreiben:', e); }
+ } catch (e) { console.error('[soma] Could not write AGENTS.md:', e); }
}
return done;
}
@@ -404,7 +405,7 @@ export function copySkill(root: string, bundledDir: string, id: string, backupDi
const old = projectCopy(root, id);
if (!b) {
// Nicht mitgeliefert: Nur einschalten, was schon im Projekt liegt
- if (old == null) throw new Error(`Den Skill „${id}“ gibt es in dieser App nicht.`);
+ if (old == null) throw new Error(`The skill “${id}” does not exist in this app.`);
return null;
}
const next = renderSkill(b.text, values, mode);
@@ -484,7 +485,7 @@ export function agentsEntries(root: string, bundledDir: string, modes: SkillMode
export function writeAgentsList(root: string, entries: AgentsEntry[]): string | null {
const file = path.join(root, 'AGENTS.md');
const cur = agentsText(root);
- if (cur == null) return 'AGENTS.md fehlt. Der Skill liegt im Projekt, ein Agent erfährt aber nichts davon.';
+ if (cur == null) return 'AGENTS.md is missing. The skill is in the project, but an agent learns nothing about it.';
const eol = cur.includes('\r\n') ? '\r\n' : '\n';
const block = skillsBlock(entries).replace(/\n/g, eol);
const a = cur.indexOf(BEGIN), z = cur.indexOf(END);
diff --git a/app/src/main/workspace.ts b/app/src/main/workspace.ts
index eacabd5..7838860 100644
--- a/app/src/main/workspace.ts
+++ b/app/src/main/workspace.ts
@@ -45,7 +45,7 @@ const writeJson = (file: string, value: unknown) => {
export const isProjectId = (id: string) => UUID.test(id);
export function projectDir(id: string): string {
- if (!isProjectId(id)) throw new Error(`Ungültige Projekt-ID: ${id}`);
+ if (!isProjectId(id)) throw new Error(`Invalid project ID: ${id}`);
return path.join(workspacesDir(), id);
}
@@ -53,7 +53,7 @@ const stateFile = (id: string) => path.join(projectStateDir(), `${id}.json`);
export const readProjectJson = (id: string) => readJson<ProjectJson>(path.join(projectDir(id), '.soma', 'project.json'));
/** Neues Projekt: UUID-Ordner in den App-Daten (E21), Vorlage kopieren, Zustand doppelt ablegen (E27), Git-Verlauf anlegen (E7). */
-export async function createProject(name = 'Neues Modell'): Promise<{ id: string; dir: string }> {
+export async function createProject(name = 'New model'): Promise<{ id: string; dir: string }> {
const id = randomUUID();
const dir = projectDir(id);
fs.mkdirSync(dir, { recursive: true });
@@ -68,10 +68,10 @@ export async function createProject(name = 'Neues Modell'): Promise<{ id: string
// und lässt sich im Verlauf als Vorschau öffnen. Scheitert der Build, geht das Anlegen trotzdem weiter.
await runSoma(['build', '--project', dir], dir, 90000);
try {
- await new GitRepo(dir).init('Neues Modell angelegt');
+ await new GitRepo(dir).init('New model created');
} catch (e) {
// Ohne Git bleibt das Projekt benutzbar. Der Verlauf meldet den Grund (Projekt-Check), statt das Anlegen scheitern zu lassen.
- console.error('[soma] Git-Verlauf konnte nicht angelegt werden:', e);
+ console.error('[soma] Could not create the Git history:', e);
}
setLastProject(id);
return { id, dir };
@@ -124,7 +124,7 @@ export function readSkillModes(id: string): SkillModes | null {
export function updateProjectSkills(id: string, patch: { modes?: SkillModes; skill_settings?: ProjectJson['skill_settings'] }): void {
const file = path.join(projectDir(id), '.soma', 'project.json');
const pj = readJson<ProjectJson>(file);
- if (!pj) throw new Error('.soma/project.json fehlt oder ist unlesbar. Ohne sie lässt sich kein Skill eintragen.');
+ if (!pj) throw new Error('.soma/project.json is missing or unreadable. Without it no skill can be recorded.');
// Leere Einstellungen fallen weg, damit project.json ohne Änderung auch gleich bleibt
const settings = Object.fromEntries(Object.entries(patch.skill_settings ?? pj.skill_settings ?? {}).filter(([, v]) => v && Object.keys(v).length));
// `skills` bleibt auch leer stehen (wie bisher), `skills_on_demand` nur, wenn es welche gibt
@@ -145,27 +145,27 @@ export function updateProjectSkills(id: string, patch: { modes?: SkillModes; ski
export function inspectProject(id: string): { name: string; problems: string[] } {
const dir = projectDir(id);
const problems: string[] = [];
- if (!fs.existsSync(dir)) return { name: id, problems: ['Der Arbeitsordner existiert nicht.'] };
+ if (!fs.existsSync(dir)) return { name: id, problems: ['The working folder does not exist.'] };
const pj = readJson<ProjectJson>(path.join(dir, '.soma', 'project.json'));
const backup = readJson<ProjectState>(stateFile(id));
if (!pj) {
problems.push(backup
- ? '.soma/project.json fehlt oder ist unlesbar. Eine Kopie liegt in den App-Daten (nicht automatisch wiederhergestellt).'
- : '.soma/project.json fehlt oder ist unlesbar, und es gibt keine Kopie.');
+ ? '.soma/project.json is missing or unreadable. A copy is in the app data (not restored automatically).'
+ : '.soma/project.json is missing or unreadable, and there is no copy.');
} else if (pj.id !== id) {
- problems.push('Die ID in .soma/project.json passt nicht zum Arbeitsordner.');
+ problems.push('The ID in .soma/project.json does not match the working folder.');
} else if (pj.api_version > API_VERSION) {
- problems.push(`Das Projekt nutzt api_version ${pj.api_version}, diese App kennt nur ${API_VERSION}.`);
+ problems.push(`The project uses api_version ${pj.api_version}, this app only knows ${API_VERSION}.`);
} else if (isNewerVersion(pj.app_version)) {
- problems.push(`Das Modell wurde zuletzt mit SOMA ${pj.app_version} gespeichert, diese App ist ${SOMA_VERSION}. Neuere Funktionen fehlen hier vielleicht.`);
+ problems.push(`The model was last saved with SOMA ${pj.app_version}, this app is ${SOMA_VERSION}. Newer features may be missing here.`);
}
const entry = pj?.entry ?? 'model.py';
- if (!fs.existsSync(path.join(dir, entry))) problems.push(`Einstiegspunkt ${entry} fehlt.`);
+ if (!fs.existsSync(path.join(dir, entry))) problems.push(`Entry point ${entry} is missing.`);
for (const s of [pj?.skills, pj?.skills_on_demand].flatMap((x) => (Array.isArray(x) ? x : [])).filter(isSkillId)) {
- if (!fs.existsSync(path.join(dir, SKILLS_DIR, `${s}.md`))) problems.push(`Der Skill „${s}“ ist eingeschaltet, aber ${SKILLS_DIR}/${s}.md fehlt.`);
+ if (!fs.existsSync(path.join(dir, SKILLS_DIR, `${s}.md`))) problems.push(`The skill “${s}” is switched on, but ${SKILLS_DIR}/${s}.md is missing.`);
}
for (const bad of ['.venv', 'venv', 'env']) {
- if (fs.existsSync(path.join(dir, bad, 'pyvenv.cfg'))) problems.push(`Im Projekt liegt eine eigene Python-Umgebung (${bad}/). Sie wird ignoriert und nicht in die ZIP gepackt.`);
+ if (fs.existsSync(path.join(dir, bad, 'pyvenv.cfg'))) problems.push(`The project contains its own Python environment (${bad}/). It is ignored and not packed into the ZIP.`);
}
return { name: pj?.name ?? backup?.name ?? id, problems };
}
@@ -231,7 +231,7 @@ export async function backupWorkspace(id: string): Promise<string> {
try { fs.renameSync(src, dst); return dst; } catch (e) {
const code = (e as NodeJS.ErrnoException).code ?? '';
if (!['EPERM', 'EBUSY', 'EACCES'].includes(code) || attempt >= 20) {
- throw new Error('Der Arbeitsordner ist noch in Benutzung (ein Terminal oder Programm liegt darin). Schließe es und versuche es erneut.');
+ throw new Error('The working folder is still in use (a terminal or program is open in it). Close it and try again.');
}
await new Promise((r) => setTimeout(r, 300));
}
@@ -309,7 +309,7 @@ export function sweepDiscarded(): void {
/** Entpackt eine ZIP als Arbeitsordner `id`. Erst in einen Temp-Ordner, dann umbenennen: nie ein halb entpacktes Projekt. */
export async function extractProject(zipPath: string, id: string): Promise<string> {
const dst = projectDir(id);
- if (fs.existsSync(dst)) throw new Error('Der Arbeitsordner existiert schon (erst sichern).');
+ if (fs.existsSync(dst)) throw new Error('The working folder already exists (back it up first).');
const tmp = path.join(workspacesDir(), `.tmp-${randomUUID()}`);
try {
await extractZip(zipPath, tmp);
diff --git a/app/src/main/zip.ts b/app/src/main/zip.ts
index ea8e88d..787a21a 100644
--- a/app/src/main/zip.ts
+++ b/app/src/main/zip.ts
@@ -57,7 +57,7 @@ export async function saveProjectZip(dir: string, zipPath: string, info: ZipInfo
function openZip(zipPath: string): Promise<yauzl.ZipFile> {
return new Promise((resolve, reject) => {
- yauzl.open(zipPath, { lazyEntries: true, autoClose: true }, (err, z) => (err || !z ? reject(err ?? new Error('ZIP nicht lesbar')) : resolve(z)));
+ yauzl.open(zipPath, { lazyEntries: true, autoClose: true }, (err, z) => (err || !z ? reject(err ?? new Error('ZIP not readable')) : resolve(z)));
});
}
@@ -77,7 +77,7 @@ export async function readZipTexts(zipPath: string, names: string[]): Promise<Re
zip.on('entry', (entry: yauzl.Entry) => {
if (!names.includes(entry.fileName) || entry.uncompressedSize > 5 * 1024 * 1024) { zip.readEntry(); return; }
zip.openReadStream(entry, (err, stream) => {
- if (err || !stream) { reject(err ?? new Error('Eintrag nicht lesbar')); return; }
+ if (err || !stream) { reject(err ?? new Error('Entry not readable')); return; }
const chunks: Buffer[] = [];
stream.on('data', (c: Buffer) => chunks.push(c));
stream.on('end', () => { found[entry.fileName] = Buffer.concat(chunks).toString('utf8'); zip.readEntry(); });
@@ -99,14 +99,14 @@ export async function extractZip(zipPath: string, dest: string): Promise<number>
zip.on('end', () => resolve(count));
zip.on('entry', (entry: yauzl.Entry) => {
total += entry.uncompressedSize;
- if (total > MAX_UNPACKED) { reject(new Error('Die ZIP ist entpackt größer als 2 GB und wird nicht geöffnet.')); zip.close(); return; }
- if (!isSafeEntryName(entry.fileName)) { reject(new Error(`Unsicherer Pfad in der ZIP: ${entry.fileName}`)); zip.close(); return; }
+ if (total > MAX_UNPACKED) { reject(new Error('Unpacked, the ZIP is larger than 2 GB and will not be opened.')); zip.close(); return; }
+ if (!isSafeEntryName(entry.fileName)) { reject(new Error(`Unsafe path in the ZIP: ${entry.fileName}`)); zip.close(); return; }
const target = path.resolve(root, entry.fileName);
- if (target !== root && !target.startsWith(root + path.sep)) { reject(new Error(`Unsicherer Pfad in der ZIP: ${entry.fileName}`)); zip.close(); return; }
+ if (target !== root && !target.startsWith(root + path.sep)) { reject(new Error(`Unsafe path in the ZIP: ${entry.fileName}`)); zip.close(); return; }
if (entry.fileName.endsWith('/')) { fs.mkdirSync(target, { recursive: true }); zip.readEntry(); return; }
fs.mkdirSync(path.dirname(target), { recursive: true });
zip.openReadStream(entry, (err, stream) => {
- if (err || !stream) { reject(err ?? new Error('Eintrag nicht lesbar')); return; }
+ if (err || !stream) { reject(err ?? new Error('Entry not readable')); return; }
pipeline(stream, fs.createWriteStream(target)).then(() => { count++; zip.readEntry(); }, reject);
});
});
diff --git a/app/src/renderer/animdata.ts b/app/src/renderer/animdata.ts
index d0cb083..bfb4934 100644
--- a/app/src/renderer/animdata.ts
+++ b/app/src/renderer/animdata.ts
@@ -43,9 +43,9 @@ export class AnimData {
static async parse(glb: ArrayBuffer): Promise<AnimData> {
const gltf = await new GLTFLoader().parseAsync(glb, '');
const meta = (gltf.parser.json as { extras?: { soma_animation?: AnimMeta } }).extras?.soma_animation;
- if (!meta || meta.version !== 1) throw new Error('Keine Animation von soma (extras.soma_animation fehlt)');
+ if (!meta || meta.version !== 1) throw new Error('Not an animation from soma (extras.soma_animation is missing)');
const clip = gltf.animations[0];
- if (!clip) throw new Error('Die Datei enthält keine Bewegung');
+ if (!clip) throw new Error('The file contains no motion');
// three.js benennt Knoten um (ohne Punkte, Doppelpunkte, Leerzeichen): Die Spuren heißen wie der Knoten, der echte
// Bauteilname steht in seinen extras
const byNode = new Map<string, { part?: string; camera?: boolean; target?: boolean }>();
@@ -78,7 +78,7 @@ export class AnimData {
}
}
for (const [name, e] of pending) if (e.pos && e.rot) tracks.set(name, { pos: e.pos, rot: e.rot });
- if (!cam.pos || !cam.target) throw new Error('Die Animation hat keine Kamera');
+ if (!cam.pos || !cam.target) throw new Error('The animation has no camera');
return new AnimData(meta, tracks, { pos: cam.pos, target: cam.target });
}
diff --git a/app/src/renderer/animtool.ts b/app/src/renderer/animtool.ts
index 089f7fc..50404fe 100644
--- a/app/src/renderer/animtool.ts
+++ b/app/src/renderer/animtool.ts
@@ -109,7 +109,7 @@ export class AnimTool {
try { this.list = await this.d.list(); } catch { return; }
if (seq !== this.loading || !this.active) return;
const anims = this.list.animations;
- this.ui.select.replaceChildren(...anims.map((a) => el('option', { value: a.id, textContent: `${a.name} (${a.duration.toFixed(1).replace('.', ',')} s)` })));
+ this.ui.select.replaceChildren(...anims.map((a) => el('option', { value: a.id, textContent: `${a.name} (${a.duration.toFixed(1)} s)` })));
this.ui.select.disabled = anims.length < 2;
const want = anims.find((a) => a.id === (this.want ?? this.current?.entry.id)) ?? anims[0];
this.want = null;
@@ -158,7 +158,7 @@ export class AnimTool {
this.d.changed();
} catch (e) {
this.current = null;
- this.d.toast(`Die Animation ließ sich nicht laden: ${e instanceof Error ? e.message : String(e)}`, 'error');
+ this.d.toast(`Could not load the animation: ${e instanceof Error ? e.message : String(e)}`, 'error');
}
}
@@ -195,7 +195,7 @@ export class AnimTool {
if (this.follow) this.d.viewer.setCamera(f.camera.position, f.camera.target);
this.paintTexts(f);
this.ui.range.value = String(this.t);
- this.ui.time.textContent = `${this.t.toFixed(2).replace('.', ',')} / ${c.data.duration.toFixed(2).replace('.', ',')} s`;
+ this.ui.time.textContent = `${this.t.toFixed(2)} / ${c.data.duration.toFixed(2)} s`;
}
/** Titel, Untertitel und Beschriftungen über das Bild, ausgeschaltet gar nichts (auch nicht im Bild für die Markierung). */
@@ -239,8 +239,8 @@ export class AnimTool {
private renderPlay(): void {
this.ui.play.replaceChildren(icon(this.playing ? 'pause' : 'play', 16, 2));
- this.ui.play.setAttribute('aria-label', this.playing ? 'Anhalten' : 'Abspielen');
- this.ui.play.title = this.playing ? 'Anhalten (Leertaste)' : 'Abspielen (Leertaste)';
+ this.ui.play.setAttribute('aria-label', this.playing ? 'Pause' : 'Play');
+ this.ui.play.title = this.playing ? 'Pause (Space)' : 'Play (Space)';
}
private render(): void {
@@ -252,11 +252,11 @@ export class AnimTool {
this.ui.video.disabled = !has || this.rendering;
hint.classList.toggle('warn', !!err || !!c?.entry.stale);
if (this.rendering) return;
- if (err) hint.textContent = `${err.file}${err.line ? `, Zeile ${err.line}` : ''}: ${err.message}`;
- else if (this.list.building) hint.textContent = 'Animation wird gebaut …';
- else if (c?.entry.stale) hint.textContent = 'Älter als der Code, wird neu gebaut …';
- else if (c) hint.textContent = `${c.entry.file}, Zeile ${c.entry.line ?? 1} · ${c.entry.parts} bewegte${c.entry.parts === 1 ? 's' : ''} Bauteil${c.entry.parts === 1 ? '' : 'e'}`;
- else hint.textContent = 'Noch keine Animation. Der Agent legt sie in animations/ an (Skill „Animation und Video“).';
+ if (err) hint.textContent = `${err.file}${err.line ? `, line ${err.line}` : ''}: ${err.message}`;
+ else if (this.list.building) hint.textContent = 'Building the animation …';
+ else if (c?.entry.stale) hint.textContent = 'Older than the code, rebuilding …';
+ else if (c) hint.textContent = `${c.entry.file}, line ${c.entry.line ?? 1} · ${c.entry.parts} moving part${c.entry.parts === 1 ? '' : 's'}`;
+ else hint.textContent = 'No animation yet. The agent creates them in animations/ (skill “Animation and video”).';
if (!has) this.ui.time.textContent = '';
}
@@ -264,7 +264,7 @@ export class AnimTool {
progress(f: number): void {
if (!this.rendering) return;
this.ui.hint.classList.remove('warn');
- this.ui.hint.textContent = `Video wird erzeugt … ${Math.round(f * 100)} %`;
+ this.ui.hint.textContent = `Making the video … ${Math.round(f * 100)} %`;
}
private async makeVideo(): Promise<void> {
@@ -276,9 +276,9 @@ export class AnimTool {
this.progress(0);
try {
const r = await this.d.renderVideo(c.entry.id);
- if (!r.ok) { this.d.toast(`Das Video ließ sich nicht erzeugen: ${r.error ?? 'unbekannter Fehler'}`, 'error'); return; }
+ if (!r.ok) { this.d.toast(`Could not make the video: ${r.error ?? 'unknown error'}`, 'error'); return; }
const mp4 = r.files.find((f) => f.endsWith('.mp4'));
- this.d.toast(`Video erzeugt: ${mp4}${r.warnings.length ? `\n${r.warnings.join('\n')}` : ''}`, r.warnings.length ? 'info' : 'ok');
+ this.d.toast(`Video created: ${mp4}${r.warnings.length ? `\n${r.warnings.join('\n')}` : ''}`, r.warnings.length ? 'info' : 'ok');
if (mp4) this.d.showVideo(mp4);
} finally {
this.rendering = false;
@@ -290,12 +290,12 @@ export class AnimTool {
agentText(): string | null {
if (!this.active || !this.current) return null;
// Ausgeblendete Texte fehlen auch im Bild: Sonst sucht der Agent einen Untertitel, den er selbst angelegt hat, vergeblich
- return `Animation „${this.current.entry.name}“ bei ${this.t.toFixed(2)} s${this.texts ? '' : ' (ohne Titel, Untertitel und Beschriftungen)'}`;
+ return `animation "${this.current.entry.name}" at ${this.t.toFixed(2)} s${this.texts ? '' : ' (without titles, captions and labels)'}`;
}
private agentNote(): string | null {
const c = this.current;
- return c ? `[Animation: "${c.entry.name}" (${c.entry.file}) bei ${this.t.toFixed(2)} s] ` : null;
+ return c ? `[Animation: "${c.entry.name}" (${c.entry.file}) at ${this.t.toFixed(2)} s] ` : null;
}
/** Prüfhilfe: Zustand der Karte. */
diff --git a/app/src/renderer/code.ts b/app/src/renderer/code.ts
index bcd6e6b..5e7d78b 100644
--- a/app/src/renderer/code.ts
+++ b/app/src/renderer/code.ts
@@ -150,13 +150,6 @@ const HIGHLIGHT = HighlightStyle.define([
{ tag: [t.quote, t.processingInstruction, t.contentSeparator, t.meta], class: 'k-cm' },
]);
-const PHRASES = {
- 'Find': 'Suchen', 'Replace': 'Ersetzen', 'next': 'weiter', 'previous': 'zurück', 'all': 'alle', 'match case': 'Groß/klein',
- 'by word': 'ganzes Wort', 'regexp': 'Regex', 'replace': 'ersetzen', 'replace all': 'alle ersetzen', 'close': 'schließen',
- 'current match': 'aktueller Treffer', 'on line': 'in Zeile', 'replaced match on line $': 'Treffer in Zeile $ ersetzt',
- 'replaced $ matches': '$ Treffer ersetzt', 'Go to line': 'Gehe zu Zeile', 'go': 'los', 'Control character': 'Steuerzeichen',
-};
-
const errText = (e: unknown) => (e instanceof Error ? e.message : String(e));
/**
@@ -189,7 +182,7 @@ export class CodePanel {
ui.link.setAttribute('aria-pressed', String(this.linked));
});
this.view = new EditorView({ parent: ui.view, state: EditorState.create({ doc: '' }) });
- this.empty = el('div', { className: 'hint', textContent: 'Keine Datei geöffnet. Klick auf ein Bauteil oder links unter „Dateien“ auf eine Datei.' });
+ this.empty = el('div', { className: 'hint', textContent: 'No file open. Click a part, or a file under “Files” on the left.' });
this.md = el('div', { className: 'mdview', tabIndex: -1 });
this.md.hidden = true;
ui.view.append(this.empty, this.md);
@@ -197,7 +190,7 @@ export class CodePanel {
const m = (e.target as HTMLElement).closest<HTMLElement>('[data-mode]')?.dataset.mode;
if (m) this.setPreview(m === 'view');
});
- this.saveBtn = el('button', { id: 'btn-code-save', className: 'btn sm acc', textContent: 'Speichern und bauen', title: 'Geänderte Dateien speichern und das Modell bauen (Strg+S im Editor). Die ZIP-Datei schreibt „Speichern“ oben.' });
+ this.saveBtn = el('button', { id: 'btn-code-save', className: 'btn sm acc', textContent: 'Save and build', title: 'Save the changed files and build the model (Ctrl+S in the editor). “Save” at the top writes the ZIP file.' });
this.saveBtn.addEventListener('click', () => deps.saveAndBuild());
this.renderChrome();
}
@@ -329,10 +322,10 @@ export class CodePanel {
p = (async () => {
if (isPdf(file)) return this.loadPdf(file);
let text: string;
- try { text = await this.deps.read(file); } catch (e) { this.deps.toast(`${file} lässt sich nicht lesen: ${errText(e)}`, 'error'); return null; }
+ try { text = await this.deps.read(file); } catch (e) { this.deps.toast(`${file} cannot be read: ${errText(e)}`, 'error'); return null; }
const locked = readOnlyReason(file)
- ?? (text.length > MAX_EDIT_CHARS ? 'Zu groß zum Bearbeiten (über 2 MB).' : null)
- ?? (text.includes('\uFFFD') ? 'Nicht als UTF-8 lesbar. Bearbeiten würde die Datei beschädigen.' : null);
+ ?? (text.length > MAX_EDIT_CHARS ? 'Too large to edit (over 2 MB).' : null)
+ ?? (text.includes('\uFFFD') ? 'Not readable as UTF-8. Editing would damage the file.' : null);
const d: Doc = { file, base: text, eol: text.includes('\r\n') ? '\r\n' : '\n', locked, dirty: false, writing: false, queue: Promise.resolve(), conflict: null, mark: null, scrollTop: 0,
preview: isMarkdown(file), previewScroll: 0, state: null! };
d.state = EditorState.create({ doc: text, extensions: this.extensions(d) });
@@ -346,7 +339,7 @@ export class CodePanel {
private async loadPdf(file: string): Promise<Doc | null> {
let data: ArrayBuffer;
- try { data = await this.deps.readBinary(file); } catch (e) { this.deps.toast(`${file} lässt sich nicht lesen: ${errText(e)}`, 'error'); return null; }
+ try { data = await this.deps.readBinary(file); } catch (e) { this.deps.toast(`${file} cannot be read: ${errText(e)}`, 'error'); return null; }
const pdf = new PdfView(file, this.deps);
pdf.root.hidden = true;
this.ui.view.append(pdf.root);
@@ -370,7 +363,7 @@ export class CodePanel {
lineNumbers(), highlightActiveLineGutter(), highlightSpecialChars(), history(), drawSelection(), indentOnInput(),
syntaxHighlighting(HIGHLIGHT), bracketMatching(), closeBrackets(), highlightActiveLine(), highlightSelectionMatches(), search({ top: false }),
py ? [python(), constants] : isMarkdown(d.file) ? [markdown(), EditorView.lineWrapping] : [],
- indentUnit.of(' '), EditorState.tabSize.of(4), EditorState.phrases.of(PHRASES), EditorState.readOnly.of(!!d.locked),
+ indentUnit.of(' '), EditorState.tabSize.of(4), EditorState.readOnly.of(!!d.locked),
keymap.of([...closeBracketsKeymap, ...defaultKeymap, ...searchKeymap, ...historyKeymap, indentWithTab]),
markField,
EditorView.updateListener.of((u) => this.onUpdate(d, u)),
@@ -418,9 +411,9 @@ export class CodePanel {
if (!d) return;
if (d.dirty || d.conflict) {
const c = await this.deps.ask({
- title: 'Datei schließen', message: `${file} hat ungespeicherte Änderungen.`,
- detail: d.conflict ? 'Die Datei wurde außerdem außerhalb geändert. Verwerfen legt deine Fassung als Sicherung ab.' : 'Verwerfen legt deine Fassung als Sicherung ab.',
- buttons: d.conflict ? ['Verwerfen', 'Abbrechen'] : ['Speichern', 'Verwerfen', 'Abbrechen'],
+ title: 'Close file', message: `${file} has unsaved changes.`,
+ detail: d.conflict ? 'The file was also changed outside the editor. Discard keeps your version as a backup.' : 'Discard keeps your version as a backup.',
+ buttons: d.conflict ? ['Discard', 'Cancel'] : ['Save', 'Discard', 'Cancel'],
});
const choice = d.conflict ? (c === 0 ? 'discard' : 'cancel') : c === 0 ? 'save' : c === 1 ? 'discard' : 'cancel';
if (choice === 'cancel') return;
@@ -467,10 +460,10 @@ export class CodePanel {
d.base = text;
d.conflict = null;
d.dirty = this.textOf(d) !== text; // während des Schreibens weitergetippt: bleibt ungespeichert
- if (r.backup) this.deps.toast(`${d.file} gespeichert. Die Fassung von außen liegt als Sicherung unter ${r.backup}`, 'info');
+ if (r.backup) this.deps.toast(`${d.file} saved. The outside version is kept as a backup at ${r.backup}`, 'info');
} else if (r.conflict) {
d.conflict = { disk: r.disk ?? null };
- } else this.deps.toast(`${d.file} ließ sich nicht speichern: ${r.error}`, 'error');
+ } else this.deps.toast(`${d.file} could not be saved: ${r.error}`, 'error');
this.renderChrome();
this.deps.changed();
// Eine Änderung von außen kann während des Schreibens gekommen sein, ihr Ereignis wurde dann übersprungen
@@ -484,10 +477,10 @@ export class CodePanel {
if (!id) return false;
try {
const b = await window.soma.fs.backupText(id, d.file, this.textOf(d));
- this.deps.toast(`Deine Fassung von ${d.file} liegt als Sicherung unter ${b}`, 'info');
+ this.deps.toast(`Your version of ${d.file} is kept as a backup at ${b}`, 'info');
return true;
} catch (e) {
- this.deps.toast(`${d.file} ließ sich nicht sichern, es wird nichts verworfen: ${errText(e)}`, 'error');
+ this.deps.toast(`${d.file} could not be backed up, nothing is discarded: ${errText(e)}`, 'error');
return false;
}
}
@@ -535,11 +528,11 @@ export class CodePanel {
const { tabs, info, banner } = this.ui;
this.deps.active?.(this.active);
tabs.replaceChildren(...[...this.docs.values()].map((d) => {
- const x = el('button', { className: 'x', title: `${d.file} schließen` }, icon('x', 11, 2.2));
- x.setAttribute('aria-label', `${d.file} schließen`);
+ const x = el('button', { className: 'x', title: `Close ${d.file}` }, icon('x', 11, 2.2));
+ x.setAttribute('aria-label', `Close ${d.file}`);
x.addEventListener('click', (e) => { e.stopPropagation(); void this.close(d.file); });
- const state = d.conflict ? el('span', { className: 'dirty warn', textContent: '●', title: 'Konflikt mit einer Änderung von außen' })
- : d.dirty ? el('span', { className: 'dirty', textContent: '●', title: 'Nicht gespeichert' }) : null;
+ const state = d.conflict ? el('span', { className: 'dirty warn', textContent: '●', title: 'Conflict with a change from outside' })
+ : d.dirty ? el('span', { className: 'dirty', textContent: '●', title: 'Not saved' }) : null;
const tab = el('div', { className: 'ctab' + (d.file === this.active ? ' on' : ''), title: d.file }, el('span', { textContent: d.file.split('/').pop()! }), state, x);
tab.addEventListener('click', () => { this.activate(d); this.renderChrome(); });
return tab;
@@ -558,18 +551,18 @@ export class CodePanel {
const m = d.pdf ? null : d.mark;
const left: (Node | string)[] = [];
if (d.pdf) { /* PDF: eigene Leiste in der Ansicht */ }
- else if (d.locked) left.push(icon('lock', 13, 2), `Nur lesen. ${d.locked}`);
+ else if (d.locked) left.push(icon('lock', 13, 2), `Read only. ${d.locked}`);
else if (m) {
const sw = m.kind === 'er' ? el('span', { className: 'ci-err' }, icon('alert', 13, 2)) : el('span', { className: 'sw' });
if (m.color) sw.style.background = m.color;
- left.push(sw, `${m.label} · Zeile ${m.from}${m.to !== m.from ? '–' + m.to : ''}`);
+ left.push(sw, `${m.label} · ${m.to !== m.from ? 'lines' : 'line'} ${m.from}${m.to !== m.from ? '–' + m.to : ''}`);
}
// Ungespeichert (in irgendeiner Datei, ohne Konflikt): Hinweis und Knopf, gespeichert und gebaut wird erst auf Wunsch
const waiting = [...this.docs.values()].filter((x) => x.dirty && !x.conflict);
const pending = waiting.length > 0;
// Gebaut wird nur, wenn eine gespeicherte Datei das Modell betrifft. Sonst heißt der Knopf nur „Speichern“.
- this.saveBtn.textContent = waiting.some((x) => affectsBuild(x.file)) ? 'Speichern und bauen' : 'Speichern';
- const hint = !d.locked && d.dirty && !d.conflict ? el('span', { className: 'c3 ci-hint', textContent: 'Nicht gespeichert · Strg+S' }) : '';
+ this.saveBtn.textContent = waiting.some((x) => affectsBuild(x.file)) ? 'Save and build' : 'Save';
+ const hint = !d.locked && d.dirty && !d.conflict ? el('span', { className: 'c3 ci-hint', textContent: 'Not saved · Ctrl+S' }) : '';
if (left.length || pending) info.replaceChildren(el('span', { className: 'ci-main' }, ...left), el('span', { className: 'grow' }), hint, pending ? this.saveBtn : '');
else info.replaceChildren();
info.classList.toggle('locked', !!d.locked && !d.pdf);
@@ -577,15 +570,15 @@ export class CodePanel {
banner.hidden = !d.conflict;
if (d.conflict) {
const gone = d.conflict.disk === null;
- const keep = el('button', { className: 'btn sm acc', textContent: gone ? 'Mit meiner Fassung neu anlegen' : 'Meine Fassung behalten' });
- const take = el('button', { className: 'btn sm', textContent: gone ? 'Schließen' : 'Fassung von außen laden' });
+ const keep = el('button', { className: 'btn sm acc', textContent: gone ? 'Recreate with my version' : 'Keep my version' });
+ const take = el('button', { className: 'btn sm', textContent: gone ? 'Close' : 'Load the outside version' });
keep.addEventListener('click', () => void this.keepMine(d.file));
take.addEventListener('click', () => void this.takeTheirs(d.file));
banner.replaceChildren(
el('span', { className: 'cb-ico' }, icon('alert', 16)),
el('div', { className: 'cb-text' },
- el('b', { textContent: gone ? `${d.file} wurde außerhalb gelöscht` : `${d.file} wurde außerhalb geändert, vermutlich vom Agenten` }),
- el('span', { textContent: 'Deine Eingaben hier sind noch nicht gespeichert. Die Fassung, die du nicht wählst, kommt in eine Sicherung.' }),
+ el('b', { textContent: gone ? `${d.file} was deleted outside the editor` : `${d.file} was changed outside the editor, probably by the agent` }),
+ el('span', { textContent: 'Your edits here are not saved yet. The version you do not choose goes into a backup.' }),
el('div', { className: 'cb-actions' }, keep, take)));
}
}
diff --git a/app/src/renderer/explodetool.ts b/app/src/renderer/explodetool.ts
index d0d5cc6..261da07 100644
--- a/app/src/renderer/explodetool.ts
+++ b/app/src/renderer/explodetool.ts
@@ -479,7 +479,7 @@ export class ExplodeTool {
constructor(ui: Ui, private deps: Deps) {
const own = <T extends HTMLElement>(id: string): T => {
const e = ui.card.querySelector<T>(`#${id}`);
- if (!e) throw new Error(`Explosionskarte: #${id} fehlt in index.html`);
+ if (!e) throw new Error(`Exploded view card: #${id} is missing in index.html`);
return e;
};
this.ui = {
@@ -567,7 +567,7 @@ export class ExplodeTool {
const ctl = new AbortController();
this.loading = ctl;
const { viewer } = this.deps;
- const view = this.deps.busy.show('Explosion wird vorbereitet', () => this.setActive(false, false));
+ const view = this.deps.busy.show('Preparing the exploded view', () => this.setActive(false, false));
try {
// Strahltest und Hüllquader in Einbaulage
if (this.shown > 0) viewer.setOffsets(null);
@@ -575,7 +575,7 @@ export class ExplodeTool {
const size = diagonal(own);
const t0 = performance.now();
const { dirs, opp } = directions(own);
- view.detail(`${own.length} Bauteile: Was steht wem im Weg?`);
+ view.detail(`${own.length} ${own.length === 1 ? 'part' : 'parts'}: what blocks what?`);
const block = await viewer.explodeRays(own.map((p) => p.id), dirs, opp,
{ eps: Math.max(EPS_MIN, EPS * size), touch: Math.max(TOUCH_MIN, TOUCH * size), samples: SAMPLES },
{ signal: ctl.signal, progress: (f) => view.progress(f) });
@@ -597,8 +597,8 @@ export class ExplodeTool {
/** Beschreibung für den Agenten, etwa beim Markieren. Ohne Explosion null. */
agentText(): string | null {
if (!this.active || this.shown <= 0 || !this.moving) return null;
- const step = this.stepPos === null ? '' : `, Schritt ${this.shownStep()} von ${this.order.length} des Auseinanderbaus`;
- return `Explosionsansicht (${Math.round(this.shown * 100)} %${step}): Die Bauteile sind nur zur Darstellung auseinandergezogen, ihre Lage im Bild ist nicht die Einbaulage`;
+ const step = this.stepPos === null ? '' : `, step ${this.shownStep()} of ${this.order.length} of the disassembly`;
+ return `exploded view (${Math.round(this.shown * 100)} %${step}): the parts are only pulled apart for display, their position in the picture is not the assembled position`;
}
/** Plan und Lagen aus der Analyse (prepare() hat sie gerechnet). */
@@ -781,11 +781,11 @@ export class ExplodeTool {
};
const lines = this.order.map((ids, k) => `${k + 1}. ${ids.map((id) => {
const { st, pl } = steps.get(id)!;
- const what = st.members.length > 1 ? `Baugruppe aus ${st.members.map(name).join(', ')}` : name(id);
- return `${what} nach ${dirName(pl.dirs[st.dir])}${st.forced ? ' (steckt fest)' : ''}`;
+ const what = st.members.length > 1 ? `assembly of ${st.members.map(name).join(', ')}` : name(id);
+ return `${what} towards ${dirName(pl.dirs[st.dir])}${st.forced ? ' (stuck)' : ''}`;
}).join('; ')}`);
- return `Reihenfolge des Auseinanderbaus laut Explosionsansicht (Strahltest auf dem Netz, ohne Gewähr; zum Zusammenbau rückwärts lesen). `
- + `Es bleibt stehen: ${name(plan.base)}.\n${lines.join('\n')}\n`;
+ return `Disassembly order from the exploded view (ray test on the mesh, not guaranteed; read backwards to assemble). `
+ + `Stays in place: ${name(plan.base)}.\n${lines.join('\n')}\n`;
}
/** Gleitend zum Ziel. Ohne Bildwiederholung (unsichtbares Fenster) steht sie nach Ablauf trotzdem dort. */
@@ -824,11 +824,11 @@ export class ExplodeTool {
const playButton = (b: HTMLButtonElement, on: boolean, name: string, title: string) => {
b.replaceChildren(icon(on ? 'pause' : 'play', 15));
b.classList.toggle('on', on);
- b.setAttribute('aria-label', on ? 'Anhalten' : name);
- b.title = on ? 'Anhalten (der laufende Schritt wird noch fertig)' : title;
+ b.setAttribute('aria-label', on ? 'Pause' : name);
+ b.title = on ? 'Pause (the current step still finishes)' : title;
};
- playButton(ui.play, this.playing && this.playDir > 0, 'Auseinanderbauen abspielen', 'Den Auseinanderbau Schritt für Schritt abspielen');
- playButton(ui.assemble, this.playing && this.playDir < 0, 'Zusammenbauen abspielen', 'Den Zusammenbau Schritt für Schritt abspielen');
+ playButton(ui.play, this.playing && this.playDir > 0, 'Play disassembly', 'Play the disassembly step by step');
+ playButton(ui.assemble, this.playing && this.playDir < 0, 'Play assembly', 'Play the assembly step by step');
const pos = this.stepPos ?? this.shownStep();
ui.back.disabled = !n || pos <= 1e-6;
ui.next.disabled = !n || pos >= n - 1e-6;
@@ -836,12 +836,12 @@ export class ExplodeTool {
// Nur bei Abweichung: render() läuft beim Abspielen in jedem Bild, eine offene Auswahlliste soll dabei stehen bleiben
if (ui.speed.value !== String(this.speed)) ui.speed.value = String(this.speed);
const k = this.shownStep();
- ui.step.textContent = n ? `Schritt ${k} von ${n}` : '';
+ ui.step.textContent = n ? `Step ${k} of ${n}` : '';
// Darunter, was in diesem Schritt herauskommt (Namen können lang sein, die Zeile hat die volle Breite)
let what = '';
if (n) {
- if (k === 0) what = 'Zusammengebaut';
- else if (this.stepPos === null) what = 'Alle Schritte zugleich';
+ if (k === 0) what = 'Assembled';
+ else if (this.stepPos === null) what = 'All steps at once';
else {
const names = new Map(this.deps.viewer.partList().map((x) => [x.id, x.name]));
what = this.order[k - 1].map((id) => this.label(id, names)).join(', ');
@@ -854,10 +854,10 @@ export class ExplodeTool {
if (!this.active) return;
// Im Normalfall kein Hinweis: Die Zeile verschwindet dann ganz, statt leer Platz zu nehmen
const notes: string[] = [];
- if (!this.plan?.base) notes.push('Keine Bauteile zum Auseinanderziehen.');
- else if (!this.moving) notes.push('Nur ein Bauteil, da rückt nichts auseinander.');
- if (this.forced) notes.push(`${this.forced === 1 ? 'Ein Teil steckt' : `${this.forced} Teile stecken`} fest (verklemmt oder eingeschlossen) und ${this.forced === 1 ? 'fährt' : 'fahren'} durch andere hindurch.`);
- if (this.refs && this.plan?.base) notes.push('Referenzen bleiben stehen.');
+ if (!this.plan?.base) notes.push('No parts to pull apart.');
+ else if (!this.moving) notes.push('Only one part, nothing moves apart.');
+ if (this.forced) notes.push(`${this.forced === 1 ? 'One part is' : `${this.forced} parts are`} stuck (jammed or enclosed) and ${this.forced === 1 ? 'moves' : 'move'} through others.`);
+ if (this.refs && this.plan?.base) notes.push('Reference parts stay in place.');
ui.hint.textContent = notes.join(' ');
ui.hint.hidden = !notes.length;
ui.hint.classList.toggle('warn', this.forced > 0);
diff --git a/app/src/renderer/filetree.ts b/app/src/renderer/filetree.ts
index ccaf3cb..b6ff902 100644
--- a/app/src/renderer/filetree.ts
+++ b/app/src/renderer/filetree.ts
@@ -5,7 +5,7 @@ import { el, menuItem, menus } from './ui';
/** Dateien, die die App verwaltet. Sie stehen eingeklappt unter „Vom Programm verwaltet“, damit der Baum ruhig bleibt. */
const MANAGED = new Set(['AGENTS.md', 'CLAUDE.md', '.gitignore']);
-const TAGS: Record<string, string> = { 'model.py': 'Modell', 'output/model.step': 'Ergebnis', 'NOTES.md': 'Notizen', 'requirements.txt': 'Pakete' };
+const TAGS: Record<string, string> = { 'model.py': 'model', 'output/model.step': 'result', 'NOTES.md': 'notes', 'requirements.txt': 'packages' };
/** Ordner der Markierungen. Der Hauptprozess liefert ihn als einzigen Teil von .soma/ mit. */
const FEEDBACK = '.soma/feedback';
export const TEXT_EXT = /\.(py|md|txt|json|toml|cfg|ini|yml|yaml|gitignore|csv)$|^[^.]*$/i;
@@ -108,13 +108,13 @@ export class FileTree {
}
};
walk(rest, 0, '');
- if (!rest.length && !ed) rows.push(el('div', { className: 'hint', textContent: 'Noch keine Dateien.' }));
+ if (!rest.length && !ed) rows.push(el('div', { className: 'hint', textContent: 'No files yet.' }));
// Markierungen (E16) aus .soma/feedback/: eigene Gruppe, neueste zuerst. Zum Wiederfinden und erneut an den Agenten geben.
if (feedback?.children?.length) {
rows.push(el('div', { className: 'gap' }));
const open = !this.collapsed.has(FEEDBACK);
- const head = this.button(0, open ? 'down' : 'right', 'image', 'Markierungen', String(feedback.children.length), 'dim');
- head.title = 'Bilder aus „Markieren“, abgelegt in .soma/feedback/. Klick öffnet zum Markieren, Rechtsklick gibt den Pfad an den Agenten oder öffnet im Bildprogramm.';
+ const head = this.button(0, open ? 'down' : 'right', 'image', 'Markups', String(feedback.children.length), 'dim');
+ head.title = 'Images from “Mark up”, stored in .soma/feedback/. Click to open for markup, right-click to send the path to the agent or open in an image viewer.';
head.setAttribute('aria-expanded', String(open));
head.dataset.path = FEEDBACK;
head.addEventListener('click', () => this.toggle(FEEDBACK));
@@ -124,8 +124,8 @@ export class FileTree {
if (managed.length) {
rows.push(el('div', { className: 'gap' }));
const open = !this.collapsed.has('#managed');
- const head = this.button(0, open ? 'down' : 'right', 'lock', 'Vom Programm verwaltet', String(managed.length), 'dim');
- head.title = 'Diese Dateien legt die App an und erneuert sie bei Updates. Ändern ist nicht nötig.';
+ const head = this.button(0, open ? 'down' : 'right', 'lock', 'Managed by the app', String(managed.length), 'dim');
+ head.title = 'The app creates these files and renews them with updates. There is no need to change them.';
head.setAttribute('aria-expanded', String(open));
head.addEventListener('click', () => this.toggle('#managed'));
rows.push(head);
@@ -159,7 +159,7 @@ export class FileTree {
const prev = this.input;
// Neu gezeichnet, während das Feld offen ist: das Getippte übernehmen
const input = el('input', { className: 'fedit', type: 'text', spellcheck: false, autocomplete: 'off', value: prev ? prev.value : value });
- input.setAttribute('aria-label', this.edit?.mode === 'rename' ? 'Neuer Name' : this.edit?.mode === 'dir' ? 'Name des neuen Ordners' : 'Name der neuen Datei');
+ input.setAttribute('aria-label', this.edit?.mode === 'rename' ? 'New name' : this.edit?.mode === 'dir' ? 'Name of the new folder' : 'Name of the new file');
if (!prev) input.dataset.fresh = '1';
const finish = async (fromBlur: boolean) => {
if (this.submitting || this.input !== input) return;
@@ -212,25 +212,25 @@ export class FileTree {
const folder = n ? (n.dir ? n.path : parentOf(n.path)) : '';
const blockCreate = fileOpBlockReason(folder, 'create');
const blocked = (item: HTMLButtonElement, reason: string | null) => { if (reason) { item.disabled = true; item.title = reason; } return item; };
- const items: HTMLElement[] = [el('div', { className: 'mh', textContent: n ? n.name : 'Projektordner' })];
+ const items: HTMLElement[] = [el('div', { className: 'mh', textContent: n ? n.name : 'Project folder' })];
if (n && !n.dir) {
- if (TEXT_EXT.test(n.name) || /\.pdf$/i.test(n.name)) items.push(menuItem('Öffnen', { icon: 'code', onClick: () => d.open(n) }));
- if (IMAGE_EXT.test(n.name)) items.push(menuItem('Markieren', { icon: 'camera', onClick: () => d.mark(n.path) }));
- if (VIDEO_EXT.test(n.name)) items.push(menuItem('Abspielen', { icon: 'play', onClick: () => d.open(n) }));
- items.push(menuItem('Mit Standardprogramm öffnen', { icon: 'openext', onClick: () => d.openExternal(n.path) }));
+ if (TEXT_EXT.test(n.name) || /\.pdf$/i.test(n.name)) items.push(menuItem('Open', { icon: 'code', onClick: () => d.open(n) }));
+ if (IMAGE_EXT.test(n.name)) items.push(menuItem('Mark up', { icon: 'camera', onClick: () => d.mark(n.path) }));
+ if (VIDEO_EXT.test(n.name)) items.push(menuItem('Play', { icon: 'play', onClick: () => d.open(n) }));
+ items.push(menuItem('Open with default app', { icon: 'openext', onClick: () => d.openExternal(n.path) }));
}
- items.push(menuItem('Im Explorer zeigen', { icon: 'folder', onClick: () => d.reveal(n?.path ?? '') }));
+ items.push(menuItem('Show in Explorer', { icon: 'folder', onClick: () => d.reveal(n?.path ?? '') }));
if (n) {
items.push(el('div', { className: 'msep' }),
- menuItem('Pfad an Agent geben', { icon: 'send', onClick: () => d.toAgent(n.path) }),
- menuItem('Pfad kopieren', { icon: 'copy', onClick: () => d.copyPath(n.path) }));
+ menuItem('Send path to agent', { icon: 'send', onClick: () => d.toAgent(n.path) }),
+ menuItem('Copy path', { icon: 'copy', onClick: () => d.copyPath(n.path) }));
}
items.push(el('div', { className: 'msep' }),
- blocked(menuItem(n?.dir ? 'Neue Datei hier' : 'Neue Datei', { icon: 'fileplus', onClick: () => this.startCreate(folder, false) }), blockCreate),
- blocked(menuItem(n?.dir ? 'Neuer Ordner hier' : 'Neuer Ordner', { icon: 'folderplus', onClick: () => this.startCreate(folder, true) }), blockCreate));
+ blocked(menuItem(n?.dir ? 'New file here' : 'New file', { icon: 'fileplus', onClick: () => this.startCreate(folder, false) }), blockCreate),
+ blocked(menuItem(n?.dir ? 'New folder here' : 'New folder', { icon: 'folderplus', onClick: () => this.startCreate(folder, true) }), blockCreate));
if (n) {
- items.push(blocked(menuItem('Umbenennen', { icon: 'pen', kbd: 'F2', onClick: () => this.startRename(n) }), fileOpBlockReason(n.path, 'rename')),
- blocked(menuItem('Löschen', { icon: 'trash', kbd: 'Entf', onClick: () => d.trash(n.path) }), fileOpBlockReason(n.path, 'delete')));
+ items.push(blocked(menuItem('Rename', { icon: 'pen', kbd: 'F2', onClick: () => this.startRename(n) }), fileOpBlockReason(n.path, 'rename')),
+ blocked(menuItem('Delete', { icon: 'trash', kbd: 'Del', onClick: () => d.trash(n.path) }), fileOpBlockReason(n.path, 'delete')));
}
this.menu.replaceChildren(...items);
menus.at(this.menu, x, y);
@@ -263,8 +263,8 @@ export class FileTree {
return b;
}
const b = this.button(depth, null, fileIcon(n.name), n.name, TAGS[n.path] ?? '', '');
- b.title = TEXT_EXT.test(n.name) || /\.pdf$/i.test(n.name) ? `${n.path} im Code öffnen` : IMAGE_EXT.test(n.name) ? `${n.path} zum Markieren öffnen`
- : VIDEO_EXT.test(n.name) ? `${n.path} abspielen` : n.path;
+ b.title = TEXT_EXT.test(n.name) || /\.pdf$/i.test(n.name) ? `Open ${n.path} in the code` : IMAGE_EXT.test(n.name) ? `Open ${n.path} for markup`
+ : VIDEO_EXT.test(n.name) ? `Play ${n.path}` : n.path;
b.dataset.path = n.path;
b.addEventListener('click', () => this.deps.open(n));
if (n.path === this.active) b.classList.add('sel');
diff --git a/app/src/renderer/index.html b/app/src/renderer/index.html
index 449d88d..722bcbe 100644
--- a/app/src/renderer/index.html
+++ b/app/src/renderer/index.html
@@ -1,5 +1,5 @@
<!doctype html>
-<html lang="de">
+<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; media-src 'self' blob:; font-src 'self' data:">
@@ -10,62 +10,62 @@
<body>
<div id="app">
<header id="topbar" class="top">
- <button id="btn-home" class="logo" title="Startseite" aria-label="Startseite"><i data-icon="logo" data-size="22" data-stroke="1.6"></i></button>
- <button id="btn-doc" class="docname" title="Neu, Öffnen, Zuletzt geöffnet, Speichern unter" aria-haspopup="menu" aria-expanded="false"><b id="doc-name">SOMA</b><i data-icon="down" data-size="14" data-stroke="2"></i></button>
+ <button id="btn-home" class="logo" title="Start page" aria-label="Start page"><i data-icon="logo" data-size="22" data-stroke="1.6"></i></button>
+ <button id="btn-doc" class="docname" title="New, Open, Recent, Save as" aria-haspopup="menu" aria-expanded="false"><b id="doc-name">SOMA</b><i data-icon="down" data-size="14" data-stroke="2"></i></button>
<span id="save-badge" class="savestate"></span>
<button id="problems" class="warnbadge" hidden aria-haspopup="dialog" aria-expanded="false"></button>
<span class="grow"></span>
<div id="build-pill" class="pill">
- <button id="btn-buildinfo" class="main" title="Build-Details" aria-haspopup="menu" aria-expanded="false">
- <span id="build-dot" class="dot"></span><span id="status" class="strong">Bereit</span><span id="status-detail" class="c2"></span>
+ <button id="btn-buildinfo" class="main" title="Build details" aria-haspopup="menu" aria-expanded="false">
+ <span id="build-dot" class="dot"></span><span id="status" class="strong">Ready</span><span id="status-detail" class="c2"></span>
</button>
- <button id="btn-cancel" class="inner" hidden>Abbrechen</button>
- <button id="btn-buildnow" class="inner acc" hidden>Jetzt bauen</button>
+ <button id="btn-cancel" class="inner" hidden>Cancel</button>
+ <button id="btn-buildnow" class="inner acc" hidden>Build now</button>
<span class="sep"></span>
- <button id="btn-auto" class="auto" title="Automatisch bauen, wenn sich der Code ändert"><i data-icon="refresh" data-size="14" data-stroke="2"></i><span id="auto-label">Auto an</span></button>
+ <button id="btn-auto" class="auto" title="Build automatically when the code changes"><i data-icon="refresh" data-size="14" data-stroke="2"></i><span id="auto-label">Auto on</span></button>
</div>
<span class="grow"></span>
- <div id="layout" class="layout" role="group" aria-label="Spalten">
- <button id="btn-lay-side" aria-pressed="true" title="Seitenleiste ein- und ausblenden (Strg 1)" aria-label="Seitenleiste"><i data-icon="sidel" data-size="17" data-stroke="1.7"></i></button>
- <button id="btn-lay-code" aria-pressed="false" title="Code ein- und ausblenden (Strg 2)" aria-label="Code"><i data-icon="code" data-size="16" data-stroke="1.9"></i></button>
- <button id="btn-lay-agent" aria-pressed="true" title="Agent ein- und ausklappen (Strg 3). Eingeklappt läuft er weiter." aria-label="Agent"><i data-icon="panel" data-size="17" data-stroke="1.7"></i></button>
+ <div id="layout" class="layout" role="group" aria-label="Columns">
+ <button id="btn-lay-side" aria-pressed="true" title="Show or hide the sidebar (Ctrl 1)" aria-label="Sidebar"><i data-icon="sidel" data-size="17" data-stroke="1.7"></i></button>
+ <button id="btn-lay-code" aria-pressed="false" title="Show or hide the code (Ctrl 2)" aria-label="Code"><i data-icon="code" data-size="16" data-stroke="1.9"></i></button>
+ <button id="btn-lay-agent" aria-pressed="true" title="Expand or collapse the agent (Ctrl 3). Collapsed, it keeps running." aria-label="Agent"><i data-icon="panel" data-size="17" data-stroke="1.7"></i></button>
</div>
- <button id="btn-export" class="btn" aria-haspopup="menu" aria-expanded="false"><i data-icon="export" data-size="15"></i>Exportieren<i data-icon="down" data-size="13" data-stroke="2"></i></button>
- <button id="btn-save" class="btn primary" title="Snapshot im Verlauf anlegen und die ZIP schreiben">Speichern <span class="kbd">Strg S</span></button>
+ <button id="btn-export" class="btn" aria-haspopup="menu" aria-expanded="false"><i data-icon="export" data-size="15"></i>Export<i data-icon="down" data-size="13" data-stroke="2"></i></button>
+ <button id="btn-save" class="btn primary" title="Add a snapshot to the history and write the ZIP">Save <span class="kbd">Ctrl S</span></button>
</header>
<div id="body">
- <nav id="rail" aria-label="Seitenleisten">
- <button data-panel="parts" aria-pressed="false" title="Bauteile des Modells: auswählen, aus- und einblenden, transparent schalten"><i data-icon="cube" data-size="20" data-stroke="1.7"></i><span>Bauteile</span></button>
- <button data-panel="files" aria-pressed="false" title="Dateien des Modells. Ein Klick auf eine Datei öffnet sie im Code daneben."><i data-icon="folder" data-size="20" data-stroke="1.7"></i><span>Dateien</span></button>
- <button data-panel="skills" aria-pressed="false" title="Skills: Regeln für den Agenten, je Modell einstellbar (3D-Druck, Toleranzen …)"><i data-icon="book" data-size="20" data-stroke="1.7"></i><span>Skills</span></button>
+ <nav id="rail" aria-label="Sidebars">
+ <button data-panel="parts" aria-pressed="false" title="Parts of the model: select, hide and show, make transparent"><i data-icon="cube" data-size="20" data-stroke="1.7"></i><span>Parts</span></button>
+ <button data-panel="files" aria-pressed="false" title="Files of the model. Click a file to open it in the code next to it."><i data-icon="folder" data-size="20" data-stroke="1.7"></i><span>Files</span></button>
+ <button data-panel="skills" aria-pressed="false" title="Skills: rules for the agent, set per model (3D printing, tolerances …)"><i data-icon="book" data-size="20" data-stroke="1.7"></i><span>Skills</span></button>
<span class="grow"></span>
- <button disabled title="Hilfe kommt in einem späteren Schritt"><i data-icon="help" data-size="20" data-stroke="1.7"></i><span>Hilfe</span></button>
- <button disabled title="Optionen kommen in einem späteren Schritt"><i data-icon="sliders" data-size="20" data-stroke="1.7"></i><span>Optionen</span></button>
+ <button disabled title="Help is coming in a later version"><i data-icon="help" data-size="20" data-stroke="1.7"></i><span>Help</span></button>
+ <button disabled title="Options are coming in a later version"><i data-icon="sliders" data-size="20" data-stroke="1.7"></i><span>Options</span></button>
</nav>
<aside id="side" hidden>
<!-- Bauteile (Entwurf 2): fest in der Seitenleiste statt als Karte im Viewer -->
- <section id="panel-parts" class="panel" aria-label="Bauteile" hidden>
- <div class="side-hd"><b>Bauteile</b><span id="parts-count" class="c3 hd-count"></span><span class="grow"></span>
- <button id="btn-parts-search" class="ibtn s" aria-label="Bauteile suchen" title="Bauteile suchen"><i data-icon="search" data-size="15" data-stroke="1.9"></i></button>
- <button class="ibtn s side-close" aria-label="Seitenleiste schließen"><i data-icon="x" data-size="15" data-stroke="2"></i></button></div>
- <input id="parts-filter" class="filter" type="search" placeholder="Bauteil suchen" aria-label="Bauteil suchen" hidden>
+ <section id="panel-parts" class="panel" aria-label="Parts" hidden>
+ <div class="side-hd"><b>Parts</b><span id="parts-count" class="c3 hd-count"></span><span class="grow"></span>
+ <button id="btn-parts-search" class="ibtn s" aria-label="Search parts" title="Search parts"><i data-icon="search" data-size="15" data-stroke="1.9"></i></button>
+ <button class="ibtn s side-close" aria-label="Close sidebar"><i data-icon="x" data-size="15" data-stroke="2"></i></button></div>
+ <input id="parts-filter" class="filter" type="search" placeholder="Search part" aria-label="Search part" hidden>
<div id="tab-model" class="list ptree"></div>
</section>
- <section id="panel-files" class="panel" aria-label="Dateien" hidden>
- <div class="side-hd"><b>Dateien</b><span class="grow"></span>
- <button id="btn-file-new" class="ibtn s" title="Neue Datei (Rechtsklick im Baum: auch in einem Ordner)" aria-label="Neue Datei"><i data-icon="fileplus" data-size="15"></i></button>
- <button id="btn-folder-new" class="ibtn s" title="Neuer Ordner" aria-label="Neuer Ordner"><i data-icon="folderplus" data-size="15"></i></button>
- <button id="btn-reveal" class="ibtn s" title="Im Explorer zeigen" aria-label="Im Explorer zeigen"><i data-icon="openext" data-size="15"></i></button>
- <button class="ibtn s side-close" aria-label="Dateien schließen"><i data-icon="x" data-size="15" data-stroke="2"></i></button></div>
+ <section id="panel-files" class="panel" aria-label="Files" hidden>
+ <div class="side-hd"><b>Files</b><span class="grow"></span>
+ <button id="btn-file-new" class="ibtn s" title="New file (right-click in the tree: also inside a folder)" aria-label="New file"><i data-icon="fileplus" data-size="15"></i></button>
+ <button id="btn-folder-new" class="ibtn s" title="New folder" aria-label="New folder"><i data-icon="folderplus" data-size="15"></i></button>
+ <button id="btn-reveal" class="ibtn s" title="Show in Explorer" aria-label="Show in Explorer"><i data-icon="openext" data-size="15"></i></button>
+ <button class="ibtn s side-close" aria-label="Close files"><i data-icon="x" data-size="15" data-stroke="2"></i></button></div>
<div id="tab-files" class="ftree"></div>
- <div id="dropzone" class="dropzone" title="STEP-Dateien, Bilder und Skizzen landen in inputs/. Vorhandenes wird nicht überschrieben."><i data-icon="upload" data-size="16"></i><span><b>Hierher ziehen:</b> landet in <code>inputs/</code></span></div>
+ <div id="dropzone" class="dropzone" title="STEP files, images and sketches go to inputs/. Existing files are not overwritten."><i data-icon="upload" data-size="16"></i><span><b>Drop here:</b> goes to <code>inputs/</code></span></div>
</section>
<section id="panel-skills" class="panel" aria-label="Skills" hidden>
<div class="side-hd"><b>Skills</b><span class="grow"></span>
- <button id="btn-skills-info" class="ibtn s" aria-label="Was sind Skills?" title="Skills sind Regeln für den Agenten. Aus: Er sieht den Skill nicht. Bei Bedarf: Er liest ihn, wenn das Gespräch auf das Thema kommt. Immer: Er befolgt ihn bei jeder Änderung. Sie liegen in .soma/skills/, stehen in AGENTS.md und wandern mit der ZIP."><i data-icon="info" data-size="15" data-stroke="1.9"></i></button>
- <button class="ibtn s side-close" aria-label="Seitenleiste schließen"><i data-icon="x" data-size="15" data-stroke="2"></i></button></div>
+ <button id="btn-skills-info" class="ibtn s" aria-label="What are skills?" title="Skills are rules for the agent. Off: the agent does not see the skill. On demand: it reads the skill when the conversation turns to the topic. Always: it follows the skill with every change. Skills live in .soma/skills/, are listed in AGENTS.md and travel with the ZIP."><i data-icon="info" data-size="15" data-stroke="1.9"></i></button>
+ <button class="ibtn s side-close" aria-label="Close sidebar"><i data-icon="x" data-size="15" data-stroke="2"></i></button></div>
<div id="skills-sum" class="sk-sum"></div>
<div id="skills-list" class="sk-list" role="list"></div>
</section>
@@ -78,9 +78,9 @@
<aside id="editor" aria-label="Code" hidden>
<section id="panel-code" class="panel">
<div class="side-hd code-hd"><div id="code-tabs" class="ctabs"></div><span class="grow"></span>
- <div id="code-mode" class="cmode" role="radiogroup" aria-label="Markdown zeigen als" hidden><button data-mode="view" role="radio" aria-checked="true" aria-label="Ansicht" title="Ansicht: als Dokument zeigen. Doppelklick auf einen Absatz springt zum Bearbeiten an diese Stelle"><i data-icon="eye" data-size="14" data-stroke="1.9"></i></button><button data-mode="edit" role="radio" aria-checked="false" aria-label="Bearbeiten" title="Bearbeiten: Quelltext im Editor, speichern mit Strg+S"><i data-icon="pen" data-size="14" data-stroke="1.9"></i></button></div>
- <button id="btn-codelink" class="ibtn s" aria-pressed="true" aria-label="Mit Auswahl verknüpft" title="Mit Auswahl verknüpft: Klick auf ein Bauteil springt zur Codestelle"><i data-icon="link" data-size="15" data-stroke="1.9"></i></button>
- <button id="btn-code-close" class="ibtn s" aria-label="Code schließen" title="Code schließen (Strg 2)"><i data-icon="x" data-size="15" data-stroke="2"></i></button></div>
+ <div id="code-mode" class="cmode" role="radiogroup" aria-label="Show Markdown as" hidden><button data-mode="view" role="radio" aria-checked="true" aria-label="View" title="View: show as a document. Double-click a paragraph to edit at that spot"><i data-icon="eye" data-size="14" data-stroke="1.9"></i></button><button data-mode="edit" role="radio" aria-checked="false" aria-label="Edit" title="Edit: source text in the editor, save with Ctrl+S"><i data-icon="pen" data-size="14" data-stroke="1.9"></i></button></div>
+ <button id="btn-codelink" class="ibtn s" aria-pressed="true" aria-label="Linked to selection" title="Linked to selection: clicking a part jumps to its code location"><i data-icon="link" data-size="15" data-stroke="1.9"></i></button>
+ <button id="btn-code-close" class="ibtn s" aria-label="Close code" title="Close code (Ctrl 2)"><i data-icon="x" data-size="15" data-stroke="2"></i></button></div>
<div id="code-info" class="code-info"></div>
<div id="code-banner" class="code-banner" role="alert" hidden></div>
<div id="code-view" class="codeview"></div>
@@ -89,7 +89,7 @@
<div class="splitter" id="split-code" hidden></div>
<main id="center">
- <section id="viewer" aria-label="3D-Ansicht">
+ <section id="viewer" aria-label="3D view">
<div id="viewer-msg"></div>
<!-- Ladeanzeige (busy.ts): Die Explosion rechnet bei großen Baugruppen einige Sekunden -->
@@ -98,26 +98,26 @@
<div class="vb-hd"><span class="spin"><i data-icon="spin" data-size="16" data-stroke="2.4"></i></span><b id="viewer-busy-title"></b><span class="grow"></span><span id="viewer-busy-time" class="c3 small"></span></div>
<div id="viewer-busy-detail" class="vb-sub"></div>
<div id="viewer-busy-bar" class="vb-bar indet"><div id="viewer-busy-fill"></div></div>
- <div class="sc-actions"><button id="btn-busy-cancel" class="btn sm" title="Vorbereitung abbrechen und das Werkzeug beenden (Escape)">Abbrechen</button></div>
+ <div class="sc-actions"><button id="btn-busy-cancel" class="btn sm" title="Cancel the preparation and close the tool (Escape)">Cancel</button></div>
</div>
</div>
<!-- Oben links: was der Viewer zeigt (Modell oder ein Ergebnis des Agenten). In der Mitte die Werkzeuge. -->
<div id="vtop" class="vtop">
<div id="view-switch" class="float switcher">
- <button id="btn-view" class="sb" aria-haspopup="menu" aria-expanded="false" title="Was der Viewer zeigt: das Modell, eine Analyse, eine Animation oder ein Video">
- <span id="view-ico" class="vico"><i data-icon="cube" data-size="16"></i></span><b id="view-name">Modell</b><span id="view-sub" class="c3"></span>
+ <button id="btn-view" class="sb" aria-haspopup="menu" aria-expanded="false" title="What the viewer shows: the model, an analysis, an animation or a video">
+ <span id="view-ico" class="vico"><i data-icon="cube" data-size="16"></i></span><b id="view-name">Model</b><span id="view-sub" class="c3"></span>
<span id="view-new" class="newbadge" hidden></span><i data-icon="down" data-size="14" data-stroke="2"></i></button>
<span id="view-sep" class="vs" hidden></span>
- <button id="btn-view-close" class="ibtn s" aria-label="Zurück zum Modell" title="Zurück zum Modell" hidden><i data-icon="x" data-size="14" data-stroke="2"></i></button>
+ <button id="btn-view-close" class="ibtn s" aria-label="Back to the model" title="Back to the model" hidden><i data-icon="x" data-size="14" data-stroke="2"></i></button>
</div>
<span class="grow"></span>
- <div id="dock" class="float dock" role="toolbar" aria-label="Werkzeuge">
- <button id="btn-measure" aria-pressed="false" title="Messen: Fläche oder Kante anklicken, ein zweiter Klick misst Abstand und Winkel (exakte Werte)"><i data-icon="ruler"></i><span class="lbl">Messen</span></button>
- <button id="btn-section" aria-pressed="false" title="Schnitt: das Modell an einer Ebene aufschneiden (senkrecht zu X, Y, Z oder parallel zu einer Fläche)"><i data-icon="section"></i><span class="lbl">Schnitt</span></button>
- <button id="btn-explode" aria-pressed="false" title="Explosion: die Bauteile zur Darstellung auseinanderziehen, Normteile entlang ihrer Achse"><i data-icon="explode"></i><span class="lbl">Explosion</span></button>
+ <div id="dock" class="float dock" role="toolbar" aria-label="Tools">
+ <button id="btn-measure" aria-pressed="false" title="Measure: click a face or edge, a second click measures distance and angle (exact values)"><i data-icon="ruler"></i><span class="lbl">Measure</span></button>
+ <button id="btn-section" aria-pressed="false" title="Section: cut the model open at a plane (normal to X, Y, Z or parallel to a face)"><i data-icon="section"></i><span class="lbl">Section</span></button>
+ <button id="btn-explode" aria-pressed="false" title="Explode: pull the parts apart for display, standard parts along their axis"><i data-icon="explode"></i><span class="lbl">Explode</span></button>
<span class="vsep"></span>
- <button id="btn-mark" title="Viewer-Bild markieren und an den Agenten geben"><i data-icon="camera"></i><span class="lbl">Markieren</span></button>
+ <button id="btn-mark" title="Mark up the viewer image and send it to the agent"><i data-icon="camera"></i><span class="lbl">Mark up</span></button>
</div>
<span class="grow"></span>
<span class="cubespace"></span>
@@ -125,11 +125,11 @@
<div id="cube" class="cube">
<!-- Ansichtswürfel (viewcube.ts): 3D, dreht sich mit der Kamera. Per Tastatur gehen die Ansichten über „Darstellung“. -->
- <div id="cube-view" class="cube-view" role="img" aria-label="Ansichtswürfel" title="Seite, Kante oder Ecke anklicken: Ansicht von dort. Ziehen dreht die Ansicht."></div>
+ <div id="cube-view" class="cube-view" role="img" aria-label="View cube" title="Click a side, edge or corner: view from there. Drag to rotate the view."></div>
<div class="vbtns">
- <button data-view="fit" aria-label="Alles einpassen" title="Alles einpassen"><i data-icon="fit"></i></button>
- <button data-view="iso" aria-label="Standardansicht" title="Standardansicht (isometrisch)"><i data-icon="home"></i></button>
- <button id="btn-display" aria-haspopup="menu" aria-expanded="false" aria-label="Darstellung" title="Darstellung: Kanten, Drahtgitter, Transparent und Ansichten"><i data-icon="layers"></i></button>
+ <button data-view="fit" aria-label="Fit all" title="Fit all"><i data-icon="fit"></i></button>
+ <button data-view="iso" aria-label="Default view" title="Default view (isometric)"><i data-icon="home"></i></button>
+ <button id="btn-display" aria-haspopup="menu" aria-expanded="false" aria-label="Display" title="Display: edges, wireframe, transparent and views"><i data-icon="layers"></i></button>
</div>
</div>
@@ -137,128 +137,128 @@
<div id="cards" class="cards">
<div id="selcard" class="float selcard" hidden>
<div class="sc-hd"><span id="sel-swatch" class="sw"></span><b id="sel-name"></b><span class="grow"></span>
- <button id="btn-sel-close" class="ibtn s" aria-label="Auswahl aufheben"><i data-icon="x" data-size="14" data-stroke="2"></i></button></div>
+ <button id="btn-sel-close" class="ibtn s" aria-label="Clear selection"><i data-icon="x" data-size="14" data-stroke="2"></i></button></div>
<div id="info" class="sc-info c2"></div>
<div id="code" class="peek code"></div>
<div class="sc-actions">
- <button id="btn-sel-code" class="btn sm" title="Die Codestelle des Bauteils im Code zeigen"><i data-icon="code" data-size="14" data-stroke="1.9"></i>Code</button>
- <button id="btn-sel-export" class="btn sm" aria-haspopup="menu" aria-expanded="false" title="Dieses Bauteil als Datei exportieren: Format wählen, dann den Speicherort"><i data-icon="export" data-size="14" data-stroke="1.9"></i>Exportieren</button>
- <button id="btn-sel-agent" class="btn sm acc" title="Bauteil, Datei und Zeilen in die Eingabe des Agenten einfügen"><i data-icon="send" data-size="14" data-stroke="1.9"></i>An Agent geben</button>
+ <button id="btn-sel-code" class="btn sm" title="Show the part's code location in the code"><i data-icon="code" data-size="14" data-stroke="1.9"></i>Code</button>
+ <button id="btn-sel-export" class="btn sm" aria-haspopup="menu" aria-expanded="false" title="Export this part as a file: choose the format, then the location"><i data-icon="export" data-size="14" data-stroke="1.9"></i>Export</button>
+ <button id="btn-sel-agent" class="btn sm acc" title="Add part, file and lines to the agent's input"><i data-icon="send" data-size="14" data-stroke="1.9"></i>Send to agent</button>
</div>
</div>
<div id="measure-card" class="float mcard" hidden>
- <div class="mc-hd"><span class="mc-ico"><i data-icon="ruler" data-size="16"></i></span><b>Messen</b><span class="grow"></span>
- <button id="btn-measure-close" class="ibtn s" aria-label="Messen beenden" title="Messen beenden (Escape)"><i data-icon="x" data-size="14" data-stroke="2"></i></button></div>
+ <div class="mc-hd"><span class="mc-ico"><i data-icon="ruler" data-size="16"></i></span><b>Measure</b><span class="grow"></span>
+ <button id="btn-measure-close" class="ibtn s" aria-label="Stop measuring" title="Stop measuring (Escape)"><i data-icon="x" data-size="14" data-stroke="2"></i></button></div>
<div id="measure-body" class="mc-body"></div>
<div class="sc-actions">
- <button id="btn-measure-again" class="btn sm" disabled>Neu messen</button>
- <button id="btn-measure-agent" class="btn sm acc" disabled title="Die Messung in die Eingabe des Agenten einfügen"><i data-icon="send" data-size="14" data-stroke="1.9"></i>An Agent geben</button>
+ <button id="btn-measure-again" class="btn sm" disabled>Measure again</button>
+ <button id="btn-measure-agent" class="btn sm acc" disabled title="Add the measurement to the agent's input"><i data-icon="send" data-size="14" data-stroke="1.9"></i>Send to agent</button>
</div>
</div>
<!-- Explosionsansicht (explodetool.ts): Bauteile auseinanderziehen. Ändert nichts am Modell. -->
<div id="explode-card" class="float excard" hidden>
- <div class="mc-hd"><span class="mc-ico"><i data-icon="explode" data-size="16"></i></span><b>Explosion</b><span class="grow"></span>
- <button id="btn-explode-close" class="ibtn s" aria-label="Explosion beenden" title="Explosion beenden (setzt das Modell wieder zusammen)"><i data-icon="x" data-size="14" data-stroke="2"></i></button></div>
+ <div class="mc-hd"><span class="mc-ico"><i data-icon="explode" data-size="16"></i></span><b>Exploded view</b><span class="grow"></span>
+ <button id="btn-explode-close" class="ibtn s" aria-label="Close exploded view" title="Close exploded view (puts the model back together)"><i data-icon="x" data-size="14" data-stroke="2"></i></button></div>
<div class="sx-pos">
- <label for="explode-range">Abstand</label>
- <input id="explode-range" type="range" min="0" max="100" step="1" aria-label="Abstand der Explosion in Prozent">
+ <label for="explode-range">Distance</label>
+ <input id="explode-range" type="range" min="0" max="100" step="1" aria-label="Explosion distance in percent">
<span id="explode-value" class="ex-val"></span>
</div>
<!-- Abspielen in beide Richtungen: links zur Einbaulage (zurück, Zusammenbau), rechts zur Explosion (Auseinanderbau, weiter) -->
<div class="ex-steps">
- <button id="btn-explode-back" class="ibtn s" aria-label="Schritt zurück" title="Einen Schritt zurück (zusammenbauen)"><i data-icon="stepback" data-size="15"></i></button>
- <button id="btn-explode-assemble" class="ibtn s ex-rev" aria-label="Zusammenbauen abspielen" title="Den Zusammenbau Schritt für Schritt abspielen"><i data-icon="play" data-size="15"></i></button>
- <button id="btn-explode-play" class="ibtn s" aria-label="Auseinanderbauen abspielen" title="Den Auseinanderbau Schritt für Schritt abspielen"><i data-icon="play" data-size="15"></i></button>
- <button id="btn-explode-next" class="ibtn s" aria-label="Schritt weiter" title="Einen Schritt weiter (auseinanderbauen)"><i data-icon="stepfwd" data-size="15"></i></button>
+ <button id="btn-explode-back" class="ibtn s" aria-label="Step back" title="One step back (assemble)"><i data-icon="stepback" data-size="15"></i></button>
+ <button id="btn-explode-assemble" class="ibtn s ex-rev" aria-label="Play assembly" title="Play the assembly step by step"><i data-icon="play" data-size="15"></i></button>
+ <button id="btn-explode-play" class="ibtn s" aria-label="Play disassembly" title="Play the disassembly step by step"><i data-icon="play" data-size="15"></i></button>
+ <button id="btn-explode-next" class="ibtn s" aria-label="Step forward" title="One step forward (disassemble)"><i data-icon="stepfwd" data-size="15"></i></button>
<span id="explode-step" class="ex-step"></span>
- <select id="explode-speed" class="ex-speed" aria-label="Tempo beim Abspielen" title="Tempo beim Abspielen"><option value="0.25">0,25×</option><option value="0.5">0,5×</option><option value="1" selected>1×</option><option value="2">2×</option></select>
- <button id="btn-explode-agent" class="ibtn s" aria-label="Reihenfolge an den Agenten geben" title="Die Reihenfolge des Auseinanderbaus in die Eingabe des Agenten einfügen"><i data-icon="send" data-size="15"></i></button>
+ <select id="explode-speed" class="ex-speed" aria-label="Playback speed" title="Playback speed"><option value="0.25">0.25×</option><option value="0.5">0.5×</option><option value="1" selected>1×</option><option value="2">2×</option></select>
+ <button id="btn-explode-agent" class="ibtn s" aria-label="Send the order to the agent" title="Add the disassembly order to the agent's input"><i data-icon="send" data-size="15"></i></button>
</div>
<div id="explode-names" class="ex-names" hidden></div>
<div id="explode-hint" class="mc-hint" hidden></div>
<div class="sc-actions">
- <button id="btn-explode-trails" class="btn sm" aria-pressed="true" title="Gestrichelte Wege von der Einbaulage zur aktuellen Lage zeigen"><i data-icon="line" data-size="14" data-stroke="1.9"></i>Wege</button>
- <button id="btn-explode-fit" class="btn sm" title="Das auseinandergezogene Modell ganz ins Bild holen"><i data-icon="fit" data-size="14" data-stroke="1.9"></i>Einpassen</button>
+ <button id="btn-explode-trails" class="btn sm" aria-pressed="true" title="Show dashed paths from the assembled position to the current position"><i data-icon="line" data-size="14" data-stroke="1.9"></i>Paths</button>
+ <button id="btn-explode-fit" class="btn sm" title="Fit the exploded model into the view"><i data-icon="fit" data-size="14" data-stroke="1.9"></i>Fit</button>
</div>
</div>
<!-- Schnittansicht (sectiontool.ts): Ebene, Lage, Seite. Ändert nichts am Modell. -->
<div id="section-card" class="float sectcard" hidden>
- <div class="mc-hd"><span class="mc-ico"><i data-icon="section" data-size="16"></i></span><b>Schnitt</b><span class="grow"></span>
- <button id="btn-section-close" class="ibtn s" aria-label="Schnitt aufheben" title="Schnitt aufheben"><i data-icon="x" data-size="14" data-stroke="2"></i></button></div>
- <div id="section-axes" class="seg" role="radiogroup" aria-label="Schnittebene">
- <button data-axis="x" role="radio" aria-checked="true" title="Ebene senkrecht zur X-Achse">X</button>
- <button data-axis="y" role="radio" aria-checked="false" title="Ebene senkrecht zur Y-Achse">Y</button>
- <button data-axis="z" role="radio" aria-checked="false" title="Ebene senkrecht zur Z-Achse">Z</button>
- <button data-axis="face" role="radio" aria-checked="false" title="Parallel zu einer ebenen Fläche: danach die Fläche im Modell anklicken"><i data-icon="target" data-size="13" data-stroke="2"></i>Fläche</button>
+ <div class="mc-hd"><span class="mc-ico"><i data-icon="section" data-size="16"></i></span><b>Section</b><span class="grow"></span>
+ <button id="btn-section-close" class="ibtn s" aria-label="Remove section" title="Remove section"><i data-icon="x" data-size="14" data-stroke="2"></i></button></div>
+ <div id="section-axes" class="seg" role="radiogroup" aria-label="Section plane">
+ <button data-axis="x" role="radio" aria-checked="true" title="Plane normal to the X axis">X</button>
+ <button data-axis="y" role="radio" aria-checked="false" title="Plane normal to the Y axis">Y</button>
+ <button data-axis="z" role="radio" aria-checked="false" title="Plane normal to the Z axis">Z</button>
+ <button data-axis="face" role="radio" aria-checked="false" title="Parallel to a planar face: then click the face in the model"><i data-icon="target" data-size="13" data-stroke="2"></i>Face</button>
</div>
<div class="sx-pos">
<label id="section-label" for="section-value">X =</label>
- <input id="section-range" type="range" aria-label="Lage der Schnittebene">
- <span class="sx-val"><input id="section-value" type="text" inputmode="decimal" spellcheck="false" autocomplete="off" aria-label="Lage der Schnittebene in mm" title="Wert eingeben und Enter. Pfeiltasten: 1 mm, mit Umschalt 10 mm, mit Alt 0,1 mm"><span class="c3">mm</span></span>
+ <input id="section-range" type="range" aria-label="Position of the section plane">
+ <span class="sx-val"><input id="section-value" type="text" inputmode="decimal" spellcheck="false" autocomplete="off" aria-label="Position of the section plane in mm" title="Enter a value and press Enter. Arrow keys: 1 mm, with Shift 10 mm, with Alt 0.1 mm"><span class="c3">mm</span></span>
</div>
<div id="section-hint" class="mc-hint"></div>
<div class="sc-actions">
- <button id="btn-section-flip" class="btn sm" title="Die andere Seite wegschneiden"><i data-icon="flip" data-size="14" data-stroke="1.9"></i>Seite wechseln</button>
- <button id="btn-section-look" class="btn sm" title="Senkrecht auf die Schnittfläche blicken"><i data-icon="eye" data-size="14" data-stroke="1.9"></i>Blick auf den Schnitt</button>
+ <button id="btn-section-flip" class="btn sm" title="Cut away the other side"><i data-icon="flip" data-size="14" data-stroke="1.9"></i>Flip side</button>
+ <button id="btn-section-look" class="btn sm" title="Look straight at the cut face"><i data-icon="eye" data-size="14" data-stroke="1.9"></i>Look at section</button>
</div>
</div>
<!-- Animation (E58, animtool.ts): Ablauf aus animations/*.py abspielen. Ändert nichts am Modell. -->
<div id="anim-card" class="float ancard" hidden>
<div class="mc-hd"><span class="mc-ico"><i data-icon="anim" data-size="16"></i></span><b>Animation</b>
- <select id="anim-select" class="an-select" aria-label="Animation wählen"></select>
- <button id="btn-anim-close" class="ibtn s" aria-label="Animation beenden" title="Animation beenden (das Modell steht wieder in Einbaulage)"><i data-icon="x" data-size="14" data-stroke="2"></i></button></div>
+ <select id="anim-select" class="an-select" aria-label="Choose animation"></select>
+ <button id="btn-anim-close" class="ibtn s" aria-label="Close animation" title="Close animation (the model returns to its assembled position)"><i data-icon="x" data-size="14" data-stroke="2"></i></button></div>
<div class="an-transport">
- <button id="btn-anim-play" class="ibtn an-play" aria-label="Abspielen" title="Abspielen (Leertaste)"><i data-icon="play" data-size="16" data-stroke="2"></i></button>
- <input id="anim-range" type="range" min="0" max="1" step="0.01" value="0" aria-label="Zeitpunkt in der Animation">
+ <button id="btn-anim-play" class="ibtn an-play" aria-label="Play" title="Play (Space)"><i data-icon="play" data-size="16" data-stroke="2"></i></button>
+ <input id="anim-range" type="range" min="0" max="1" step="0.01" value="0" aria-label="Time in the animation">
<span id="anim-time" class="an-time"></span>
</div>
<div class="an-opts">
- <button id="btn-anim-follow" class="btn sm" aria-pressed="true" title="Kamera der Animation folgen. Aus: frei drehen, die Teile bewegen sich trotzdem"><i data-icon="camera" data-size="14" data-stroke="1.9"></i>Kamera</button>
- <button id="btn-anim-loop" class="btn sm" aria-pressed="false" title="Am Ende von vorn"><i data-icon="loop" data-size="14" data-stroke="1.9"></i>Schleife</button>
- <button id="btn-anim-texts" class="btn sm" aria-pressed="true" title="Titel, Untertitel und Beschriftungen der Animation zeigen. Aus: nur die Bewegung, das Video enthält sie trotzdem"><i data-icon="text" data-size="14" data-stroke="1.9"></i>Texte</button>
+ <button id="btn-anim-follow" class="btn sm" aria-pressed="true" title="Follow the animation's camera. Off: rotate freely, the parts still move"><i data-icon="camera" data-size="14" data-stroke="1.9"></i>Camera</button>
+ <button id="btn-anim-loop" class="btn sm" aria-pressed="false" title="Start over at the end"><i data-icon="loop" data-size="14" data-stroke="1.9"></i>Loop</button>
+ <button id="btn-anim-texts" class="btn sm" aria-pressed="true" title="Show titles, subtitles and labels of the animation. Off: only the motion, the video still contains them"><i data-icon="text" data-size="14" data-stroke="1.9"></i>Texts</button>
<span class="grow"></span>
- <select id="anim-speed" class="an-speed" aria-label="Tempo" title="Tempo"><option value="0.25">0,25×</option><option value="0.5">0,5×</option><option value="1" selected>1×</option><option value="2">2×</option></select>
+ <select id="anim-speed" class="an-speed" aria-label="Speed" title="Speed"><option value="0.25">0.25×</option><option value="0.5">0.5×</option><option value="1" selected>1×</option><option value="2">2×</option></select>
</div>
<div id="anim-hint" class="mc-hint"></div>
<div class="sc-actions">
- <button id="btn-anim-video" class="btn sm" title="Video (MP4) dieser Animation nach renders/ schreiben und abspielen"><i data-icon="f-video" data-size="14" data-stroke="1.9"></i>Video erzeugen</button>
- <button id="btn-anim-agent" class="btn sm acc" title="Name der Animation und Zeitpunkt in die Eingabe des Agenten einfügen"><i data-icon="send" data-size="14" data-stroke="1.9"></i>An Agent geben</button>
+ <button id="btn-anim-video" class="btn sm" title="Write a video (MP4) of this animation to renders/ and play it"><i data-icon="f-video" data-size="14" data-stroke="1.9"></i>Make video</button>
+ <button id="btn-anim-agent" class="btn sm acc" title="Add the animation's name and the time to the agent's input"><i data-icon="send" data-size="14" data-stroke="1.9"></i>Send to agent</button>
</div>
</div>
<!-- Analyse (E58, resulttool.ts): Ergebnisse von soma analyze farbig zeigen -->
<div id="result-card" class="float rscard" hidden>
- <div class="mc-hd"><span class="mc-ico"><i data-icon="gauge" data-size="16"></i></span><b>Analyse</b>
- <select id="result-select" class="an-select" aria-label="Ergebnis wählen"></select>
- <button id="btn-result-close" class="ibtn s" aria-label="Analyse beenden" title="Analyse beenden (zeigt wieder das Modell)"><i data-icon="x" data-size="14" data-stroke="2"></i></button></div>
+ <div class="mc-hd"><span class="mc-ico"><i data-icon="gauge" data-size="16"></i></span><b>Analysis</b>
+ <select id="result-select" class="an-select" aria-label="Choose result"></select>
+ <button id="btn-result-close" class="ibtn s" aria-label="Close analysis" title="Close analysis (shows the model again)"><i data-icon="x" data-size="14" data-stroke="2"></i></button></div>
<div id="result-legend" class="rs-legend"></div>
<!-- Farbskala: gezeigte Größe (nur FEM: Sicherheit oder Vergleichsspannung) und Spanne der Färbung -->
<div id="result-scale" class="an-opts rs-fem rs-opts">
- <select id="result-field" class="an-speed" aria-label="Größe" title="Gezeigte Größe: Sicherheitsfaktor oder Vergleichsspannung nach von Mises" hidden>
- <option value="value">Sicherheit</option><option value="stress">Spannung</option></select>
- <select id="result-range" class="an-speed" aria-label="Spanne der Farbskala" title="Spanne der Färbung: wie von der Auswertung vorgeschlagen, vom kleinsten bis zum größten Wert oder selbst gewählt">
- <option value="auto">Skala automatisch</option><option value="minmax">Skala Min bis Max</option><option value="custom">Skala selbst wählen</option></select>
+ <select id="result-field" class="an-speed" aria-label="Quantity" title="Quantity shown: safety factor or von Mises stress" hidden>
+ <option value="value">Safety factor</option><option value="stress">Stress</option></select>
+ <select id="result-range" class="an-speed" aria-label="Range of the color scale" title="Range of the coloring: as suggested by the analysis, from the smallest to the largest value, or custom">
+ <option value="auto">Auto scale</option><option value="minmax">Scale min to max</option><option value="custom">Custom scale</option></select>
<span id="result-custom" class="rs-custom" hidden>
- <input id="result-lo" class="an-speed rs-num" type="number" step="any" aria-label="Skala von" title="Unteres Ende der Farbskala">
- <span>bis</span>
- <input id="result-hi" class="an-speed rs-num" type="number" step="any" aria-label="Skala bis" title="Oberes Ende der Farbskala"></span>
+ <input id="result-lo" class="an-speed rs-num" type="number" step="any" aria-label="Scale from" title="Lower end of the color scale">
+ <span>to</span>
+ <input id="result-hi" class="an-speed rs-num" type="number" step="any" aria-label="Scale to" title="Upper end of the color scale"></span>
</div>
<!-- Nur bei FEM (E65): Verformung überhöht zeigen, Lastfall ein- und ausblenden -->
<div id="result-fem" class="an-opts rs-fem" hidden>
- <select id="result-deform" class="an-speed" aria-label="Verformung" title="Verformung: unverformt, in echter Größe oder überhöht, damit man sie sieht"></select>
+ <select id="result-deform" class="an-speed" aria-label="Deformation" title="Deformation: undeformed, true scale or exaggerated so you can see it"></select>
<span class="grow"></span>
- <button id="btn-result-bcs" class="btn sm" aria-pressed="true" title="Lastfall zeigen: eingespannte Flächen und Lasten in Blau, Kräfte als Pfeile"><i data-icon="arrow" data-size="14" data-stroke="1.9"></i>Lastfall</button>
+ <button id="btn-result-bcs" class="btn sm" aria-pressed="true" title="Show the load case: fixed faces and loads in blue, forces as arrows"><i data-icon="arrow" data-size="14" data-stroke="1.9"></i>Load case</button>
</div>
<div id="result-summary" class="rs-summary"></div>
<div id="result-probe" class="rs-probe"></div>
<div id="result-hint" class="mc-hint"></div>
<div class="sc-actions">
- <button id="btn-result-rerun" class="btn sm" title="Dieselbe Auswertung am aktuellen Modell noch einmal rechnen"><i data-icon="refresh" data-size="14" data-stroke="1.9"></i>Neu berechnen</button>
- <button id="btn-result-agent" class="btn sm acc" title="Ergebnis und die angeklickte Stelle in die Eingabe des Agenten einfügen"><i data-icon="send" data-size="14" data-stroke="1.9"></i>An Agent geben</button>
+ <button id="btn-result-rerun" class="btn sm" title="Run the same analysis again on the current model"><i data-icon="refresh" data-size="14" data-stroke="1.9"></i>Recalculate</button>
+ <button id="btn-result-agent" class="btn sm acc" title="Add the result and the clicked spot to the agent's input"><i data-icon="send" data-size="14" data-stroke="1.9"></i>Send to agent</button>
</div>
</div>
@@ -266,16 +266,16 @@
<div id="errcard" class="float errcard" hidden>
<div class="ec-hd"><span class="err-ico"><i data-icon="alert" data-size="18"></i></span>
- <div class="ec-title"><b>Build fehlgeschlagen</b><span id="err-where" class="c2"></span></div><span class="grow"></span>
- <button id="btn-err-fold" class="ibtn s" aria-label="Meldung einklappen" aria-expanded="true"><i data-icon="up" data-size="15" data-stroke="2"></i></button></div>
+ <div class="ec-title"><b>Build failed</b><span id="err-where" class="c2"></span></div><span class="grow"></span>
+ <button id="btn-err-fold" class="ibtn s" aria-label="Collapse message" aria-expanded="true"><i data-icon="up" data-size="15" data-stroke="2"></i></button></div>
<div id="err-body">
<div id="err-msg" class="errmsg"></div>
<div id="err-code" class="peek code" hidden></div>
<pre id="err-trace" class="trace" hidden></pre>
<div class="ec-actions"><span class="grow"></span>
<button id="btn-err-details" class="btn sm" aria-expanded="false">Details</button>
- <button id="btn-err-code" class="btn sm"><i data-icon="code" data-size="14" data-stroke="1.9"></i>Code öffnen</button>
- <button id="btn-err-agent" class="btn sm acc" title="Die Fehlermeldung in die Eingabe des Agenten einfügen"><i data-icon="send" data-size="14" data-stroke="1.9"></i>An Agent geben</button></div>
+ <button id="btn-err-code" class="btn sm"><i data-icon="code" data-size="14" data-stroke="1.9"></i>Open code</button>
+ <button id="btn-err-agent" class="btn sm acc" title="Add the error message to the agent's input"><i data-icon="send" data-size="14" data-stroke="1.9"></i>Send to agent</button></div>
</div>
</div>
<div id="lastgood" class="float lastgood" hidden></div>
@@ -283,13 +283,13 @@
<div id="preview-banner" class="float banner" hidden>
<span class="bn-ico"><i data-icon="history" data-size="18"></i></span>
<div class="bn-text">
- <div class="bn-line"><b id="bn-title"></b><span class="tag">nur ansehen</span></div>
+ <div class="bn-line"><b id="bn-title"></b><span class="tag">view only</span></div>
<span id="bn-sub" class="c2"></span>
- <span class="c3">Dein Arbeitsstand bleibt unverändert. Wiederherstellen legt einen neuen Stand an, nichts geht verloren.</span>
+ <span class="c3">Your current work stays unchanged. Restore adds a new version, nothing is lost.</span>
</div>
<span class="grow"></span>
- <button id="btn-live" class="btn">Zurück zu Jetzt</button>
- <button id="btn-restore" class="btn vio" title="Diesen Stand als neuen Stand übernehmen">Wiederherstellen</button>
+ <button id="btn-live" class="btn">Back to now</button>
+ <button id="btn-restore" class="btn vio" title="Restore this version as a new version">Restore</button>
</div>
<!-- Video (E58, videoview.ts): MP4 aus dem Projekt abspielen, Standbild markieren -->
@@ -297,50 +297,50 @@
<video id="video-el" preload="auto" playsinline></video>
<div class="float vv-bar" role="toolbar" aria-label="Video">
<span class="vv-title"><i data-icon="f-video" data-size="15"></i><b id="video-title"></b></span><span class="vsep"></span>
- <button id="btn-video-back" class="ibtn" aria-label="Ein Bild zurück" title="Ein Bild zurück (Pfeil links)"><i data-icon="stepback" data-size="15" data-stroke="1.9"></i></button>
- <button id="btn-video-play" class="ibtn" aria-label="Abspielen" title="Abspielen oder anhalten (Leertaste)"><i data-icon="play" data-size="16" data-stroke="2"></i></button>
- <button id="btn-video-fwd" class="ibtn" aria-label="Ein Bild vor" title="Ein Bild vor (Pfeil rechts)"><i data-icon="stepfwd" data-size="15" data-stroke="1.9"></i></button>
- <input id="video-range" type="range" min="0" max="1" step="0.01" value="0" aria-label="Zeitpunkt im Video">
+ <button id="btn-video-back" class="ibtn" aria-label="One frame back" title="One frame back (Left arrow)"><i data-icon="stepback" data-size="15" data-stroke="1.9"></i></button>
+ <button id="btn-video-play" class="ibtn" aria-label="Play" title="Play or pause (Space)"><i data-icon="play" data-size="16" data-stroke="2"></i></button>
+ <button id="btn-video-fwd" class="ibtn" aria-label="One frame forward" title="One frame forward (Right arrow)"><i data-icon="stepfwd" data-size="15" data-stroke="1.9"></i></button>
+ <input id="video-range" type="range" min="0" max="1" step="0.01" value="0" aria-label="Time in the video">
<span id="video-time" class="an-time"></span><span class="vsep"></span>
- <button id="btn-video-mark" class="btn sm" title="Dieses Standbild auf der Zeichenfläche markieren und mit Zeitstempel an den Agenten geben"><i data-icon="camera" data-size="14" data-stroke="1.9"></i>Markieren</button>
- <button id="btn-video-agent" class="btn sm acc" title="Datei und Zeitstempel in die Eingabe des Agenten einfügen"><i data-icon="send" data-size="14" data-stroke="1.9"></i>Zeit an Agent</button>
- <button id="btn-video-close" class="ibtn" aria-label="Video schließen" title="Video schließen (Escape)"><i data-icon="x" data-size="15" data-stroke="2"></i></button>
+ <button id="btn-video-mark" class="btn sm" title="Mark up this frame on the canvas and send it to the agent with a timestamp"><i data-icon="camera" data-size="14" data-stroke="1.9"></i>Mark up</button>
+ <button id="btn-video-agent" class="btn sm acc" title="Add the file and timestamp to the agent's input"><i data-icon="send" data-size="14" data-stroke="1.9"></i>Time to agent</button>
+ <button id="btn-video-close" class="ibtn" aria-label="Close video" title="Close video (Escape)"><i data-icon="x" data-size="15" data-stroke="2"></i></button>
</div>
</div>
<!-- Markierung (E16): eingefrorenes Bild des Viewers oder leere Fläche zum Zeichnen -->
<div id="markup" class="markup" hidden>
- <canvas id="mark-canvas" aria-label="Zeichenfläche"></canvas>
+ <canvas id="mark-canvas" aria-label="Canvas"></canvas>
<div class="mk-frame"></div>
- <input id="mark-text" class="mk-text" type="text" spellcheck="false" autocomplete="off" aria-label="Text der Markierung" hidden>
- <div id="mark-tools" class="float dock mk-tools" role="toolbar" aria-label="Markieren">
- <span class="mk-title"><i data-icon="camera" data-size="15"></i><b>Markieren</b></span><span class="vsep"></span>
- <button data-tool="select" aria-pressed="false" aria-label="Auswählen" title="Auswählen: Form anklicken und ziehen. Ecken skalieren (Umschalt: Seitenverhältnis), der Punkt oben dreht (Umschalt: 15°-Schritte), Entf löscht, Doppelklick bearbeitet Text"><i data-icon="pointer"></i></button>
- <button data-tool="pen" aria-pressed="true" aria-label="Stift" title="Stift: frei zeichnen"><i data-icon="pen"></i></button>
- <button data-tool="line" aria-pressed="false" aria-label="Linie" title="Linie: vom Anfang zum Ende ziehen (mit Umschalt: in 15°-Schritten)"><i data-icon="line"></i></button>
- <button data-tool="arrow" aria-pressed="false" aria-label="Pfeil" title="Pfeil: vom Anfang zur Spitze ziehen (mit Umschalt: in 15°-Schritten)"><i data-icon="arrow"></i></button>
- <button data-tool="rect" aria-pressed="false" aria-label="Rechteck" title="Rechteck (mit Umschalt: Quadrat)"><i data-icon="square"></i></button>
- <button data-tool="ellipse" aria-pressed="false" aria-label="Kreis" title="Kreis oder Ellipse (mit Umschalt: Kreis)"><i data-icon="circle"></i></button>
- <button data-tool="text" aria-pressed="false" aria-label="Text" title="Text: an die Stelle klicken, schreiben, Enter. Klick auf einen Text bearbeitet ihn"><i data-icon="text"></i></button>
+ <input id="mark-text" class="mk-text" type="text" spellcheck="false" autocomplete="off" aria-label="Markup text" hidden>
+ <div id="mark-tools" class="float dock mk-tools" role="toolbar" aria-label="Markup">
+ <span class="mk-title"><i data-icon="camera" data-size="15"></i><b>Markup</b></span><span class="vsep"></span>
+ <button data-tool="select" aria-pressed="false" aria-label="Select" title="Select: click a shape and drag it. Corners scale (Shift: keep aspect ratio), the dot on top rotates (Shift: 15° steps), Del deletes, double-click edits text"><i data-icon="pointer"></i></button>
+ <button data-tool="pen" aria-pressed="true" aria-label="Pen" title="Pen: draw freely"><i data-icon="pen"></i></button>
+ <button data-tool="line" aria-pressed="false" aria-label="Line" title="Line: drag from start to end (with Shift: in 15° steps)"><i data-icon="line"></i></button>
+ <button data-tool="arrow" aria-pressed="false" aria-label="Arrow" title="Arrow: drag from start to tip (with Shift: in 15° steps)"><i data-icon="arrow"></i></button>
+ <button data-tool="rect" aria-pressed="false" aria-label="Rectangle" title="Rectangle (with Shift: square)"><i data-icon="square"></i></button>
+ <button data-tool="ellipse" aria-pressed="false" aria-label="Circle" title="Circle or ellipse (with Shift: circle)"><i data-icon="circle"></i></button>
+ <button data-tool="text" aria-pressed="false" aria-label="Text" title="Text: click the spot, type, Enter. Click a text to edit it"><i data-icon="text"></i></button>
<span class="vsep"></span>
- <button id="btn-mark-color" class="mk-colorbtn" aria-haspopup="menu" aria-expanded="false" aria-label="Farbe" title="Farbe (gilt auch für die ausgewählte Form)"><span id="mark-color-sw" class="swatch"></span><i data-icon="down" data-size="12" data-stroke="2"></i></button>
+ <button id="btn-mark-color" class="mk-colorbtn" aria-haspopup="menu" aria-expanded="false" aria-label="Color" title="Color (also applies to the selected shape)"><span id="mark-color-sw" class="swatch"></span><i data-icon="down" data-size="12" data-stroke="2"></i></button>
<span class="vsep"></span>
- <button id="btn-mark-undo" aria-label="Rückgängig" title="Rückgängig (Strg Z), wiederholen mit Strg Y" disabled><i data-icon="undo"></i></button>
- <button id="btn-mark-delete" aria-label="Löschen" title="Ausgewählte Form löschen (Entf)" disabled><i data-icon="trash"></i></button>
+ <button id="btn-mark-undo" aria-label="Undo" title="Undo (Ctrl Z), redo with Ctrl Y" disabled><i data-icon="undo"></i></button>
+ <button id="btn-mark-delete" aria-label="Delete" title="Delete the selected shape (Del)" disabled><i data-icon="trash"></i></button>
<span class="vsep"></span>
- <button id="btn-mark-grid" aria-pressed="false" title="Raster ein- und ausschalten. Es steht mit im Bild, Linien, Pfeile und Formen rasten ein (Alt beim Ziehen: frei)"><i data-icon="grid"></i><span class="lbl">Raster</span></button>
- <button id="btn-mark-blank" aria-pressed="false" title="Auf leerer Fläche zeichnen statt auf dem Viewer-Bild"><i data-icon="image"></i><span class="lbl">Leere Fläche</span></button>
+ <button id="btn-mark-grid" aria-pressed="false" title="Turn the grid on and off. It is part of the image, lines, arrows and shapes snap to it (Alt while dragging: free)"><i data-icon="grid"></i><span class="lbl">Grid</span></button>
+ <button id="btn-mark-blank" aria-pressed="false" title="Draw on a blank canvas instead of the viewer image"><i data-icon="image"></i><span class="lbl">Blank canvas</span></button>
</div>
<div id="mark-hint" class="float mk-hint"></div>
<div class="mk-actions">
- <button id="btn-mark-cancel" class="btn" title="Zeichnung verwerfen (Escape)">Abbrechen</button>
- <button id="btn-mark-send" class="btn primary" title="Als PNG in .soma/feedback/ speichern und den Pfad in die Eingabe des Agenten einfügen"><i data-icon="send" data-size="15" data-stroke="2"></i>An Agent geben</button>
+ <button id="btn-mark-cancel" class="btn" title="Discard the drawing (Escape)">Cancel</button>
+ <button id="btn-mark-send" class="btn primary" title="Save as PNG in .soma/feedback/ and add the path to the agent's input"><i data-icon="send" data-size="15" data-stroke="2"></i>Send to agent</button>
</div>
</div>
</section>
<div id="versions" class="tl">
- <span class="lbl"><i data-icon="history" data-size="15"></i>Verlauf</span>
+ <span class="lbl"><i data-icon="history" data-size="15"></i>History</span>
<div id="vtrack" class="track"><div class="line"></div><div id="vdots"></div></div>
<span id="vproblem" class="vproblem" hidden></span>
<span id="vinfo" class="c3"></span>
@@ -348,13 +348,13 @@
</main>
<div class="splitter" id="split-right"></div>
- <aside id="terminals" class="agent" aria-label="Agent und Terminals">
+ <aside id="terminals" class="agent" aria-label="Agent and terminals">
<div id="term-tabs" class="tabs">
- <button id="btn-term-add" class="ibtn addtab" aria-haspopup="menu" aria-expanded="false" title="Neuer Tab: Agent oder Terminal" aria-label="Neuer Tab: Agent oder Terminal"><i data-icon="plus" data-size="15" data-stroke="2"></i><i data-icon="down" data-size="12" data-stroke="2"></i></button>
+ <button id="btn-term-add" class="ibtn addtab" aria-haspopup="menu" aria-expanded="false" title="New tab: agent or terminal" aria-label="New tab: agent or terminal"><i data-icon="plus" data-size="15" data-stroke="2"></i><i data-icon="down" data-size="12" data-stroke="2"></i></button>
</div>
<div id="term-panes"></div>
<div id="agent-strip" class="strip" hidden>
- <button id="btn-agent-expand" class="ibtn" title="Agent-Bereich ausklappen" aria-label="Agent-Bereich ausklappen"><i data-icon="panel"></i></button>
+ <button id="btn-agent-expand" class="ibtn" title="Expand the agent area" aria-label="Expand the agent area"><i data-icon="panel"></i></button>
<div id="strip-tabs" class="strip-tabs"></div>
</div>
</aside>
@@ -362,115 +362,115 @@
<!-- Menüs: fest im Dokument, damit Kurzbefehle und Tests die Einträge auch geschlossen finden -->
<div id="menu-doc" class="menu" role="menu" hidden>
- <button id="btn-new" class="mi" role="menuitem"><i data-icon="plus" data-size="15"></i><span>Neues Modell</span><span class="k">Strg N</span></button>
- <button id="btn-open" class="mi" role="menuitem"><i data-icon="folder" data-size="15"></i><span>Öffnen …</span><span class="k">Strg O</span></button>
- <div id="recent-wrap"><div class="msep"></div><div class="mh">ZULETZT GEÖFFNET</div><div id="recent-list"></div></div>
+ <button id="btn-new" class="mi" role="menuitem"><i data-icon="plus" data-size="15"></i><span>New model</span><span class="k">Ctrl N</span></button>
+ <button id="btn-open" class="mi" role="menuitem"><i data-icon="folder" data-size="15"></i><span>Open …</span><span class="k">Ctrl O</span></button>
+ <div id="recent-wrap"><div class="msep"></div><div class="mh">RECENT</div><div id="recent-list"></div></div>
<div class="msep"></div>
- <button id="btn-save-menu" class="mi" role="menuitem"><span class="noico"></span><span>Speichern</span><span class="k">Strg S</span></button>
- <button id="btn-saveas" class="mi" role="menuitem"><span class="noico"></span><span>Speichern unter …</span><span class="k">Strg Umschalt S</span></button>
+ <button id="btn-save-menu" class="mi" role="menuitem"><span class="noico"></span><span>Save</span><span class="k">Ctrl S</span></button>
+ <button id="btn-saveas" class="mi" role="menuitem"><span class="noico"></span><span>Save as …</span><span class="k">Ctrl Shift S</span></button>
<div class="msep"></div>
- <button id="btn-reveal-menu" class="mi" role="menuitem"><i data-icon="openext" data-size="15"></i><span>Im Explorer zeigen</span></button>
- <button id="btn-start" class="mi" role="menuitem"><i data-icon="home" data-size="15"></i><span>Startseite</span></button>
+ <button id="btn-reveal-menu" class="mi" role="menuitem"><i data-icon="openext" data-size="15"></i><span>Show in Explorer</span></button>
+ <button id="btn-start" class="mi" role="menuitem"><i data-icon="home" data-size="15"></i><span>Start page</span></button>
</div>
<div id="menu-build" class="menu" role="menu" hidden>
<div class="mhead"><b id="bm-title"></b><span id="bm-sub" class="c3"></span></div>
<div id="bm-warn" class="mnote warn" hidden></div>
<div class="msep"></div>
- <label class="mi keep switchrow"><i data-icon="refresh" data-size="15"></i><span>Automatisch bauen</span><input id="chk-auto" type="checkbox" class="switch" checked></label>
- <div class="mnote indent">Bei großen Modellen ausschalten. Dann baut der Knopf oder der Agent.</div>
- <button id="btn-build" class="mi" role="menuitem"><i data-icon="play" data-size="15"></i><span>Jetzt bauen</span><span class="k">Strg B</span></button>
+ <label class="mi keep switchrow"><i data-icon="refresh" data-size="15"></i><span>Build automatically</span><input id="chk-auto" type="checkbox" class="switch" checked></label>
+ <div class="mnote indent">Turn off for large models. Then the button or the agent builds.</div>
+ <button id="btn-build" class="mi" role="menuitem"><i data-icon="play" data-size="15"></i><span>Build now</span><span class="k">Ctrl B</span></button>
</div>
- <div id="menu-view" class="menu wide" role="menu" aria-label="Was der Viewer zeigt" hidden></div>
+ <div id="menu-view" class="menu wide" role="menu" aria-label="What the viewer shows" hidden></div>
<div id="menu-display" class="menu" role="menu" hidden>
- <div class="mh">DARSTELLUNG</div>
- <button class="mi keep" role="menuitemcheckbox" data-display="edges" aria-checked="true"><span class="chk"><i data-icon="check" data-size="15" data-stroke="2.2"></i></span><span>Kanten</span></button>
- <button class="mi keep" role="menuitemcheckbox" data-display="wire" aria-checked="false"><span class="chk"><i data-icon="check" data-size="15" data-stroke="2.2"></i></span><span>Drahtgitter</span></button>
+ <div class="mh">DISPLAY</div>
+ <button class="mi keep" role="menuitemcheckbox" data-display="edges" aria-checked="true"><span class="chk"><i data-icon="check" data-size="15" data-stroke="2.2"></i></span><span>Edges</span></button>
+ <button class="mi keep" role="menuitemcheckbox" data-display="wire" aria-checked="false"><span class="chk"><i data-icon="check" data-size="15" data-stroke="2.2"></i></span><span>Wireframe</span></button>
<button class="mi keep" role="menuitemcheckbox" data-display="ghost" aria-checked="false"><span class="chk"><i data-icon="check" data-size="15" data-stroke="2.2"></i></span><span>Transparent</span></button>
<div class="msep"></div>
- <div class="mh">ANSICHT</div>
+ <div class="mh">VIEW</div>
<div class="chips views">
- <button class="chip" data-view="front">Vorne</button><button class="chip" data-view="back">Hinten</button><button class="chip" data-view="left">Links</button>
- <button class="chip" data-view="right">Rechts</button><button class="chip" data-view="top">Oben</button><button class="chip" data-view="bottom">Unten</button>
+ <button class="chip" data-view="front">Front</button><button class="chip" data-view="back">Back</button><button class="chip" data-view="left">Left</button>
+ <button class="chip" data-view="right">Right</button><button class="chip" data-view="top">Top</button><button class="chip" data-view="bottom">Bottom</button>
</div>
- <div class="mnote">Doppelklick ins Modell setzt den Drehpunkt. Das Mausrad zoomt zur Mausposition, die rechte Maustaste verschiebt. „Einpassen“ neben dem Würfel setzt zurück.</div>
+ <div class="mnote">Double-click the model to set the pivot. The mouse wheel zooms to the mouse position, the right mouse button pans. “Fit” next to the cube resets.</div>
</div>
<div id="menu-export" class="menu wide" role="menu" hidden>
- <div class="mh">UMFANG</div>
- <div class="seg"><button id="exp-all" class="on" aria-pressed="true">Alle Bauteile</button><button id="exp-sel" aria-pressed="false" disabled>Nur Auswahl</button></div>
- <div class="mh">3D-DRUCK</div>
+ <div class="mh">SCOPE</div>
+ <div class="seg"><button id="exp-all" class="on" aria-pressed="true">All parts</button><button id="exp-sel" aria-pressed="false" disabled>Selection only</button></div>
+ <div class="mh">3D PRINTING</div>
<div class="chips"><button class="chip" data-fmt="stl">STL</button><button class="chip" data-fmt="3mf">3MF</button><button class="chip" data-fmt="amf">AMF</button></div>
- <div class="mh">CAD-AUSTAUSCH</div>
+ <div class="mh">CAD EXCHANGE</div>
<div class="chips"><button class="chip" data-fmt="step">STEP</button><button class="chip" data-fmt="iges">IGES</button><button class="chip" data-fmt="brep">BREP</button></div>
- <div class="mh">GRAFIK UND WEB</div>
+ <div class="mh">GRAPHICS AND WEB</div>
<div class="chips"><button class="chip" data-fmt="glb">GLB</button><button class="chip" data-fmt="gltf">GLTF</button><button class="chip" data-fmt="obj">OBJ</button><button class="chip" data-fmt="vrml">VRML</button></div>
<div class="mh">2D</div>
- <div class="chips"><button class="chip" data-fmt="dxf" title="Schnitt in Bauteilmitte">DXF · Schnitt</button><button class="chip" data-fmt="svg" title="Projektion">SVG · Ansicht</button></div>
+ <div class="chips"><button class="chip" data-fmt="dxf" title="Section through the middle of the part">DXF · Section</button><button class="chip" data-fmt="svg" title="Projection">SVG · View</button></div>
<div class="msep"></div>
- <div class="mnote">Ein Bauteil: Speicherort wählen. Alle Bauteile: Ordner wählen, jedes wird eine eigene Datei. Referenz- und Zukaufteile sind bei „Alle Bauteile“ nicht dabei.</div>
+ <div class="mnote">One part: choose the location. All parts: choose a folder, each part becomes its own file. Reference and purchased parts are not included in “All parts”.</div>
</div>
<div id="menu-agents" class="menu" role="menu" hidden>
- <div class="mh">AGENT STARTEN</div>
+ <div class="mh">START AGENT</div>
<div id="agent-list"></div>
<div class="msep"></div>
- <button id="btn-term-plain" class="mi" role="menuitem"><i data-icon="term" data-size="15" data-stroke="2"></i><span>Leeres Terminal</span></button>
+ <button id="btn-term-plain" class="mi" role="menuitem"><i data-icon="term" data-size="15" data-stroke="2"></i><span>Empty terminal</span></button>
</div>
- <div id="menu-problems" class="menu wide" role="dialog" aria-label="Hinweise zum Projekt" hidden>
+ <div id="menu-problems" class="menu wide" role="dialog" aria-label="Project issues" hidden>
<div id="problem-list"></div>
- <div class="mnote sepline">Die App meldet nur, sie repariert nichts selbst.</div>
+ <div class="mnote sepline">The app only reports, it does not repair anything by itself.</div>
</div>
<div id="menu-ctx" class="menu" role="menu" hidden></div>
- <div id="menu-mark-color" class="menu" role="menu" aria-label="Farbe der Markierung" hidden>
- <div class="mh">FARBE</div>
+ <div id="menu-mark-color" class="menu" role="menu" aria-label="Markup color" hidden>
+ <div class="mh">COLOR</div>
<div class="mk-palette">
<button data-color="orange" aria-pressed="true" aria-label="Orange" title="Orange" style="--c:var(--mk-orange)"></button>
- <button data-color="red" aria-pressed="false" aria-label="Rot" title="Rot" style="--c:var(--mk-red)"></button>
+ <button data-color="red" aria-pressed="false" aria-label="Red" title="Red" style="--c:var(--mk-red)"></button>
<button data-color="pink" aria-pressed="false" aria-label="Pink" title="Pink" style="--c:var(--mk-pink)"></button>
- <button data-color="violet" aria-pressed="false" aria-label="Violett" title="Violett" style="--c:var(--mk-violet)"></button>
- <button data-color="blue" aria-pressed="false" aria-label="Blau" title="Blau" style="--c:var(--mk-blue)"></button>
- <button data-color="cyan" aria-pressed="false" aria-label="Türkis" title="Türkis" style="--c:var(--mk-cyan)"></button>
- <button data-color="green" aria-pressed="false" aria-label="Grün" title="Grün" style="--c:var(--mk-green)"></button>
- <button data-color="yellow" aria-pressed="false" aria-label="Gelb" title="Gelb" style="--c:var(--mk-yellow)"></button>
- <button data-color="white" aria-pressed="false" aria-label="Weiß" title="Weiß" style="--c:var(--mk-white)"></button>
- <button data-color="black" aria-pressed="false" aria-label="Schwarz" title="Schwarz" style="--c:var(--mk-black)"></button>
+ <button data-color="violet" aria-pressed="false" aria-label="Violet" title="Violet" style="--c:var(--mk-violet)"></button>
+ <button data-color="blue" aria-pressed="false" aria-label="Blue" title="Blue" style="--c:var(--mk-blue)"></button>
+ <button data-color="cyan" aria-pressed="false" aria-label="Cyan" title="Cyan" style="--c:var(--mk-cyan)"></button>
+ <button data-color="green" aria-pressed="false" aria-label="Green" title="Green" style="--c:var(--mk-green)"></button>
+ <button data-color="yellow" aria-pressed="false" aria-label="Yellow" title="Yellow" style="--c:var(--mk-yellow)"></button>
+ <button data-color="white" aria-pressed="false" aria-label="White" title="White" style="--c:var(--mk-white)"></button>
+ <button data-color="black" aria-pressed="false" aria-label="Black" title="Black" style="--c:var(--mk-black)"></button>
</div>
<div class="msep"></div>
- <label class="mi keep mk-custom" title="Beliebige Farbe im Farbdialog wählen"><input id="mark-color-custom" type="color" value="#f29a38"><span>Eigene Farbe …</span></label>
- <div class="mnote">Ist eine Form ausgewählt, bekommt sie die Farbe gleich mit.</div>
+ <label class="mi keep mk-custom" title="Choose any color in the color dialog"><input id="mark-color-custom" type="color" value="#f29a38"><span>Custom color …</span></label>
+ <div class="mnote">If a shape is selected, it gets the color right away.</div>
</div>
<div id="start" class="start" hidden>
<header class="top"><span class="logo"><i data-icon="logo" data-size="22" data-stroke="1.6"></i></span><b class="brand">SOMA</b><span id="start-version" class="c3 small"></span><span class="grow"></span>
- <button id="btn-start-close" class="btn">Zurück zum Modell</button></header>
+ <button id="btn-start-close" class="btn">Back to the model</button></header>
<div class="start-body">
<div class="start-grid">
<div>
- <h1>Modelle</h1>
- <p class="c2 lead">Ein Modell ist eine ZIP-Datei mit Code, Ergebnis und Verlauf. Du kannst sie frei verschieben und weitergeben.</p>
+ <h1>Models</h1>
+ <p class="c2 lead">A model is a ZIP file with code, result and history. You can move it and share it freely.</p>
<div class="bigcards">
- <button id="start-new" class="bigcard"><span class="ico acc"><i data-icon="plus" data-size="22" data-stroke="2.2"></i></span><b>Neues Modell</b><span class="c2">Vorlage mit Beispielteil, dazu ein Terminal im Modellordner</span><span class="c3 small">Strg N</span></button>
- <button id="start-open" class="bigcard"><span class="ico"><i data-icon="folder" data-size="22"></i></span><b>Öffnen …</b><span class="c2">ZIP-Datei von diesem oder einem anderen Rechner</span><span class="c3 small">Strg O</span></button>
+ <button id="start-new" class="bigcard"><span class="ico acc"><i data-icon="plus" data-size="22" data-stroke="2.2"></i></span><b>New model</b><span class="c2">Template with an example part, plus a terminal in the model folder</span><span class="c3 small">Ctrl N</span></button>
+ <button id="start-open" class="bigcard"><span class="ico"><i data-icon="folder" data-size="22"></i></span><b>Open …</b><span class="c2">ZIP file from this or another computer</span><span class="c3 small">Ctrl O</span></button>
</div>
- <div class="cap">ZULETZT GEÖFFNET</div>
+ <div class="cap">RECENT</div>
<div id="start-recent" class="recent-grid"></div>
</div>
<div class="start-side">
<section class="panel-card">
- <div class="ph"><b>Agenten auf diesem Rechner</b><span class="c3 small">Du bringst deinen eigenen Agenten mit und installierst ihn selbst.</span></div>
+ <div class="ph"><b>Agents on this computer</b><span class="c3 small">You bring your own agent and install it yourself.</span></div>
<div id="start-agents"></div>
</section>
<section id="start-note" class="panel-card note">
<span class="note-ico"><i data-icon="info" data-size="18"></i></span>
- <div class="note-text"><b>Gut zu wissen</b>
- <span class="c2">Der Agent arbeitet mit deinen Benutzerrechten. Er kann Dateien auf diesem Rechner lesen und ändern. Freigaben und Schutz regelst du im Agenten selbst.</span>
- <button id="btn-note-ok" class="btn sm">Verstanden</button></div>
+ <div class="note-text"><b>Good to know</b>
+ <span class="c2">The agent works with your user rights. It can read and change files on this computer. You set permissions and protection in the agent itself.</span>
+ <button id="btn-note-ok" class="btn sm">Got it</button></div>
</section>
</div>
</div>
diff --git a/app/src/renderer/main.ts b/app/src/renderer/main.ts
index e7b3472..30280b8 100644
--- a/app/src/renderer/main.ts
+++ b/app/src/renderer/main.ts
@@ -50,13 +50,13 @@ async function readText(rel: string): Promise<string> {
return t;
}
-const num = (v: number, digits = 1) => v.toLocaleString('de-DE', { maximumFractionDigits: digits });
+const num = (v: number, digits = 1) => v.toLocaleString('en-US', { maximumFractionDigits: digits });
const SURFACE: Record<string, string> = {
- PLANE: 'eben', CYLINDER: 'Zylinder', CONE: 'Kegel', SPHERE: 'Kugel', TORUS: 'Torus', BSPLINE: 'Freiform', BEZIER: 'Freiform',
- REVOLUTION: 'Drehfläche', EXTRUSION: 'Extrusionsfläche', OFFSET: 'Versatzfläche', OTHER: 'sonstige',
+ PLANE: 'plane', CYLINDER: 'cylinder', CONE: 'cone', SPHERE: 'sphere', TORUS: 'torus', BSPLINE: 'freeform', BEZIER: 'freeform',
+ REVOLUTION: 'surface of revolution', EXTRUSION: 'extruded surface', OFFSET: 'offset surface', OTHER: 'other',
};
-const surfaceName = (s: string | null) => (s ? SURFACE[s] ?? s.toLowerCase() : 'Fläche');
-const ERROR_KIND: Record<string, string> = { Timeout: 'Zeitlimit überschritten', PythonStart: 'Python ließ sich nicht starten', NoResult: 'Build ohne Ergebnis' };
+const surfaceName = (s: string | null) => (s ? SURFACE[s] ?? s.toLowerCase() : 'face');
+const ERROR_KIND: Record<string, string> = { Timeout: 'Time limit exceeded', PythonStart: 'Python could not be started', NoResult: 'Build without result' };
// ---- Seitenleiste (Bauteile, Dateien, Skills) und Code-Spalte (Entwurf 2) -----------------------------------------
@@ -119,9 +119,9 @@ const code = new CodePanel(
quote: (file, pages, text) => {
// Eine Zeile mit Datei und Seite, wie Auswahl und Markierung. Sehr lange Zitate werden gekürzt, das steht in der Meldung.
const cut = text.length > MAX_QUOTE;
- insertToAgent(`[Zitat: ${file} S. ${pages}: "${cut ? `${text.slice(0, MAX_QUOTE)} …` : text}"] `, cut ? `Zitat auf ${MAX_QUOTE} Zeichen gekürzt.` : undefined);
+ insertToAgent(`[Quote: ${file} p. ${pages}: "${cut ? `${text.slice(0, MAX_QUOTE)} …` : text}"] `, cut ? `Quote shortened to ${MAX_QUOTE} characters.` : undefined);
},
- markPage: (file, page, canvas) => void markSource(`${file} S. ${page}`, canvas, canvas.width, canvas.height),
+ markPage: (file, page, canvas) => void markSource(`${file} p. ${page}`, canvas, canvas.width, canvas.height),
},
);
@@ -134,10 +134,10 @@ async function imageUrl(rel: string): Promise<string> {
/** Link aus einer Markdown-Ansicht: Web-Adressen im Browser, Dateien im Projekt wie ein Klick im Dateibaum. */
function openLink(href: string): void {
if (/^(https?:|mailto:)/i.test(href)) {
- void api.openUrl(href).then((r) => { if (!r.ok) toast(r.error ?? `${href} ließ sich nicht öffnen.`, 'error'); });
+ void api.openUrl(href).then((r) => { if (!r.ok) toast(r.error ?? `${href} could not be opened.`, 'error'); });
return;
}
- if (/^[a-z][a-z0-9+.-]*:/i.test(href)) { toast(`Dieser Link wird aus Sicherheitsgründen nicht geöffnet: ${href.slice(0, 100)}`, 'error'); return; }
+ if (/^[a-z][a-z0-9+.-]*:/i.test(href)) { toast(`For security reasons, this link is not opened: ${href.slice(0, 100)}`, 'error'); return; }
if (TEXT_EXT.test(href.split('/').pop() ?? '') || isPdf(href)) void openCode(href);
else void openExternal(href);
}
@@ -164,21 +164,21 @@ const files = new FileTree($('tab-files'), $('menu-ctx'), {
// Bilder (etwa Markierungen und Skizzen) öffnen auf der Zeichenfläche (E52), das Bildprogramm gibt es per Rechtsklick
else if (IMAGE_EXT.test(n.name)) void markImage(n.path);
else if (VIDEO_EXT.test(n.name)) void videoView.open(n.path);
- else if (/\.(step|stp)$/i.test(n.name)) toast('Fremde STEP-Dateien im Viewer ansehen kommt in einem späteren Schritt. Der Agent kann sie schon jetzt im Skript einbinden.', 'info');
- else toast('Für diesen Dateityp gibt es keine Ansicht in der App. Rechtsklick: „Mit Standardprogramm öffnen“.', 'info');
+ else if (/\.(step|stp)$/i.test(n.name)) toast('Viewing other STEP files in the viewer is coming in a later version. The agent can already use them in the script.', 'info');
+ else toast('The app has no view for this file type. Right-click: “Open with default app”.', 'info');
},
create: async (parent, name, dir) => {
const r = await api.fs.create(parent, name, dir);
- if (!r.ok || !r.path) { toast(r.error ?? `${name} ließ sich nicht anlegen.`, 'error'); return false; }
+ if (!r.ok || !r.path) { toast(r.error ?? `${name} could not be created.`, 'error'); return false; }
await refreshFiles();
if (!dir && TEXT_EXT.test(name)) void openCode(r.path);
return true;
},
rename: async (rel, name) => {
- if (!fileOpAllowed(rel, 'umbenennen')) return true;
+ if (!fileOpAllowed(rel, 'rename')) return true;
const wasOpen = code.openUnder(rel);
const r = await api.fs.rename(rel, name);
- if (!r.ok || !r.path) { toast(r.error ?? `${rel} ließ sich nicht umbenennen.`, 'error'); return false; }
+ if (!r.ok || !r.path) { toast(r.error ?? `${rel} could not be renamed.`, 'error'); return false; }
// Reiter wandern mit: der alte zu, die Datei unter neuem Namen wieder auf (ohne das Panel zu wechseln)
code.forget(rel);
for (const f of wasOpen) void code.open(r.path + f.slice(rel.length), undefined, false);
@@ -186,33 +186,33 @@ const files = new FileTree($('tab-files'), $('menu-ctx'), {
return true;
},
trash: (rel) => void (async () => {
- if (!fileOpAllowed(rel, 'löschen')) return;
+ if (!fileOpAllowed(rel, 'delete')) return;
const r = await api.fs.trash(rel);
if (r.canceled) return;
- if (!r.ok) { toast(r.error ?? `${rel} ließ sich nicht löschen.`, 'error'); return; }
+ if (!r.ok) { toast(r.error ?? `${rel} could not be deleted.`, 'error'); return; }
code.forget(rel);
await refreshFiles();
- toast(`${rel} liegt im Papierkorb.`);
+ toast(`${rel} is in the Recycle Bin.`);
})(),
- reveal: (rel) => void api.fs.reveal(rel).then((r) => { if (!r.ok) toast(r.error ?? 'Der Explorer ließ sich nicht öffnen.', 'error'); }),
+ reveal: (rel) => void api.fs.reveal(rel).then((r) => { if (!r.ok) toast(r.error ?? 'Explorer could not be opened.', 'error'); }),
openExternal: (rel) => void openExternal(rel),
mark: (rel) => void markImage(rel),
- toAgent: (rel) => insertToAgent(`[Datei: ${rel}] `),
- copyPath: (rel) => void navigator.clipboard.writeText(rel).then(() => toast(`Pfad kopiert: ${rel}`), (e) => toast(`Der Pfad ließ sich nicht kopieren: ${e instanceof Error ? e.message : String(e)}`, 'error')),
+ toAgent: (rel) => insertToAgent(`[File: ${rel}] `),
+ copyPath: (rel) => void navigator.clipboard.writeText(rel).then(() => toast(`Path copied: ${rel}`), (e) => toast(`The path could not be copied: ${e instanceof Error ? e.message : String(e)}`, 'error')),
});
fileTree = files;
files.setActive(code.activeFile);
async function openExternal(rel: string): Promise<void> {
const r = await api.fs.openExternal(rel);
- if (!r.ok) toast(r.error ?? `${rel} ließ sich nicht öffnen.`, 'error');
+ if (!r.ok) toast(r.error ?? `${rel} could not be opened.`, 'error');
}
/** Umbenennen und Löschen nur ohne ungespeicherte Eingaben im Editor, sonst gingen sie unter dem alten Namen verloren. */
-function fileOpAllowed(rel: string, what: string): boolean {
+function fileOpAllowed(rel: string, what: 'rename' | 'delete'): boolean {
const open = code.unsaved().filter((f) => f === rel || f.startsWith(`${rel}/`));
if (!open.length) return true;
- toast(`Zum ${what === 'löschen' ? 'Löschen' : 'Umbenennen'} erst speichern oder die Änderungen verwerfen: ${open.join(', ')}`, 'error');
+ toast(`To ${what}, first save or discard the changes: ${open.join(', ')}`, 'error');
return false;
}
@@ -251,7 +251,7 @@ document.addEventListener('drop', (e) => {
if (isInternal(e)) {
if (!overTerminal(e)) return;
const partId = e.dataTransfer?.getData(DRAG_PART), rel = e.dataTransfer?.getData(DRAG_FILE);
- if (partId) { selectPart(partId, null); insertToAgent(selectionText()); } else if (rel) insertToAgent(`[Datei: ${rel}] `);
+ if (partId) { selectPart(partId, null); insertToAgent(selectionText()); } else if (rel) insertToAgent(`[File: ${rel}] `);
return;
}
const list = [...(e.dataTransfer?.files ?? [])];
@@ -262,11 +262,11 @@ async function importFiles(list: File[]): Promise<void> {
const r = await api.fs.importFiles(list);
showPanel('files');
const lines: string[] = [];
- if (r.files.length) lines.push(`In inputs/ abgelegt: ${r.files.map((f) => f.replace(/^inputs\//, '')).join(', ')}`, 'Der Agent kann sie jetzt im Skript einbinden.');
+ if (r.files.length) lines.push(`Added to inputs/: ${r.files.map((f) => f.replace(/^inputs\//, '')).join(', ')}`, 'The agent can now use them in the script.');
// Ein Ordner voller Verknüpfungen soll die Meldung nicht über den Bildschirm ziehen
const shown = r.errors.slice(0, 8);
- if (r.errors.length > shown.length) shown.push(`… und ${r.errors.length - shown.length} weitere`);
- if (r.errors.length) lines.push(`Nicht übernommen:\n${shown.join('\n')}`);
+ if (r.errors.length > shown.length) shown.push(`… and ${r.errors.length - shown.length} more`);
+ if (r.errors.length) lines.push(`Not added:\n${shown.join('\n')}`);
if (lines.length) toast(lines.join('\n'), r.errors.length ? 'error' : 'ok');
}
@@ -307,12 +307,12 @@ async function renderSelection(): Promise<void> {
const e = partEntry(partId);
const name = e?.name ?? p?.name ?? partId;
// Zukaufteile (Normteile aus soma.fasteners, E48) sehen aus wie eigene Teile, der Zusatz unterscheidet sie
- $('sel-name').textContent = name + (p?.role === 'reference' ? ' (Referenz)' : p?.role === 'hardware' ? ' (Zukaufteil)' : '');
- $('sel-name').title = p?.group ? `Gruppe ${p.group}` : '';
+ $('sel-name').textContent = name + (p?.role === 'reference' ? ' (reference)' : p?.role === 'hardware' ? ' (purchased part)' : '');
+ $('sel-name').title = p?.group ? `Group ${p.group}` : '';
$('sel-swatch').style.background = p?.color ?? '';
const bits = pick?.faceId != null
- ? ['Fläche', surfaceName(pick.surface), ...(pick.area != null ? [`${num(pick.area)} mm²`] : [])]
- : pick?.cut ? ['Schnittfläche', 'ganzes Bauteil'] : ['ganzes Bauteil'];
+ ? ['Face', surfaceName(pick.surface), ...(pick.area != null ? [`${num(pick.area)} mm²`] : [])]
+ : pick?.cut ? ['Cut face', 'whole part'] : ['whole part'];
$('info').textContent = bits.join(' · ');
const peek = $('code');
const hasCode = !!(e?.file && e.line);
@@ -321,13 +321,13 @@ async function renderSelection(): Promise<void> {
if (!hasCode) { peek.replaceChildren(); return; }
const { from, to } = lineRange(e!);
const last = Math.min(to, from + 3);
- const head = el('div', { className: 'ph' }, el('span', { textContent: e!.file! }), el('span', { textContent: `Zeile ${from}${to !== from ? '–' + to : ''}` }));
+ const head = el('div', { className: 'ph' }, el('span', { textContent: e!.file! }), el('span', { textContent: `${to !== from ? 'Lines' : 'Line'} ${from}${to !== from ? '–' + to : ''}` }));
try {
const src = (await readText(e!.file!)).split(/\r?\n/);
if (selection?.partId !== partId) return; // inzwischen etwas anderes gewählt
peek.replaceChildren(head, ...codeRows(src.slice(from - 1, last), from, { from, to, kind: 'hl' }));
- if (to > last) peek.append(el('div', { className: 'ph', textContent: `… bis Zeile ${to}` }));
- } catch { peek.replaceChildren(head, el('div', { className: 'ph', textContent: `${e!.file} nicht lesbar` })); }
+ if (to > last) peek.append(el('div', { className: 'ph', textContent: `… to line ${to}` }));
+ } catch { peek.replaceChildren(head, el('div', { className: 'ph', textContent: `${e!.file} not readable` })); }
if (codeOpen) void code.follow(e!.file!, { from, to, label: name, color: p?.color });
}
@@ -336,31 +336,31 @@ function selectionText(): string | null {
if (!selection) return null;
const e = partEntry(selection.partId);
const group = partInfo(selection.partId)?.group;
- const bits = [`Bauteil "${e?.name ?? partInfo(selection.partId)?.name ?? selection.partId}"${group ? ` in Gruppe "${group}"` : ''}`];
- if (e?.file && e.line) { const { from, to } = lineRange(e); bits.push(`${e.file} Zeile ${from}${to !== from ? '-' + to : ''}`); }
+ const bits = [`part "${e?.name ?? partInfo(selection.partId)?.name ?? selection.partId}"${group ? ` in group "${group}"` : ''}`];
+ if (e?.file && e.line) { const { from, to } = lineRange(e); bits.push(`${e.file} ${to !== from ? 'lines' : 'line'} ${from}${to !== from ? '-' + to : ''}`); }
const pk = selection.pick;
if (pk?.faceId != null) {
- bits.push(`angeklickte Fläche: ${surfaceName(pk.surface)}${pk.area != null ? `, ${pk.area.toFixed(1)} mm²` : ''}, Punkt (${pk.point.map((v) => v.toFixed(1)).join(', ')}) mm`);
+ bits.push(`clicked face: ${surfaceName(pk.surface)}${pk.area != null ? `, ${pk.area.toFixed(1)} mm²` : ''}, point (${pk.point.map((v) => v.toFixed(1)).join(', ')}) mm`);
}
- return `[Auswahl: ${bits.join(', ')}] `;
+ return `[Selection: ${bits.join(', ')}] `;
}
function errorText(): string | null {
const e = buildStatus.state === 'error' ? buildStatus.result?.error : undefined;
if (!e) return null;
- const where = e.file ? `${e.file}${e.line ? ` Zeile ${e.line}` : ''}: ` : '';
- return `[Build-Fehler: ${where}${e.message.replace(/\s+/g, ' ').trim().slice(0, 400)}] `;
+ const where = e.file ? `${e.file}${e.line ? ` line ${e.line}` : ''}: ` : '';
+ return `[Build error: ${where}${e.message.replace(/\s+/g, ' ').trim().slice(0, 400)}] `;
}
/** Fügt Text in die Eingabezeile des aktiven Terminals ein. Abschicken macht der Nutzer selbst (E11). `done` steht vor der Meldung. */
function insertToAgent(text: string | null, done?: string): void {
if (!text) return;
const pre = done ? `${done}\n` : '';
- if (!terminals.count) { toast(`${pre}Kein Terminal offen. Starte über + einen Agenten oder ein Terminal.`, 'error'); return; }
+ if (!terminals.count) { toast(`${pre}No terminal is open. Start an agent or a terminal with +.`, 'error'); return; }
setAgentCollapsed(false);
const title = terminals.insert(text);
- if (title) toast(`${pre}In die Eingabe von ${title} eingefügt. Enter schickt ab.`);
- else toast(`${pre}Alle Terminals sind beendet. Öffne über + ein neues.`, 'error');
+ if (title) toast(`${pre}Added to the input of ${title}. Enter sends it.`);
+ else toast(`${pre}All terminals have ended. Open a new one with +.`, 'error');
}
// ---- Messen (E9) ------------------------------------------------------------------------------------------------
@@ -431,13 +431,13 @@ const MARK_MAX_PX = 8192;
async function markImage(rel: string): Promise<void> {
if (!project || !(await mayReplaceMarkup(rel))) return;
let img: HTMLImageElement, url: string;
- try { url = await imageUrl(rel); } catch (e) { toast(`${rel} lässt sich nicht lesen: ${e instanceof Error ? e.message : String(e)}`, 'error'); return; }
+ try { url = await imageUrl(rel); } catch (e) { toast(`${rel} cannot be read: ${e instanceof Error ? e.message : String(e)}`, 'error'); return; }
try {
img = new Image();
img.src = url;
await img.decode();
} catch {
- toast(`${rel} ließ sich nicht als Bild laden. Rechtsklick: „Mit Standardprogramm öffnen“.`, 'error');
+ toast(`${rel} could not be loaded as an image. Right-click: “Open with default app”.`, 'error');
return;
} finally { URL.revokeObjectURL(url); }
// SVG ohne Größenangabe meldet 0: dann einfach in Viewergröße
@@ -451,7 +451,7 @@ async function mayReplaceMarkup(source: string): Promise<boolean> {
if (!markup.active) return true;
if (markup.source === source) return false;
if (!markup.drawn) return true;
- const c = await api.dialog.choose({ title: 'Markierung', message: 'Die offene Markierung ist noch nicht an den Agenten gegeben.', detail: `Verwerfen und ${source} öffnen?`, buttons: ['Verwerfen und wechseln', 'Abbrechen'] });
+ const c = await api.dialog.choose({ title: 'Markup', message: 'The open markup has not been sent to the agent yet.', detail: `Discard it and open ${source}?`, buttons: ['Discard and switch', 'Cancel'] });
return c === 0;
}
@@ -481,7 +481,7 @@ async function sendMarkup(): Promise<void> {
try {
const r = await api.fs.saveFeedback(await markup.image());
// Ging das Speichern schief, bleibt die Zeichnung offen: Nichts geht verloren, der Nutzer kann es noch einmal versuchen
- if (!r.ok || !r.path) { toast(`Die Markierung ließ sich nicht speichern: ${r.error ?? 'unbekannter Fehler'}`, 'error'); return; }
+ if (!r.ok || !r.path) { toast(`The markup could not be saved: ${r.error ?? 'unknown error'}`, 'error'); return; }
const old = versions.previewed, source = markup.source;
markup.close();
void refreshFiles(); // die neue Markierung steht gleich im Dateibaum
@@ -489,11 +489,11 @@ async function sendMarkup(): Promise<void> {
// aktuellen Code, hält die Schnittfläche für eine echte Fläche oder die auseinandergezogenen Teile für ihre Lage)
// Auf einem Bild aus dem Projekt gezeichnet: Der Agent soll das Original kennen, Stand und Schnitt spielen dann keine Rolle
const cut = [sectionTool.agentText(), explodeTool.agentText(), animTool.agentText(), resultTool.agentText()].filter(Boolean).join(', ');
- const note = source ? `, gezeichnet auf ${source}`
- : (old ? `, zeigt den älteren Stand ${old.short} "${old.subject.slice(0, 80)}"` : '') + (cut ? `, ${cut}` : '');
- insertToAgent(`[Markierung: ${r.path}${note}] `, `Markierung gespeichert: ${r.path}`);
+ const note = source ? `, drawn on ${source}`
+ : (old ? `, shows the older version ${old.short} "${old.subject.slice(0, 80)}"` : '') + (cut ? `, ${cut}` : '');
+ insertToAgent(`[Markup: ${r.path}${note}] `, `Markup saved: ${r.path}`);
} catch (e) {
- toast(`Die Markierung ließ sich nicht speichern: ${e instanceof Error ? e.message : String(e)}`, 'error');
+ toast(`The markup could not be saved: ${e instanceof Error ? e.message : String(e)}`, 'error');
} finally { btn.disabled = false; }
}
@@ -554,15 +554,15 @@ function openPartMenu(id: string, x: number, y: number): void {
const m = $('menu-ctx');
const items: (HTMLElement | null)[] = [
el('div', { className: 'mh', textContent: e?.name ?? partInfo(id)?.name ?? id }),
- menuItem('Isolieren', { icon: 'target', onClick: () => { viewer.isolate(id); refreshPartsCard(); } }),
- viewer.hiddenCount ? menuItem('Alle einblenden', { icon: 'eye', onClick: () => { viewer.showAll(); refreshPartsCard(); } }) : null,
- menuItem(visible ? 'Ausblenden' : 'Einblenden', { icon: visible ? 'eyeoff' : 'eye', onClick: () => { viewer.setVisible(id, !visible); refreshPartsCard(); } }),
- menuItem(ghost ? 'Nicht mehr transparent' : 'Transparent', { icon: 'ghost', onClick: () => { viewer.setGhosted(id, !ghost); refreshPartsCard(); } }),
- menuItem('Kamera auf Bauteil', { icon: 'fit', onClick: () => viewer.focusPart(id) }),
+ menuItem('Isolate', { icon: 'target', onClick: () => { viewer.isolate(id); refreshPartsCard(); } }),
+ viewer.hiddenCount ? menuItem('Show all', { icon: 'eye', onClick: () => { viewer.showAll(); refreshPartsCard(); } }) : null,
+ menuItem(visible ? 'Hide' : 'Show', { icon: visible ? 'eyeoff' : 'eye', onClick: () => { viewer.setVisible(id, !visible); refreshPartsCard(); } }),
+ menuItem(ghost ? 'Not transparent' : 'Transparent', { icon: 'ghost', onClick: () => { viewer.setGhosted(id, !ghost); refreshPartsCard(); } }),
+ menuItem('Zoom to part', { icon: 'fit', onClick: () => viewer.focusPart(id) }),
el('div', { className: 'msep' }),
- menuItem('Code zeigen', { icon: 'code', disabled: !e?.file, onClick: () => { selectPart(id, null); if (e?.file && e.line) void openCode(e.file, { ...lineRange(e), label: e.name, color: partInfo(id)?.color }); } }),
- menuItem('An Agent geben', { icon: 'send', onClick: () => { selectPart(id, null); insertToAgent(selectionText()); } }),
- menuItem('Exportieren …', { icon: 'export', onClick: () => { selectPart(id, null); exportScope = 'sel'; openExportMenu(); } }),
+ menuItem('Show code', { icon: 'code', disabled: !e?.file, onClick: () => { selectPart(id, null); if (e?.file && e.line) void openCode(e.file, { ...lineRange(e), label: e.name, color: partInfo(id)?.color }); } }),
+ menuItem('Send to agent', { icon: 'send', onClick: () => { selectPart(id, null); insertToAgent(selectionText()); } }),
+ menuItem('Export …', { icon: 'export', onClick: () => { selectPart(id, null); exportScope = 'sel'; openExportMenu(); } }),
];
m.replaceChildren(...items.filter((x): x is HTMLElement => !!x));
menus.at(m, x, y);
@@ -574,12 +574,12 @@ function openGroupMenu(ids: string[], name: string, x: number, y: number): void
const allGhost = ids.every((id) => viewer.isGhosted(id));
const m = $('menu-ctx');
const items: (HTMLElement | null)[] = [
- el('div', { className: 'mh', textContent: `${name} · ${ids.length} Teil${ids.length === 1 ? '' : 'e'}` }),
- menuItem('Isolieren', { icon: 'target', onClick: () => { viewer.isolate(ids); refreshPartsCard(); } }),
- viewer.hiddenCount ? menuItem('Alle einblenden', { icon: 'eye', onClick: () => { viewer.showAll(); refreshPartsCard(); } }) : null,
- menuItem(anyVisible ? 'Ausblenden' : 'Einblenden', { icon: anyVisible ? 'eyeoff' : 'eye', onClick: () => { viewer.setVisible(ids, !anyVisible); refreshPartsCard(); } }),
- menuItem(allGhost ? 'Nicht mehr transparent' : 'Transparent', { icon: 'ghost', onClick: () => { viewer.setGhosted(ids, !allGhost); refreshPartsCard(); } }),
- menuItem('Kamera auf Gruppe', { icon: 'fit', onClick: () => viewer.setView('fit', ids) }),
+ el('div', { className: 'mh', textContent: `${name} · ${ids.length} part${ids.length === 1 ? '' : 's'}` }),
+ menuItem('Isolate', { icon: 'target', onClick: () => { viewer.isolate(ids); refreshPartsCard(); } }),
+ viewer.hiddenCount ? menuItem('Show all', { icon: 'eye', onClick: () => { viewer.showAll(); refreshPartsCard(); } }) : null,
+ menuItem(anyVisible ? 'Hide' : 'Show', { icon: anyVisible ? 'eyeoff' : 'eye', onClick: () => { viewer.setVisible(ids, !anyVisible); refreshPartsCard(); } }),
+ menuItem(allGhost ? 'Not transparent' : 'Transparent', { icon: 'ghost', onClick: () => { viewer.setGhosted(ids, !allGhost); refreshPartsCard(); } }),
+ menuItem('Zoom to group', { icon: 'fit', onClick: () => viewer.setView('fit', ids) }),
];
m.replaceChildren(...items.filter((x): x is HTMLElement => !!x));
menus.at(m, x, y);
@@ -608,27 +608,27 @@ function renderBuild(s: BuildStatus): void {
if (s.installing) {
dot.className = 'spin';
dot.append(icon('spin', 14, 2.4));
- main.textContent = 'Installiert Pakete …';
+ main.textContent = 'Installing packages …';
detail.textContent = s.installing.join(', ');
} else if (s.state === 'building') {
dot.className = 'spin';
dot.append(icon('spin', 14, 2.4));
- main.textContent = 'Baut …';
- detail.textContent = s.queued ? 'weiterer Build vorgemerkt' : '';
+ main.textContent = 'Building …';
+ detail.textContent = s.queued ? 'another build queued' : '';
} else if (s.stale) {
- main.textContent = 'Code geändert';
- detail.textContent = 'Auto-Build ist aus';
+ main.textContent = 'Code changed';
+ detail.textContent = 'Auto build is off';
} else if (s.state === 'ok') {
dot.style.background = 'var(--ok)';
- main.textContent = 'Gebaut';
- detail.textContent = `${count} Bauteil${count === 1 ? '' : 'e'} · ${num(secs)} s`;
+ main.textContent = 'Built';
+ detail.textContent = `${count} part${count === 1 ? '' : 's'} · ${num(secs)} s`;
} else if (s.state === 'error') {
const e = s.result?.error;
dot.style.background = 'var(--err)';
- main.textContent = 'Build fehlgeschlagen';
- detail.textContent = e?.file ? `${e.file}${e.line ? `, Zeile ${e.line}` : ''}` : ERROR_KIND[e?.kind ?? ''] ?? '';
+ main.textContent = 'Build failed';
+ detail.textContent = e?.file ? `${e.file}${e.line ? `, line ${e.line}` : ''}` : ERROR_KIND[e?.kind ?? ''] ?? '';
} else {
- main.textContent = 'Bereit';
+ main.textContent = 'Ready';
detail.textContent = '';
}
void renderErrorCard();
@@ -640,10 +640,10 @@ async function renderErrorCard(): Promise<void> {
const hasModel = viewer.partList().length > 0;
$('viewer').classList.toggle('dim', !!e && hasModel);
$('lastgood').hidden = !(e && hasModel && lastOkAt);
- if (lastOkAt) $('lastgood').textContent = `Letzter guter Stand · ${fmtWhen(lastOkAt)}`;
+ if (lastOkAt) $('lastgood').textContent = `Last good version · ${fmtWhen(lastOkAt)}`;
const card = $('errcard');
if (!e) { card.hidden = true; return; }
- $('err-where').textContent = `${e.file ? `${e.file}${e.line ? `, Zeile ${e.line}` : ''}` : ERROR_KIND[e.kind] ?? e.kind} · ${fmtWhen(errorAt)}`;
+ $('err-where').textContent = `${e.file ? `${e.file}${e.line ? `, line ${e.line}` : ''}` : ERROR_KIND[e.kind] ?? e.kind} · ${fmtWhen(errorAt)}`;
$('err-msg').textContent = e.message;
$('err-trace').textContent = e.traceback;
$<HTMLButtonElement>('btn-err-details').disabled = !e.traceback;
@@ -685,7 +685,7 @@ async function loadModel(): Promise<void> {
scheduleThumb();
} catch (e) {
msg.className = 'error';
- msg.textContent = `Das Modell konnte nicht geladen werden: ${e instanceof Error ? e.message : String(e)}`;
+ msg.textContent = `The model could not be loaded: ${e instanceof Error ? e.message : String(e)}`;
}
}
@@ -721,11 +721,11 @@ const versions = new VersionsBar({
refreshPartsCard();
selectPart(null, null);
void renderErrorCard();
- } catch (e) { toast(`Vorschau nicht darstellbar: ${e instanceof Error ? e.message : String(e)}`, 'error'); }
+ } catch (e) { toast(`The preview cannot be shown: ${e instanceof Error ? e.message : String(e)}`, 'error'); }
renderViewSwitch();
},
toast,
- beforeRestore: () => leaveEditor('Stand wiederherstellen'), // Wiederherstellen ersetzt Dateien
+ beforeRestore: () => leaveEditor('Restore version'), // Wiederherstellen ersetzt Dateien
});
// ---- Projekt ----------------------------------------------------------------------------------------------------
@@ -753,7 +753,7 @@ async function onProject(p: ProjectInfo): Promise<void> {
resetViewLists();
selection = null;
void renderSelection();
- partsCard.message('Modell wird gebaut …');
+ partsCard.message('Building the model …');
$('doc-name').textContent = p.name;
document.title = `SOMA – ${p.name}`;
$<HTMLInputElement>('chk-auto').checked = p.autoBuild;
@@ -773,7 +773,7 @@ async function onProject(p: ProjectInfo): Promise<void> {
function showProblems(problems: string[]): void {
const b = $('problems');
b.hidden = problems.length === 0;
- b.replaceChildren(icon('alert', 14, 2), `${problems.length} Hinweis${problems.length === 1 ? '' : 'e'}`);
+ b.replaceChildren(icon('alert', 14, 2), `${problems.length} issue${problems.length === 1 ? '' : 's'}`);
b.title = problems.join('\n');
$('problem-list').replaceChildren(...problems.map((p) => el('div', { className: 'problem' }, el('span', { className: 'pi' }, icon('alert', 16)), el('span', { textContent: p }))));
}
@@ -790,12 +790,12 @@ function renderSaveState(st: SaveState): void {
let text: string;
// Ungespeichertes im Editor zählt mit, auch wenn die Dateien auf der Platte dem gespeicherten Stand entsprechen
const unsaved = st.unsaved || code.unsaved().length > 0;
- if (!st.zipPath) { dot.style.background = 'var(--warn)'; text = 'Noch nicht gespeichert'; }
- else if (unsaved) { dot.style.background = 'var(--warn)'; text = `Nicht gespeichert${st.savedAt ? ` · zuletzt ${fmtWhen(st.savedAt)}` : ''}`; }
- else { dot.style.background = 'var(--ok)'; text = `Gespeichert${st.savedAt ? ` · ${fmtWhen(st.savedAt)}` : ''}`; }
+ if (!st.zipPath) { dot.style.background = 'var(--warn)'; text = 'Not saved yet'; }
+ else if (unsaved) { dot.style.background = 'var(--warn)'; text = `Not saved${st.savedAt ? ` · last ${fmtWhen(st.savedAt)}` : ''}`; }
+ else { dot.style.background = 'var(--ok)'; text = `Saved${st.savedAt ? ` · ${fmtWhen(st.savedAt)}` : ''}`; }
const b = $('save-badge');
b.replaceChildren(dot, text);
- b.title = st.zipPath ? `ZIP: ${st.zipPath}` : 'Noch nicht als ZIP gespeichert. Strg+S speichert.';
+ b.title = st.zipPath ? `ZIP: ${st.zipPath}` : 'Not saved as a ZIP yet. Ctrl+S saves.';
versions.setSaved(st.zipPath ? st.savedHead : null);
document.title = `SOMA – ${project?.name ?? ''}${unsaved ? ' ●' : ''}`;
}
@@ -810,7 +810,7 @@ async function refreshSaveState(): Promise<void> {
*/
async function saveCode(): Promise<void> {
const r = await code.saveAll();
- if (!r.ok) { toast('Nicht alles ließ sich speichern (siehe Hinweis im Code). Gebaut wird erst danach.', 'error'); return; }
+ if (!r.ok) { toast('Not everything could be saved (see the note in the code). The build waits until then.', 'error'); return; }
if (r.saved.some(affectsBuild)) await api.build.run();
}
@@ -819,12 +819,12 @@ async function leaveEditor(title: string): Promise<boolean> {
const files = code.unsaved();
if (!files.length) return true;
const c = await api.dialog.choose({
- title, message: `Im Editor gibt es ungespeicherte Änderungen: ${files.join(', ')}.`,
- detail: 'Verwerfen legt deine Fassung als Sicherung in den App-Daten ab.', buttons: ['Speichern', 'Verwerfen', 'Abbrechen'],
+ title, message: `The editor has unsaved changes: ${files.join(', ')}.`,
+ detail: 'Discard keeps your version as a backup in the app data.', buttons: ['Save', 'Discard', 'Cancel'],
});
if (c === 0) {
const r = await code.saveAll();
- if (!r.ok) toast('Nicht alles ließ sich speichern (siehe Hinweis im Code-Panel).', 'error');
+ if (!r.ok) toast('Not everything could be saved (see the note in the code panel).', 'error');
return r.ok;
}
return c === 1 ? code.discardAll() : false;
@@ -842,17 +842,17 @@ async function doSave(saveAs = false): Promise<void> {
const label = btn.innerHTML;
btn.disabled = true;
btn.classList.add('busy');
- btn.replaceChildren(el('span', { className: 'spin' }, icon('spin', 14, 2.4)), 'Speichert …');
+ btn.replaceChildren(el('span', { className: 'spin' }, icon('spin', 14, 2.4)), 'Saving …');
try {
// Erst die Eingaben im Editor, sonst fehlten sie in Snapshot und ZIP. Das Speichern baut danach, falls nötig.
const c = await code.saveAll();
- if (!c.ok) { toast('Nicht alles im Editor ließ sich speichern (siehe Hinweis im Code). Das Modell ist deshalb nicht gespeichert.', 'error'); return; }
+ if (!c.ok) { toast('Not everything in the editor could be saved (see the note in the code). So the model is not saved.', 'error'); return; }
const r = await api.project.save(saveAs);
if (r.cancelled) return;
if (r.error) { toast(r.error, 'error'); return; }
const kb = Math.round((r.bytes ?? 0) / 1024);
- const lines = [`Gespeichert: ${r.zipPath}`, `${r.files} Dateien, ${kb} KB${r.snapshot ? ' · Snapshot im Verlauf angelegt' : ''}`];
- if (r.warnings?.length) lines.push(`Hinweis: ${r.warnings.join(' ')}`);
+ const lines = [`Saved: ${r.zipPath}`, `${r.files} file${r.files === 1 ? '' : 's'}, ${kb} KB${r.snapshot ? ' · snapshot added to the history' : ''}`];
+ if (r.warnings?.length) lines.push(`Note: ${r.warnings.join(' ')}`);
toast(lines.join('\n'), r.warnings?.length ? 'error' : 'ok');
project = await api.project.current(); // der Modellname folgt dem Dateinamen
$('doc-name').textContent = project.name;
@@ -866,20 +866,20 @@ async function doSave(saveAs = false): Promise<void> {
}
async function doOpen(): Promise<boolean> {
- if (!(await leaveEditor('Modell öffnen'))) return false;
+ if (!(await leaveEditor('Open model'))) return false;
const r = await api.project.openZip();
if (r.error) toast(r.error, 'error');
return !!r.opened;
}
-const doNew = async () => { if (await leaveEditor('Neues Modell')) await api.project.create(); };
+const doNew = async () => { if (await leaveEditor('New model')) await api.project.create(); };
/** „Jetzt bauen“: baut immer. Vorher werden die Eingaben im Editor gespeichert, sonst sähe der Build sie nicht. */
async function doBuild(): Promise<void> {
const r = await code.saveAll();
- if (!r.ok) { toast('Nicht alles ließ sich speichern (siehe Hinweis im Code-Panel). Gebaut wird erst danach.', 'error'); return; }
+ if (!r.ok) { toast('Not everything could be saved (see the note in the code panel). The build waits until then.', 'error'); return; }
await api.build.run();
}
-const openProject = async (id: string) => { if (await leaveEditor('Modell öffnen')) await api.project.open(id); };
+const openProject = async (id: string) => { if (await leaveEditor('Open model')) await api.project.open(id); };
// Kurzbefehle gelten nicht im Terminal: dort gehören Strg+S/Strg+O den Programmen (Claude Code nutzt Strg+O selbst)
window.addEventListener('keydown', (e) => {
@@ -920,14 +920,14 @@ $('btn-start').addEventListener('click', () => showStart(true));
$('btn-home').addEventListener('click', () => showStart(true));
// Versionsnummer (E68): neben dem Namen auf der Startseite und im Hinweis des Logos
$('start-version').textContent = SOMA_VERSION;
-$('btn-home').title = `Startseite · SOMA ${SOMA_VERSION}`;
+$('btn-home').title = `Start page · SOMA ${SOMA_VERSION}`;
$('problems').addEventListener('click', () => menus.toggle($('menu-problems'), $('problems')));
// Build
function renderAuto(): void {
const on = $<HTMLInputElement>('chk-auto').checked;
- $('auto-label').textContent = on ? 'Auto an' : 'Auto aus';
- $('btn-auto').title = on ? 'Baut automatisch, wenn sich der Code ändert. Klick schaltet aus.' : 'Auto-Build ist aus. Klick schaltet ein.';
+ $('auto-label').textContent = on ? 'Auto on' : 'Auto off';
+ $('btn-auto').title = on ? 'Builds automatically when the code changes. Click to turn off.' : 'Auto build is off. Click to turn on.';
}
$<HTMLInputElement>('chk-auto').addEventListener('change', (e) => { renderAuto(); void api.build.setAuto((e.target as HTMLInputElement).checked); });
$('btn-auto').addEventListener('click', () => { const c = $<HTMLInputElement>('chk-auto'); c.checked = !c.checked; c.dispatchEvent(new Event('change')); });
@@ -939,8 +939,8 @@ $('btn-buildinfo').addEventListener('click', () => {
const count = s.result?.parts?.length ?? 0;
const secs = s.seconds ?? 0;
const warn = s.result?.warnings ?? [];
- $('bm-title').textContent = s.state === 'error' ? 'Letzter Build fehlgeschlagen' : s.state === 'building' ? 'Build läuft' : lastOkAt ? `Zuletzt gebaut ${fmtWhen(lastOkAt)}` : 'Noch nicht gebaut';
- $('bm-sub').textContent = s.state === 'ok' ? `${num(secs)} s · ${count} Bauteil${count === 1 ? '' : 'e'} · ${warn.length ? `${warn.length} Warnung${warn.length === 1 ? '' : 'en'}` : 'keine Warnungen'}` : '';
+ $('bm-title').textContent = s.state === 'error' ? 'Last build failed' : s.state === 'building' ? 'Build running' : lastOkAt ? `Last built ${fmtWhen(lastOkAt)}` : 'Not built yet';
+ $('bm-sub').textContent = s.state === 'ok' ? `${num(secs)} s · ${count} part${count === 1 ? '' : 's'} · ${warn.length ? `${warn.length} warning${warn.length === 1 ? '' : 's'}` : 'no warnings'}` : '';
$('bm-warn').hidden = !warn.length;
$('bm-warn').textContent = warn.join('\n');
menus.toggle($('menu-build'), $('btn-buildinfo'));
@@ -963,7 +963,7 @@ function renderExportScope(): void {
const name = e?.name ?? (selection ? partInfo(selection.partId)?.name : undefined);
const sel = $<HTMLButtonElement>('exp-sel');
sel.disabled = !name;
- sel.textContent = name ? `Nur ${name}` : 'Nur Auswahl';
+ sel.textContent = name ? `Only ${name}` : 'Selection only';
if (!name) exportScope = 'all';
$('exp-all').classList.toggle('on', exportScope === 'all');
sel.classList.toggle('on', exportScope === 'sel');
@@ -997,9 +997,9 @@ async function doExport(fmt: string, label: string): Promise<ExportResult> {
const r = await api.build.export(fmt, part);
if (r.cancelled) return r;
const name = (f: string) => f.split(/[\\/]/).pop() ?? f;
- if (r.ok && part) toast(`„${part}“ als ${label} exportiert:\n${r.target ?? r.files[0] ?? ''}`);
- else if (r.ok) toast(`${r.files.length} Datei${r.files.length === 1 ? '' : 'en'} als ${label} exportiert nach ${r.target ?? ''}:\n${r.files.map(name).join(', ') || '(keine Datei)'}`);
- else toast(`Export fehlgeschlagen: ${r.error}`, 'error');
+ if (r.ok && part) toast(`“${part}” exported as ${label}:\n${r.target ?? r.files[0] ?? ''}`);
+ else if (r.ok) toast(`${r.files.length} file${r.files.length === 1 ? '' : 's'} exported as ${label} to ${r.target ?? ''}:\n${r.files.map(name).join(', ') || '(no file)'}`);
+ else toast(`Export failed: ${r.error}`, 'error');
return r;
}
@@ -1050,17 +1050,17 @@ const scheduleViewLists = () => { clearTimeout(viewTimer); viewTimer = setTimeou
function renderViewSwitch(): void {
const prev = versions.previewed;
- let ico = 'cube', name = 'Modell', sub = '', closable = false;
+ let ico = 'cube', name = 'Model', sub = '', closable = false;
const n = viewer.partList().length;
- if (prev) { ico = 'history'; name = `Stand ${prev.short}`; sub = 'nur ansehen'; closable = true; }
+ if (prev) { ico = 'history'; name = `Version ${prev.short}`; sub = 'view only'; closable = true; }
// Bei Analyse und Animation sagt das Symbol, was es ist: Der Platz gehört dem Namen
- else if (resultTool.isActive) { ico = 'gauge'; name = resultTool.currentTitle ?? 'Analyse'; closable = true; }
+ else if (resultTool.isActive) { ico = 'gauge'; name = resultTool.currentTitle ?? 'Analysis'; closable = true; }
else if (animTool.isActive) { ico = 'anim'; name = animTool.currentName ?? 'Animation'; closable = true; }
- else sub = n ? `${n} Bauteil${n === 1 ? '' : 'e'}` : '';
+ else sub = n ? `${n} part${n === 1 ? '' : 's'}` : '';
$('view-ico').replaceChildren(icon(ico, 16));
$('view-name').textContent = name;
$('view-sub').textContent = sub;
- $('btn-view').title = resultTool.isActive && !prev ? `Analyse: ${name}` : animTool.isActive && !prev ? `Animation: ${name}` : 'Was der Viewer zeigt: das Modell, eine Analyse, eine Animation oder ein Video';
+ $('btn-view').title = resultTool.isActive && !prev ? `Analysis: ${name}` : animTool.isActive && !prev ? `Animation: ${name}` : 'What the viewer shows: the model, an analysis, an animation or a video';
$('view-switch').classList.toggle('vio', !!prev);
$('view-switch').classList.toggle('result', !prev && (resultTool.isActive || animTool.isActive));
$('btn-view-close').hidden = !closable;
@@ -1069,8 +1069,8 @@ function renderViewSwitch(): void {
const badge = $('view-new');
badge.hidden = !unseen;
badge.dataset.n = String(unseen);
- badge.textContent = `${unseen} neu`;
- badge.title = 'Neue Ergebnisse des Agenten. Klick zeigt die Liste.';
+ badge.textContent = `${unseen} new`;
+ badge.title = 'New results from the agent. Click to show the list.';
}
/** Eintrag im Menü des Umschalters. `dot`: Statusfarbe (Fundstellen), `isNew`: noch nicht gesehen. */
@@ -1078,7 +1078,7 @@ function viewItem(ico: string, label: string, opts: { sub?: string; on?: boolean
const d = opts.dot ? el('span', { className: 'dot' }) : null;
if (d) d.style.background = opts.dot!;
const b = el('button', { className: 'mi' + (opts.on ? ' cur' : ''), title: opts.title ?? '' },
- icon(ico, 15), el('span', { className: 'vl', textContent: label }), opts.isNew ? el('span', { className: 'tag acc', textContent: 'neu' }) : null,
+ icon(ico, 15), el('span', { className: 'vl', textContent: label }), opts.isNew ? el('span', { className: 'tag acc', textContent: 'new' }) : null,
el('span', { className: 'k' }, d, opts.sub ?? '', el('span', { className: 'chk' }, icon('check', 14, 2.2))));
b.setAttribute('role', 'menuitemradio');
b.setAttribute('aria-checked', String(!!opts.on));
@@ -1091,23 +1091,23 @@ async function openViewMenu(): Promise<void> {
if (menus.isOpen(m)) { menus.close(); return; }
await refreshViewLists();
const n = viewer.partList().length;
- const items: HTMLElement[] = [viewItem('cube', 'Modell', { sub: `${n} Bauteil${n === 1 ? '' : 'e'}`, on: !resultTool.isActive && !animTool.isActive, onClick: () => showModelView() })];
+ const items: HTMLElement[] = [viewItem('cube', 'Model', { sub: `${n} part${n === 1 ? '' : 's'}`, on: !resultTool.isActive && !animTool.isActive, onClick: () => showModelView() })];
const { results, anims, videos } = viewLists;
const head = (t: string, src: string) => el('div', { className: 'mh' }, t, el('span', { className: 'src', textContent: src }));
if (results.length) {
- items.push(el('div', { className: 'msep' }), head('ANALYSEN', '.soma/results/'));
+ items.push(el('div', { className: 'msep' }), head('ANALYSES', '.soma/results/'));
for (const r of results) {
const bad = r.parts.filter((x) => x.critical > 0).length;
items.push(viewItem('gauge', r.id === r.kind ? r.title : `${r.title} (${r.id})`, {
- sub: r.stale ? 'veraltet' : bad ? `${bad} Bauteil${bad === 1 ? '' : 'e'} kritisch` : 'in Ordnung', dot: r.stale ? 'var(--tx3)' : bad ? 'var(--err)' : 'var(--ok)',
+ sub: r.stale ? 'outdated' : bad ? `${bad} part${bad === 1 ? '' : 's'} critical` : 'OK', dot: r.stale ? 'var(--tx3)' : bad ? 'var(--err)' : 'var(--ok)',
on: resultTool.isActive && resultTool.currentId === r.id, isNew: !seen.has(resultKey(r)), onClick: () => resultTool.show(r.id),
}));
}
}
if (anims.length) {
- items.push(el('div', { className: 'msep' }), head('ANIMATIONEN', 'animations/'));
+ items.push(el('div', { className: 'msep' }), head('ANIMATIONS', 'animations/'));
for (const a of anims) {
- items.push(viewItem('anim', a.name, { sub: `${a.duration.toFixed(1).replace('.', ',')} s`, on: animTool.isActive && animTool.currentId === a.id, isNew: !seen.has(animKey(a)), title: a.file, onClick: () => animTool.show(a.id) }));
+ items.push(viewItem('anim', a.name, { sub: `${a.duration.toFixed(1)} s`, on: animTool.isActive && animTool.currentId === a.id, isNew: !seen.has(animKey(a)), title: a.file, onClick: () => animTool.show(a.id) }));
}
}
if (videos.length) {
@@ -1116,7 +1116,7 @@ async function openViewMenu(): Promise<void> {
}
if (!results.length && !anims.length && !videos.length) {
items.push(el('div', { className: 'msep' }), el('div', {
- className: 'mnote', textContent: 'Noch keine Ergebnisse. Der Agent legt sie an: Analysen mit soma analyze, Animationen in animations/, Videos mit soma render (Skills „Analyse“ und „Animation und Video“).',
+ className: 'mnote', textContent: 'No results yet. The agent creates them: analyses with soma analyze, animations in animations/, videos with soma render (skills “Analysis” and “Animation and video”).',
}));
}
m.replaceChildren(...items);
@@ -1147,7 +1147,7 @@ $('btn-sel-agent').addEventListener('click', () => insertToAgent(selectionText()
$('btn-err-agent').addEventListener('click', () => insertToAgent(errorText()));
$('btn-err-code').addEventListener('click', () => {
const e = buildStatus.result?.error;
- if (e?.file) void openCode(e.file, e.line ? { from: e.line, to: e.line, label: 'Build-Fehler', kind: 'er' } : undefined);
+ if (e?.file) void openCode(e.file, e.line ? { from: e.line, to: e.line, label: 'Build error', kind: 'er' } : undefined);
});
$('btn-err-details').addEventListener('click', () => {
const t = $('err-trace');
@@ -1157,7 +1157,7 @@ $('btn-err-details').addEventListener('click', () => {
$('btn-err-fold').addEventListener('click', () => {
const folded = $('errcard').classList.toggle('folded');
$('btn-err-fold').setAttribute('aria-expanded', String(!folded));
- $('btn-err-fold').setAttribute('aria-label', folded ? 'Meldung ausklappen' : 'Meldung einklappen');
+ $('btn-err-fold').setAttribute('aria-label', folded ? 'Expand message' : 'Collapse message');
});
// ---- Seitenleiste -----------------------------------------------------------------------------------------------
@@ -1191,13 +1191,13 @@ function renderAgentMenu(): void {
const d = el('span', { className: 'dot' });
d.style.background = a.found ? 'var(--ok)' : 'transparent';
if (!a.found) d.style.boxShadow = 'inset 0 0 0 1.5px var(--tx3)';
- const b = el('button', { className: 'mi', disabled: !a.found, title: a.found ? `${a.command} in einem neuen Tab starten` : `${a.command} wurde im PATH nicht gefunden. Installiere den Agenten selbst, dann erscheint er hier.` },
- el('span', { className: 'noico' }, d), el('span', { textContent: a.label }), a.found ? null : el('span', { className: 'k', textContent: 'nicht installiert' }));
+ const b = el('button', { className: 'mi', disabled: !a.found, title: a.found ? `Start ${a.command} in a new tab` : `${a.command} was not found in the PATH. Install the agent yourself, then it appears here.` },
+ el('span', { className: 'noico' }, d), el('span', { textContent: a.label }), a.found ? null : el('span', { className: 'k', textContent: 'not installed' }));
b.setAttribute('role', 'menuitem');
b.addEventListener('click', () => { setAgentCollapsed(false); void terminals.add({ command: a.command, title: a.label }); });
return b;
}));
- if (!agents.length) $('agent-list').append(el('div', { className: 'mnote', textContent: 'Suche nach Agenten …' }));
+ if (!agents.length) $('agent-list').append(el('div', { className: 'mnote', textContent: 'Looking for agents …' }));
}
$('btn-term-add').addEventListener('click', () => { renderAgentMenu(); menus.toggle($('menu-agents'), $('btn-term-add')); });
$('btn-term-plain').addEventListener('click', () => void terminals.add({ title: 'Terminal' }));
@@ -1237,25 +1237,25 @@ async function showStart(on: boolean): Promise<void> {
void api.project.thumb(p.id).then((url) => { if (url) th.replaceChildren(el('img', { src: url, alt: '' })); });
const cur = p.id === project?.id;
// Viele heißen „Neues Modell“: Ob es je gespeichert wurde, hilft beim Wiederfinden und beim Aufräumen
- const when = cur ? 'geöffnet' : `geändert ${fmtWhen(p.modified, true)}`;
- const card = el('button', { className: 'recent' + (cur ? ' cur' : ''), title: cur ? 'Gerade geöffnet' : `${p.name} öffnen` },
- th, el('div', { className: 'meta' }, el('b', { textContent: p.name }), el('span', { textContent: when }), !p.saved && el('span', { textContent: 'nie gespeichert' })));
+ const when = cur ? 'open' : `changed ${fmtWhen(p.modified, true)}`;
+ const card = el('button', { className: 'recent' + (cur ? ' cur' : ''), title: cur ? 'Currently open' : `Open ${p.name}` },
+ th, el('div', { className: 'meta' }, el('b', { textContent: p.name }), el('span', { textContent: when }), !p.saved && el('span', { textContent: 'never saved' })));
card.addEventListener('click', () => { if (!cur) void openProject(p.id); showStart(false); });
if (cur) return el('div', { className: 'recent-item' }, card);
// Entfernen (E69): Arbeitsordner in den Papierkorb, die Rückfrage im Hauptprozess sagt, was dabei verloren geht
- const rm = el('button', { className: 'recent-rm', title: `„${p.name}“ von diesem Rechner entfernen`, ariaLabel: `${p.name} entfernen` }, icon('trash', 15));
+ const rm = el('button', { className: 'recent-rm', title: `Remove “${p.name}” from this computer`, ariaLabel: `Remove ${p.name}` }, icon('trash', 15));
rm.addEventListener('click', () => void (async () => {
const r = await api.project.remove(p.id).catch((e: unknown) => ({ removed: false, error: e instanceof Error ? e.message : String(e) }));
if (r.error) toast(r.error, 'error');
- if (r.removed) { toast(`„${p.name}“ entfernt. Der Arbeitsordner liegt im Papierkorb.`, 'ok'); void showStart(true); }
+ if (r.removed) { toast(`“${p.name}” removed. The working folder is in the Recycle Bin.`, 'ok'); void showStart(true); }
})());
return el('div', { className: 'recent-item' }, card, rm);
}));
- if (!list.length) $('start-recent').append(el('div', { className: 'c3', textContent: 'Noch keine Modelle auf diesem Rechner.' }));
+ if (!list.length) $('start-recent').append(el('div', { className: 'c3', textContent: 'No models on this computer yet.' }));
if (!agents.length) await refreshAgents();
$('start-agents').replaceChildren(...agents.map((a) => el('div', { className: 'agrow' },
el('span', { className: a.found ? 'ok' : 'no' }, icon(a.found ? 'check' : 'x', 16, 2.2)),
- el('div', {}, el('b', { textContent: a.label }), el('span', { textContent: a.found ? `gefunden (${a.command})` : 'nicht installiert' })))));
+ el('div', {}, el('b', { textContent: a.label }), el('span', { textContent: a.found ? `found (${a.command})` : 'not installed' })))));
}
$('btn-start-close').addEventListener('click', () => showStart(false));
$('start-new').addEventListener('click', () => { void doNew(); showStart(false); });
@@ -1285,7 +1285,7 @@ api.render.onProgress((f) => animTool.progress(f));
// Bilder und Videos, die der Agent erzeugt hat: kurz Bescheid geben, ein Klick im Dateibaum öffnet sie
api.render.onNotice((n) => {
if (!n.byAgent) return;
- if (n.ok) toast(`Der Agent hat ${n.files.join(', ')} erzeugt.`, 'info');
+ if (n.ok) toast(`The agent created ${n.files.join(', ')}.`, 'info');
void refreshFiles();
scheduleViewLists();
});
diff --git a/app/src/renderer/markdown.ts b/app/src/renderer/markdown.ts
index 135d3b9..0d31074 100644
--- a/app/src/renderer/markdown.ts
+++ b/app/src/renderer/markdown.ts
@@ -35,7 +35,7 @@ export function renderMarkdown(src: string, file: string, readOnly: boolean, dep
const lineAt = (pos: number) => { let n = 1; for (let i = src.indexOf('\n'); i >= 0 && i < pos; i = src.indexOf('\n', i + 1)) n++; return n; };
let tokens: Token[];
try { tokens = lexer(src, { gfm: true }); } catch (e) {
- root.append(el('p', { className: 'md-err', textContent: `Die Datei lässt sich nicht als Markdown lesen: ${e instanceof Error ? e.message : String(e)}` }));
+ root.append(el('p', { className: 'md-err', textContent: `The file cannot be read as Markdown: ${e instanceof Error ? e.message : String(e)}` }));
return root;
}
@@ -73,12 +73,12 @@ export function renderMarkdown(src: string, file: string, readOnly: boolean, dep
const img = el('img', { className: 'md-img', alt, title: t.title ?? alt });
// Nur Bilder aus dem Projekt. Fremde Adressen lädt die App nicht (offline, und der Agent soll nichts nachladen lassen).
if (isWeb(href) || /^[a-z][a-z0-9+.-]*:/i.test(href)) {
- return el('span', { className: 'md-imgmiss', textContent: `[Bild: ${alt || href}]`, title: `Externe Bilder werden nicht geladen: ${href}` });
+ return el('span', { className: 'md-imgmiss', textContent: `[Image: ${alt || href}]`, title: `External images are not loaded: ${href}` });
}
const rel = resolve(dir, href);
void deps.image(rel).then((url) => {
if (url) img.src = url;
- else img.replaceWith(el('span', { className: 'md-imgmiss', textContent: `[Bild fehlt: ${rel}]` }));
+ else img.replaceWith(el('span', { className: 'md-imgmiss', textContent: `[Image missing: ${rel}]` }));
});
return img;
};
@@ -101,7 +101,7 @@ export function renderMarkdown(src: string, file: string, readOnly: boolean, dep
case 'blockquote': node = el('blockquote', {}, ...blocks(t.tokens, pos)); break;
case 'list': node = list(t as Tokens.List, pos); break;
case 'table': node = table(t as Tokens.Table); break;
- case 'html': node = el('pre', { className: 'md-html', title: 'HTML wird nicht ausgeführt, nur gezeigt', textContent: t.text.replace(/\n$/, '') }); break;
+ case 'html': node = el('pre', { className: 'md-html', title: 'HTML is not run, only shown', textContent: t.text.replace(/\n$/, '') }); break;
default: node = el('p', { textContent: t.raw });
}
if (pos >= 0) node.dataset.line = String(lineAt(pos));
@@ -138,7 +138,7 @@ export function renderMarkdown(src: string, file: string, readOnly: boolean, dep
// Umschalten nur, wenn das Kästchen sicher im Quelltext gefunden ist. Sonst nur anzeigen.
if (m && !readOnly) {
const p = at + m[0].length - 2;
- box.title = 'Abhaken ändert die Datei (speichern mit Strg+S)';
+ box.title = 'Checking it off changes the file (save with Ctrl+S)';
box.addEventListener('change', () => deps.toggleTask(p, box.checked ? 'x' : ' '));
} else box.disabled = true;
li.prepend(box);
@@ -160,7 +160,7 @@ export function renderMarkdown(src: string, file: string, readOnly: boolean, dep
};
root.append(...blocks(tokens, 0));
- if (!root.childElementCount) root.append(el('p', { className: 'md-empty', textContent: readOnly ? 'Leere Datei.' : 'Leere Datei. „Bearbeiten“ oben schreibt hinein.' }));
+ if (!root.childElementCount) root.append(el('p', { className: 'md-empty', textContent: readOnly ? 'Empty file.' : 'Empty file. “Edit” at the top lets you write in it.' }));
root.addEventListener('click', (e) => {
const a = (e.target as HTMLElement).closest<HTMLElement>('.md-link');
diff --git a/app/src/renderer/markup.ts b/app/src/renderer/markup.ts
index 6837a42..5442967 100644
--- a/app/src/renderer/markup.ts
+++ b/app/src/renderer/markup.ts
@@ -194,7 +194,7 @@ export class Markup {
this.draw(false);
const blob = await new Promise<Blob | null>((r) => this.ui.canvas.toBlob(r, 'image/png'));
this.draw();
- if (!blob) throw new Error('Das Bild ließ sich nicht erzeugen.');
+ if (!blob) throw new Error('Could not create the image.');
return new Uint8Array(await blob.arrayBuffer());
}
@@ -254,7 +254,7 @@ export class Markup {
if (this.selected != null) { this.selected = null; this.changed(); return; }
if (!this.shapes.length || Date.now() < this.escUntil) { this.close(); return; }
this.escUntil = Date.now() + 3000;
- toast('Noch einmal Escape verwirft die Zeichnung.', 'info');
+ toast('Press Escape again to discard the drawing.', 'info');
}
// ---- Geometrie ------------------------------------------------------------------------------------------------
@@ -638,10 +638,10 @@ export class Markup {
u.blank.setAttribute('aria-pressed', String(this.blankBg));
u.grid.setAttribute('aria-pressed', String(this.grid));
u.canvas.style.cursor = this.tool === 'select' ? 'default' : this.tool === 'text' ? 'text' : 'crosshair';
- const what = this.blankBg ? 'Leere Fläche. Das Bild landet in '
- : this.sourceFile ? `Bild ${this.sourceFile}. Die Markierung landet als neue Datei in ` : `Bild des Viewers von ${fmtWhen(this.takenAt)}. Es landet in `;
+ const what = this.blankBg ? 'Blank canvas. The image is saved in '
+ : this.sourceFile ? `Image ${this.sourceFile}. The markup is saved as a new file in ` : `Viewer image from ${fmtWhen(this.takenAt)}. It is saved in `;
u.hint.replaceChildren(what,
- el('code', { textContent: '.soma/feedback/' }), ', der Pfad in der Eingabe des Agenten.');
+ el('code', { textContent: '.soma/feedback/' }), ', and its path goes into the agent’s input.');
}
// ---- Prüfhilfen (nur für Tests) -------------------------------------------------------------------------------
diff --git a/app/src/renderer/measuretool.ts b/app/src/renderer/measuretool.ts
index 71e12c5..ba37473 100644
--- a/app/src/renderer/measuretool.ts
+++ b/app/src/renderer/measuretool.ts
@@ -21,19 +21,20 @@ interface Deps {
}
const TYPE: Record<string, string> = {
- PLANE: 'eben', CYLINDER: 'Zylinder', CONE: 'Kegel', SPHERE: 'Kugel', TORUS: 'Torus', BSPLINE: 'Freiform', BEZIER: 'Freiform',
- REVOLUTION: 'Drehfläche', EXTRUSION: 'Extrusionsfläche', OFFSET: 'Versatzfläche', OTHER: 'sonstige',
- LINE: 'Gerade', CIRCLE: 'Kreis', ELLIPSE: 'Ellipse', HYPERBOLA: 'Hyperbel', PARABOLA: 'Parabel', VERTEX: 'Punkt',
+ PLANE: 'plane', CYLINDER: 'cylinder', CONE: 'cone', SPHERE: 'sphere', TORUS: 'torus', BSPLINE: 'freeform', BEZIER: 'freeform',
+ REVOLUTION: 'revolved', EXTRUSION: 'extruded', OFFSET: 'offset', OTHER: 'other',
+ LINE: 'line', CIRCLE: 'circle', ELLIPSE: 'ellipse', HYPERBOLA: 'hyperbola', PARABOLA: 'parabola', VERTEX: 'point',
};
-const KIND: Record<string, string> = { face: 'Fläche', edge: 'Kante', vertex: 'Punkt' };
-/** „Fläche · eben“, „Kante · Kreis“, beim Eckpunkt nur „Punkt“. */
-const what = (i: { kind: string; type: string }, sep = ' · ') => (i.kind === 'vertex' ? 'Punkt' : `${KIND[i.kind]}${sep}${typeName(i.type)}`);
-/** Lage eines Punkts: „X 20,00 · Y −15,00 · Z 5,00“. */
-const coords = (p: number[]) => p.map((v, k) => `${'XYZ'[k]} ${minus((Math.abs(v) < 5e-4 ? 0 : v).toLocaleString('de-DE', { minimumFractionDigits: 2, maximumFractionDigits: 2 }))}`).join(' · ');
+const KIND: Record<string, string> = { face: 'Face', edge: 'Edge', vertex: 'Point' };
+/** „Face · plane“, „Edge · circle“, beim Eckpunkt nur „Point“. Im Fließtext (`inline`) „face (plane)“. */
+const what = (i: { kind: string; type: string }, inline = false) => (i.kind === 'vertex' ? (inline ? 'point' : 'Point')
+ : inline ? `${KIND[i.kind].toLowerCase()} (${typeName(i.type)})` : `${KIND[i.kind]} · ${typeName(i.type)}`);
+/** Lage eines Punkts: „X 20.00 · Y −15.00 · Z 5.00“. */
+const coords = (p: number[]) => p.map((v, k) => `${'XYZ'[k]} ${minus((Math.abs(v) < 5e-4 ? 0 : v).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 }))}`).join(' · ');
const typeName = (t: string) => TYPE[t] ?? t.toLowerCase();
-const mm = (v: number) => `${v.toLocaleString('de-DE', { minimumFractionDigits: 2, maximumFractionDigits: 2 })} mm`;
-const mm2 = (v: number) => `${v.toLocaleString('de-DE', { minimumFractionDigits: 2, maximumFractionDigits: 2 })} mm²`;
-const deg = (v: number) => `${v.toLocaleString('de-DE', { maximumFractionDigits: 1 })}°`;
+const mm = (v: number) => `${v.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })} mm`;
+const mm2 = (v: number) => `${v.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })} mm²`;
+const deg = (v: number) => `${v.toLocaleString('en-US', { maximumFractionDigits: 1 })}°`;
const minus = (s: string) => s.replace(/^-/, '−');
/** Für den Agenten: Punkt als Dezimalzeichen, drei Stellen, kein „-0“. */
const f3 = (v: number) => (Math.abs(v) < 5e-4 ? 0 : v).toFixed(3);
@@ -43,7 +44,7 @@ const vec = (d: number[]) => `(${d.map((x) => +(Math.abs(x) < 5e-7 ? 0 : x).toFi
function dirText(d: number[]): string {
const len = Math.hypot(d[0], d[1], d[2]) || 1;
for (let i = 0; i < 3; i++) if (Math.abs(Math.abs(d[i]) / len - 1) < 1e-6) return `${d[i] > 0 ? '+' : '−'}${'XYZ'[i]}`;
- return `(${d.map((x) => minus((x / len).toLocaleString('de-DE', { maximumFractionDigits: 3 }))).join(' · ')})`;
+ return `(${d.map((x) => minus((x / len).toLocaleString('en-US', { maximumFractionDigits: 3 }))).join(' · ')})`;
}
const mid = (a: number[], b: number[]) => [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2, (a[2] + b[2]) / 2];
const same = (a: number[], b: number[]) => Math.hypot(a[0] - b[0], a[1] - b[1], a[2] - b[2]) < 1e-3;
@@ -81,7 +82,7 @@ export class MeasureTool {
ui.agent.addEventListener('click', () => { const t = this.agentText(); if (t) deps.insert(t); });
deps.viewer.onMeasurePick = (h) => void this.pick(h);
// Die Schnittfläche hat keine exakte Geometrie. Der Klick verwirft nichts, ein Hinweis sagt, was geht.
- deps.viewer.onMeasureCut = () => { this.note = 'Die Schnittfläche selbst lässt sich nicht messen. Ein Klick nahe ihrem Rand wählt die geschnittene Fläche.'; this.render(); };
+ deps.viewer.onMeasureCut = () => { this.note = 'The section face itself cannot be measured. Click near its edge to pick the face that was cut.'; this.render(); };
window.addEventListener('keydown', (e) => {
if (!this.active || e.key !== 'Escape' || e.defaultPrevented) return;
const t = e.target as HTMLElement | null;
@@ -122,20 +123,20 @@ export class MeasureTool {
this.prepT0 = performance.now();
// Sekunden mitzählen, nur die Zahl: Neu zeichnen ließe den laufenden Balken jedes Mal von vorn beginnen
this.prepTick = setInterval(() => { const t = this.ui.body.querySelector('.mc-load-time'); if (t) t.textContent = this.prepSeconds(); }, 1000);
- this.phase = 'Messdienst startet …';
+ this.phase = 'Starting the measuring service …';
this.prep = (async () => {
// Läuft der Dienst schon, ist start() gleich fertig
let r = await window.soma.measure.start().catch((e: unknown) => ({ ok: false, error: String(e), stale: false }));
if (seq !== this.prepSeq) return;
if (r.ok) {
- this.phase = `Geometrie wird geladen (${n} ${n === 1 ? 'Bauteil' : 'Bauteile'}) …`;
+ this.phase = `Loading geometry (${n} ${n === 1 ? 'part' : 'parts'}) …`;
this.render();
r = await window.soma.measure.prepare(source, build).catch((e: unknown) => ({ ok: false, error: String(e), stale: false }));
if (seq !== this.prepSeq) return;
}
// Ein veralteter Stand ist kein Fehler: Der neue Build ruft reset() und lädt selbst
if (r.ok) this.warm = true;
- else if (!r.stale && !this.a) this.error = r.error ?? 'Der Messdienst ließ sich nicht vorbereiten.';
+ else if (!r.stale && !this.a) this.error = r.error ?? 'The measuring service could not be prepared.';
this.endPrepare();
this.render();
})();
@@ -175,7 +176,7 @@ export class MeasureTool {
private async query(): Promise<void> {
const build = this.deps.build();
- if (!build) { this.error = 'Zu diesem Stand gibt es keine Geometrie zum Messen. Einmal neu bauen hilft.'; this.render(); return; }
+ if (!build) { this.error = 'This version has no geometry to measure. Building it again helps.'; this.render(); return; }
const seq = ++this.seq;
this.busy = true;
this.render();
@@ -189,7 +190,7 @@ export class MeasureTool {
this.warm = true;
if (r.ok && r.result) { this.result = r.result; this.drawMarks(); }
else {
- this.error = r.error ?? 'Die Messung ist fehlgeschlagen.';
+ this.error = r.error ?? 'The measurement failed.';
if (r.stale) { this.a = this.b = null; this.deps.viewer.setMeasureMarks(null); }
}
this.render();
@@ -202,14 +203,14 @@ export class MeasureTool {
private primary(r: MeasureResult): { label: string; span: MeasureSpan } | null {
const p = r.pair;
if (!p) return null;
- if (p.planes) return { label: 'Abstand der Ebenen', span: p.planes };
+ if (p.planes) return { label: 'Distance between planes', span: p.planes };
const circles = r.a.type === 'CIRCLE' && r.b?.type === 'CIRCLE';
- if (p.axes) return { label: circles ? 'Abstand der Mittelpunkte' : 'Abstand der Achsen', span: p.axes };
- if (p.toPlane) return { label: 'Abstand zur Ebene', span: p.toPlane };
- if (p.toAxis) return { label: 'Abstand zur Achse', span: p.toAxis };
- if (p.toLine) return { label: 'Abstand zur Geraden', span: p.toLine };
- if (r.a.kind === 'vertex' && r.b?.kind === 'vertex' && p.points) return { label: 'Abstand der Punkte', span: p.points };
- return { label: 'Kürzester Abstand', span: p.min };
+ if (p.axes) return { label: circles ? 'Distance between centers' : 'Distance between axes', span: p.axes };
+ if (p.toPlane) return { label: 'Distance to plane', span: p.toPlane };
+ if (p.toAxis) return { label: 'Distance to axis', span: p.toAxis };
+ if (p.toLine) return { label: 'Distance to line', span: p.toLine };
+ if (r.a.kind === 'vertex' && r.b?.kind === 'vertex' && p.points) return { label: 'Distance between points', span: p.points };
+ return { label: 'Shortest distance', span: p.min };
}
/** Wert, der im Viewer an einem einzelnen Element steht. */
@@ -250,23 +251,23 @@ export class MeasureTool {
const hint = (t: string) => el('div', { className: 'mc-hint', textContent: t });
if (this.phase) rows.push(this.loadingRow());
if (this.error && !this.busy) rows.push(el('div', { className: 'mc-err', textContent: this.error }));
- else if (!this.a) rows.push(hint('Klick auf einen Punkt, eine Kante oder eine Fläche. Ein zweiter Klick misst Abstand und Winkel zum ersten.'));
- else if (this.busy) rows.push(hint(this.phase ? 'Gemessen wird, sobald die Geometrie geladen ist.' : this.warm ? 'Messe …' : 'Messe … Beim ersten Mal startet der Messdienst, das dauert einige Sekunden.'));
+ else if (!this.a) rows.push(hint('Click a point, an edge or a face. A second click measures distance and angle to the first.'));
+ else if (this.busy) rows.push(hint(this.phase ? 'Measuring as soon as the geometry is loaded.' : this.warm ? 'Measuring …' : 'Measuring … The first time, the measuring service starts, which takes a few seconds.'));
else if (this.result && !this.result.b) {
rows.push(...this.entityRows(this.result.a, true));
- rows.push(hint('Zweites Element anklicken für Abstand und Winkel.'));
+ rows.push(hint('Click a second element for distance and angle.'));
} else if (this.result?.b && this.result.pair) {
const r = this.result, p = this.result.pair;
const main = this.primary(r)!;
rows.push(el('div', { className: 'mc-main' }, el('span', { textContent: main.label }), el('b', { textContent: mm(main.span.value) })));
- if (main.span !== p.min && Math.abs(main.span.value - p.min.value) > 5e-4) rows.push(this.row('Kürzester Abstand', mm(p.min.value)));
+ if (main.span !== p.min && Math.abs(main.span.value - p.min.value) > 5e-4) rows.push(this.row('Shortest distance', mm(p.min.value)));
if (p.points) {
// Bei zwei Punkten ist der Abstand schon die Hauptangabe, die Anteile je Achse gehören trotzdem dazu
- if (main.span !== p.points) rows.push(this.row('Punkt zu Punkt', mm(p.points.value)));
+ if (main.span !== p.points) rows.push(this.row('Point to point', mm(p.points.value)));
const d = p.points.delta ?? [0, 0, 0];
- rows.push(el('div', { className: 'mc-sub', textContent: d.map((v, k) => `Δ${'XYZ'[k]} ${minus(v.toLocaleString('de-DE', { minimumFractionDigits: 2, maximumFractionDigits: 2 }))}`).join(' · ') }));
+ rows.push(el('div', { className: 'mc-sub', textContent: d.map((v, k) => `Δ${'XYZ'[k]} ${minus(v.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 }))}`).join(' · ') }));
}
- if (p.angle != null) rows.push(this.row('Winkel', p.angle < 1e-6 ? '0° (parallel)' : deg(p.angle)));
+ if (p.angle != null) rows.push(this.row('Angle', p.angle < 1e-6 ? '0° (parallel)' : deg(p.angle)));
rows.push(el('div', { className: 'mc-sep' }));
rows.push(this.entityLine('A', r.a), this.entityLine('B', r.b!));
}
@@ -295,7 +296,7 @@ export class MeasureTool {
private entityLine(tag: string, i: MeasureInfo): HTMLElement {
const value = this.headline(i);
- return el('div', { className: 'mc-ent' }, el('b', { textContent: tag }), el('span', { textContent: `${what(i, ' ')} · ${i.name ?? i.part}${value ? ` · ${value}` : ''}` }));
+ return el('div', { className: 'mc-ent' }, el('b', { textContent: tag }), el('span', { textContent: `${what(i, true)} · ${i.name ?? i.part}${value ? ` · ${value}` : ''}` }));
}
private entityRows(i: MeasureInfo, withPart: boolean): HTMLElement[] {
@@ -303,18 +304,18 @@ export class MeasureTool {
el('div', { className: 'mc-title' }, el('b', { textContent: what(i) }), el('span', { className: 'c2', textContent: i.name ?? i.part })),
];
if (i.kind === 'vertex' && i.point) i.point.forEach((v, k) => rows.push(this.row('XYZ'[k], mm(Math.abs(v) < 5e-4 ? 0 : v).replace(/^-/, '−'))));
- if (i.radius != null) { rows.push(this.row('Durchmesser', `Ø ${mm(2 * i.radius)}`), this.row('Radius', mm(i.radius))); }
- if (i.majorRadius != null && i.minorRadius != null) rows.push(this.row('Radien', `${mm(i.majorRadius)} · ${mm(i.minorRadius)}`));
- if (i.semiAngle != null) rows.push(this.row('Halber Öffnungswinkel', deg(Math.abs(i.semiAngle))));
- if (i.axis) rows.push(this.row('Achse', dirText(i.axis.dir)));
- if (i.normal) rows.push(this.row('Normale', dirText(i.normal)));
- if (i.dir) rows.push(this.row('Richtung', dirText(i.dir)));
- if (i.kind === 'edge' && i.length != null) rows.push(this.row(i.type === 'CIRCLE' && i.closed === false ? 'Bogenlänge' : 'Länge', mm(i.length)));
- if (i.area != null) rows.push(this.row('Fläche', mm2(i.area)));
+ if (i.radius != null) { rows.push(this.row('Diameter', `Ø ${mm(2 * i.radius)}`), this.row('Radius', mm(i.radius))); }
+ if (i.majorRadius != null && i.minorRadius != null) rows.push(this.row('Radii', `${mm(i.majorRadius)} · ${mm(i.minorRadius)}`));
+ if (i.semiAngle != null) rows.push(this.row('Half angle', deg(Math.abs(i.semiAngle))));
+ if (i.axis) rows.push(this.row('Axis', dirText(i.axis.dir)));
+ if (i.normal) rows.push(this.row('Normal', dirText(i.normal)));
+ if (i.dir) rows.push(this.row('Direction', dirText(i.dir)));
+ if (i.kind === 'edge' && i.length != null) rows.push(this.row(i.type === 'CIRCLE' && i.closed === false ? 'Arc length' : 'Length', mm(i.length)));
+ if (i.area != null) rows.push(this.row('Area', mm2(i.area)));
const bb = withPart ? this.deps.part(i.part)?.bbox : undefined;
if (bb) {
const d = [0, 1, 2].map((k) => bb[1][k] - bb[0][k]);
- rows.push(el('div', { className: 'mc-sep' }), this.row('Bauteil (X × Y × Z)', d.map((v) => v.toLocaleString('de-DE', { minimumFractionDigits: 2, maximumFractionDigits: 2 })).join(' × ') + ' mm'));
+ rows.push(el('div', { className: 'mc-sep' }), this.row('Part (X × Y × Z)', d.map((v) => v.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })).join(' × ') + ' mm'));
}
return rows;
}
@@ -325,27 +326,27 @@ export class MeasureTool {
agentText(): string | null {
const r = this.result;
if (!r) return null;
- const desc = (i: MeasureInfo) => `Bauteil "${i.name ?? i.part}" ${what(i, ' ')}`;
+ const desc = (i: MeasureInfo) => `part "${i.name ?? i.part}" ${what(i, true)}`;
const facts = (i: MeasureInfo) => {
const out: string[] = [];
- if (i.kind === 'vertex' && i.point) return [`Lage ${vec(i.point.map((v) => +v.toFixed(3)))}`];
- if (i.radius != null) out.push(`Durchmesser ${f3(2 * i.radius)} mm`);
- if (i.axis) out.push(`Achse ${vec(i.axis.dir)} durch ${vec(i.axis.point)}`);
- if (i.normal) out.push(`Normale ${vec(i.normal)}`);
- if (i.dir) out.push(`Richtung ${vec(i.dir)}`);
- if (i.kind === 'edge' && i.length != null) out.push(`Länge ${f3(i.length)} mm`);
- if (i.area != null) out.push(`Fläche ${f3(i.area)} mm²`);
- if (i.point) out.push(`angeklickt bei ${vec(i.point.map((v) => +v.toFixed(3)))}`);
+ if (i.kind === 'vertex' && i.point) return [`position ${vec(i.point.map((v) => +v.toFixed(3)))}`];
+ if (i.radius != null) out.push(`diameter ${f3(2 * i.radius)} mm`);
+ if (i.axis) out.push(`axis ${vec(i.axis.dir)} through ${vec(i.axis.point)}`);
+ if (i.normal) out.push(`normal ${vec(i.normal)}`);
+ if (i.dir) out.push(`direction ${vec(i.dir)}`);
+ if (i.kind === 'edge' && i.length != null) out.push(`length ${f3(i.length)} mm`);
+ if (i.area != null) out.push(`area ${f3(i.area)} mm²`);
+ if (i.point) out.push(`clicked at ${vec(i.point.map((v) => +v.toFixed(3)))}`);
return out;
};
- if (!r.b || !r.pair) return `[Messung: ${desc(r.a)}, ${facts(r.a).join(', ')}] `;
+ if (!r.b || !r.pair) return `[Measurement: ${desc(r.a)}, ${facts(r.a).join(', ')}] `;
const p = r.pair, main = this.primary(r)!;
const out = [`${main.label} ${f3(main.span.value)} mm`];
- if (main.span !== p.min && Math.abs(main.span.value - p.min.value) > 5e-4) out.push(`kürzester Abstand ${f3(p.min.value)} mm`);
+ if (main.span !== p.min && Math.abs(main.span.value - p.min.value) > 5e-4) out.push(`shortest distance ${f3(p.min.value)} mm`);
if (p.points && main.span === p.points) out.push(`dX ${f3(p.points.delta?.[0] ?? 0)}, dY ${f3(p.points.delta?.[1] ?? 0)}, dZ ${f3(p.points.delta?.[2] ?? 0)}`);
- else if (p.points) out.push(`Punkt zu Punkt ${f3(p.points.value)} mm (dX ${f3(p.points.delta?.[0] ?? 0)}, dY ${f3(p.points.delta?.[1] ?? 0)}, dZ ${f3(p.points.delta?.[2] ?? 0)})`);
- if (p.angle != null) out.push(`Winkel ${p.angle.toFixed(1)}°`);
- return `[Messung: ${desc(r.a)} und ${desc(r.b)}: ${out.join(', ')}] `;
+ else if (p.points) out.push(`point to point ${f3(p.points.value)} mm (dX ${f3(p.points.delta?.[0] ?? 0)}, dY ${f3(p.points.delta?.[1] ?? 0)}, dZ ${f3(p.points.delta?.[2] ?? 0)})`);
+ if (p.angle != null) out.push(`angle ${p.angle.toFixed(1)}°`);
+ return `[Measurement: ${desc(r.a)} and ${desc(r.b)}: ${out.join(', ')}] `;
}
// ---- Prüfhilfe (nur Tests) ------------------------------------------------------------------------------------
diff --git a/app/src/renderer/overlay.ts b/app/src/renderer/overlay.ts
index 1d50dba..58a4285 100644
--- a/app/src/renderer/overlay.ts
+++ b/app/src/renderer/overlay.ts
@@ -136,7 +136,7 @@ export function resultColor(v: number, m: Pick<ResultMeta, 'bad' | 'threshold' |
return mix(OK, FAR, (f - 0.15) / 0.85);
}
-const fmt = (v: number, unit: string) => `${(+v.toFixed(unit === '°' ? 1 : 2)).toLocaleString('de-DE')}${unit === '°' ? '°' : unit ? ` ${unit}` : ''}`;
+const fmt = (v: number, unit: string) => `${(+v.toFixed(unit === '°' ? 1 : 2)).toLocaleString('en-US')}${unit === '°' ? '°' : unit ? ` ${unit}` : ''}`;
/** Legende unten rechts: Farbverlauf über die Spanne, Grenzwert markiert. */
function paintLegend(g: CanvasRenderingContext2D, w: number, h: number, unit: number, m: ResultMeta, note: string | null): void {
@@ -165,7 +165,7 @@ function paintLegend(g: CanvasRenderingContext2D, w: number, h: number, unit: nu
g.fillText(fmt(hi, m.unit), bx + bw, by + bh + unit * 1.0);
g.textAlign = 'center';
g.fillStyle = '#e6e8eb';
- g.fillText(`Grenze ${fmt(m.threshold, m.unit)}`, Math.min(Math.max(tx, bx + unit * 3), bx + bw - unit * 3), by + bh + unit * 2.1);
+ g.fillText(`Limit ${fmt(m.threshold, m.unit)}`, Math.min(Math.max(tx, bx + unit * 3), bx + bw - unit * 3), by + bh + unit * 2.1);
g.textAlign = 'left';
if (note) {
g.fillStyle = '#a3acb6';
diff --git a/app/src/renderer/parts.ts b/app/src/renderer/parts.ts
index b5b65e9..8d83577 100644
--- a/app/src/renderer/parts.ts
+++ b/app/src/renderer/parts.ts
@@ -50,13 +50,13 @@ export class PartsCard {
render(): void {
const { list, count } = this.ui;
count.textContent = this.parts.length ? String(this.parts.length) : '';
- if (!this.parts.length) { list.replaceChildren(el('div', { className: 'hint', textContent: this.placeholder || 'Noch keine Bauteile.' })); return; }
+ if (!this.parts.length) { list.replaceChildren(el('div', { className: 'hint', textContent: this.placeholder || 'No parts yet.' })); return; }
const match = (p: PartRow) => !this.filter || p.name.toLowerCase().includes(this.filter) || (p.group ?? '').toLowerCase().includes(this.filter);
const own = this.tree('own', this.parts.filter((p) => p.role !== 'reference' && match(p)));
const refs = this.tree('ref', this.parts.filter((p) => p.role === 'reference' && match(p)));
const rows: HTMLElement[] = this.rows(own, 0);
- if (refs.items.length) rows.push(el('div', { className: 'grp', textContent: 'REFERENZEN' }), ...this.rows(refs, 0));
- if (!rows.length) rows.push(el('div', { className: 'hint', textContent: 'Kein Bauteil passt zur Suche.' }));
+ if (refs.items.length) rows.push(el('div', { className: 'grp', textContent: 'REFERENCES' }), ...this.rows(refs, 0));
+ if (!rows.length) rows.push(el('div', { className: 'hint', textContent: 'No part matches the search.' }));
list.replaceChildren(...rows);
}
@@ -96,13 +96,13 @@ export class PartsCard {
const anyVisible = ids.some((id) => this.hooks.isVisible(id));
const ghosts = ids.filter((id) => this.hooks.isGhost(id)).length;
const toggle = () => { if (open) this.collapsed.add(g.key); else this.collapsed.delete(g.key); this.render(); };
- const name = el('button', { className: 'nm', title: open ? 'Gruppe zuklappen' : 'Gruppe aufklappen' },
+ const name = el('button', { className: 'nm', title: open ? 'Collapse group' : 'Expand group' },
el('span', { className: 'chev' + (open ? '' : ' shut') }, icon('down', 13, 2)), el('span', { className: 'gname', textContent: g.name }), el('span', { className: 'gcount', textContent: String(ids.length) }));
name.setAttribute('aria-expanded', String(open));
name.addEventListener('click', toggle);
const row = el('div', { className: 'row gr' + (anyVisible ? '' : ' off') }, name,
- this.ghostButton(`Gruppe ${g.name}`, ghosts === ids.length, ghosts > 0 && ghosts < ids.length, () => this.hooks.setGhost(ids, ghosts !== ids.length)),
- this.eyeButton(`Gruppe ${g.name}`, anyVisible, () => this.hooks.setVisible(ids, !anyVisible)));
+ this.ghostButton(`group ${g.name}`, ghosts === ids.length, ghosts > 0 && ghosts < ids.length, () => this.hooks.setGhost(ids, ghosts !== ids.length)),
+ this.eyeButton(`group ${g.name}`, anyVisible, () => this.hooks.setVisible(ids, !anyVisible)));
row.style.paddingLeft = `${4 + depth * 14}px`;
row.addEventListener('contextmenu', (e) => { e.preventDefault(); this.hooks.groupContext(ids, g.name, e.clientX, e.clientY); });
return row;
@@ -113,7 +113,7 @@ export class PartsCard {
const ghost = this.hooks.isGhost(p.id);
const sw = el('span', { className: 'sw' + (p.role === 'reference' ? ' ref' : '') });
sw.style.background = p.color;
- const name = el('button', { className: 'nm', title: 'Auswählen und Codestelle zeigen' }, sw, el('span', { className: 'pname', textContent: p.name }));
+ const name = el('button', { className: 'nm', title: 'Select and show the code location' }, sw, el('span', { className: 'pname', textContent: p.name }));
name.addEventListener('click', () => this.hooks.select(p.id));
const row = el('div', { className: 'row' + (this.selected === p.id ? ' sel' : '') + (visible ? '' : ' off') }, name,
this.ghostButton(p.name, ghost, false, () => this.hooks.setGhost([p.id], !ghost)),
@@ -127,16 +127,16 @@ export class PartsCard {
}
private eyeButton(what: string, visible: boolean, act: () => void): HTMLButtonElement {
- const b = el('button', { className: 'eye', title: visible ? 'Ausblenden' : 'Einblenden' }, icon(visible ? 'eye' : 'eyeoff', 15));
- b.setAttribute('aria-label', `${what} ${visible ? 'ausblenden' : 'einblenden'}`);
+ const b = el('button', { className: 'eye', title: visible ? 'Hide' : 'Show' }, icon(visible ? 'eye' : 'eyeoff', 15));
+ b.setAttribute('aria-label', `${visible ? 'Hide' : 'Show'} ${what}`);
b.addEventListener('click', () => { act(); this.render(); });
return b;
}
/** Transparent schalten. `partly`: nur ein Teil der Gruppe ist transparent. */
private ghostButton(what: string, on: boolean, partly: boolean, act: () => void): HTMLButtonElement {
- const b = el('button', { className: 'eye gh' + (on ? ' on' : partly ? ' partly' : ''), title: on ? 'Nicht mehr transparent' : 'Transparent schalten' }, icon('ghost', 15));
- b.setAttribute('aria-label', `${what} ${on ? 'nicht mehr transparent' : 'transparent schalten'}`);
+ const b = el('button', { className: 'eye gh' + (on ? ' on' : partly ? ' partly' : ''), title: on ? 'Not transparent' : 'Make transparent' }, icon('ghost', 15));
+ b.setAttribute('aria-label', `${on ? 'Make opaque' : 'Make transparent'}: ${what}`);
b.setAttribute('aria-pressed', String(on));
b.addEventListener('click', () => { act(); this.render(); });
return b;
diff --git a/app/src/renderer/pdfview.ts b/app/src/renderer/pdfview.ts
index 0f5fb68..19e7f5f 100644
--- a/app/src/renderer/pdfview.ts
+++ b/app/src/renderer/pdfview.ts
@@ -73,15 +73,15 @@ export class PdfView {
this.bar = {
page: el('span', { className: 'pdf-page-no c3' }),
zoom: el('span', { className: 'pdf-zoom c3' }),
- quote: btn('send', 'Markierten Text als Zitat mit Seite an den Agenten geben', () => this.sendQuote(), 'Zitat an Agent'),
- mark: btn('camera', 'Diese Seite als Bild markieren (für Zeichnungen und gescannte Seiten)', () => void this.markPage(), 'Seite markieren'),
+ quote: btn('send', 'Send the selected text to the agent as a quote with its page', () => this.sendQuote(), 'Quote to agent'),
+ mark: btn('camera', 'Mark up this page as an image (for drawings and scanned pages)', () => void this.markPage(), 'Mark up page'),
};
- const minus = btn('minus', 'Verkleinern', () => this.step(-1));
- const plus = btn('plus', 'Vergrößern', () => this.step(1));
- const fit = btn('fit', 'Auf Seitenbreite', () => this.setZoom(null));
+ const minus = btn('minus', 'Zoom out', () => this.step(-1));
+ const plus = btn('plus', 'Zoom in', () => this.step(1));
+ const fit = btn('fit', 'Fit page width', () => this.setZoom(null));
this.pagesEl = el('div', { className: 'pdf-pages' });
this.scroller = el('div', { className: 'pdf-scroll', tabIndex: -1 }, this.pagesEl);
- this.floatBtn = el('button', { className: 'btn sm acc pdf-float', title: 'Markierten Text als Zitat an den Agenten geben' }, icon('send', 13, 2), 'Zitat an Agent');
+ this.floatBtn = el('button', { className: 'btn sm acc pdf-float', title: 'Send the selected text to the agent as a quote' }, icon('send', 13, 2), 'Quote to agent');
this.floatBtn.hidden = true;
// Mausdruck nicht als Klick ins Dokument werten, sonst ginge die Textauswahl vor dem Klick verloren
this.floatBtn.addEventListener('mousedown', (e) => e.preventDefault());
@@ -129,8 +129,8 @@ export class PdfView {
}).promise;
} catch (e) {
if (id !== this.loadId) return;
- this.error = e instanceof PasswordException ? 'Die PDF ist mit einem Passwort geschützt. Rechtsklick im Dateibaum: „Mit Standardprogramm öffnen“.'
- : `Die PDF lässt sich nicht lesen: ${e instanceof Error ? e.message : String(e)}`;
+ this.error = e instanceof PasswordException ? 'The PDF is password protected. Right-click it in the file tree: “Open with default app”.'
+ : `The PDF cannot be read: ${e instanceof Error ? e.message : String(e)}`;
this.showMessage(this.error);
return;
}
@@ -336,12 +336,12 @@ export class PdfView {
}
private updatePageNo(): void {
- this.bar.page.textContent = this.pages.length ? `Seite ${this.currentPage()} von ${this.pages.length}` : '';
+ this.bar.page.textContent = this.pages.length ? `Page ${this.currentPage()} of ${this.pages.length}` : '';
}
private updateBar(): void {
this.updatePageNo();
- this.bar.zoom.textContent = `${Math.round(this.scale() * 100)} %`;
+ this.bar.zoom.textContent = `${Math.round(this.scale() * 100)}%`;
this.bar.mark.disabled = !this.pages.length;
this.bar.quote.disabled = !this.selection();
}
diff --git a/app/src/renderer/render.html b/app/src/renderer/render.html
index 4c500e2..017db72 100644
--- a/app/src/renderer/render.html
+++ b/app/src/renderer/render.html
@@ -1,5 +1,5 @@
<!doctype html>
-<html lang="de">
+<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self' data:">
diff --git a/app/src/renderer/render.ts b/app/src/renderer/render.ts
index 177f3a8..04b2c70 100644
--- a/app/src/renderer/render.ts
+++ b/app/src/renderer/render.ts
@@ -55,7 +55,7 @@ function frame(s: Scene, t: number, stamp: string | null, forceView: boolean): H
}
function png(c: HTMLCanvasElement): Promise<ArrayBuffer> {
- return new Promise((resolve, reject) => c.toBlob((b) => (b ? b.arrayBuffer().then(resolve, reject) : reject(new Error('PNG ließ sich nicht erzeugen'))), 'image/png'));
+ return new Promise((resolve, reject) => c.toBlob((b) => (b ? b.arrayBuffer().then(resolve, reject) : reject(new Error('Could not create the PNG'))), 'image/png'));
}
/** Übersicht: Standbilder gleichmäßig über die Dauer, je mit Zeit, oben Name und Dauer der Animation. */
@@ -71,7 +71,7 @@ async function sheet(s: Scene, job: RenderJob, cols: number, rows: number): Prom
g.fillStyle = '#e6e8eb';
g.font = `600 ${Math.round(head * 0.45)}px "IBM Plex Sans", "Segoe UI", sans-serif`;
g.textBaseline = 'middle';
- g.fillText(`${anim.meta.name} · ${fmtTime(anim.duration)} · ${n} Standbilder`, gap * 2, head / 2 + gap / 2);
+ g.fillText(`${anim.meta.name} · ${fmtTime(anim.duration)} · ${n} stills`, gap * 2, head / 2 + gap / 2);
for (let i = 0; i < n; i++) {
const t = n === 1 ? 0 : (anim.duration * i) / (n - 1);
const img = frame(s, t, fmtTime(t), !!job.view);
@@ -90,7 +90,7 @@ async function video(s: Scene, job: RenderJob, progress: (f: number) => void): P
let codec: 'avc' | 'vp9' = 'avc';
if (!(await canEncodeVideo('avc', { width: c.width, height: c.height }))) {
codec = 'vp9';
- warnings.push('H.264 lässt sich auf diesem Rechner nicht kodieren, das Video ist VP9 (spielt in der App und in Browsern, nicht in jedem Player).');
+ warnings.push('This computer cannot encode H.264, the video is VP9 (plays in the app and in browsers, not in every player).');
}
const output = new Output({ format: new Mp4OutputFormat({ fastStart: 'in-memory' }), target: new BufferTarget() });
const source = new CanvasSource(c, { codec, bitrate: QUALITY_HIGH, keyFrameInterval: 1 });
@@ -105,7 +105,7 @@ async function video(s: Scene, job: RenderJob, progress: (f: number) => void): P
}
await output.finalize();
const buf = output.target.buffer;
- if (!buf) throw new Error('Das Video ist leer.');
+ if (!buf) throw new Error('The video is empty.');
return { mp4: buf, warnings };
}
@@ -116,7 +116,7 @@ async function run(job: RenderJob): Promise<RenderOutput> {
const t = s.anim ? Math.min(job.at, s.anim.duration) : 0;
return { ok: true, png: await png(frame(s, t, null, !!job.view)), warnings };
}
- if (!s.anim) return { ok: false, error: 'Übersicht und Video brauchen eine Animation.' };
+ if (!s.anim) return { ok: false, error: 'A contact sheet or video needs an animation.' };
if (job.kind === 'sheet') return { ok: true, png: await sheet(s, job, job.grid[0], job.grid[1]), warnings };
const v = await video(s, job, (f) => api.progress(job.id, f * 0.9));
// Übersicht zum Video, damit der Agent sieht, was darin steht (Videos kann er nicht ansehen)
diff --git a/app/src/renderer/resulttool.ts b/app/src/renderer/resulttool.ts
index c06e6ca..a820d28 100644
--- a/app/src/renderer/resulttool.ts
+++ b/app/src/renderer/resulttool.ts
@@ -28,19 +28,19 @@ interface Deps {
changed(): void;
}
-const num = (v: number, unit: string) => (+v.toFixed(unit === '°' ? 1 : 2) + 0).toLocaleString('de-DE'); // + 0: kein „-0“
+const num = (v: number, unit: string) => (+v.toFixed(unit === '°' ? 1 : 2) + 0).toLocaleString('en-US'); // + 0: kein „-0“
// Ohne Einheit (Sicherheitsfaktor der FEM) steht die Zahl allein
const withUnit = (v: number, unit: string) => `${num(v, unit)}${unit === '°' ? '°' : unit ? ` ${unit}` : ''}`;
const dot = (v: number, unit: string) => `${v.toFixed(unit === '°' ? 1 : 2)}${unit === '°' ? '°' : unit ? ` ${unit}` : ''}`;
-const de = (v: number, digits: number) => (+v.toFixed(digits) + 0).toLocaleString('de-DE');
+const loc = (v: number, digits: number) => (+v.toFixed(digits) + 0).toLocaleString('en-US');
/** Höchster Sicherheitsfaktor in der Datei (soma.fem VALUE_CAP): Dort ist kaum Spannung, der Wert selbst sagt nichts. */
const SAFETY_CAP = 99;
-const safety = (v: number) => (v >= SAFETY_CAP ? `über ${SAFETY_CAP}` : de(v, 2));
+const safety = (v: number) => (v >= SAFETY_CAP ? `over ${SAFETY_CAP}` : loc(v, 2));
/** FEM an einer Stelle: die gezeigte Größe zuerst, dann die andere und die Verschiebung. */
const femAt = (p: ResultProbe, field: ResultField, label: boolean) => {
- const stress = p.stress != null ? `${de(p.stress, 1)} MPa` : null;
- const sf = `${label || field === 'stress' ? 'Sicherheit ' : ''}${safety(p.value)}`;
- return [...(field === 'stress' && stress ? [stress, sf] : [sf, stress]), p.disp != null ? `${de(p.disp, 3)} mm` : null].filter(Boolean).join(' · ');
+ const stress = p.stress != null ? `${loc(p.stress, 1)} MPa` : null;
+ const sf = `${label || field === 'stress' ? 'Safety ' : ''}${safety(p.value)}`;
+ return [...(field === 'stress' && stress ? [stress, sf] : [sf, stress]), p.disp != null ? `${loc(p.disp, 3)} mm` : null].filter(Boolean).join(' · ');
};
type RangeMode = 'auto' | 'minmax' | 'custom';
/** Abstand des Schilds vom Zeiger (px): neben den Armen des Fadenkreuzes, nicht darauf. */
@@ -184,7 +184,7 @@ export class ResultTool {
this.pinned = null;
this.d.changed();
} catch (err) {
- this.d.toast(`Das Ergebnis ließ sich nicht laden: ${err instanceof Error ? err.message : String(err)}`, 'error');
+ this.d.toast(`Could not load the result: ${err instanceof Error ? err.message : String(err)}`, 'error');
}
this.render();
}
@@ -202,18 +202,18 @@ export class ResultTool {
// Ohne Ergebnis keine Skala zum Einstellen
this.ui.range.parentElement!.hidden = !r;
if (!r) {
- this.ui.hint.textContent = 'Noch kein Ergebnis. Der Agent erzeugt es mit soma analyze (Überhang, Wandstärke, Abstand, Festigkeit mit FEM).';
+ this.ui.hint.textContent = 'No result yet. The agent creates it with soma analyze (overhang, wall thickness, clearance, strength with FEM).';
return;
}
- this.ui.hint.textContent = this.busy ? 'Wird neu berechnet …' : r.stale ? 'Älter als der Code. „Neu berechnen“ wertet das aktuelle Modell aus.' : `soma ${r.command.join(' ')}`;
+ this.ui.hint.textContent = this.busy ? 'Recalculating …' : r.stale ? 'Older than the code. “Recalculate” evaluates the current model.' : `soma ${r.command.join(' ')}`;
this.renderLegend();
for (const p of r.parts) {
- const range = p.min != null && p.max != null ? `${withUnit(p.min, r.unit)} bis ${withUnit(p.max, r.unit)}` : 'keine Werte';
- const crit = p.critical > 0 ? `${(p.critical / 100).toLocaleString('de-DE', { maximumFractionDigits: 2 })} cm² kritisch` : 'nichts kritisch';
+ const range = p.min != null && p.max != null ? `${withUnit(p.min, r.unit)} to ${withUnit(p.max, r.unit)}` : 'no values';
+ const crit = p.critical > 0 ? `${(p.critical / 100).toLocaleString('en-US', { maximumFractionDigits: 2 })} cm² critical` : 'nothing critical';
// FEM: kleinste Sicherheit, höchste Spannung und größte Verschiebung sagen mehr als die Spanne
// („kritisch“ nur, wenn es so ist: die Zeile ist schmal, und sie ist dann ohnehin rot)
const text = r.fem && p.stress && p.displacement && p.min != null
- ? `Sicherheit ${de(p.min, 2)} · ${de(p.stress.value, 1)} MPa · ${de(p.displacement.value, 3)} mm${p.critical > 0 ? ` · ${crit}` : ''}`
+ ? `Safety ${loc(p.min, 2)} · ${loc(p.stress.value, 1)} MPa · ${loc(p.displacement.value, 3)} mm${p.critical > 0 ? ` · ${crit}` : ''}`
: `${range} · ${crit}`;
this.ui.summary.append(el('div', { className: 'rs-row' + (p.critical > 0 ? ' bad' : '') },
el('b', { textContent: p.name }), el('span', { textContent: text })));
@@ -239,9 +239,9 @@ export class ResultTool {
mark.hidden = v.threshold < lo || v.threshold > hi;
mark.style.left = `${Math.max(0, Math.min(100, ((v.threshold - lo) / (hi - lo || 1)) * 100))}%`;
bar.append(mark);
- const weakest = this.d.layer.field === 'stress' && this.d.layer.stressLimitMixed ? ' (schwächster Werkstoff)' : '';
+ const weakest = this.d.layer.field === 'stress' && this.d.layer.stressLimitMixed ? ' (weakest material)' : '';
// Gewählte Spanne: Rot heißt dort „oberes Ende der Skala“, nicht kritisch. Das steht dabei
- const thr = `Grenze ${withUnit(v.threshold, v.unit)}${weakest}, ${v.ramp ? 'Farbe über die Spanne' : `kritisch ${v.bad === 'high' ? 'darüber' : 'darunter'}`}`;
+ const thr = `Limit ${withUnit(v.threshold, v.unit)}${weakest}, ${v.ramp ? 'color across the range' : `critical ${v.bad === 'high' ? 'above' : 'below'}`}`;
this.ui.legend.append(
el('div', { className: 'rs-q', textContent: v.unit ? `${v.quantity} (${v.unit})` : v.quantity }), bar,
el('div', { className: 'rs-scale' }, el('span', { textContent: withUnit(lo, v.unit) }),
@@ -282,18 +282,18 @@ export class ResultTool {
const fem = r.fem;
this.ui.femRow.hidden = !fem;
if (!fem) return;
- const n = (v: number[]) => `${de(Math.hypot(v[0], v[1], v[2]), 1)} N`;
+ const n = (v: number[]) => `${loc(Math.hypot(v[0], v[1], v[2]), 1)} N`;
for (const b of fem.bcs) {
- const what = b.kind === 'fix' ? `fest${b.axes && b.axes !== 'xyz' ? ` (nur ${b.axes.toUpperCase().split('').join(', ')})` : ''}`
- : b.kind === 'force' ? 'Kraft' : 'Druck';
- const val = b.kind === 'fix' ? (b.reaction ? `Lagerkraft ${n(b.reaction)}` : '')
- : b.kind === 'pressure' ? `${de(b.value ?? 0, 3)} MPa, zusammen ${n(b.total ?? [0, 0, 0])}` : n(b.total ?? [0, 0, 0]);
+ const what = b.kind === 'fix' ? `Fixed${b.axes && b.axes !== 'xyz' ? ` (${b.axes.toUpperCase().split('').join(', ')} only)` : ''}`
+ : b.kind === 'force' ? 'Force' : 'Pressure';
+ const val = b.kind === 'fix' ? (b.reaction ? `reaction force ${n(b.reaction)}` : '')
+ : b.kind === 'pressure' ? `${loc(b.value ?? 0, 3)} MPa, total ${n(b.total ?? [0, 0, 0])}` : n(b.total ?? [0, 0, 0]);
this.ui.summary.append(el('div', { className: 'rs-row bc' }, el('b', { textContent: what }), el('span', { textContent: `${b.label} · ${val}` })));
}
for (const t of r.notes ?? []) this.ui.summary.append(el('div', { className: 'rs-note', textContent: t }));
const l = this.d.layer;
- const opts: [number, string][] = [[0, 'Unverformt'], [1, 'Echte Größe']];
- if (l.autoScale > 1) opts.push([l.autoScale, `${fmtScale(l.autoScale)}-fach überhöht`]);
+ const opts: [number, string][] = [[0, 'Undeformed'], [1, 'True scale']];
+ if (l.autoScale > 1) opts.push([l.autoScale, `Exaggerated ${fmtScale(l.autoScale)}×`]);
this.ui.deform.replaceChildren(...opts.map(([v, t]) => el('option', { value: String(v), textContent: t })));
this.ui.deform.value = String(l.scale);
this.ui.bcs.setAttribute('aria-pressed', String(l.bcsVisible));
@@ -302,7 +302,7 @@ export class ResultTool {
private showProbe(p: ResultProbe | null, pinned: boolean): void {
const r = this.current;
if (!r) return;
- if (!p) { if (!pinned || !this.pinned) this.ui.probe.textContent = this.pinned ? this.probeText(this.pinned, true) : 'Zeiger aufs Modell: Wert an der Stelle. Klick merkt sie für den Agenten.'; return; }
+ if (!p) { if (!pinned || !this.pinned) this.ui.probe.textContent = this.pinned ? this.probeText(this.pinned, true) : 'Point at the model to see the value there. Click to keep the spot for the agent.'; return; }
this.ui.probe.textContent = this.probeText(p, pinned);
}
@@ -341,7 +341,7 @@ export class ResultTool {
private probeText(p: ResultProbe, pinned: boolean): string {
const r = this.current!;
const what = r.fem ? femAt(p, this.d.layer.field, true) : withUnit(p.value, r.unit);
- return `${pinned ? 'Gewählt' : 'Zeiger'}: ${p.name}, ${what} bei (${p.point.map((v) => (v + 0).toLocaleString('de-DE')).join('; ')})`;
+ return `${pinned ? 'Picked' : 'Pointer'}: ${p.name}, ${what} at (${p.point.map((v) => (v + 0).toLocaleString('en-US')).join(', ')})`;
}
private async rerun(): Promise<void> {
@@ -351,7 +351,7 @@ export class ResultTool {
this.render();
try {
const res = await this.d.rerun(r.id);
- if (!res.ok) this.d.toast(`Neu berechnen ging nicht: ${res.error ?? 'unbekannter Fehler'}`, 'error');
+ if (!res.ok) this.d.toast(`Could not recalculate: ${res.error ?? 'unknown error'}`, 'error');
} finally {
this.busy = false;
await this.refresh();
@@ -361,16 +361,16 @@ export class ResultTool {
private agentNote(): string | null {
const r = this.current;
if (!r) return null;
- const head = `[Ergebnis: "${r.title}" (${r.file}, Grenzwert ${dot(r.threshold, r.unit)})`;
+ const head = `[Result: "${r.title}" (${r.file}, limit ${dot(r.threshold, r.unit)})`;
const p = this.pinned;
// FEM: Sicherheit mit Spannung und Verschiebung, damit der Agent die Stelle ohne neue Rechnung einordnen kann
- const extra = p && p.stress != null ? ` (${p.stress.toFixed(1)} MPa${p.disp != null ? `, Verschiebung ${p.disp.toFixed(3)} mm` : ''})` : '';
- return p ? `${head}, Bauteil "${p.name}": ${r.fem ? 'Sicherheit ' : ''}${r.fem && p.value >= SAFETY_CAP ? `über ${SAFETY_CAP}` : dot(p.value, r.unit)}${extra} bei (${p.point.map((v) => v.toFixed(1)).join(', ')}) mm] ` : `${head}] `;
+ const extra = p && p.stress != null ? ` (${p.stress.toFixed(1)} MPa${p.disp != null ? `, displacement ${p.disp.toFixed(3)} mm` : ''})` : '';
+ return p ? `${head}, part "${p.name}": ${r.fem ? 'safety factor ' : ''}${r.fem && p.value >= SAFETY_CAP ? `over ${SAFETY_CAP}` : dot(p.value, r.unit)}${extra} at (${p.point.map((v) => v.toFixed(1)).join(', ')}) mm] ` : `${head}] `;
}
/** Für die Markierung: Welches Ergebnis zu sehen ist (null: keines). */
agentText(): string | null {
- return this.active && this.current ? `zeigt das Ergebnis „${this.current.title}“ (${this.current.file})` : null;
+ return this.active && this.current ? `shows the result "${this.current.title}" (${this.current.file})` : null;
}
/** Prüfhilfe. */
diff --git a/app/src/renderer/resultview.ts b/app/src/renderer/resultview.ts
index 78b47b2..f2f77b5 100644
--- a/app/src/renderer/resultview.ts
+++ b/app/src/renderer/resultview.ts
@@ -64,7 +64,7 @@ export class ResultLayer {
const m = this.meta;
if (!m) return null;
const base: ResultMeta = this.field === 'stress'
- ? { ...m, quantity: 'Vergleichsspannung (von Mises)', unit: 'MPa', bad: 'high', threshold: this.stressLimit, range: this.autoRange('stress') }
+ ? { ...m, quantity: 'von Mises stress', unit: 'MPa', bad: 'high', threshold: this.stressLimit, range: this.autoRange('stress') }
: m;
return this.range ? { ...base, range: this.range, ramp: true } : base;
}
@@ -102,7 +102,7 @@ export class ResultLayer {
async show(glb: ArrayBuffer): Promise<ResultMeta> {
const gltf = await new GLTFLoader().parseAsync(glb, '');
const meta = (gltf.parser.json as { extras?: { soma_result?: ResultMeta } }).extras?.soma_result;
- if (!meta || !Array.isArray(meta.range)) throw new Error('Kein Ergebnis von soma (extras.soma_result fehlt)');
+ if (!meta || !Array.isArray(meta.range)) throw new Error('Not a result from soma (extras.soma_result is missing)');
this.hide();
const meshes: ResultMesh[] = [];
const deformables: Deformable[] = [];
@@ -258,7 +258,7 @@ export class ResultLayer {
/** Zeile für die Legende im Bild: wie stark die Verformung überhöht ist. */
deformNote(): string | null {
if (!this.isFem || this.scale <= 0) return null;
- return this.scale === 1 ? 'Verformung in echter Größe' : `Verformung ${fmtScale(this.scale)}-fach überhöht`;
+ return this.scale === 1 ? 'Deformation at true scale' : `Deformation exaggerated ${fmtScale(this.scale)}×`;
}
/** Farben neu aus den Werten (etwa nach geänderter Spanne). */
@@ -338,4 +338,4 @@ export function niceScale(x: number): number {
return (f < 2 ? 1 : f < 5 ? 2 : 5) * e;
}
-export const fmtScale = (s: number) => s.toLocaleString('de-DE', { maximumFractionDigits: 0 });
+export const fmtScale = (s: number) => s.toLocaleString('en-US', { maximumFractionDigits: 0 });
diff --git a/app/src/renderer/sectiontool.ts b/app/src/renderer/sectiontool.ts
index fa51d71..74f64dc 100644
--- a/app/src/renderer/sectiontool.ts
+++ b/app/src/renderer/sectiontool.ts
@@ -20,7 +20,8 @@ interface Ui {
}
interface Deps { viewer: Viewer }
-const num = (v: number, digits = 2) => (Math.abs(v) < 5e-4 ? 0 : v).toLocaleString('de-DE', { minimumFractionDigits: digits, maximumFractionDigits: 3 }).replace(/^-/, '−');
+// Ohne Tausendertrennzeichen: Der Wert steht auch im Eingabefeld und muss sich wieder lesen lassen
+const num = (v: number, digits = 2) => (Math.abs(v) < 5e-4 ? 0 : v).toLocaleString('en-US', { minimumFractionDigits: digits, maximumFractionDigits: 3, useGrouping: false }).replace(/^-/, '−');
/** Für den Agenten: Punkt als Dezimalzeichen, drei Stellen, kein „-0“. */
const f3 = (v: number) => (Math.abs(v) < 5e-4 ? 0 : v).toFixed(3);
const vec = (d: number[]) => `(${d.map((x) => +(Math.abs(x) < 5e-7 ? 0 : x).toFixed(4)).join(', ')})`;
@@ -114,12 +115,12 @@ export class SectionTool {
if (this.axis !== 'face') {
const name = this.axis.toUpperCase();
const gone = this.removedSign() > 0 ? '>' : '<';
- return `Schnittansicht bei ${name} = ${f3(this.value)} mm, weggeschnitten ist ${name} ${gone} ${f3(this.value)}`;
+ return `section view at ${name} = ${f3(this.value)} mm, ${name} ${gone} ${f3(this.value)} is cut away`;
}
const r = this.removedDir();
const p = this.planePoint();
- return `Schnittansicht, Ebene durch (${p.map(f3).join(', ')}) mm parallel zu einer Fläche von "${this.face!.name}", `
- + `weggeschnitten ist die Seite in Richtung ${vec(r)}`;
+ return `section view, plane through (${p.map(f3).join(', ')}) mm parallel to a face of "${this.face!.name}", `
+ + `the side towards ${vec(r)} is cut away`;
}
// ---- Zustand ------------------------------------------------------------------------------------------------
@@ -155,7 +156,9 @@ export class SectionTool {
private showValue(): void { if (this.active) this.ui.value.value = num(this.shown()); }
private takeInput(): void {
- const t = this.ui.value.value.trim().replace(/\s/g, '').replace('−', '-').replace(',', '.');
+ // Komma als Dezimaltrenner weiter annehmen, neben einem Punkt ist es ein Tausendertrennzeichen
+ const s = this.ui.value.value.trim().replace(/\s/g, '').replace('−', '-');
+ const t = s.includes('.') ? s.replace(/,/g, '') : s.replace(',', '.');
const u = Number(t);
if (t === '' || !Number.isFinite(u)) { this.render(); return; }
this.setShown(u);
@@ -191,7 +194,7 @@ export class SectionTool {
if (!this.picking) return;
if (!h || h.surface !== 'PLANE') {
// Weiter warten: Ein Fehlklick soll nicht gleich alles abbrechen
- this.note = h ? 'Das ist keine ebene Fläche. Bitte eine ebene Fläche anklicken.' : 'Dort ist keine Fläche. Bitte eine ebene Fläche anklicken.';
+ this.note = h ? 'That is not a planar face. Please click a planar face.' : 'There is no face there. Please click a planar face.';
this.deps.viewer.pickPlane((x) => this.picked(x));
this.render();
return;
@@ -246,13 +249,13 @@ export class SectionTool {
ui.range.step = String(step);
ui.range.value = String(u);
if (document.activeElement !== ui.value) this.showValue();
- ui.label.textContent = faceMode ? 'Tiefe' : `${this.axis.toUpperCase()} =`;
+ ui.label.textContent = faceMode ? 'Depth' : `${this.axis.toUpperCase()} =`;
ui.flip.disabled = ui.look.disabled = this.picking;
ui.range.disabled = ui.value.disabled = this.picking;
let hint: string;
- if (this.picking) hint = this.note || 'Ebene Fläche im Modell anklicken. Escape bricht ab.';
- else if (faceMode) hint = `Parallel zu einer Fläche von „${this.face!.name}“, Tiefe ab der Fläche.`;
- else hint = `Weggeschnitten: ${this.axis.toUpperCase()} ${this.removedSign() > 0 ? '>' : '<'} ${num(this.value)} mm`;
+ if (this.picking) hint = this.note || 'Click a planar face in the model. Escape cancels.';
+ else if (faceMode) hint = `Parallel to a face of “${this.face!.name}”, depth from the face.`;
+ else hint = `Cut away: ${this.axis.toUpperCase()} ${this.removedSign() > 0 ? '>' : '<'} ${num(this.value)} mm`;
ui.hint.textContent = hint;
ui.hint.classList.toggle('warn', !!this.note);
}
diff --git a/app/src/renderer/skills.ts b/app/src/renderer/skills.ts
index 910b00b..7aead94 100644
--- a/app/src/renderer/skills.ts
+++ b/app/src/renderer/skills.ts
@@ -28,28 +28,32 @@ interface Ui {
}
const unitOf = (v: SkillVar) => (v.unit ? (v.unit === '°' ? '°' : ` ${v.unit}`) : '');
-/** Wert für die Oberfläche: Zahl mit Komma und Einheit, bei einer Auswahl der deutsche Name. */
+/** Wert für die Oberfläche: Zahl mit Einheit, bei einer Auswahl der angezeigte Name. */
const shown = (v: SkillVar, x: SkillValue = v.value) => (typeof x === 'number'
- ? `${x.toLocaleString('de-DE', { maximumFractionDigits: 6 })}${unitOf(v)}` : v.options?.find((o) => o.value === x)?.label ?? String(x));
+ ? `${x.toLocaleString('en-US', { maximumFractionDigits: 6, useGrouping: false })}${unitOf(v)}` : v.options?.find((o) => o.value === x)?.label ?? String(x));
/** Für den Agenten: Zahlen mit Punkt. */
const forAgent = (v: SkillVar) => (typeof v.value === 'number' ? `${String(v.value)}${unitOf(v)}` : shown(v));
const changedVars = (s: SkillInfo) => s.vars.filter((v) => v.value !== v.default);
/** Die drei Stufen (E55), benannt nach dem, was der Agent tut. */
const MODES: { mode: SkillMode; label: string; title: string }[] = [
- { mode: 'off', label: 'Aus', title: 'Der Agent sieht diesen Skill nicht.' },
- { mode: 'demand', label: 'Bei Bedarf', title: 'Der Agent liest ihn, wenn das Gespräch auf das Thema kommt.' },
- { mode: 'always', label: 'Immer', title: 'Der Agent befolgt ihn bei jeder Änderung.' },
+ { mode: 'off', label: 'Off', title: 'The agent does not see this skill.' },
+ { mode: 'demand', label: 'On demand', title: 'The agent reads it when the conversation turns to the topic.' },
+ { mode: 'always', label: 'Always', title: 'The agent follows it with every change.' },
];
const modeOf = (m: SkillMode) => MODES.find((x) => x.mode === m)!;
/** Symbol vor der Überschrift einer Kategorie: Die Liste ist lang, so findet man die Gruppen schneller. */
-const CATEGORY_ICON: Record<string, string> = { Arbeitsweise: 'route', Fertigungsverfahren: 'wrench', Konstruktionswissen: 'compass', 'Prüfen und Zeigen': 'gauge' };
+const CATEGORY_ICON: Record<string, string> = {
+ 'Way of working': 'route', Manufacturing: 'wrench', 'Design knowledge': 'compass', 'Check and present': 'gauge',
+ // Kategorien älterer Skill-Köpfe (vor E73)
+ Arbeitsweise: 'route', Fertigungsverfahren: 'wrench', Konstruktionswissen: 'compass', 'Prüfen und Zeigen': 'gauge',
+};
const labelOf = (m: SkillMode) => modeOf(m).label;
/** Text für die Eingabe des Agenten: Pfad und die vom Standard abweichenden Einstellungen. */
export function skillNote(s: SkillInfo): string {
const set = changedVars(s);
- return `[Skill: ${s.file}${set.length ? `, Einstellungen: ${set.map((v) => `${v.label} = ${forAgent(v)}`).join(', ')}` : ''}] `;
+ return `[Skill: ${s.file}${set.length ? `, settings: ${set.map((v) => `${v.label} = ${forAgent(v)}`).join(', ')}` : ''}] `;
}
/**
@@ -97,35 +101,35 @@ export class SkillsPanel {
this.skills = r.skills;
this.render();
this.deps.changed();
- if (!r.ok) { this.deps.toast(`„${s.title}“ ließ sich nicht auf „${labelOf(mode)}“ stellen: ${r.error ?? 'unbekannter Fehler'}`, 'error'); return; }
- const kept = r.backup ? ' Die vorige Fassung im Projekt liegt in der Sicherung.' : '';
- if (r.warning) { this.deps.toast(`„${s.title}“ steht auf „${labelOf(mode)}“. ${r.warning}${kept}`, 'error'); return; }
+ if (!r.ok) { this.deps.toast(`“${s.title}” could not be set to “${labelOf(mode)}”: ${r.error ?? 'unknown error'}`, 'error'); return; }
+ const kept = r.backup ? ' The previous version in the project is in the backup.' : '';
+ if (r.warning) { this.deps.toast(`“${s.title}” is set to “${labelOf(mode)}”. ${r.warning}${kept}`, 'error'); return; }
// Ein laufender Agent liest AGENTS.md nicht von selbst neu
this.deps.toast(mode === 'always'
- ? `„${s.title}“ gilt jetzt immer und steht in AGENTS.md. Einem laufenden Agenten sagt „An Agent geben“ Bescheid.${kept}`
+ ? `“${s.title}” now always applies and is listed in AGENTS.md. “Send to agent” tells a running agent.${kept}`
: mode === 'demand'
? (was === 'always'
- ? `„${s.title}“ gilt nur noch bei Bedarf. Ein laufender Agent folgt ihm vielleicht weiter: Sag ihm Bescheid.${kept}`
- : `„${s.title}“ steht dem Agenten bei Bedarf zur Verfügung (AGENTS.md). Ein laufender Agent erfährt davon erst nach einem Neustart.${kept}`)
- : `„${s.title}“ ist aus. Ein laufender Agent kennt die Regeln vielleicht noch: Sag ihm Bescheid oder starte ihn neu.${kept}`);
+ ? `“${s.title}” now only applies on demand. A running agent may keep following it: tell it.${kept}`
+ : `“${s.title}” is available to the agent on demand (AGENTS.md). A running agent only learns about it after a restart.${kept}`)
+ : `“${s.title}” is off. A running agent may still know the rules: tell it or restart it.${kept}`);
}
private render(): void {
const { list, sum } = this.ui;
- if (this.error) { list.replaceChildren(el('div', { className: 'hint', textContent: `Skills nicht lesbar: ${this.error}` })); sum.textContent = ''; this.renderDetail(); return; }
+ if (this.error) { list.replaceChildren(el('div', { className: 'hint', textContent: `Skills not readable: ${this.error}` })); sum.textContent = ''; this.renderDetail(); return; }
if (!this.skills.length) {
- list.replaceChildren(el('div', { className: 'hint', textContent: this.loaded ? 'Diese App bringt keine Skills mit.' : 'Lädt …' }));
+ list.replaceChildren(el('div', { className: 'hint', textContent: this.loaded ? 'This app comes without skills.' : 'Loading …' }));
sum.textContent = '';
this.renderDetail();
return;
}
const count = (m: SkillMode) => this.skills.filter((s) => s.mode === m).length;
- sum.textContent = `Regeln für den Agenten, je Modell · ${count('always')} immer, ${count('demand')} bei Bedarf, ${count('off')} aus`;
+ sum.textContent = `Rules for the agent, per model · ${count('always')} always, ${count('demand')} on demand, ${count('off')} off`;
// Der Hauptprozess liefert die Skills nach Kategorien sortiert: Überschrift, wo eine neue beginnt
const out: HTMLElement[] = [];
let cat: string | null = null;
for (const s of this.skills) {
- const c = s.category || 'Weitere';
+ const c = s.category || 'Other';
if (c !== cat) {
const h = el('div', { className: 'sk-cat' }, icon(CATEGORY_ICON[c] ?? 'book', 14, 1.9), el('span', { textContent: c }));
h.setAttribute('role', 'heading');
@@ -143,10 +147,10 @@ export class SkillsPanel {
private row(s: SkillInfo): HTMLElement {
const set = changedVars(s);
const note = s.problems.length || s.changed
- ? el('span', { className: 'warn', textContent: s.problems[0] ?? 'Kopie weicht von der Fassung der App ab' })
- : set.length ? el('span', { className: 'cust', textContent: `${set.map((v) => shown(v)).join(' · ')} · angepasst` })
+ ? el('span', { className: 'warn', textContent: s.problems[0] ?? 'The copy differs from the app’s version' })
+ : set.length ? el('span', { className: 'cust', textContent: `${set.map((v) => shown(v)).join(' · ')} · customized` })
: el('span', { textContent: s.summary });
- const open = el('button', { className: 'sk-open', title: `${s.title}: Beschreibung, Stufe und Einstellungen` }, el('b', { textContent: s.title }), note);
+ const open = el('button', { className: 'sk-open', title: `${s.title}: description, level and settings` }, el('b', { textContent: s.title }), note);
open.addEventListener('click', () => this.openDetail(this.openId === s.id ? null : s.id));
const row = el('div', { className: `sk-row ${s.mode}${this.openId === s.id ? ' sel' : ''}` }, open, this.levelChip(s));
row.setAttribute('role', 'listitem');
@@ -156,10 +160,10 @@ export class SkillsPanel {
/** Kleiner Schalter mit der Stufe. Klick öffnet ein Menü mit den drei Stufen und was sie bedeuten. */
private levelChip(s: SkillInfo): HTMLButtonElement {
- const b = el('button', { className: `sk-lvl ${s.mode}`, disabled: this.busy.has(s.id), title: `Stufe: ${labelOf(s.mode)}. ${modeOf(s.mode).title}` },
+ const b = el('button', { className: `sk-lvl ${s.mode}`, disabled: this.busy.has(s.id), title: `Level: ${labelOf(s.mode)}. ${modeOf(s.mode).title}` },
el('span', { className: 'ld' }), el('span', { textContent: labelOf(s.mode) }), icon('down', 12, 2));
b.setAttribute('aria-haspopup', 'menu');
- b.setAttribute('aria-label', `${s.title}: Stufe ${labelOf(s.mode)}`);
+ b.setAttribute('aria-label', `${s.title}: level ${labelOf(s.mode)}`);
b.addEventListener('click', (e) => {
e.stopPropagation();
const m = this.ui.menu;
@@ -181,7 +185,7 @@ export class SkillsPanel {
private modeSwitch(s: SkillInfo): HTMLElement {
const box = el('div', { className: 'sk-mode' });
box.setAttribute('role', 'radiogroup');
- box.setAttribute('aria-label', `${s.title}: Stufe`);
+ box.setAttribute('aria-label', `${s.title}: level`);
for (const m of MODES) {
const b = el('button', { textContent: m.label, title: m.title });
b.setAttribute('role', 'radio');
@@ -201,47 +205,47 @@ export class SkillsPanel {
box.hidden = !s;
if (!s) { box.replaceChildren(); return; }
box.dataset.id = s.id;
- const close = el('button', { className: 'ibtn s', title: 'Schließen (Escape)' }, icon('x', 14, 2));
- close.setAttribute('aria-label', 'Karte schließen');
+ const close = el('button', { className: 'ibtn s', title: 'Close (Escape)' }, icon('x', 14, 2));
+ close.setAttribute('aria-label', 'Close card');
close.addEventListener('click', () => this.closeDetail());
const kids: (HTMLElement | null)[] = [
el('div', { className: 'mc-hd' }, el('span', { className: 'mc-ico sk-ico' }, icon('book', 15)),
- el('div', { className: 'sk-title' }, el('b', { textContent: s.title }), el('span', { className: 'c3', textContent: s.category || 'Weitere' })), el('span', { className: 'grow' }), close),
+ el('div', { className: 'sk-title' }, el('b', { textContent: s.title }), el('span', { className: 'c3', textContent: s.category || 'Other' })), el('span', { className: 'grow' }), close),
el('div', { className: 'sk-desc', textContent: s.summary }),
];
- if (s.changed) kids.push(el('div', { className: 'sk-note', textContent: 'Die Kopie im Projekt weicht von der Fassung dieser App ab. Aus- und wieder Einschalten übernimmt die Fassung der App, die bisherige kommt in die Sicherung.' }));
+ if (s.changed) kids.push(el('div', { className: 'sk-note', textContent: 'The copy in the project differs from this app’s version. Switching it off and on again takes over the app’s version, the previous one goes into the backup.' }));
for (const p of s.problems) kids.push(el('div', { className: 'sk-warn', textContent: p }));
- kids.push(el('div', { className: 'sk-sec' }, el('div', { className: 'sk-h', textContent: 'Für dieses Modell' }), this.modeSwitch(s),
+ kids.push(el('div', { className: 'sk-sec' }, el('div', { className: 'sk-h', textContent: 'For this model' }), this.modeSwitch(s),
el('div', { className: 'c3 small', textContent: modeOf(s.mode).title })));
if (s.vars.length) {
const set = changedVars(s);
- const reset = set.length ? el('button', { className: 'sk-resetall', textContent: 'Zurücksetzen', title: 'Alle Einstellungen dieses Skills zurück auf den Standard' }) : null;
+ const reset = set.length ? el('button', { className: 'sk-resetall', textContent: 'Reset', title: 'Reset all settings of this skill to the default' }) : null;
reset?.addEventListener('click', () => void this.resetAll(s));
kids.push(el('div', { className: 'sk-sec' },
- el('div', { className: 'sk-h' }, el('span', { textContent: 'Einstellungen' }), el('span', { className: 'grow' }), set.length ? el('span', { className: 'sk-hn', textContent: `${set.length} angepasst · ` }) : null, reset),
+ el('div', { className: 'sk-h' }, el('span', { textContent: 'Settings' }), el('span', { className: 'grow' }), set.length ? el('span', { className: 'sk-hn', textContent: `${set.length} customized · ` }) : null, reset),
el('div', { className: 'sk-vars' }, ...s.vars.map((v) => this.field(s, v)))));
}
- if (s.topics.length) kids.push(el('div', { className: 'sk-sec' }, el('div', { className: 'sk-h', textContent: 'Darauf achtet der Agent' }), el('ul', { className: 'sk-topics' }, ...s.topics.map((t) => el('li', { textContent: t })))));
+ if (s.topics.length) kids.push(el('div', { className: 'sk-sec' }, el('div', { className: 'sk-h', textContent: 'What the agent watches for' }), el('ul', { className: 'sk-topics' }, ...s.topics.map((t) => el('li', { textContent: t })))));
if (s.bundled) {
const id = `sk-${s.id}-default`;
const sel = el('select', { id, className: 'sk-select', disabled: this.busy.has(s.id) }, ...MODES.map((m) => el('option', { value: m.mode, textContent: m.label })));
sel.value = s.defaultMode;
sel.addEventListener('change', () => void this.setDefault(s, sel.value as SkillMode));
- kids.push(el('div', { className: 'sk-sec sk-def', title: 'Gilt für alle Modelle, die ab jetzt angelegt werden. Dieses Modell bleibt, wie es ist.' },
- el('label', { textContent: 'Bei neuen Modellen', htmlFor: id }), sel));
+ kids.push(el('div', { className: 'sk-sec sk-def', title: 'Applies to all models created from now on. This model stays as it is.' },
+ el('label', { textContent: 'For new models', htmlFor: id }), sel));
}
const actions = el('div', { className: 'sc-actions sk-actions' });
if (s.file) {
- const view = el('button', { className: 'btn sm', title: 'Die Kopie im Projekt im Code zeigen (nur lesen)' }, icon('file', 14, 1.9), 'Datei ansehen');
+ const view = el('button', { className: 'btn sm', title: 'Show the copy in the project in the code (read only)' }, icon('file', 14, 1.9), 'View file');
view.addEventListener('click', () => this.deps.open(s.file!));
actions.append(view);
}
if (s.mode !== 'off' && s.file) {
- const send = el('button', { className: 'btn sm acc', title: 'Pfad und angepasste Einstellungen in die Eingabe des Agenten einfügen, damit ein laufender Agent davon erfährt' }, icon('send', 14, 1.9), 'An Agent geben');
+ const send = el('button', { className: 'btn sm acc', title: 'Add the path and customized settings to the agent’s input, so a running agent learns about them' }, icon('send', 14, 1.9), 'Send to agent');
send.addEventListener('click', () => this.deps.insert(skillNote(s)));
actions.append(send);
}
- if (!s.file) kids.push(el('div', { className: 'sk-note', textContent: 'Auf „Bei Bedarf“ oder „Immer“ liegt der Skill als Markdown im Projekt und lässt sich ansehen.' }));
+ if (!s.file) kids.push(el('div', { className: 'sk-note', textContent: 'On “On demand” or “Always”, the skill is a Markdown file in the project and can be viewed.' }));
if (actions.childElementCount) kids.push(actions);
box.replaceChildren(...kids.filter((x): x is HTMLElement => !!x));
}
@@ -256,8 +260,8 @@ export class SkillsPanel {
this.busy.delete(s.id);
this.skills = r.skills;
this.render();
- if (!r.ok) { this.deps.toast(r.error ?? 'Die Vorgabe für neue Modelle ließ sich nicht ändern.', 'error'); return; }
- this.deps.toast(`„${s.title}“ steht bei neuen Modellen auf „${labelOf(mode)}“. Dieses Modell bleibt, wie es ist.`);
+ if (!r.ok) { this.deps.toast(r.error ?? 'The default for new models could not be changed.', 'error'); return; }
+ this.deps.toast(`“${s.title}” is set to “${labelOf(mode)}” for new models. This model stays as it is.`);
}
/** Einstellungen ändern (null: Standard). Der Hauptprozess prüft die Werte und schreibt die Kopie neu, wenn der Skill nicht aus ist. */
@@ -269,24 +273,24 @@ export class SkillsPanel {
this.busy.delete(s.id);
this.skills = r.skills;
this.render();
- if (!r.ok) { this.deps.toast(r.error ?? 'Die Einstellung ließ sich nicht ändern.', 'error'); return; }
+ if (!r.ok) { this.deps.toast(r.error ?? 'The setting could not be changed.', 'error'); return; }
this.deps.changed();
const now = r.skills.find((x) => x.id === s.id) ?? s;
- const kept = r.backup ? ' Die vorige Fassung im Projekt liegt in der Sicherung.' : '';
- this.deps.toast(`„${s.title}“: ${what(now)}. `
- + (s.mode !== 'off' ? `Steht in ${s.file}. Einem laufenden Agenten sagt „An Agent geben“ Bescheid.${kept}` : 'Gilt, sobald der Skill nicht mehr aus ist.'));
+ const kept = r.backup ? ' The previous version in the project is in the backup.' : '';
+ this.deps.toast(`“${s.title}”: ${what(now)}. `
+ + (s.mode !== 'off' ? `Written to ${s.file}. “Send to agent” tells a running agent.${kept}` : 'Applies as soon as the skill is no longer off.'));
}
private setVar(s: SkillInfo, v: SkillVar, value: SkillValue | null): Promise<void> {
return this.configure(s, { [v.name]: value }, (now) => {
const x = now.vars.find((y) => y.name === v.name) ?? v;
- return `${v.label} ${shown(x)}${value === null ? ' (Standard)' : ''}`;
+ return `${v.label} ${shown(x)}${value === null ? ' (default)' : ''}`;
});
}
private resetAll(s: SkillInfo): Promise<void> {
const set = changedVars(s);
- return this.configure(s, Object.fromEntries(set.map((v) => [v.name, null])), () => `${set.map((v) => v.label).join(', ')} zurück auf den Standard`);
+ return this.configure(s, Object.fromEntries(set.map((v) => [v.name, null])), () => `${set.map((v) => v.label).join(', ')} reset to the default`);
}
/** Eingabe einer Einstellung: Zahlenfeld (Komma oder Punkt, Enter übernimmt, Escape verwirft) oder Auswahl. */
@@ -299,10 +303,10 @@ export class SkillsPanel {
sel.addEventListener('change', () => void this.setVar(s, v, sel.value));
input = sel;
} else {
- const shownNum = typeof v.value === 'number' ? v.value.toLocaleString('de-DE', { maximumFractionDigits: 6 }) : String(v.value);
+ const shownNum = typeof v.value === 'number' ? v.value.toLocaleString('en-US', { maximumFractionDigits: 6, useGrouping: false }) : String(v.value);
const inp = el('input', { id, className: 'sk-num', type: 'text', value: shownNum, spellcheck: false, autocomplete: 'off' });
inp.inputMode = 'decimal';
- inp.title = v.min != null && v.max != null ? `Erlaubt ${shown(v, v.min)} bis ${shown(v, v.max)}` : '';
+ inp.title = v.min != null && v.max != null ? `Allowed ${shown(v, v.min)} to ${shown(v, v.max)}` : '';
inp.addEventListener('change', () => { if (inp.value.trim() !== shownNum) void this.setVar(s, v, inp.value); });
inp.addEventListener('keydown', (e) => {
if (e.key === 'Enter') { e.preventDefault(); inp.blur(); if (inp.value.trim() !== shownNum) void this.setVar(s, v, inp.value); }
@@ -313,8 +317,8 @@ export class SkillsPanel {
input.disabled = this.busy.has(s.id);
const label = el('label', { textContent: v.label, htmlFor: id });
const isDefault = v.value === v.default;
- const reset = el('button', { className: 'sk-reset', title: `Zurück auf den Standard (${shown(v, v.default)})` }, icon('undo', 13, 2));
- reset.setAttribute('aria-label', `${v.label} zurück auf den Standard`);
+ const reset = el('button', { className: 'sk-reset', title: `Reset to the default (${shown(v, v.default)})` }, icon('undo', 13, 2));
+ reset.setAttribute('aria-label', `Reset ${v.label} to the default`);
reset.hidden = isDefault;
reset.addEventListener('click', () => void this.setVar(s, v, null));
const row = el('div', { className: 'sk-var' + (isDefault ? '' : ' set') }, label, el('span', { className: 'sk-in' }, input, el('span', { className: 'c3', textContent: v.unit })), reset);
diff --git a/app/src/renderer/terminals.ts b/app/src/renderer/terminals.ts
index f021d5f..b02fe67 100644
--- a/app/src/renderer/terminals.ts
+++ b/app/src/renderer/terminals.ts
@@ -25,7 +25,7 @@ export class TerminalTabs {
if (!t) return;
t.exited = true;
t.tab.classList.add('exited');
- t.term.write(`\r\n\x1b[90m[Prozess beendet, Code ${code}]\x1b[0m\r\n`);
+ t.term.write(`\r\n\x1b[90m[Process ended, code ${code}]\x1b[0m\r\n`);
this.renderStrip();
});
new ResizeObserver(() => this.fitActive()).observe(panes);
@@ -69,10 +69,10 @@ export class TerminalTabs {
const agent = !!opts.command;
const title = opts.title ?? (this.tabs.size ? `Terminal ${this.tabs.size + 1}` : 'Terminal');
- const label = el('button', { className: 't', title: agent ? `${title} läuft in einer Shell im Modellordner` : 'Shell im Modellordner' },
+ const label = el('button', { className: 't', title: agent ? `${title} runs in a shell in the model folder` : 'Shell in the model folder' },
agent ? el('span', { className: 'dot' }) : icon('term', 14, 2), el('span', { textContent: title }));
- const x = el('button', { className: 'x', title: `${title} schließen` }, icon('x', 12, 2.2));
- x.setAttribute('aria-label', `${title} schließen`);
+ const x = el('button', { className: 'x', title: `Close ${title}` }, icon('x', 12, 2.2));
+ x.setAttribute('aria-label', `Close ${title}`);
x.addEventListener('click', (e) => { e.stopPropagation(); this.close(id); });
label.addEventListener('click', () => this.activate(id));
const tab = el('div', { className: 'tab' }, label, x);
@@ -139,7 +139,7 @@ export class TerminalTabs {
private renderStrip(): void {
this.strip.replaceChildren(...[...this.tabs.values()].map((t) => {
- const b = el('button', { className: (t.id === this.active ? 'on' : '') + (t.exited ? ' exited' : ''), title: `${t.title} (Agent-Bereich ausklappen)` },
+ const b = el('button', { className: (t.id === this.active ? 'on' : '') + (t.exited ? ' exited' : ''), title: `${t.title} (expand the agent area)` },
t.agent ? el('span', { className: 'dot' }) : icon('term', 14, 2), el('span', { className: 'v', textContent: t.title }));
b.addEventListener('click', () => { this.activate(t.id); this.onStripClick(); });
return b;
diff --git a/app/src/renderer/ui.ts b/app/src/renderer/ui.ts
index add659a..c31fcb3 100644
--- a/app/src/renderer/ui.ts
+++ b/app/src/renderer/ui.ts
@@ -22,15 +22,15 @@ export function toast(text: string, kind: 'ok' | 'info' | 'error' = 'ok'): void
toastTimer = setTimeout(() => { t.hidden = true; }, kind === 'error' ? 12000 : 6000);
}
-/** Uhrzeit, bei älteren Tagen mit Datum: „14:02“, „gestern 14:02“, „24.09. 14:02“. */
+/** Uhrzeit, bei älteren Tagen mit Datum: „14:02“, „yesterday 14:02“, „24 Sept 14:02“. */
export function fmtWhen(t: number | string, withToday = false): string {
const d = new Date(t);
const now = new Date();
- const time = d.toLocaleTimeString('de-DE', { hour: '2-digit', minute: '2-digit' });
- if (d.toDateString() === now.toDateString()) return withToday ? `heute ${time}` : time;
+ const time = d.toLocaleTimeString('en-GB', { hour: '2-digit', minute: '2-digit' });
+ if (d.toDateString() === now.toDateString()) return withToday ? `today ${time}` : time;
const y = new Date(now); y.setDate(now.getDate() - 1);
- if (d.toDateString() === y.toDateString()) return `gestern ${time}`;
- return `${d.toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit' })} ${time}`;
+ if (d.toDateString() === y.toDateString()) return `yesterday ${time}`;
+ return `${d.toLocaleDateString('en-GB', { day: 'numeric', month: 'short' })} ${time}`;
}
interface OpenMenu { menu: HTMLElement; anchor: HTMLElement | null; onClose?: () => void }
diff --git a/app/src/renderer/versions.ts b/app/src/renderer/versions.ts
index 9c5bd41..f534d3f 100644
--- a/app/src/renderer/versions.ts
+++ b/app/src/renderer/versions.ts
@@ -96,7 +96,7 @@ export class VersionsBar {
return;
}
const commit = this.log.commits[i];
- this.ui.info.textContent = 'Lade Vorschau …';
+ this.ui.info.textContent = 'Loading preview …';
const res = await window.soma.versions.preview(commit.hash);
if (seq !== this.seq) return; // inzwischen etwas anderes gewählt
if (res.error) {
@@ -115,7 +115,7 @@ export class VersionsBar {
const r = await window.soma.versions.restore(this.previewHash);
if (r.cancelled) return;
if (r.error) { this.hooks.toast(r.error, 'error'); return; }
- this.hooks.toast(r.commit ? 'Stand wiederhergestellt und als neuer Stand im Verlauf abgelegt.' : 'Dieser Stand war schon der aktuelle.', 'ok');
+ this.hooks.toast(r.commit ? 'Version restored and added to the history as a new version.' : 'This version already was the current one.', 'ok');
this.previewHash = null;
await this.refresh();
await this.hooks.show(null, true);
@@ -130,25 +130,25 @@ export class VersionsBar {
ui.dots.replaceChildren(...commits.map((c, i) => {
const dot = el('button', { className: 'vdot' + (c.byApp ? ' app' : '') + (c.hash === this.savedHead ? ' saved' : '') + (i === idx ? ' cur' : '') }, el('i'));
dot.style.left = pos(i);
- const saved = c.hash === this.savedHead ? '\nZuletzt gespeichert' : '';
- dot.title = `${c.subject}\n${who(c)} · ${fmtWhen(c.date, true)}${saved}\n${i === idx ? 'Wird gerade angezeigt' : 'Klick zeigt diesen Stand als Vorschau'}`;
+ const saved = c.hash === this.savedHead ? '\nLast saved' : '';
+ dot.title = `${c.subject}\n${who(c)} · ${fmtWhen(c.date, true)}${saved}\n${i === idx ? 'Shown right now' : 'Click to preview this version'}`;
dot.setAttribute('aria-label', `${c.subject}, ${fmtWhen(c.date, true)}`);
dot.addEventListener('click', () => void this.select(i));
return dot;
}), (() => {
- const live = el('button', { className: 'vdot live' + (idx === n ? ' cur' : '') + (dirtyFiles ? ' dirty' : '') }, el('i'), el('span', { textContent: 'Jetzt' }));
+ const live = el('button', { className: 'vdot live' + (idx === n ? ' cur' : '') + (dirtyFiles ? ' dirty' : '') }, el('i'), el('span', { textContent: 'Now' }));
live.style.left = pos(n);
- live.title = `Jetzt: der Arbeitsstand${dirtyFiles ? `, ${dirtyFiles} Änderung${dirtyFiles === 1 ? '' : 'en'} noch in keinem Stand` : ''}`;
+ live.title = `Now: your current work${dirtyFiles ? `, ${dirtyFiles} change${dirtyFiles === 1 ? '' : 's'} not in any version yet` : ''}`;
live.addEventListener('click', () => void this.select(n));
return live;
})());
const previewCommit = this.previewHash ? commits.find((c) => c.hash === this.previewHash) : null;
- ui.info.textContent = n === 0 ? '' : `${n + 1} Stände`;
+ ui.info.textContent = n === 0 ? '' : `${n + 1} versions`;
ui.banner.hidden = !previewCommit;
ui.viewer.classList.toggle('preview', !!previewCommit);
if (previewCommit) {
- ui.bannerTitle.textContent = `Vorschau · Stand ${idx + 1} von ${n + 1}`;
+ ui.bannerTitle.textContent = `Preview · version ${idx + 1} of ${n + 1}`;
ui.bannerSub.textContent = `${previewCommit.subject} · ${who(previewCommit)} · ${fmtWhen(previewCommit.date, true)}`;
ui.bannerSub.title = ui.bannerSub.textContent;
}
diff --git a/app/src/renderer/videoview.ts b/app/src/renderer/videoview.ts
index 2588d07..6fd7cd5 100644
--- a/app/src/renderer/videoview.ts
+++ b/app/src/renderer/videoview.ts
@@ -32,10 +32,10 @@ export class VideoView {
ui.range.addEventListener('input', () => { v.pause(); v.currentTime = Number(ui.range.value); });
ui.close.addEventListener('click', () => this.close());
ui.mark.addEventListener('click', () => void this.mark());
- ui.agent.addEventListener('click', () => { if (this.file) d.insert(`[Video: ${this.file} bei ${videoStamp(v.currentTime)}] `); });
+ ui.agent.addEventListener('click', () => { if (this.file) d.insert(`[Video: ${this.file} at ${videoStamp(v.currentTime)}] `); });
for (const ev of ['timeupdate', 'seeked', 'loadedmetadata', 'play', 'pause', 'ended']) v.addEventListener(ev, () => this.render());
v.addEventListener('click', () => (v.paused ? void v.play().catch(() => {}) : v.pause()));
- v.addEventListener('error', () => { if (this.file) d.toast(`${this.file} lässt sich nicht abspielen (Format?). Rechtsklick im Dateibaum: „Mit Standardprogramm öffnen“.`, 'error'); });
+ v.addEventListener('error', () => { if (this.file) d.toast(`${this.file} can't be played (format?). Right-click it in the file tree: “Open with default app”.`, 'error'); });
window.addEventListener('keydown', (e) => {
if (ui.root.hidden || (e.target as HTMLElement | null)?.closest?.('input, textarea, select, .cm-editor, #terminals, #markup')) return;
if (e.key === ' ') { e.preventDefault(); if (v.paused) void v.play().catch(() => {}); else v.pause(); }
@@ -50,7 +50,7 @@ export class VideoView {
async open(rel: string): Promise<void> {
let data: ArrayBuffer;
- try { data = await this.d.readBinary(rel); } catch (e) { this.d.toast(`${rel} lässt sich nicht lesen: ${e instanceof Error ? e.message : String(e)}`, 'error'); return; }
+ try { data = await this.d.readBinary(rel); } catch (e) { this.d.toast(`Can't read ${rel}: ${e instanceof Error ? e.message : String(e)}`, 'error'); return; }
this.release();
this.file = rel;
this.url = URL.createObjectURL(new Blob([data], { type: /\.webm$/i.test(rel) ? 'video/webm' : 'video/mp4' }));
@@ -89,7 +89,7 @@ export class VideoView {
this.ui.range.value = String(v.currentTime);
this.ui.time.textContent = `${videoStamp(v.currentTime)} / ${videoStamp(dur)}`;
this.ui.play.replaceChildren(icon(v.paused ? 'play' : 'pause', 16, 2));
- this.ui.play.setAttribute('aria-label', v.paused ? 'Abspielen' : 'Anhalten');
+ this.ui.play.setAttribute('aria-label', v.paused ? 'Play' : 'Pause');
}
/** Das gerade gezeigte Bild in voller Auflösung. */
@@ -107,8 +107,8 @@ export class VideoView {
const v = this.ui.video;
v.pause();
const c = this.frame();
- if (!c || !this.file) { this.d.toast('Das Video zeigt noch kein Bild.', 'error'); return; }
- await this.d.markFrame(`${this.file} bei ${videoStamp(v.currentTime)}`, c);
+ if (!c || !this.file) { this.d.toast('The video shows no frame yet.', 'error'); return; }
+ await this.d.markFrame(`${this.file} at ${videoStamp(v.currentTime)}`, c);
}
/** Prüfhilfen. */
diff --git a/app/src/renderer/viewcube.ts b/app/src/renderer/viewcube.ts
index c23f4b5..5e76e4a 100644
--- a/app/src/renderer/viewcube.ts
+++ b/app/src/renderer/viewcube.ts
@@ -12,12 +12,12 @@ export interface CubeHost {
/** Seiten des Würfels. CAD-Konvention der App: Z oben, vorne ist -Y (so zeigt auch „Vorne“ im Viewer). */
const FACES: { n: [number, number, number]; up: [number, number, number]; text: string; bg: string }[] = [
- { n: [0, 0, 1], up: [0, 1, 0], text: 'OBEN', bg: '#2b3139' },
- { n: [0, 0, -1], up: [0, -1, 0], text: 'UNTEN', bg: '#2b3139' },
- { n: [0, -1, 0], up: [0, 0, 1], text: 'VORNE', bg: '#262b33' },
- { n: [0, 1, 0], up: [0, 0, 1], text: 'HINTEN', bg: '#262b33' },
- { n: [1, 0, 0], up: [0, 0, 1], text: 'RECHTS', bg: '#20252c' },
- { n: [-1, 0, 0], up: [0, 0, 1], text: 'LINKS', bg: '#20252c' },
+ { n: [0, 0, 1], up: [0, 1, 0], text: 'TOP', bg: '#2b3139' },
+ { n: [0, 0, -1], up: [0, -1, 0], text: 'BOTTOM', bg: '#2b3139' },
+ { n: [0, -1, 0], up: [0, 0, 1], text: 'FRONT', bg: '#262b33' },
+ { n: [0, 1, 0], up: [0, 0, 1], text: 'BACK', bg: '#262b33' },
+ { n: [1, 0, 0], up: [0, 0, 1], text: 'RIGHT', bg: '#20252c' },
+ { n: [-1, 0, 0], up: [0, 0, 1], text: 'LEFT', bg: '#20252c' },
];
/** Grenze zwischen Mitte und Rand einer Seite. Der Würfel reicht von -1 bis 1, außen liegen Kanten und Ecken. */
const EDGE = 0.62;
@@ -29,7 +29,7 @@ const AXES: { dir: [number, number, number]; color: string; label: string }[] =
/** Richtung in Worten, für den Hinweis beim Überfahren: „Oben vorne rechts“. */
function dirName(s: number[]): string {
- const parts = [s[2] > 0 ? 'oben' : s[2] < 0 ? 'unten' : '', s[1] < 0 ? 'vorne' : s[1] > 0 ? 'hinten' : '', s[0] > 0 ? 'rechts' : s[0] < 0 ? 'links' : ''].filter(Boolean);
+ const parts = [s[2] > 0 ? 'top' : s[2] < 0 ? 'bottom' : '', s[1] < 0 ? 'front' : s[1] > 0 ? 'back' : '', s[0] > 0 ? 'right' : s[0] < 0 ? 'left' : ''].filter(Boolean);
const t = parts.join(' ');
return t.charAt(0).toUpperCase() + t.slice(1);
}
@@ -171,7 +171,7 @@ export class ViewCube {
if (key === this.hoverKey) return;
this.hoverKey = key;
for (const o of [...this.hl.children]) { this.hl.remove(o); (o as THREE.Mesh).geometry.dispose(); ((o as THREE.Mesh).material as THREE.Material).dispose(); }
- this.el.title = s ? `${dirName(s)}: Ansicht von dort (Klick). Ziehen dreht.` : 'Seite, Kante oder Ecke anklicken: Ansicht von dort. Ziehen dreht die Ansicht.';
+ this.el.title = s ? `${dirName(s)}: view from there (click). Drag to rotate.` : 'Click a face, edge or corner to view from there. Drag to rotate the view.';
if (s) {
const range = (v: number): [number, number] => (v < 0 ? [-1, -EDGE] : v > 0 ? [EDGE, 1] : [-EDGE, EDGE]);
for (let a = 0; a < 3; a++) {
diff --git a/app/src/shared/editable.ts b/app/src/shared/editable.ts
index b919ba2..e082cef 100644
--- a/app/src/shared/editable.ts
+++ b/app/src/shared/editable.ts
@@ -4,11 +4,11 @@
/** Grund, warum eine Datei (Pfad relativ zum Projekt) nur lesbar ist, sonst null. */
export function readOnlyReason(rel: string): string | null {
const p = rel.replace(/\\/g, '/').replace(/^\.\//, '');
- if (/^(AGENTS|CLAUDE)\.md$/i.test(p)) return 'Wird von der App verwaltet und bei Updates ersetzt. Eigene Wünsche und Regeln gehören in NOTES.md.';
- if (/^\.gitignore$/i.test(p)) return 'Wird von der App verwaltet.';
- if (/^(output|exports)\//i.test(p)) return 'Wird beim Bauen oder Exportieren neu erzeugt.';
- if (/^\.soma\/skills\//i.test(p)) return 'Kopie eines Skills. Umstellen links unter „Skills“.';
- if (/^\.(soma|git)(\/|$)/i.test(p)) return 'Interne Daten der App und von Git.';
+ if (/^(AGENTS|CLAUDE)\.md$/i.test(p)) return 'Managed by the app and replaced on updates. Your own wishes and rules belong in NOTES.md.';
+ if (/^\.gitignore$/i.test(p)) return 'Managed by the app.';
+ if (/^(output|exports)\//i.test(p)) return 'Recreated on every build or export.';
+ if (/^\.soma\/skills\//i.test(p)) return 'Copy of a skill. Change it on the left under “Skills”.';
+ if (/^\.(soma|git)(\/|$)/i.test(p)) return 'Internal data of the app and of Git.';
return null;
}
@@ -19,15 +19,15 @@ export function readOnlyReason(rel: string): string | null {
*/
export function fileOpBlockReason(rel: string, op: 'create' | 'rename' | 'delete'): string | null {
const p = rel.replace(/\\/g, '/').replace(/^\.\//, '').replace(/\/$/, '');
- if (!p) return op === 'create' ? null : 'Der Projektordner selbst lässt sich hier nicht ändern.';
- if (/^(AGENTS|CLAUDE)\.md$/i.test(p) || /^\.gitignore$/i.test(p)) return 'Wird von der App verwaltet.';
- if (/^output(\/|$)/i.test(p)) return 'Wird beim Bauen neu erzeugt.';
+ if (!p) return op === 'create' ? null : 'The project folder itself cannot be changed here.';
+ if (/^(AGENTS|CLAUDE)\.md$/i.test(p) || /^\.gitignore$/i.test(p)) return 'Managed by the app.';
+ if (/^output(\/|$)/i.test(p)) return 'Recreated on every build.';
// Markierungen (E16) gehören dem Nutzer: aufräumen und umbenennen ja. Neues legt dort nur „An Agent geben“ ab, das
// sperrt die Prüfung des Ordners selbst (.soma/feedback fällt unter die nächste Regel).
if (/^\.soma\/feedback\/[^/]+$/i.test(p)) return null;
- if (/^\.(soma|git)(\/|$)/i.test(p)) return 'Interne Daten der App und von Git.';
- if (op !== 'create' && /^model\.py$/i.test(p)) return 'model.py ist der feste Einstiegspunkt des Modells.';
- if (op === 'rename' && /^(inputs|parts)$/i.test(p)) return 'Der Agent sucht diesen Ordner unter seinem Namen.';
+ if (/^\.(soma|git)(\/|$)/i.test(p)) return 'Internal data of the app and of Git.';
+ if (op !== 'create' && /^model\.py$/i.test(p)) return 'model.py is the fixed entry point of the model.';
+ if (op === 'rename' && /^(inputs|parts)$/i.test(p)) return 'The agent looks for this folder by its name.';
return null;
}
diff --git a/app/test/animation.mjs b/app/test/animation.mjs
index 0884bad..b5f4c11 100644
--- a/app/test/animation.mjs
+++ b/app/test/animation.mjs
@@ -106,30 +106,35 @@ try {
check('Animationsdatei baut das Modell nicht neu (eigener Weg)', await ev(() => window.__t.buildStarts()) <= 2, String(await ev(() => window.__t.buildStarts())));
let r = soma(['anim', 'info', 'Deckel öffnen']);
- check('soma anim info: Ablauf mit Zeiten, Gelenk, Kamera, Untertitel, Beschriftung', r.status === 0 && r.stdout.includes('Dauer 8.00 s')
- && r.stdout.includes('1.00-3.00 s Lid: 0 -> -110 Grad') && r.stdout.includes('Kamera: Umlauf 90 Grad') && r.stdout.includes('"Der Deckel öffnet bis 110°"')
- && r.stdout.includes('"Scharnier" an Lid') && r.stdout.includes('nicht geprueft'), r.stdout.slice(0, 300) + r.stderr);
+ check('soma anim info: Ablauf mit Zeiten, Gelenk, Kamera, Untertitel, Beschriftung', r.status === 0 && r.stdout.includes('duration 8.00 s')
+ && r.stdout.includes('1.00-3.00 s Lid: 0 -> -110 deg') && r.stdout.includes('Camera: orbit 90 deg') && r.stdout.includes('"Der Deckel öffnet bis 110°"')
+ && r.stdout.includes('"Scharnier" on Lid') && r.stdout.includes('not checked'), r.stdout.slice(0, 300) + r.stderr);
// 2) Kollisionen: falsche Drehachse dreht den Deckel in den Kasten
fs.writeFileSync(path.join(dir, 'animations', 'falsch.py'), FALSCH);
await waitFor('zweite Animation', () => window.soma.anim.list().then((x) => x.animations.length === 2 && !x.building), 90000);
r = soma(['anim', 'check', 'Deckel falsch', '--step', '0.25']);
- check('soma anim check meldet die Kollision Lid / Body mit Zeit und Tiefe (Exit 1)', r.status === 1 && /Lid \/ Body: Kollision, bis \d+\.\d\d mm tief/.test(r.stdout), r.stdout + r.stderr);
+ check('soma anim check meldet die Kollision Lid / Body mit Zeit und Tiefe (Exit 1)', r.status === 1 && /Lid \/ Body: collision, up to \d+\.\d\d mm deep/.test(r.stdout), r.stdout + r.stderr);
r = soma(['anim', 'check', 'Deckel öffnen', '--step', '0.5']);
- check('Richtige Drehachse: keine Kollision (Exit 0), der aufliegende Deckel gilt als gewollte Berührung', r.status === 0 && !r.stdout.includes('Kollision,')
- && /Beruehren sich schon im Modell[^\n]*Lid \/ Body/.test(r.stdout), r.stdout);
+ check('Richtige Drehachse: keine Kollision (Exit 0), der aufliegende Deckel gilt als gewollte Berührung', r.status === 0 && !r.stdout.includes('collision,')
+ && /Already touching in the model[^\n]*Lid \/ Body/.test(r.stdout), r.stdout);
r = soma(['anim', 'info', 'Deckel falsch']);
- check('Ergebnis der Prüfung steht danach in soma anim info', r.stdout.includes('Lid / Body: Kollision'), r.stdout.slice(-300));
+ check('Ergebnis der Prüfung steht danach in soma anim info', r.stdout.includes('Lid / Body: collision'), r.stdout.slice(-300));
+ // Prüfungen von vor E73 stehen mit deutschen Arten in .check.json: Sie werden weiter gelesen
+ const checkFile = path.join(dir, '.soma', 'anim', 'deckel-falsch.check.json');
+ fs.writeFileSync(checkFile, fs.readFileSync(checkFile, 'utf8').replaceAll('"collision"', '"Kollision"'));
+ r = soma(['anim', 'info', 'Deckel falsch']);
+ check('Alte Prüfung mit „Kollision“ in .check.json: soma anim info zeigt sie englisch', r.stdout.includes('Lid / Body: collision, up to'), r.stdout.slice(-300));
// 3) Fehler in einer Animationsdatei: Datei, Zeile, Liste der Bauteile. Die anderen bleiben
fs.writeFileSync(path.join(dir, 'animations', 'kaputt.py'), KAPUTT);
await waitFor('Fehler gemeldet', () => window.soma.anim.list().then((x) => x.errors.length === 1 && !x.building), 90000);
l = await list();
check('Fehler mit Datei und Zeile 3, nennt das Bauteil und die vorhandenen, die anderen Animationen bleiben', l.errors[0].file === 'animations/kaputt.py'
- && l.errors[0].line === 3 && l.errors[0].message.includes("'Gibtsnicht' gibt es im Modell nicht") && l.errors[0].message.includes("'Lid'") && l.animations.length === 2,
+ && l.errors[0].line === 3 && l.errors[0].message.includes("'Gibtsnicht' does not exist in the model") && l.errors[0].message.includes("'Lid'") && l.animations.length === 2,
JSON.stringify(l.errors[0]));
r = soma(['anim', 'build', 'animations/kaputt.py']);
- check('soma anim build: FEHLER mit Ort im Fehlerkanal, Exit 1', r.status === 1 && r.stderr.includes('Animation FEHLER (animations/kaputt.py:3)'), r.stderr.slice(0, 200));
+ check('soma anim build: FEHLER mit Ort im Fehlerkanal, Exit 1', r.status === 1 && r.stderr.includes('Animation ERROR (animations/kaputt.py:3)'), r.stderr.slice(0, 200));
fs.rmSync(path.join(dir, 'animations', 'kaputt.py'));
await waitFor('Fehler weg', () => window.soma.anim.list().then((x) => x.errors.length === 0), 20000).catch(() => {});
check('Gelöschte Datei: Ihr Fehler verschwindet aus der Liste', (await list()).errors.length === 0);
@@ -146,7 +151,7 @@ try {
await waitFor('Deckel öffnen gewählt', () => window.__t.anim().name === 'Deckel öffnen', 10000);
let s = await ev(() => window.__t.anim());
check('Karte „Animation“: zwei zur Auswahl, Dauer 8 s, Kamera folgt (eigene Kamera), Hinweis mit Datei', s.active && s.options.length === 2 && near(s.duration, 8)
- && s.follow && s.hint.startsWith('animations/deckel.py, Zeile 4') && s.time === '0,00 / 8,00 s'
+ && s.follow && s.hint.startsWith('animations/deckel.py, line 4') && s.time === '0.00 / 8.00 s'
&& JSON.stringify(await ev(() => window.__t.viewSwitch())) === '{"name":"Deckel öffnen","sub":"","unseen":0,"closable":true}', JSON.stringify(s));
await ev(() => window.__t.animSeek(3));
let pose = await ev((id) => window.__t.viewer.partPose(id), ids.Lid);
@@ -162,7 +167,7 @@ try {
check('Bei 7,5 s: Kasten hervorgehoben, Kamera von vorn, Texte werden gemalt', vs.highlight.includes(ids.Body) && vs.painter
&& near(view.dir[0], 0, 0.02) && near(view.dir[1], -1, 0.02), JSON.stringify([vs, view.dir]));
s = await ev(() => window.__t.anim());
- check('„An Agent geben“: Name, Datei und Zeit', s.note === '[Animation: "Deckel öffnen" (animations/deckel.py) bei 7.50 s] ', s.note);
+ check('„An Agent geben“: Name, Datei und Zeit', s.note === '[Animation: "Deckel öffnen" (animations/deckel.py) at 7.50 s] ', s.note);
// Schalter „Texte“: Titel, Untertitel und Beschriftungen aus, Bewegung und Hervorhebung bleiben
await domClick('btn-anim-texts');
const noText = { s: await ev(() => window.__t.anim()), vs: await ev(() => window.__t.viewer.animViewState()) };
@@ -190,27 +195,27 @@ try {
// 6) soma render: Fehler der Verbindung
r = soma(['render'], { env: { ...process.env, PYTHONUTF8: '1', SOMA_APP: '', SOMA_APP_TOKEN: '' } });
- check('Ohne die Umgebung der App: verständliche Meldung', r.status === 1 && r.stderr.includes('braucht die laufende App'), r.stderr);
+ check('Ohne die Umgebung der App: verständliche Meldung', r.status === 1 && r.stderr.includes('needs the running app'), r.stderr);
r = soma(['render'], { env: { ...env, SOMA_APP_TOKEN: 'x'.repeat(48) } });
- check('Falscher Schlüssel: abgelehnt', r.status === 1 && r.stderr.includes('Falscher Schlüssel'), r.stderr);
+ check('Falscher Schlüssel: abgelehnt', r.status === 1 && r.stderr.includes('Wrong key'), r.stderr);
const other = fs.mkdtempSync(path.join(os.tmpdir(), 'soma-anderes-'));
r = soma(['render', '--project', other]);
- check('Anderer Ordner als das offene Modell: abgelehnt', r.status === 1 && r.stderr.includes('nicht das Modell'), r.stderr);
+ check('Anderer Ordner als das offene Modell: abgelehnt', r.status === 1 && r.stderr.includes('not the model that is open'), r.stderr);
cleanup(other);
r = soma(['render', '--anim', 'Deckel öffnen', '--at', '99']);
- check('Zeit außerhalb der Animation: Meldung mit der Dauer', r.status === 1 && r.stderr.includes('dauert 8 s'), r.stderr);
+ check('Zeit außerhalb der Animation: Meldung mit der Dauer', r.status === 1 && r.stderr.includes('the animation lasts 8 s'), r.stderr);
// 7) soma render: Bild, Animation zu einer Zeit, Übersicht, Video
r = soma(['render']);
- const iso = path.join(dir, 'renders', 'ansicht-iso.png');
- check('soma render: renders/ansicht-iso.png in 1280 x 800', r.status === 0 && r.stdout.includes('geschrieben: renders/ansicht-iso.png')
+ const iso = path.join(dir, 'renders', 'view-iso.png');
+ check('soma render: renders/view-iso.png in 1280 x 800', r.status === 0 && r.stdout.includes('written: renders/view-iso.png')
&& JSON.stringify(pngSize(iso)) === '[1280,800]', r.stdout + r.stderr);
r = soma(['render', '--view', 'top', '--size', '640x400', '--out', 'renders/oben.png']);
check('--view, --size und --out', r.status === 0 && JSON.stringify(pngSize(path.join(dir, 'renders', 'oben.png'))) === '[640,400]', r.stdout + r.stderr);
r = soma(['render', '--anim', 'Deckel öffnen', '--at', '2']);
check('Animation zu einer Zeit: renders/deckel-oeffnen-2s.png', r.status === 0 && fs.existsSync(path.join(dir, 'renders', 'deckel-oeffnen-2s.png')), r.stdout + r.stderr);
r = soma(['render', '--anim', 'Deckel öffnen', '--sheet', '3x2', '--size', '320x200']);
- const sheet = pngSize(path.join(dir, 'renders', 'deckel-oeffnen-uebersicht.png'));
+ const sheet = pngSize(path.join(dir, 'renders', 'deckel-oeffnen-sheet.png'));
check('Übersicht 3 x 2 Standbilder mit Kopfzeile', r.status === 0 && sheet && sheet[0] === 3 * 320 + 4 * 6 && sheet[1] > 2 * 200, JSON.stringify(sheet) + r.stderr);
const t0 = Date.now();
r = soma(['render', '--anim', 'Deckel öffnen', '--video']);
@@ -218,10 +223,10 @@ try {
const head = fs.existsSync(mp4) ? fs.readFileSync(mp4).subarray(4, 8).toString('ascii') : '';
const vtt = fs.existsSync(mp4.replace('.mp4', '.vtt')) ? fs.readFileSync(mp4.replace('.mp4', '.vtt'), 'utf8') : '';
check('Video: MP4, Untertitel als WebVTT, Übersicht für den Agenten', r.status === 0 && head === 'ftyp' && vtt.startsWith('WEBVTT')
- && vtt.includes('00:00:01.000 --> 00:00:05.500') && vtt.includes('Der Deckel öffnet bis 110°') && r.stdout.includes('Uebersicht (PNG)'),
+ && vtt.includes('00:00:01.000 --> 00:00:05.500') && vtt.includes('Der Deckel öffnet bis 110°') && r.stdout.includes('contact sheet (PNG)'),
`${head} ${Date.now() - t0} ms ${r.stderr}`);
- await waitFor('Hinweis im Fenster', () => window.__t.toast().text.includes('Der Agent hat renders/deckel-oeffnen.mp4'), 5000).catch(() => {});
- check('Das Fenster meldet, was der Agent erzeugt hat', (await ev(() => window.__t.toast())).text.includes('Der Agent hat renders/deckel-oeffnen.mp4'));
+ await waitFor('Hinweis im Fenster', () => window.__t.toast().text.includes('The agent created renders/deckel-oeffnen.mp4'), 5000).catch(() => {});
+ check('Das Fenster meldet, was der Agent erzeugt hat', (await ev(() => window.__t.toast())).text.includes('The agent created renders/deckel-oeffnen.mp4'));
// 8) Video abspielen, Zeit und Standbild an den Agenten
await ev(() => window.__t.showPanel('files'));
@@ -236,16 +241,16 @@ try {
check('Springen auf 2 s: Zeitanzeige', v.time.startsWith('00:02.00 / 00:08'), v.time);
await shot('video-1');
await domClick('btn-video-agent');
- await waitFor('Zeit im Terminal', (id) => window.__t.termText(id).includes('[Video: renders/deckel-oeffnen.mp4 bei 00:02.00]'), 8000, tid).catch(() => {});
- check('„Zeit an Agent“: Datei und Zeitstempel in der Eingabe', (await term()).includes('[Video: renders/deckel-oeffnen.mp4 bei 00:02.00]'), (await term()).slice(-200));
+ await waitFor('Zeit im Terminal', (id) => window.__t.termText(id).includes('[Video: renders/deckel-oeffnen.mp4 at 00:02.00]'), 8000, tid).catch(() => {});
+ check('„Zeit an Agent“: Datei und Zeitstempel in der Eingabe', (await term()).includes('[Video: renders/deckel-oeffnen.mp4 at 00:02.00]'), (await term()).slice(-200));
await domClick('btn-video-mark');
await waitFor('Zeichenfläche', () => window.__t.markup().active, 8000);
const mk = await ev(() => window.__t.markup());
- check('„Markieren“: Standbild auf der Zeichenfläche, Quelle mit Zeitstempel', mk.source === 'renders/deckel-oeffnen.mp4 bei 00:02.00', JSON.stringify(mk.source));
+ check('„Markieren“: Standbild auf der Zeichenfläche, Quelle mit Zeitstempel', mk.source === 'renders/deckel-oeffnen.mp4 at 00:02.00', JSON.stringify(mk.source));
await shot('video-2-markieren');
await domClick('btn-mark-send');
- await waitFor('Markierung im Terminal', (id) => window.__t.termText(id).includes('gezeichnet auf renders/deckel-oeffnen.mp4 bei 00:02.00]'), 10000, tid).catch(() => {});
- check('Markierung des Standbilds: Pfad des Bilds, Video und Zeit in der Eingabe', /\[Markierung: \.soma\/feedback\/markierung-[\d-]+\.png, gezeichnet auf renders\/deckel-oeffnen\.mp4 bei 00:02\.00\]/.test(await term()),
+ await waitFor('Markierung im Terminal', (id) => window.__t.termText(id).includes('drawn on renders/deckel-oeffnen.mp4 at 00:02.00]'), 10000, tid).catch(() => {});
+ check('Markierung des Standbilds: Pfad des Bilds, Video und Zeit in der Eingabe', /\[Markup: \.soma\/feedback\/markup-[\d-]+\.png, drawn on renders\/deckel-oeffnen\.mp4 at 00:02\.00\]/.test(await term()),
(await term()).slice(-200));
await domClick('btn-video-close');
check('Schließen: Player weg', !(await ev(() => window.__t.video())).open);
@@ -263,13 +268,13 @@ try {
// 10) Auswertungen
r = soma(['analyze', 'overhang']);
check('Überhang: Konsole hat 3,64 cm² Überhang (Unterseite in 10 mm Höhe), Kasten keinen', r.status === 0
- && /Konsole: 0\.0° bis 90\.0°, 3\.6\d cm² über 45\.0°/.test(r.stdout) && /Body: [^\n]*nichts über 45\.0°/.test(r.stdout), r.stdout + r.stderr);
+ && /Konsole: 0\.0° to 90\.0°, 3\.6\d cm² above 45\.0°/.test(r.stdout) && /Body: [^\n]*nothing above 45\.0°/.test(r.stdout), r.stdout + r.stderr);
r = soma(['analyze', 'thickness']);
- check('Wandstärke: Lasche 1 mm unter dem Grenzwert 1,2, Kasten nicht', r.status === 0 && /Lasche: 1\.00 mm bis [^\n]*cm² unter 1\.20 mm/.test(r.stdout)
- && /Body: 2\.00 mm bis [^\n]*nichts unter 1\.20 mm/.test(r.stdout), r.stdout + r.stderr);
+ check('Wandstärke: Lasche 1 mm unter dem Grenzwert 1,2, Kasten nicht', r.status === 0 && /Lasche: 1\.00 mm to [^\n]*cm² below 1\.20 mm/.test(r.stdout)
+ && /Body: 2\.00 mm to [^\n]*nothing below 1\.20 mm/.test(r.stdout), r.stdout + r.stderr);
r = soma(['analyze', 'clearance']);
check('Abstand: Stift mit 0,2 mm Spalt kritisch, Störer überschneidet sich, Deckel liegt nur auf', r.status === 0
- && /Stift: [^\n]*unter 0\.50 mm/.test(r.stdout) && /Störer: -[^\n]*Ueberschneidung/.test(r.stdout) && /Lid: [^\n]*nichts unter 0\.50 mm[^\n]*Beruehrung/.test(r.stdout),
+ && /Stift: [^\n]*below 0\.50 mm/.test(r.stdout) && /Störer: -[^\n]*overlap/.test(r.stdout) && /Lid: [^\n]*nothing below 0\.50 mm[^\n]*contact/.test(r.stdout),
r.stdout + r.stderr);
await pickView(1); // erste Analyse über den Umschalter oben links
await waitFor('Ergebnis geladen', () => window.__t.result().id !== null, 20000);
@@ -278,7 +283,7 @@ try {
let rs = await ev(() => window.__t.result());
vs = await ev(() => window.__t.viewer.animViewState());
check('Karte „Analyse“: drei Ergebnisse, Wandstärke je Bauteil, Lasche kritisch, Modell tritt zurück', rs.active && rs.options.length === 3
- && rs.rows.some((x) => x.startsWith('Lasche') && x.includes('kritisch') && !x.includes('nichts')) && rs.rows.some((x) => x.startsWith('Body') && x.includes('nichts kritisch'))
+ && rs.rows.some((x) => x.startsWith('Lasche') && x.includes('critical') && !x.includes('nothing')) && rs.rows.some((x) => x.startsWith('Body') && x.includes('nothing critical'))
&& vs.modelHidden && !rs.stale, JSON.stringify(rs.rows));
await ev(() => window.__t.viewer.setView('front'));
await sleep(300);
@@ -286,20 +291,20 @@ try {
const pin = await ev((p) => window.__t.resultPin(p.x, p.y), at);
rs = await ev(() => window.__t.result());
check('Klick auf die Lasche: Wert 1 mm an der Stelle, „An Agent geben“ nennt ihn', pin?.name === 'Lasche' && near(pin.value, 1, 0.02)
- && rs.note.startsWith('[Ergebnis: "Wandstärke" (.soma/results/thickness.glb, Grenzwert 1.20 mm), Bauteil "Lasche": 1.00 mm bei ('), JSON.stringify([pin, rs.note]));
+ && rs.note.startsWith('[Result: "Wall thickness" (.soma/results/thickness.glb, limit 1.20 mm), part "Lasche": 1.00 mm at ('), JSON.stringify([pin, rs.note]));
await ev(() => window.__t.viewer.setView('iso'));
await shot('analyse-1');
r = soma(['render', '--result', 'thickness']);
- check('soma render --result: Bild mit Farben und Legende', r.status === 0 && JSON.stringify(pngSize(path.join(dir, 'renders', 'ergebnis-thickness.png'))) === '[1280,800]', r.stderr);
+ check('soma render --result: Bild mit Farben und Legende', r.status === 0 && JSON.stringify(pngSize(path.join(dir, 'renders', 'result-thickness.png'))) === '[1280,800]', r.stderr);
// Code ändern: Ergebnis veraltet, „Neu berechnen“ wertet das neue Modell aus
fs.writeFileSync(path.join(dir, 'model.py'), MODEL(2.0));
await waitFor('neuer Build', () => window.__t.status().state === 'ok' && window.__t.result().stale === true, 60000).catch(() => {});
rs = await ev(() => window.__t.result());
- check('Nach Codeänderung: Ergebnis als veraltet gekennzeichnet', rs.stale && rs.hint.startsWith('Älter als der Code'), rs.hint);
+ check('Nach Codeänderung: Ergebnis als veraltet gekennzeichnet', rs.stale && rs.hint.startsWith('Older than the code'), rs.hint);
await domClick('btn-result-rerun');
await waitFor('neu berechnet', () => window.__t.result().stale === false, 90000).catch(() => {});
rs = await ev(() => window.__t.result());
- check('„Neu berechnen“: Lasche jetzt 2 mm, nichts kritisch', !rs.stale && rs.rows.some((x) => x.startsWith('Lasche') && x.includes('nichts kritisch')), JSON.stringify(rs.rows));
+ check('„Neu berechnen“: Lasche jetzt 2 mm, nichts kritisch', !rs.stale && rs.rows.some((x) => x.startsWith('Lasche') && x.includes('nothing critical')), JSON.stringify(rs.rows));
await domClick('btn-result-close');
check('Analyse aus: Modell wieder sichtbar', !(await ev(() => window.__t.viewer.animViewState())).modelHidden);
@@ -322,8 +327,8 @@ add_part("Drawer", drawer)
await waitFor('Beispiel gebaut', () => window.soma.anim.list().then((x) => !x.building && (x.animations.some((a) => a.name === 'Open the lid') || x.errors.length > 0)), 90000).catch(() => {});
l = await list();
r = soma(['anim', 'info', 'Open the lid']);
- check('Beispiel aus dem Skill „Animation und Video“ baut ohne Fehler, Ablauf mit Titel, Gelenk und Schublade', !l.errors.length
- && r.status === 0 && r.stdout.includes('Lid: 0 -> -110 Grad') && r.stdout.includes('Drawer: 0 -> 60 mm') && r.stdout.includes('Titel: Storage box'),
+ check('Beispiel aus dem Skill „Animation and video“ baut ohne Fehler, Ablauf mit Titel, Gelenk und Schublade', !l.errors.length
+ && r.status === 0 && r.stdout.includes('Lid: 0 -> -110 deg') && r.stdout.includes('Drawer: 0 -> 60 mm') && r.stdout.includes('Title: Storage box'),
JSON.stringify(l.errors) + r.stdout.slice(0, 200) + r.stderr);
// 13) Ohne App, eigener Ordner (E64): Grenzwert mit Netzgenauigkeit, Teil vor Gruppe, Problemstellen, bessere Druckrichtung,
@@ -357,20 +362,20 @@ a.wait(0.5)
`);
const plainSoma = (args) => soma(args, { cwd: plain });
r = plainSoma(['analyze', 'overhang']);
- check('Fase mit genau 45°: nicht kritisch, als „genau am Grenzwert“ genannt', r.status === 0 && /Gehäuse: [^\n]*nichts über 45\.0°, 1\.41 cm² genau am Grenzwert/.test(r.stdout), r.stdout + r.stderr);
- check('Pilz: Problemstelle mit Fläche und Größe, Hinweis auf --up -z', /Pilz: [^\n]*5\.12 cm² über 45\.0°, mit --up -z nur 0\.00 cm²/.test(r.stdout)
- && /\n {4}512\.0 mm² in 24\.0 x 24\.0 mm, bis 90\.0° bei/.test(r.stdout), r.stdout);
+ check('Fase mit genau 45°: nicht kritisch, als „genau am Grenzwert“ genannt', r.status === 0 && /Gehäuse: [^\n]*nothing above 45\.0°, 1\.41 cm² exactly at the limit/.test(r.stdout), r.stdout + r.stderr);
+ check('Pilz: Problemstelle mit Fläche und Größe, Hinweis auf --up -z', /Pilz: [^\n]*5\.12 cm² above 45\.0°, with --up -z only 0\.00 cm²/.test(r.stdout)
+ && /\n {4}512\.0 mm² in 24\.0 x 24\.0 mm, up to 90\.0° at/.test(r.stdout), r.stdout);
r = plainSoma(['analyze', 'overhang', '--parts', 'Gehäuse', '--name', 'teil']);
const r2 = plainSoma(['analyze', 'overhang', '--parts', 'Gehäuse/', '--name', 'gruppe']);
check('--parts: Bauteil vor gleichnamiger Gruppe mit Hinweis, „Gehäuse/“ meint die Gruppe', r.status === 0 && !r.stdout.includes('Schraube:')
- && r.stdout.includes("Hinweis: 'Gehäuse' ist Bauteil und Gruppe") && r2.status === 0 && r2.stdout.includes('Schraube:') && !r2.stdout.includes('Hinweis'), r.stdout + r2.stdout);
+ && r.stdout.includes("Note: 'Gehäuse' is a part and a group") && r2.status === 0 && r2.stdout.includes('Schraube:') && !r2.stdout.includes('Note:'), r.stdout + r2.stdout);
r = plainSoma(['anim', 'build']);
check('Animation importiert aus model.py, das Modell läuft trotzdem nur einmal', r.status === 0 && fs.readFileSync(path.join(plain, 'laeufe.txt'), 'utf8') === 'xxxx',
fs.readFileSync(path.join(plain, 'laeufe.txt'), 'utf8') + r.stderr);
r = plainSoma(['anim', 'info', 'Schleife']);
- check('soma anim info: zwölf kurze Schritte als eine Zeile', r.status === 0 && r.stdout.includes('Pilz: 0 -> 12 mm (12 Schritte)') && !r.stdout.includes('Pilz: 1 -> 2'), r.stdout);
+ check('soma anim info: zwölf kurze Schritte als eine Zeile', r.status === 0 && r.stdout.includes('Pilz: 0 -> 12 mm (12 steps)') && !r.stdout.includes('Pilz: 1 -> 2'), r.stdout);
r = plainSoma(['anim', 'check', 'Schleife']);
- check('soma anim check: frei, Exit 0', r.status === 0 && r.stdout.includes('Zeitpunkte') && r.stdout.includes('keine'), r.stdout + r.stderr);
+ check('soma anim check: frei, Exit 0', r.status === 0 && r.stdout.includes('time steps') && r.stdout.includes('none'), r.stdout + r.stderr);
cleanup(plain);
} catch (e) {
t.fail();
diff --git a/app/test/editor.mjs b/app/test/editor.mjs
index fd11bd4..31d5d30 100644
--- a/app/test/editor.mjs
+++ b/app/test/editor.mjs
@@ -96,8 +96,8 @@ try {
await sleep(2500);
s = await ed();
check('Tippen: Platte unverändert, kein Build', s.dirty && disk().includes('LENGTH = 60.0') && await builds() === b0 && await body() === 60, `${await builds() - b0} Builds`);
- check('Anzeige: Punkt am Reiter, „Nicht gespeichert · Strg+S" und Knopf „Speichern und bauen"', await ev(() => !!document.querySelector('#code-tabs .ctab.on .dirty')
- && document.getElementById('code-info').textContent.includes('Nicht gespeichert · Strg+S') && document.getElementById('btn-code-save')?.textContent === 'Speichern und bauen'));
+ check('Anzeige: Punkt am Reiter, „Not saved · Ctrl+S" und Knopf „Save and build"', await ev(() => !!document.querySelector('#code-tabs .ctab.on .dirty')
+ && document.getElementById('code-info').textContent.includes('Not saved · Ctrl+S') && document.getElementById('btn-code-save')?.textContent === 'Save and build'));
await shot('8-editor-ungespeichert');
// 4) Strg+S im Editor: speichern, dann genau ein Build
@@ -112,7 +112,7 @@ try {
await replace('LENGTH = 70.0', 'LENGTH = 72.0');
await domClick('btn-code-save');
await waitFor('Build mit 72', () => window.__t.status().state === 'ok' && (window.__t.partSize('Body') || [0])[0] === 72, 60000).catch(() => {});
- check('Knopf „Speichern und bauen": gespeichert und gebaut (72 mm), Knopf wieder weg', disk().includes('LENGTH = 72.0') && await body() === 72 && await ev(() => !document.getElementById('btn-code-save')?.isConnected));
+ check('Knopf „Save and build": gespeichert und gebaut (72 mm), Knopf wieder weg', disk().includes('LENGTH = 72.0') && await body() === 72 && await ev(() => !document.getElementById('btn-code-save')?.isConnected));
// 6) Änderung von außen ohne eigene Eingaben: Der Editor übernimmt sie
fs.writeFileSync(modelPy, disk().replace('LENGTH = 72.0', 'LENGTH = 75.0'));
@@ -130,7 +130,7 @@ try {
&& await ev(() => !document.getElementById('code-banner').hidden && !!document.querySelector('#code-tabs .dirty.warn')));
await ctrlS();
await sleep(300);
- check('Strg+S bei Konflikt: nichts geschrieben, Meldung', disk().includes('LENGTH = 77.0') && (await ev(() => window.__t.toast())).text.includes('Nicht alles ließ sich speichern'));
+ check('Strg+S bei Konflikt: nichts geschrieben, Meldung', disk().includes('LENGTH = 77.0') && (await ev(() => window.__t.toast())).text.includes('Not everything could be saved'));
await shot('9-editor-konflikt');
await idle();
const b1 = await builds();
@@ -151,7 +151,7 @@ try {
// 8) Dateien der App: nur lesen, mit Begründung
await open('AGENTS.md');
s = await ed();
- check('AGENTS.md: nur lesen, mit Begründung und Verweis auf NOTES.md', s.readOnly && /NOTES\.md/.test(s.locked ?? '') && await ev(() => document.getElementById('code-info').textContent.startsWith('Nur lesen')));
+ check('AGENTS.md: nur lesen, mit Begründung und Verweis auf NOTES.md', s.readOnly && /NOTES\.md/.test(s.locked ?? '') && await ev(() => document.getElementById('code-info').textContent.startsWith('Read only')));
check('Eingaben in AGENTS.md werden nicht angenommen', !(await replace('Instructions', 'Anweisungen')) && !(await ed()).dirty);
// 9) Notizen (Markdown): speichern ja, bauen nein. Dazu Zeilenenden: Eine Datei mit CRLF behält sie.
@@ -162,7 +162,7 @@ try {
await idle();
const b2 = await builds();
await replace('Wunsch: Deckel', 'Wunsch: Deckel mit Lippe');
- check('Nur Markdown ungespeichert: Der Knopf heißt „Speichern", nicht „Speichern und bauen"', await ev(() => document.getElementById('btn-code-save')?.textContent === 'Speichern'));
+ check('Nur Markdown ungespeichert: Der Knopf heißt „Save", nicht „Save and build"', await ev(() => document.getElementById('btn-code-save')?.textContent === 'Save'));
await ctrlS();
await until('NOTES.md geschrieben', () => fs.readFileSync(notes, 'utf8').includes('Lippe'));
await sleep(2000);
@@ -229,12 +229,12 @@ try {
check('Text markiert: schwebender Knopf „Zitat an Agent" erscheint', selected && (await ed()).pdf.float);
await ev(() => document.querySelector('.pdf-float').click());
await sleep(200);
- check('Zitat geht mit Datei und Seite an den Agenten', await ev(() => window.__inserted) === '[Zitat: docs/datenblatt.pdf S. 1: "Haltemoment 0,45 Nm"] ',
+ check('Zitat geht mit Datei und Seite an den Agenten', await ev(() => window.__inserted) === '[Quote: docs/datenblatt.pdf p. 1: "Haltemoment 0,45 Nm"] ',
`${await ev(() => window.__inserted)} | ${(await ev(() => window.__t.toast())).text} | ${await ev(() => window.__t.terminals.count)}`);
await ev(() => window.__t.editor.pdfMarkPage(2));
await waitFor('Seite auf der Zeichenfläche', () => window.__t.markup().active, 10000).catch(() => {});
const mk = await ev(() => window.__t.markup());
- check('„Seite markieren": Seite 2 öffnet auf der Zeichenfläche', mk.active && mk.source === 'docs/datenblatt.pdf S. 2', mk.source);
+ check('„Mark up page": Seite 2 öffnet auf der Zeichenfläche', mk.active && mk.source === 'docs/datenblatt.pdf p. 2', mk.source);
await shot('9d-pdf-seite-markieren');
await ev(() => document.body.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true })));
fs.writeFileSync(pdfFile, makePdf([['Datenblatt NEMA 17'], ['Seite zwei'], ['Neue Seite drei']]));
@@ -246,7 +246,7 @@ try {
await open('docs/kaputt.pdf');
await waitFor('Fehlermeldung', () => !!window.__t.editor.state().pdf?.error, 10000).catch(() => {});
s = await ed();
- check('Kaputte PDF: Meldung in der Ansicht, App läuft weiter', !!s.pdf?.error && await ev(() => [...document.querySelectorAll('.pdf-msg')].some((m) => m.offsetParent && m.textContent.includes('lässt sich nicht lesen'))), s.pdf?.error ?? '');
+ check('Kaputte PDF: Meldung in der Ansicht, App läuft weiter', !!s.pdf?.error && await ev(() => [...document.querySelectorAll('.pdf-msg')].some((m) => m.offsetParent && m.textContent.includes('cannot be read'))), s.pdf?.error ?? '');
// 10) Build-Fehler: „Code öffnen" markiert die Zeile rot
await open('model.py');
@@ -271,7 +271,7 @@ try {
const inHead = (await exec(['show', 'HEAD:model.py'], proj.dir)).stdout;
check('„Speichern" oben: Eingabe aus dem Editor ist im Snapshot und in der ZIP', inHead.includes('LENGTH = 81.0') && fs.existsSync(zipPath) && !(await ed()).dirty);
await replace('LENGTH = 81.0', 'LENGTH = 82.0');
- check('Ungespeicherte Eingabe im Editor: Speicherstand oben zeigt „Nicht gespeichert"', await ev(() => document.getElementById('save-badge').textContent.startsWith('Nicht gespeichert')),
+ check('Ungespeicherte Eingabe im Editor: Speicherstand oben zeigt „Not saved"', await ev(() => document.getElementById('save-badge').textContent.startsWith('Not saved')),
await ev(() => document.getElementById('save-badge').textContent));
// 12) Modellwechsel mit ungespeicherter Eingabe: Rückfrage (Abbrechen, dann Speichern)
@@ -302,7 +302,7 @@ try {
// 14) Späte Schreibanfrage für ein schon gewechseltes Modell: nicht ins neue schreiben, sondern sichern
const late = await ev((id) => window.soma.fs.writeText(id, 'model.py', 'X = 1\n', null, true), proj.id);
- check('Späte Eingabe für das alte Modell: nicht ins neue geschrieben, sondern gesichert', !late.ok && /Sicherung/.test(late.error ?? '') && fs.readFileSync(model2, 'utf8').includes('LENGTH = 60.0')
+ check('Späte Eingabe für das alte Modell: nicht ins neue geschrieben, sondern gesichert', !late.ok && /backup/.test(late.error ?? '') && fs.readFileSync(model2, 'utf8').includes('LENGTH = 60.0')
&& backups().includes('X = 1\n'), (late.error ?? '').slice(0, 60));
const relevant = page.errors.filter((e) => !/favicon/i.test(e));
diff --git a/app/test/explode.mjs b/app/test/explode.mjs
index d4b0b2d..c8c0ee5 100644
--- a/app/test/explode.mjs
+++ b/app/test/explode.mjs
@@ -100,7 +100,7 @@ try {
});
await sleep(300);
check('Abbrechen während der Analyse: Explosion aus, Karte zu, Ladeanzeige weg, nichts verschoben',
- cancelled.during.loading && cancelled.during.busy?.title === 'Explosion wird vorbereitet' && !cancelled.after.active && !cancelled.after.loading
+ cancelled.during.loading && cancelled.during.busy?.title === 'Preparing the exploded view' && !cancelled.after.active && !cancelled.after.loading
&& cancelled.card && cancelled.busy === null && !(await ev(() => window.__t.explode())).active && !Object.keys((await vs()).offsets).length
&& await ev(() => document.getElementById('viewer-busy').hidden && document.getElementById('btn-explode').getAttribute('aria-pressed') === 'false'),
JSON.stringify(cancelled).slice(0, 160));
@@ -112,7 +112,7 @@ try {
let v = await vs();
const st = s.steps;
const dir = (id) => (st[id] ? sign(st[id].dir) : '-');
- check('„Explosion": Karte offen ohne Richtungsknöpfe, Knopf gedrückt, Schieber 50 %, Vorzugsachse Z (aus den Schrauben), Anker Unterteil, nichts steckt fest',
+ check('„Explode": Karte offen ohne Richtungsknöpfe, Knopf gedrückt, Schieber 50 %, Vorzugsachse Z (aus den Schrauben), Anker Unterteil, nichts steckt fest',
s.active && s.amount === 0.5 && s.shown === 0.5 && s.axis === 'z' && s.base === ids.Unterteil && s.forced === 0
&& s.text.includes('50 %') && await ev(() => !document.querySelector('#explode-card [data-axis]')
&& document.getElementById('btn-explode').getAttribute('aria-pressed') === 'true'), `${s.base} ${s.forced} ${s.analysisMs} ms`);
@@ -131,8 +131,8 @@ try {
check('Stift (kein Normteil) kommt nach dem Deckel schräg entlang der Achse seiner Bohrung heraus, aus den Zylinderflächen des Meshers',
!!st[ids.Stift] && st[ids.Stift].dir.every((v, k) => near(v, tilt[k], 1e-3)) && st[ids.Stift].level === 2 && !st[ids.Stift].forced
&& byId[ids.Stift].dirs.some((d) => Math.abs(d[0] * tilt[0] + d[1] * tilt[1] + d[2] * tilt[2]) > 0.9999), JSON.stringify(st[ids.Stift]));
- check('Die Referenz bleibt stehen und zählt nicht mit', !st[ids.Tisch] && !v.offsets[ids.Tisch] && s.text.includes('Referenzen bleiben stehen'));
- check('Im Normalfall kein allgemeiner Hinweis, nur der zu den Referenzen', s.hint === 'Referenzen bleiben stehen.' && !s.text.includes('Jedes Teil kommt'), String(s.hint));
+ check('Die Referenz bleibt stehen und zählt nicht mit', !st[ids.Tisch] && !v.offsets[ids.Tisch] && s.text.includes('Reference parts stay in place'));
+ check('Im Normalfall kein allgemeiner Hinweis, nur der zu den Referenzen', s.hint === 'Reference parts stay in place.' && !s.text.includes('Each part'), String(s.hint));
// Abstände: gleiche Lücke g zwischen allem, was übereinander gestapelt ist
const off = v.offsets;
@@ -154,7 +154,7 @@ try {
const so = off[ids.Stift];
check('Der Stift rückt nur entlang seiner Achse', !!so && near(so[0], 0, 1e-6) && near(so[1] / so[2], tilt[1] / tilt[2], 1e-3) && so[2] > 0, JSON.stringify(so));
check('Alle Teile außer Anker und Referenz verschoben, gestrichelte Wege für jedes', s.moving === 12 && v.trails === 12, `${s.moving} ${v.trails}`);
- check('Text für den Agenten: Explosionsansicht, nicht die Einbaulage', s.agent?.startsWith('Explosionsansicht (50 %)') && s.agent.includes('nicht die Einbaulage'), s.agent);
+ check('Text für den Agenten: Explosionsansicht, nicht die Einbaulage', s.agent?.startsWith('exploded view (50 %)') && s.agent.includes('not the assembled position'), s.agent);
await domClick('btn-explode-fit');
await waitFor('Kamera steht', () => !window.__t.viewer.viewState().animating, 5000);
await shot('explosion-1');
@@ -179,31 +179,31 @@ try {
const sorted = (xs) => [...xs].sort();
const btn = (id) => ev((i) => { const b = document.getElementById(i); return { label: b.getAttribute('aria-label'), disabled: b.disabled, on: b.classList.contains('on') }; }, id);
const setSpeed = (x) => ev((val) => { const e = document.getElementById('explode-speed'); e.value = val; e.dispatchEvent(new Event('change')); }, String(x));
- check('Sechs Schritte, alle zugleich: Anzeige „Schritt 6 von 6", „Weiter" gesperrt, „Zurück" nicht',
- s.order.length === 6 && s.stepPos === null && s.shownStep === 6 && s.text.includes('Schritt 6 von 6') && s.text.includes('Alle Schritte zugleich')
+ check('Sechs Schritte, alle zugleich: Anzeige „Step 6 of 6", „Step forward" gesperrt, „Step back" nicht',
+ s.order.length === 6 && s.stepPos === null && s.shownStep === 6 && s.text.includes('Step 6 of 6') && s.text.includes('All steps at once')
&& (await btn('btn-explode-next')).disabled && !(await btn('btn-explode-back')).disabled, s.text.replace(/\n/g, ' | '));
// Zusammenbauen abspielen, erst im Viertel-Tempo: Das neue Tempo wirkt sofort (sonst dauerte es 6 × 2,8 s)
await setSpeed(0.25);
await domClick('btn-explode-assemble');
s = await ex();
let asm = await btn('btn-explode-assemble'), apart = await btn('btn-explode-play');
- check('„Zusammenbauen abspielen": läuft rückwärts, der Knopf heißt „Anhalten" und leuchtet, „Auseinanderbauen abspielen" bleibt',
- s.playing && s.direction === 'together' && s.speed === 0.25 && asm.label === 'Anhalten' && asm.on && apart.label === 'Auseinanderbauen abspielen' && !apart.on,
+ check('„Play assembly": läuft rückwärts, der Knopf heißt „Pause" und leuchtet, „Play disassembly" bleibt',
+ s.playing && s.direction === 'together' && s.speed === 0.25 && asm.label === 'Pause' && asm.on && apart.label === 'Play disassembly' && !apart.on,
JSON.stringify([s.direction, asm, apart]));
const t0 = Date.now();
await setSpeed(2);
- const together = await waitFor('Zusammengebaut', () => !window.__t.explode().animating, 8000).then(() => true, () => false);
+ const together = await waitFor('Assembled', () => !window.__t.explode().animating, 8000).then(() => true, () => false);
const took = Date.now() - t0;
s = await ex();
- check('Tempo 2× während des Abspielens: nach gut 2 s zusammengebaut (nicht 17 s), „Schritt 0 von 6", „Zurück" gesperrt',
+ check('Tempo 2× während des Abspielens: nach gut 2 s zusammengebaut (nicht 17 s), „Step 0 of 6", „Step back" gesperrt',
together && took < 6000 && s.speed === 2 && s.stepPos === 0 && !s.playing && s.direction === null && !Object.keys((await vs()).offsets).length
- && s.shownStep === 0 && s.text.includes('Schritt 0 von 6') && s.text.includes('Zusammengebaut') && (await btn('btn-explode-back')).disabled
- && (await btn('btn-explode-assemble')).label === 'Zusammenbauen abspielen', `${took} ms, ${s.text.replace(/\n/g, ' | ')}`);
+ && s.shownStep === 0 && s.text.includes('Step 0 of 6') && s.text.includes('Assembled') && (await btn('btn-explode-back')).disabled
+ && (await btn('btn-explode-assemble')).label === 'Play assembly', `${took} ms, ${s.text.replace(/\n/g, ' | ')}`);
await domClick('btn-explode-next');
await stepDone();
s = await ex();
- check('„Weiter": Schritt 1, nur die sechs Schrauben sind heraus, die Anzeige nennt sie', s.stepPos === 1 && s.shownStep === 1
- && JSON.stringify(await movedIds()) === JSON.stringify(sorted([...screws, ...side])) && s.text.includes('Schritt 1 von 6') && s.text.includes('Schraube 1'), s.text);
+ check('„Step forward": Schritt 1, nur die sechs Schrauben sind heraus, die Anzeige nennt sie', s.stepPos === 1 && s.shownStep === 1
+ && JSON.stringify(await movedIds()) === JSON.stringify(sorted([...screws, ...side])) && s.text.includes('Step 1 of 6') && s.text.includes('Schraube 1'), s.text);
await domClick('btn-explode-next');
await stepDone();
await domClick('btn-explode-next');
@@ -212,40 +212,40 @@ try {
// Deckel und Seitenblech kamen in Schritt 2, die Anzeige nennt nur, was in diesem Schritt herauskommt
check('Schritt 3: dazu Deckel, Seitenblech und Stift, Platine, Klotz und Mutter noch drin, die Anzeige nennt den Stift',
JSON.stringify(await movedIds()) === JSON.stringify(sorted([...screws, ...side, ids.Deckel, ids.Seitenblech, ids.Stift]))
- && s.text.includes('Schritt 3 von 6') && s.text.includes('Stift') && !s.text.includes('Deckel'), `${s.text.replace(/\s+/g, ' ').slice(0, 200)} | ${JSON.stringify(await movedIds())}`);
+ && s.text.includes('Step 3 of 6') && s.text.includes('Stift') && !s.text.includes('Deckel'), `${s.text.replace(/\s+/g, ' ').slice(0, 200)} | ${JSON.stringify(await movedIds())}`);
await domClick('btn-explode-play');
s = await ex();
apart = await btn('btn-explode-play');
- check('„Auseinanderbauen abspielen": läuft weiter, der Knopf heißt jetzt „Anhalten" und leuchtet', s.playing && s.direction === 'apart'
- && apart.label === 'Anhalten' && apart.on && (await btn('btn-explode-assemble')).label === 'Zusammenbauen abspielen', JSON.stringify(apart));
+ check('„Play disassembly": läuft weiter, der Knopf heißt jetzt „Pause" und leuchtet', s.playing && s.direction === 'apart'
+ && apart.label === 'Pause' && apart.on && (await btn('btn-explode-assemble')).label === 'Play assembly', JSON.stringify(apart));
await stepDone();
s = await ex();
const full = (await vs()).offsets;
- check('Am Ende (Schritt 6) stehen alle Teile wie in der ganzen Explosion bei 100 %, „Weiter" gesperrt', s.stepPos === 6 && !s.playing
- && s.text.includes('Schritt 6 von 6') && (await btn('btn-explode-next')).disabled
+ check('Am Ende (Schritt 6) stehen alle Teile wie in der ganzen Explosion bei 100 %, „Step forward" gesperrt', s.stepPos === 6 && !s.playing
+ && s.text.includes('Step 6 of 6') && (await btn('btn-explode-next')).disabled
&& Object.keys(s.far).every((id) => (s.far[id].every((x) => near(x, 0, 1e-6)) && !full[id]) || (full[id] && s.far[id].every((x, k) => near(full[id][k], x, 1e-3)))),
JSON.stringify(full[ids.Mutter]));
await domClick('btn-explode-back');
await stepDone();
const back = (await vs()).offsets;
- check('„Zurück": Schritt 5, die Mutter steckt wieder im Klotz (geht mit der Baugruppe)', (await ex()).stepPos === 5
+ check('„Step back": Schritt 5, die Mutter steckt wieder im Klotz (geht mit der Baugruppe)', (await ex()).stepPos === 5
&& back[ids.Mutter].every((x, k) => near(x, back[ids.Klotz][k], 1e-6)), JSON.stringify([back[ids.Mutter], back[ids.Klotz]]));
s = await ex();
- check('Text für den Agenten nennt den Schritt', s.agent?.includes('Schritt 5 von 6 des Auseinanderbaus'), s.agent);
+ check('Text für den Agenten nennt den Schritt', s.agent?.includes('step 5 of 6 of the disassembly'), s.agent);
// Umkehren und Anhalten in beide Richtungen, im halben Tempo (1,4 s je Schritt, genug Luft für die Klicks)
await setSpeed(0.5);
await domClick('btn-explode-assemble');
await sleep(400);
await domClick('btn-explode-play');
s = await ex();
- check('Beim Zusammenbauen „Auseinanderbauen abspielen": kehrt um, ohne Sprung', s.playing && s.direction === 'apart' && s.stepPos > 4 && s.stepPos < 5
+ check('Beim Zusammenbauen „Play disassembly": kehrt um, ohne Sprung', s.playing && s.direction === 'apart' && s.stepPos > 4 && s.stepPos < 5
&& (await btn('btn-explode-play')).on && !(await btn('btn-explode-assemble')).on, String(s.stepPos));
await sleep(300);
await domClick('btn-explode-play');
s = await ex();
let paused = s.stepPos;
- check('Anhalten beim Auseinanderbauen: hält gleich an, Knopf wieder „Auseinanderbauen abspielen"', !s.playing && s.direction === null
- && (await btn('btn-explode-play')).label === 'Auseinanderbauen abspielen', String(paused));
+ check('Anhalten beim Auseinanderbauen: hält gleich an, Knopf wieder „Play disassembly"', !s.playing && s.direction === null
+ && (await btn('btn-explode-play')).label === 'Play disassembly', String(paused));
await stepDone();
s = await ex();
check('… und der laufende Schritt wird noch fertig (vorwärts auf den nächsten ganzen Schritt)', s.stepPos === Math.ceil(paused - 1e-6) && s.stepPos <= 6,
@@ -256,35 +256,35 @@ try {
await domClick('btn-explode-assemble');
s = await ex();
paused = s.stepPos;
- check('Anhalten beim Zusammenbauen: hält gleich an, Knopf wieder „Zusammenbauen abspielen"', !s.playing && s.direction === null && paused < from
- && (await btn('btn-explode-assemble')).label === 'Zusammenbauen abspielen', `${from} → ${paused}`);
+ check('Anhalten beim Zusammenbauen: hält gleich an, Knopf wieder „Play assembly"', !s.playing && s.direction === null && paused < from
+ && (await btn('btn-explode-assemble')).label === 'Play assembly', `${from} → ${paused}`);
await stepDone();
s = await ex();
check('… und der laufende Schritt wird noch fertig (rückwärts auf den ganzen Schritt davor), die Anzeige stimmt', s.stepPos === Math.floor(paused + 1e-6)
- && s.stepPos < from && s.text.includes(`Schritt ${s.stepPos} von 6`), `${paused} → ${s.stepPos}`);
+ && s.stepPos < from && s.text.includes(`Step ${s.stepPos} of 6`), `${paused} → ${s.stepPos}`);
await setSpeed(1);
check('Reihenfolge für den Agenten: sechs Zeilen, Deckel nach +Z, Stift schräg, Baugruppe aus Klotz und Mutter, Anker Unterteil',
- s.orderText.includes('Es bleibt stehen: "Unterteil"') && s.orderText.includes('2. ') && s.orderText.includes('"Deckel" nach +Z')
- && s.orderText.includes('Baugruppe aus') && s.orderText.includes('3. "Stift" nach (0, -0.5, 0.866)') && s.orderText.includes('6. "Mutter" nach +Y'),
+ s.orderText.includes('Stays in place: "Unterteil"') && s.orderText.includes('2. ') && s.orderText.includes('"Deckel" towards +Z')
+ && s.orderText.includes('assembly of') && s.orderText.includes('3. "Stift" towards (0, -0.5, 0.866)') && s.orderText.includes('6. "Mutter" towards +Y'),
s.orderText);
await domClick('btn-explode-agent');
await sleep(200);
const toast = await ev(() => window.__t.toast());
- check('„Reihenfolge an den Agenten geben" fügt sie in die Eingabe ein', toast.text.includes('eingefügt'), toast.text);
+ check('„Send the order to the agent" fügt sie in die Eingabe ein', toast.text.includes('Added to the input of'), toast.text);
// Der Schieber verlässt das Abspielen, die Anzeige folgt ihm: 0 % ist der Anfang, alles darüber das Ende
await slide(0);
s = await ex();
- check('Schieber auf 0 % verlässt das Abspielen: „Schritt 0 von 6", zusammengebaut, „Zurück" gesperrt', s.stepPos === null && s.shownStep === 0
- && s.text.includes('Schritt 0 von 6') && s.text.includes('Zusammengebaut') && (await btn('btn-explode-back')).disabled, s.text.replace(/\n/g, ' | '));
+ check('Schieber auf 0 % verlässt das Abspielen: „Step 0 of 6", zusammengebaut, „Step back" gesperrt', s.stepPos === null && s.shownStep === 0
+ && s.text.includes('Step 0 of 6') && s.text.includes('Assembled') && (await btn('btn-explode-back')).disabled, s.text.replace(/\n/g, ' | '));
await domClick('btn-explode-next');
s = await ex();
- check('„Weiter" bei 0 %: Der Abstand geht auf 50 %, sonst sähe man den Schritt nicht', s.amount === 0.5 && s.text.includes('50 %'), String(s.amount));
+ check('„Step forward" bei 0 %: Der Abstand geht auf 50 %, sonst sähe man den Schritt nicht', s.amount === 0.5 && s.text.includes('50 %'), String(s.amount));
await stepDone();
check('… und Schritt 1 ist heraus', (await ex()).stepPos === 1 && JSON.stringify(await movedIds()) === JSON.stringify(sorted([...screws, ...side])));
await slide(100);
s = await ex();
- check('Schieber auf 100 %: wieder alle zugleich, „Schritt 6 von 6"', s.stepPos === null && s.shownStep === 6 && s.text.includes('Schritt 6 von 6')
- && s.text.includes('Alle Schritte zugleich'), s.text.replace(/\n/g, ' | '));
+ check('Schieber auf 100 %: wieder alle zugleich, „Step 6 of 6"', s.stepPos === null && s.shownStep === 6 && s.text.includes('Step 6 of 6')
+ && s.text.includes('All steps at once'), s.text.replace(/\n/g, ' | '));
// 3) Auswahl in der Explosion: Klick auf die Deckeloberseite wählt den Deckel, der Punkt steht in Einbaulage (z = 24)
const lidUp = zz(ids.Deckel);
@@ -331,7 +331,7 @@ try {
await ev((id) => window.__t.viewer.setVisible(id, true), ids.Platine);
await domClick('btn-explode-trails');
v = await vs();
- check('„Wege" aus: keine Linien, Knopf nicht gedrückt', v.trails === 0 && await ev(() => document.getElementById('btn-explode-trails').getAttribute('aria-pressed') === 'false'), String(v.trails));
+ check('„Paths" aus: keine Linien, Knopf nicht gedrückt', v.trails === 0 && await ev(() => document.getElementById('btn-explode-trails').getAttribute('aria-pressed') === 'false'), String(v.trails));
await domClick('btn-explode-trails');
// 5) Schnitt dazu: Die Karten überdecken sich nicht, der Bereich des Schnitts reicht über das auseinandergezogene Modell
@@ -349,11 +349,11 @@ try {
await domClick('btn-measure');
s = await ex();
v = await vs();
- check('„Messen": Explosion aus, alle Teile in Einbaulage, Karte zu', !s.active && s.shown === 0 && !Object.keys(v.offsets).length && v.trails === 0
+ check('„Measure": Explosion aus, alle Teile in Einbaulage, Karte zu', !s.active && s.shown === 0 && !Object.keys(v.offsets).length && v.trails === 0
&& await ev(() => document.getElementById('explode-card').hidden && window.__t.measure().active), JSON.stringify(v.offsets).slice(0, 80));
await domClick('btn-explode');
await settle();
- check('„Explosion" beendet das Messen und zieht wieder auseinander (75 %, wie zuletzt eingestellt)',
+ check('„Explode" beendet das Messen und zieht wieder auseinander (75 %, wie zuletzt eingestellt)',
!(await ev(() => window.__t.measure().active)) && (await ex()).shown === 0.75 && Object.keys((await vs()).offsets).length === 12);
// 7) Neuer Build: Die Explosion bleibt, die Analyse läuft neu (Deckel 6 mm dick)
diff --git a/app/test/fasteners.mjs b/app/test/fasteners.mjs
index d6a0297..6380d50 100644
--- a/app/test/fasteners.mjs
+++ b/app/test/fasteners.mjs
@@ -140,14 +140,14 @@ msgs = {
"m10": err(lambda: HeatSetInsert("M10x12.7", at=(0, 0, 0))),
"amb": err(lambda: HeatSetInsert("M3", at=(0, 0, 0))),
}
-out("DIN 912: Hinweis auf ISO 4762", "heisst heute ISO 4762" in msgs["din"], msgs["din"])
-out("M3x11: keine Normlänge, Liste und check_length=False genannt", "Normlaengen: 5, 6, 8, 10, 12" in msgs["len"] and "check_length=False" in msgs["len"]
+out("DIN 912: Hinweis auf ISO 4762", "is now called ISO 4762" in msgs["din"], msgs["din"])
+out("M3x11: keine Normlänge, Liste und check_length=False genannt", "Standard lengths: 5, 6, 8, 10, 12" in msgs["len"] and "check_length=False" in msgs["len"]
and Screw("ISO 4762", "M3x11", at=(0, 0, 0), check_length=False).length == 11, msgs["len"])
-out("M7 gibt es nicht: vorhandene Größen genannt", "Vorhanden: M1.6, M2" in msgs["size"], msgs["size"])
-out("at fehlt, (x, y) ohne on, Gerade verfehlt das Teil: je eine Erklärung", "at fehlt" in msgs["at"] and "on=teil" in msgs["xy"] and "trifft das Teil nicht" in msgs["miss"],
+out("M7 gibt es nicht: vorhandene Größen genannt", "Available: M1.6, M2" in msgs["size"], msgs["size"])
+out("at fehlt, (x, y) ohne on, Gerade verfehlt das Teil: je eine Erklärung", "at is missing" in msgs["at"] and "on=part" in msgs["xy"] and "does not hit the part" in msgs["miss"],
msgs["miss"])
-out("Einsatz M10 (Tabelle nennt Bohrer M14): abgelehnt statt falscher Bohrung", "keine brauchbare Bohrung" in msgs["m10"], msgs["m10"])
-out("Einsatz M3 ohne Länge: nicht eindeutig, Längen genannt", "nicht eindeutig" in msgs["amb"] and "5.7" in msgs["amb"], msgs["amb"])
+out("Einsatz M10 (Tabelle nennt Bohrer M14): abgelehnt statt falscher Bohrung", "no usable hole" in msgs["m10"], msgs["m10"])
+out("Einsatz M3 ohne Länge: nicht eindeutig, Längen genannt", "ambiguous" in msgs["amb"] and "5.7" in msgs["amb"], msgs["amb"])
# 8) Viele gleiche Schrauben: die Geometrie wird nur einmal gebaut
t0 = time.perf_counter()
@@ -262,12 +262,12 @@ try {
const outline = await ev(() => [...document.querySelectorAll('#tab-model .row, #tab-model .grp')].map((r) => (r.classList.contains('grp') ? '#' : '')
+ ((r.querySelector('.gname') ?? r.querySelector('.pname'))?.textContent ?? r.textContent)).join(' '));
check('Bauteilbaum: Normteile als Gruppe bei den eigenen Teilen, keine Referenzen-Überschrift', outline.includes('Normteile') && outline.includes('Einsätze')
- && !outline.includes('#REFERENZEN'), outline.slice(0, 120));
+ && !outline.includes('#REFERENCES'), outline.slice(0, 120));
await ev(() => [...document.querySelectorAll('#tab-model .row:not(.gr)')].find((r) => r.querySelector('.pname')?.textContent === 'Schraube 1').querySelector('.nm').click());
await waitFor('Auswahl', () => window.__t.info() !== '', 5000).catch(() => {});
const info = await ev(() => window.__t.info());
- check('Auswahl einer Schraube: Name mit „(Zukaufteil)“, Codestelle wie bei eigenen Teilen', info.startsWith('Schraube 1 (Zukaufteil)'), info.slice(0, 60));
+ check('Auswahl einer Schraube: Name mit „(purchased part)“, Codestelle wie bei eigenen Teilen', info.startsWith('Schraube 1 (purchased part)'), info.slice(0, 60));
await ev(() => window.__t.viewer.setView('iso'));
if (process.env.SMOKE_SHOTS) {
fs.mkdirSync(path.join(APP, 'test', 'shots'), { recursive: true });
@@ -279,7 +279,7 @@ try {
const exp = py(['-m', 'soma', 'export', '--all', '--format', 'stl', '--project', proj.dir, '--out', 'exp-test']);
const files = fs.existsSync(path.join(proj.dir, 'exp-test')) ? fs.readdirSync(path.join(proj.dir, 'exp-test')).sort() : [];
check('soma export --all: nur Gehäuse und Deckel, Meldung über 10 übersprungene Teile', exp.status === 0 && files.join(',') === 'Deckel.stl,Gehaeuse.stl'
- && exp.stdout.includes('nicht exportiert: 10'), `${files.join(',')} ${exp.stderr.slice(-120)}`);
+ && exp.stdout.includes('not exported: 10'), `${files.join(',')} ${exp.stderr.slice(-120)}`);
const one = py(['-m', 'soma', 'export', 'Klemmschraube', '--format', 'step', '--project', proj.dir, '--out', 'exp-test']);
check('Einzeln exportiert: soma export Klemmschraube', one.status === 0 && fs.existsSync(path.join(proj.dir, 'exp-test', 'Klemmschraube.step')), one.stderr.slice(-120));
fs.rmSync(path.join(proj.dir, 'exp-test'), { recursive: true, force: true });
diff --git a/app/test/fem.mjs b/app/test/fem.mjs
index 89f57d8..82967ee 100644
--- a/app/test/fem.mjs
+++ b/app/test/fem.mjs
@@ -71,42 +71,42 @@ try {
// 1) Kragbalken gegen die Formel: w = 4 * 50 * 100³ / (70000 * 10 * 10³) = 0,2857 mm, Spannung an der Einspannung 30 MPa
study('balken', BALKEN(50));
let r = soma(['analyze', 'fem', 'analyses/balken.py']);
- const w = Number(/größte Verschiebung (\d+\.\d+) mm/.exec(r.stdout)?.[1]);
- const s = Number(/höchste Vergleichsspannung (\d+\.\d) MPa/.exec(r.stdout)?.[1]);
+ const w = Number(/largest displacement (\d+\.\d+) mm/.exec(r.stdout)?.[1]);
+ const s = Number(/highest von Mises stress (\d+\.\d) MPa/.exec(r.stdout)?.[1]);
check('Kragbalken: Durchbiegung wie die Formel (0,286 mm, ±2 %)', r.status === 0 && near(w, 0.2857, 0.006), r.stdout + r.stderr);
- check('Kragbalken: Spannung an der Einspannung um 30 MPa, Sicherheit über 2, nichts kritisch', near(s, 30, 4) && /kleinste Sicherheit [5-9]\.\d\d, nichts unter 2/.test(r.stdout), r.stdout);
- check('Lastfall in der Ausgabe: fest 100 mm² mit Lagerkraft 50 N, Kraft 100 mm², im Gleichgewicht', /fest: Balken <X \(100\.0 mm²\), Lagerkraft \(0\.0, 0\.0, 50\.0\) N/.test(r.stdout)
- && /Kraft: Balken >X \(100\.0 mm²\), \(0\.0, 0\.0, -50\.0\) N/.test(r.stdout) && r.stdout.includes('(im Gleichgewicht)'), r.stdout);
- check('Netzprüfung: zweite Rechnung mit gröberem Netz genannt, Hinweis zur Spitze an der Einspannung', /mit gröberem Netz \d+\.\d MPa/.test(r.stdout)
- && r.stdout.includes('am Rand einer Einspannung'), r.stdout);
+ check('Kragbalken: Spannung an der Einspannung um 30 MPa, Sicherheit über 2, nichts kritisch', near(s, 30, 4) && /lowest safety factor [5-9]\.\d\d, nothing below 2/.test(r.stdout), r.stdout);
+ check('Lastfall in der Ausgabe: fest 100 mm² mit Lagerkraft 50 N, Kraft 100 mm², im Gleichgewicht', /fixed: Balken <X \(100\.0 mm²\), reaction force \(0\.0, 0\.0, 50\.0\) N/.test(r.stdout)
+ && /force: Balken >X \(100\.0 mm²\), \(0\.0, 0\.0, -50\.0\) N/.test(r.stdout) && r.stdout.includes('(in equilibrium)'), r.stdout);
+ check('Netzprüfung: zweite Rechnung mit gröberem Netz genannt, Hinweis zur Spitze an der Einspannung', /with a coarser mesh \d+\.\d MPa/.test(r.stdout)
+ && r.stdout.includes('at the edge of a fixed support'), r.stdout);
check('Ergebnisdatei .soma/results/balken.glb', fs.existsSync(path.join(dir, '.soma', 'results', 'balken.glb')));
// 2) Zwei verschmolzene Teile mit eigenem Werkstoff, Druck über near=, Eigengewicht
study('winkel', WINKEL);
r = soma(['analyze', 'fem', 'analyses/winkel.py']);
check('Winkel: beide Teile mit ihrem Werkstoff, Druck 0,2 MPa auf 1600 mm² (320 N), Eigengewicht, im Gleichgewicht', r.status === 0
- && /Fuss \(Aluminium 6082/.test(r.stdout) && /Wand \(Steel S235/.test(r.stdout) && /Druck: Wand nahe \(30, 100, 30\) \(1600\.0 mm²\), 0\.2 MPa, zusammen \(-320\.0, 0\.0, 0\.0\) N/.test(r.stdout)
- && r.stdout.includes('Eigengewicht') && r.stdout.includes('(im Gleichgewicht)'), r.stdout + r.stderr);
- check('Winkel: Einspannung 2400 mm² trägt Druck und Gewicht', /fest: Fuss <Z \(2400\.0 mm²\), Lagerkraft \(320\.0, 0\.0, \d\.\d\) N/.test(r.stdout), r.stdout);
+ && /Fuss \(Aluminium 6082/.test(r.stdout) && /Wand \(Steel S235/.test(r.stdout) && /pressure: Wand near \(30, 100, 30\) \(1600\.0 mm²\), 0\.2 MPa, in total \(-320\.0, 0\.0, 0\.0\) N/.test(r.stdout)
+ && r.stdout.includes('self-weight') && r.stdout.includes('(in equilibrium)'), r.stdout + r.stderr);
+ check('Winkel: Einspannung 2400 mm² trägt Druck und Gewicht', /fixed: Fuss <Z \(2400\.0 mm²\), reaction force \(320\.0, 0\.0, \d\.\d\) N/.test(r.stdout), r.stdout);
// 3) Fehler: verständlich, Exit 1, keine Ergebnisdatei
study('lose', LOSE);
r = soma(['analyze', 'fem', 'analyses/lose.py']);
- check('Nur in Z gehalten: meldet, was noch frei ist', r.status === 1 && /Lagerung reicht nicht[^\n]*Fuss, Wand: noch frei beweglich \([^)]*Verschiebung in X/.test(r.stderr + r.stdout), r.stderr + r.stdout);
+ check('Nur in Z gehalten: meldet, was noch frei ist', r.status === 1 && /supports are not enough[^\n]*Fuss, Wand: still free \([^)]*moving in X/.test(r.stderr + r.stdout), r.stderr + r.stdout);
study('kaputt', BALKEN(1).replace('fix("Balken"', 'fix("Gibtsnicht"'));
r = soma(['analyze', 'fem', 'analyses/kaputt.py']);
- check('Unbekanntes Bauteil: nennt die vorhandenen', r.status === 1 && (r.stderr + r.stdout).includes("Bauteil 'Gibtsnicht' gibt es nicht") && (r.stderr + r.stdout).includes("'Balken'"), r.stderr + r.stdout);
+ check('Unbekanntes Bauteil: nennt die vorhandenen', r.status === 1 && (r.stderr + r.stdout).includes("There is no part 'Gibtsnicht'") && (r.stderr + r.stdout).includes("'Balken'"), r.stderr + r.stdout);
study('kaputt', BALKEN(1).replace('faces="<X"', 'faces="<Q"'));
r = soma(['analyze', 'fem', 'analyses/kaputt.py']);
- check('Falscher Selektor: Fehler nennt ihn', r.status === 1 && (r.stderr + r.stdout).includes("Selektor '<Q'"), r.stderr + r.stdout);
+ check('Falscher Selektor: Fehler nennt ihn', r.status === 1 && (r.stderr + r.stdout).includes("Selector '<Q'"), r.stderr + r.stdout);
study('kaputt', BALKEN(1).replace(/study\.fix[^\n]*\n/, ''));
r = soma(['analyze', 'fem', 'analyses/kaputt.py']);
- check('Ohne fix: verlangt eine Einspannung', r.status === 1 && (r.stderr + r.stdout).includes('Mindestens ein study.fix'), r.stderr + r.stdout);
+ check('Ohne fix: verlangt eine Einspannung', r.status === 1 && (r.stderr + r.stdout).includes('At least one study.fix'), r.stderr + r.stdout);
study('kaputt', 'from soma.fem import Study\nx = 1 / 0\n');
r = soma(['analyze', 'fem', 'analyses/kaputt.py']);
- check('Fehler im Code der Studie: Datei und Zeile 2', r.status === 1 && (r.stderr + r.stdout).includes('analyses/kaputt.py (Zeile 2): ZeroDivisionError'), r.stderr + r.stdout);
+ check('Fehler im Code der Studie: Datei und Zeile 2', r.status === 1 && (r.stderr + r.stdout).includes('analyses/kaputt.py (line 2): ZeroDivisionError'), r.stderr + r.stdout);
r = soma(['analyze', 'fem']);
- check('Ohne Studie: Hinweis auf die Datei', r.status === 1 && (r.stderr + r.stdout).includes('braucht die Datei mit dem Lastfall'), r.stderr + r.stdout);
+ check('Ohne Studie: Hinweis auf die Datei', r.status === 1 && (r.stderr + r.stdout).includes('needs the file with the load case'), r.stderr + r.stdout);
check('Fehler legen keine Ergebnisse an', !fs.existsSync(path.join(dir, '.soma', 'results', 'kaputt.glb')) && !fs.existsSync(path.join(dir, '.soma', 'results', 'lose.glb')));
// 4) Anzeige in der App: Karte mit Lastfall und Überhöhung, Wert unter dem Zeiger in Ausgangslage
@@ -116,9 +116,9 @@ try {
let rs = await ev(() => window.__t.result());
// Überhöhung: 5 % von 101 mm / 0,286 mm = 17,7, auf eine runde Zahl abgerundet 10
check('Karte: Sicherheit, Spannung, Verschiebung je Teil, Lastfall in zwei Zeilen, verformt 10-fach', rs.active && rs.fem
- && rs.rows.some((x) => x.startsWith('Balken') && /Sicherheit \d+,\d+ · 30(,\d)? MPa · 0,28\d mm$/.test(x))
- && rs.fem.bcRows.length === 2 && rs.fem.bcRows[0].startsWith('fest') && rs.fem.bcRows[0].includes('Lagerkraft 50 N') && rs.fem.bcRows[1].startsWith('Kraft')
- && rs.fem.scale === 10 && rs.fem.options.includes('10-fach überhöht') && rs.fem.bcs === true && rs.meta.unit === '', JSON.stringify(rs));
+ && rs.rows.some((x) => x.startsWith('Balken') && /Safety \d+\.\d+ · 30(\.\d)? MPa · 0\.28\d mm$/.test(x))
+ && rs.fem.bcRows.length === 2 && rs.fem.bcRows[0].startsWith('Fixed') && rs.fem.bcRows[0].includes('reaction force 50 N') && rs.fem.bcRows[1].startsWith('Force')
+ && rs.fem.scale === 10 && rs.fem.options.includes('Exaggerated 10×') && rs.fem.bcs === true && rs.meta.unit === '', JSON.stringify(rs));
check('Hinweis in der Karte nennt den Befehl mit der Studie', rs.hint.startsWith('soma analyze fem analyses/balken.py'), rs.hint);
await ev(() => window.__t.viewer.setView('front'));
await sleep(300);
@@ -128,7 +128,7 @@ try {
check('Klick auf das verformte Balkenende: Stelle in Ausgangslage, Verschiebung um 0,28 mm, Spannung klein', pin?.name === 'Balken'
&& near(pin.point[0], 97, 1) && near(pin.point[2], 0, 1.2) && near(pin.disp, 0.28, 0.03) && pin.stress < 5 && pin.value > 20, JSON.stringify(pin));
rs = await ev(() => window.__t.result());
- check('An Agent geben: Sicherheit, Spannung und Verschiebung', /^\[Ergebnis: "Balken unter Last" \(\.soma\/results\/balken\.glb, Grenzwert 2\.00\), Bauteil "Balken": Sicherheit (über 99|\d+\.\d\d) \(\d+\.\d MPa, Verschiebung 0\.2\d\d mm\) bei \(/.test(rs.note), rs.note);
+ check('An Agent geben: Sicherheit, Spannung und Verschiebung', /^\[Result: "Balken unter Last" \(\.soma\/results\/balken\.glb, limit 2\.00\), part "Balken": safety factor (over 99|\d+\.\d\d) \(\d+\.\d MPa, displacement 0\.2\d\d mm\) at \(/.test(rs.note), rs.note);
await ev(() => window.__t.viewer.setView('iso'));
await shot('fem-1');
await ev(() => { const s = document.getElementById('result-deform'); s.value = '0'; s.dispatchEvent(new Event('change')); });
@@ -144,14 +144,14 @@ try {
await pick('result-field', 'stress');
rs = await ev(() => window.__t.result());
check('Spannung: MPa, Grenze 125 MPa kritisch darüber, Skala 0 bis 250', rs.scale.field === 'stress' && rs.scale.unit === 'MPa'
- && rs.scale.threshold === 125 && rs.scale.range.join() === '0,250' && rs.scale.legend.includes('Vergleichsspannung (von Mises) (MPa)')
- && rs.scale.legend.includes('Grenze 125 MPa, kritisch darüber'), JSON.stringify(rs.scale));
+ && rs.scale.threshold === 125 && rs.scale.range.join() === '0,250' && rs.scale.legend.includes('von Mises stress (MPa)')
+ && rs.scale.legend.includes('Limit 125 MPa, critical above'), JSON.stringify(rs.scale));
await ev(() => window.__t.viewer.setView('front'));
await sleep(300);
const pin2 = await ev((p) => window.__t.resultPin(p.x, p.y), at);
await ev(() => window.__t.viewer.setView('iso'));
rs = await ev(() => window.__t.result());
- check('Stelle bei Spannung: MPa zuerst, Sicherheit danach', pin2?.stress != null && /: Balken, \d+,\d MPa · Sicherheit /.test(rs.probe), rs.probe);
+ check('Stelle bei Spannung: MPa zuerst, Sicherheit danach', pin2?.stress != null && /: Balken, \d+\.\d MPa · Safety /.test(rs.probe), rs.probe);
await pick('result-range', 'minmax');
rs = await ev(() => window.__t.result());
check('Min bis Max: Spanne der Spannungen im Modell (bis rund 30 MPa)', rs.scale.mode === 'minmax' && rs.scale.range[0] >= 0 && rs.scale.range[0] < 5
@@ -168,7 +168,7 @@ try {
// Farben über die Spanne: Das untere Ende ist grau, das obere rot, obwohl der Grenzwert weit darüber liegt
const ends = await ev(() => getComputedStyle(document.querySelector('#result-legend .rs-bar')).backgroundImage.match(/rgb\([^)]*\)/g));
check('Eigene Skala 10 bis 40 MPa gilt sofort, Farbe über die Spanne bis Rot, Grenze außerhalb ohne Strich', rs.scale.range.join() === '10,40'
- && rs.scale.legend.includes('Farbe über die Spanne') && ends.at(-1) === 'rgb(240, 116, 112)'
+ && rs.scale.legend.includes('color across the range') && ends.at(-1) === 'rgb(240, 116, 112)'
&& await ev(() => document.querySelector('#result-legend .rs-mark').hidden), JSON.stringify(rs.scale) + ends?.join(' '));
await shot('fem-2');
await typeIn('result-lo', '50');
@@ -183,7 +183,7 @@ try {
// 5) soma render --result: Bild mit Legende
r = soma(['render', '--result', 'balken']);
- check('soma render --result balken: Bild 1280 x 800', r.status === 0 && JSON.stringify(pngSize(path.join(dir, 'renders', 'ergebnis-balken.png'))) === '[1280,800]', r.stdout + r.stderr);
+ check('soma render --result balken: Bild 1280 x 800', r.status === 0 && JSON.stringify(pngSize(path.join(dir, 'renders', 'result-balken.png'))) === '[1280,800]', r.stdout + r.stderr);
// 6) Studie ändern: Ergebnis veraltet (die Studie zählt mit), Neu berechnen rechnet die neue Last
await sleep(1100);
@@ -194,8 +194,8 @@ try {
await domClick('btn-result-rerun');
await waitFor('neu berechnet', () => window.__t.result().stale === false && window.__t.result().fem?.bcRows?.[0]?.includes('100 N'), 120000).catch(() => {});
rs = await ev(() => window.__t.result());
- check('Neu berechnen: Lagerkraft jetzt 100 N, Verschiebung doppelt', !rs.stale && rs.fem?.bcRows[0].includes('Lagerkraft 100 N')
- && rs.rows.some((x) => x.startsWith('Balken') && /0,5[67]\d mm/.test(x)), JSON.stringify(rs));
+ check('Neu berechnen: Lagerkraft jetzt 100 N, Verschiebung doppelt', !rs.stale && rs.fem?.bcRows[0].includes('reaction force 100 N')
+ && rs.rows.some((x) => x.startsWith('Balken') && /0\.5[67]\d mm/.test(x)), JSON.stringify(rs));
await domClick('btn-result-close');
check('Analyse aus: Modell wieder sichtbar', !(await ev(() => window.__t.viewer.animViewState())).modelHidden);
@@ -233,7 +233,7 @@ try {
const block = /```python\r?\n([\s\S]*?)\r?\n```/.exec(skill)?.[1] ?? '';
study('skill', block);
r = soma(['analyze', 'fem', 'analyses/skill.py']);
- check('Beispiel aus dem Skill „Festigkeit mit FEM“ rechnet ohne Fehler', r.status === 0 && r.stdout.includes('FEM "Bracket, 5 kg on the arm"')
+ check('Beispiel aus dem Skill „Strength with FEM“ rechnet ohne Fehler', r.status === 0 && r.stdout.includes('FEM "Bracket, 5 kg on the arm"')
&& /Bracket \(PETG/.test(r.stdout), r.stdout.slice(0, 600) + r.stderr);
} catch (e) {
t.fail();
diff --git a/app/test/groups.mjs b/app/test/groups.mjs
index 2211d61..6558b05 100644
--- a/app/test/groups.mjs
+++ b/app/test/groups.mjs
@@ -63,8 +63,8 @@ try {
})));
let r = await rows();
const outline = r.map((x) => `${x.kind === 'group' ? '+' : x.kind === 'section' ? '#' : '-'}${x.name}@${x.pad}`).join(' ');
- check('Baum: Gehäuse › Boden, Deckel, Schrauben › Schraube, dann Referenzen › Platine › Leiterplatte, Stecker › USB_C, Pinleiste',
- outline === '+Gehäuse@4 -Boden@18 -Deckel@18 +Schrauben@18 -Schraube@32 #REFERENZEN@0 +Platine@4 -Leiterplatte@18 +Stecker@18 -USB_C@32 -Pinleiste@32', outline);
+ check('Baum: Gehäuse › Boden, Deckel, Schrauben › Schraube, dann REFERENCES › Platine › Leiterplatte, Stecker › USB_C, Pinleiste',
+ outline === '+Gehäuse@4 -Boden@18 -Deckel@18 +Schrauben@18 -Schraube@32 #REFERENCES@0 +Platine@4 -Leiterplatte@18 +Stecker@18 -USB_C@32 -Pinleiste@32', outline);
const parts = await ev(() => Object.fromEntries(window.__t.parts().map((p) => [p.name, p])));
const green = parts.Leiterplatte?.color ?? '#000';
const [cr, cg, cb] = [1, 3, 5].map((i) => parseInt(green.slice(i, i + 2), 16));
@@ -104,7 +104,7 @@ try {
await page.click(center.x, center.y);
await waitFor('Auswahl Platine', () => window.__t.info().startsWith('Leiterplatte'), 5000).catch(() => {});
check('Transparent: derselbe Klick geht durch den Deckel und trifft die Leiterplatte', (await ev(() => window.__t.info())).startsWith('Leiterplatte'), (await ev(() => window.__t.info())).slice(0, 30));
- check('Auswahltext für den Agenten nennt die Gruppe', /Bauteil "Leiterplatte" in Gruppe "Platine"/.test(await ev(() => window.__t.selectionText())), (await ev(() => window.__t.selectionText())).slice(0, 70));
+ check('Auswahltext für den Agenten nennt die Gruppe', /part "Leiterplatte" in group "Platine"/.test(await ev(() => window.__t.selectionText())), (await ev(() => window.__t.selectionText())).slice(0, 70));
await clickIn(groupRow('Stecker'), '.gh');
check('Transparenz der Gruppe „Stecker": beide Teile, die Gruppe darüber zeigt „teilweise"', (await ghosted(['USB_C', 'Pinleiste'])).every(Boolean) && !(await ghosted(['Leiterplatte']))[0]
&& await ev(`(${groupRow('Platine')}).querySelector('.gh').classList.contains('partly')`));
@@ -115,8 +115,8 @@ try {
// 5) Rechtsklick auf eine Gruppe: Isolieren
await ev(`(${groupRow('Gehäuse')}).dispatchEvent(new MouseEvent('contextmenu', { bubbles: true, clientX: 60, clientY: 90 }))`);
const menu = await ev(() => [...document.querySelectorAll('#menu-ctx .mi span:nth-child(2)')].map((x) => x.textContent));
- await ev(() => [...document.querySelectorAll('#menu-ctx .mi')].find((b) => b.textContent.includes('Isolieren')).click());
- check('Rechtsklick auf eine Gruppe: Isolieren zeigt nur ihre Teile', menu.includes('Isolieren') && menu.includes('Transparent')
+ await ev(() => [...document.querySelectorAll('#menu-ctx .mi')].find((b) => b.textContent.includes('Isolate')).click());
+ check('Rechtsklick auf eine Gruppe: „Isolate“ zeigt nur ihre Teile', menu.includes('Isolate') && menu.includes('Transparent')
&& (await visible(['Boden', 'Deckel', 'Schraube'])).every(Boolean) && (await visible(['Leiterplatte', 'USB_C'])).every((v) => !v), menu.join(', '));
await ev(() => window.__t.viewer.showAll());
@@ -126,7 +126,7 @@ try {
check('Suche „usb": USB_C mit seinen Gruppen Platine und Stecker', r.filter((x) => x.kind !== 'section').map((x) => x.name).join(',') === 'Platine,Stecker,USB_C', r.map((x) => x.name).join(','));
await ev(() => document.getElementById('btn-parts-search').click());
- // 7) Ausgabe-STEP: Gruppen als Unterbaugruppen, Referenzen unter „Referenz"
+ // 7) Ausgabe-STEP: Gruppen als Unterbaugruppen, Referenzen unter „Reference" (bis E73 „Referenz")
const tree = py(`
import cadquery as cq
a = cq.Assembly.importStep(${JSON.stringify(path.join(proj.dir, 'output', 'model.step'))})
@@ -135,8 +135,8 @@ def walk(x, d=0):
for c in x.children: walk(c, d + 1)
walk(a)`);
const lines = tree.stdout.split(/\r?\n/).filter(Boolean).slice(1).map((l) => l.replace(/\s+$/, ''));
- check('output/model.step: Gehaeuse › Schrauben › Schraube und Referenz › Platine › Stecker › USB_C', lines.includes(' Gehaeuse') && lines.includes(' Schrauben') && lines.includes(' Schraube')
- && lines.includes(' Referenz') && lines.includes(' Platine') && lines.includes(' Stecker') && lines.includes(' USB_C'), lines.join(' | ').slice(0, 120));
+ check('output/model.step: Gehaeuse › Schrauben › Schraube und Reference › Platine › Stecker › USB_C', lines.includes(' Gehaeuse') && lines.includes(' Schrauben') && lines.includes(' Schraube')
+ && lines.includes(' Reference') && lines.includes(' Platine') && lines.includes(' Stecker') && lines.includes(' USB_C'), lines.join(' | ').slice(0, 120));
const relevant = page.errors.filter((e) => !/favicon/i.test(e));
check('Keine Konsolenfehler im Renderer', relevant.length === 0, relevant.slice(0, 2).join(' | ').slice(0, 100));
diff --git a/app/test/measure.mjs b/app/test/measure.mjs
index 0aede1d..ad0006a 100644
--- a/app/test/measure.mjs
+++ b/app/test/measure.mjs
@@ -48,10 +48,10 @@ try {
// 1) Messmodus
await domClick('btn-measure');
let s = await ms();
- check('„Messen": Modus an, Karte mit Hinweis, Auswahlkarte tritt zurück', s.active && s.text.includes('Klick auf einen Punkt, eine Kante oder eine Fläche')
+ check('„Measure": Modus an, Karte mit Hinweis, Auswahlkarte tritt zurück', s.active && s.text.includes('Click a point, an edge or a face')
&& await ev(() => document.getElementById('btn-measure').getAttribute('aria-pressed') === 'true' && getComputedStyle(document.getElementById('selcard')).display === 'none'));
- check('Beim Einschalten startet die Vorbereitung (Messdienst, dann Geometrie), sichtbar in der Karte', s.preparing && s.text.includes('Messdienst startet'), s.phase);
+ check('Beim Einschalten startet die Vorbereitung (Messdienst, dann Geometrie), sichtbar in der Karte', s.preparing && s.text.includes('Starting the measuring service'), s.phase);
// Der erste Klick kommt noch während der Vorbereitung: Seine Messung wartet darauf statt ins Zeitlimit zu laufen
// 2) Eine Fläche: exakte Werte, Maße des Bauteils
@@ -62,8 +62,8 @@ try {
check('Nach der Vorbereitung: keine Ladezeile, kein Fehler', !s.preparing && !s.phase && !s.error, s.error);
const expArea = 40 * 30 - 2 * Math.PI * 9;
check('Klick auf die Oberseite der Platte: Fläche eben, exakter Flächeninhalt, Normale +Z', s.result?.a.type === 'PLANE' && Math.abs(s.result.a.area - expArea) < 1e-6
- && s.text.includes('Fläche · eben') && s.text.includes('+Z'), s.error || `${s.result?.a.area}`);
- check('Karte nennt die Maße des Bauteils: 40,00 × 30,00 × 5,00 mm', s.text.includes('40,00 × 30,00 × 5,00 mm'), s.text.replace(/\s+/g, ' ').slice(0, 90));
+ && s.text.includes('Face · plane') && s.text.includes('+Z'), s.error || `${s.result?.a.area}`);
+ check('Karte nennt die Maße des Bauteils: 40.00 × 30.00 × 5.00 mm', s.text.includes('40.00 × 30.00 × 5.00 mm'), s.text.replace(/\s+/g, ' ').slice(0, 90));
await shot('11-messen-flaeche');
// 3) Zweite Fläche: Abstand der parallelen Ebenen, Beschriftung im Viewer
@@ -72,8 +72,8 @@ try {
await result(() => !!window.__t.measure().result?.pair);
s = await ms();
check('Zweiter Klick auf die Oberseite des Blocks: Abstand der Ebenen 15,00 mm, parallel', Math.abs((s.result?.pair?.planes?.value ?? 0) - 15) < 1e-9
- && s.text.includes('Abstand der Ebenen') && s.text.includes('15,00 mm') && s.text.includes('0° (parallel)'), s.error || s.text.replace(/\s+/g, ' ').slice(0, 90));
- check('Im Viewer: Beschriftung „15,00 mm" und zwei Messpunkte', await ev(() => document.querySelector('.v-label')?.textContent === '15,00 mm' && document.querySelectorAll('.v-pt').length === 2));
+ && s.text.includes('Distance between planes') && s.text.includes('15.00 mm') && s.text.includes('0° (parallel)'), s.error || s.text.replace(/\s+/g, ' ').slice(0, 90));
+ check('Im Viewer: Beschriftung „15.00 mm" und zwei Messpunkte', await ev(() => document.querySelector('.v-label')?.textContent === '15.00 mm' && document.querySelectorAll('.v-pt').length === 2));
await shot('12-messen-abstand');
// 4) Kanten: obere Ränder der beiden Bohrungen (Kreise). Dritter Klick beginnt von vorn.
@@ -82,24 +82,24 @@ try {
await clickAt(left.screen);
await result(() => !!window.__t.measure().result && !window.__t.measure().b && window.__t.measure().a?.kind === 'edge');
s = await ms();
- check('Klick auf den Rand der linken Bohrung: Kante Kreis, Ø 6,00 mm', s.result?.a.type === 'CIRCLE' && Math.abs(s.result.a.radius - 3) < 1e-9 && s.text.includes('Ø 6,00 mm'),
+ check('Klick auf den Rand der linken Bohrung: Kante Kreis, Ø 6.00 mm', s.result?.a.type === 'CIRCLE' && Math.abs(s.result.a.radius - 3) < 1e-9 && s.text.includes('Ø 6.00 mm'),
s.error || `${s.a?.kind} ${s.result?.a.type}`);
await clickAt(right.screen);
await result(() => !!window.__t.measure().result?.pair);
s = await ms();
- check('Rand der rechten Bohrung dazu: Abstand der Mittelpunkte 20,00 mm', Math.abs((s.result?.pair?.axes?.value ?? 0) - 20) < 1e-9 && s.text.includes('Abstand der Mittelpunkte'),
+ check('Rand der rechten Bohrung dazu: Abstand der Mittelpunkte 20.00 mm', Math.abs((s.result?.pair?.axes?.value ?? 0) - 20) < 1e-9 && s.text.includes('Distance between centers'),
s.error || s.text.replace(/\s+/g, ' ').slice(0, 90));
await shot('13-messen-bohrungen');
// 5) An den Agenten
const tid = await ev(() => window.__t.terminals.activeId);
await domClick('btn-measure-agent');
- await waitFor('Messung im Terminal', (id) => window.__t.termText(id).includes('[Messung:'), 10000, tid).catch(() => {});
+ await waitFor('Messung im Terminal', (id) => window.__t.termText(id).includes('[Measurement:'), 10000, tid).catch(() => {});
const txt = await ev((id) => window.__t.termText(id), tid);
// Den genauen Text prüft das Werkzeug selbst: Im Terminal kann beim Zeilenumbruch der Darstellung ein Zeichen fehlen
const agentText = (await ms()).agentText ?? '';
- check('„An Agent geben": Text mit Bauteil, Elementen und Wert (Punkt als Dezimalzeichen), steht im Terminal',
- agentText.startsWith('[Messung: Bauteil "Platte" Kante Kreis und Bauteil "Platte" Kante Kreis: Abstand der Mittelpunkte 20.000 mm') && txt.includes('[Messung: Bauteil'),
+ check('„Send to agent": Text mit Bauteil, Elementen und Wert (Punkt als Dezimalzeichen), steht im Terminal',
+ agentText.startsWith('[Measurement: part "Platte" edge (circle) and part "Platte" edge (circle): Distance between centers 20.000 mm') && txt.includes('[Measurement: part'),
agentText.slice(0, 90));
await ev((id) => window.soma.term.write(id, '\x03'), tid);
@@ -115,13 +115,13 @@ try {
await page.click(cornerR.screen.x + 4, cornerR.screen.y + 3); // knapp daneben: Der Punkt wird trotzdem gefasst
await result(() => window.__t.measure().a?.kind === 'vertex' && !!window.__t.measure().result && !window.__t.measure().b);
s = await ms();
- check('Klick nahe einer Ecke fasst den Punkt (vor den Kanten dort): X 20,00 · Y −15,00 · Z 5,00', s.a?.kind === 'vertex' && s.result?.a.type === 'VERTEX'
- && s.text.includes('Punkt') && s.text.includes('−15,00 mm') && await ev(() => document.querySelector('.v-label')?.textContent === 'X 20,00 · Y −15,00 · Z 5,00'),
+ check('Klick nahe einer Ecke fasst den Punkt (vor den Kanten dort): X 20.00 · Y −15.00 · Z 5.00', s.a?.kind === 'vertex' && s.result?.a.type === 'VERTEX'
+ && s.text.includes('Point') && s.text.includes('−15.00 mm') && await ev(() => document.querySelector('.v-label')?.textContent === 'X 20.00 · Y −15.00 · Z 5.00'),
s.error || `${s.a?.kind} ${s.text.replace(/\s+/g, ' ').slice(0, 60)}`);
await clickAt(cornerL.screen);
await result(() => !!window.__t.measure().result?.pair);
s = await ms();
- check('Zweiter Punkt: Abstand der Punkte 40,00 mm (ΔX −40,00)', Math.abs((s.result?.pair?.points?.value ?? 0) - 40) < 1e-9 && s.text.includes('Abstand der Punkte') && s.text.includes('40,00 mm') && s.text.includes('ΔX −40,00'),
+ check('Zweiter Punkt: Abstand der Punkte 40.00 mm (ΔX −40.00)', Math.abs((s.result?.pair?.points?.value ?? 0) - 40) < 1e-9 && s.text.includes('Distance between points') && s.text.includes('40.00 mm') && s.text.includes('ΔX −40.00'),
s.error || s.text.replace(/\s+/g, ' ').slice(0, 80));
await shot('14-messen-punkte');
await clickAt(cornerR.screen);
@@ -129,8 +129,8 @@ try {
await clickAt(blockTop.screen);
await result(() => !!window.__t.measure().result?.pair);
s = await ms();
- check('Punkt und Fläche: Abstand zur Ebene 15,00 mm', Math.abs((s.result?.pair?.toPlane?.value ?? 0) - 15) < 1e-9 && s.text.includes('Abstand zur Ebene'), s.error || s.text.replace(/\s+/g, ' ').slice(0, 80));
- check('Text für den Agenten nennt den Punkt mit Lage', (s.agentText ?? '').startsWith('[Messung: Bauteil "Platte" Punkt und Bauteil "Block" Fläche eben: Abstand zur Ebene 15.000 mm'), (s.agentText ?? '').slice(0, 90));
+ check('Punkt und Fläche: Abstand zur Ebene 15.00 mm', Math.abs((s.result?.pair?.toPlane?.value ?? 0) - 15) < 1e-9 && s.text.includes('Distance to plane'), s.error || s.text.replace(/\s+/g, ' ').slice(0, 80));
+ check('Text für den Agenten nennt den Punkt mit Lage', (s.agentText ?? '').startsWith('[Measurement: part "Platte" point and part "Block" face (plane): Distance to plane 15.000 mm'), (s.agentText ?? '').slice(0, 90));
const probeV = await ev((q) => window.__t.viewer.probe(q.x, q.y), cornerHidden.screen);
check('Verdeckte Ecke lässt sich nicht fassen', !!probeV && !(probeV.kind === 'vertex' && probeV.id === cornerHidden.id), probeV ? `${probeV.kind} ${probeV.type}` : 'nichts');
@@ -151,7 +151,7 @@ try {
fs.writeFileSync(path.join(proj.dir, 'model.py'), MODEL.replace('translate((45, 0, 15))', 'translate((45, 0, 18))'));
await waitFor('neu gebaut', () => window.__t.status().state === 'ok' && !window.__t.measure().a, 60000).catch(() => {});
s = await ms();
- check('Neuer Build: Messung zurückgesetzt, Modus bleibt an', s.active && !s.a && !s.result && s.text.includes('Klick auf einen Punkt'));
+ check('Neuer Build: Messung zurückgesetzt, Modus bleibt an', s.active && !s.a && !s.result && s.text.includes('Click a point'));
const blockTop2 = await topFace('Block', 23);
await clickAt(plateTop.screen);
await result(() => !!window.__t.measure().result);
diff --git a/app/test/packages.mjs b/app/test/packages.mjs
index ae6bedd..8541825 100644
--- a/app/test/packages.mjs
+++ b/app/test/packages.mjs
@@ -127,7 +127,7 @@ try {
await app.answers([0]);
const restored = await ev((h) => window.soma.versions.restore(h), first);
check('Startstand wiederhergestellt', !restored.error && !restored.cancelled, JSON.stringify(restored).slice(0, 120));
- await waitFor('Build nach Wiederherstellung', () => window.__t.status().state === 'ok' && !window.__t.status().text.includes('Installiert'), 90000).catch(() => {});
+ await waitFor('Build nach Wiederherstellung', () => window.__t.status().state === 'ok' && !window.__t.status().text.includes('Installing packages'), 90000).catch(() => {});
await sleep(1500);
check('Startstand hat keine requirements.txt, und der Build legt keine an (Paket nur noch installiert)', !fs.existsSync(req) && fs.existsSync(path.join(site, 'somatestpkg')));
check('Nach dem Wiederherstellen keine ungespeicherte Änderung durch die Paketliste', !(await g('status', '--porcelain')).includes('requirements.txt'));
@@ -150,10 +150,10 @@ try {
let sawInstalling = false;
for (const t0 = Date.now(); Date.now() - t0 < 120000; await sleep(150)) {
const st = await ev(() => ({ id: window.__t.project()?.id, ...window.__t.status(), parts: window.__t.partCount() }));
- if (st.id === proj.id && st.text.startsWith('Installiert Pakete')) sawInstalling = true;
- if (st.id === proj.id && st.state === 'ok' && st.parts === 2 && !st.text.startsWith('Installiert')) break;
+ if (st.id === proj.id && st.text.startsWith('Installing packages')) sawInstalling = true;
+ if (st.id === proj.id && st.state === 'ok' && st.parts === 2 && !st.text.startsWith('Installing packages')) break;
}
- check('Beim Öffnen zeigt die Statuszeile „Installiert Pakete …“', sawInstalling);
+ check('Beim Öffnen zeigt die Statuszeile „Installing packages …“', sawInstalling);
const dir2 = (await ev(() => window.__t.project())).dir; // neue App-Daten, also ein anderer Arbeitsordner
const site2 = path.join(dir2, '.soma', 'env', 'Lib', 'site-packages');
const req2 = path.join(dir2, 'requirements.txt');
@@ -174,7 +174,7 @@ try {
await sleep(600);
await app.screenshot(path.join(APP, 'test', 'shots', 'packages-fehler.png')).catch((e) => console.log('Screenshot:', e.message));
}
- await waitFor('Build danach', () => window.__t.status().state === 'ok' && !window.__t.status().text.includes('Installiert'), 90000).catch(() => {});
+ await waitFor('Build danach', () => window.__t.status().state === 'ok' && !window.__t.status().text.includes('Installing packages'), 90000).catch(() => {});
await sleep(1000);
check('Build läuft trotzdem, die Liste behält das fehlende Paket', (await ev(() => window.__t.status().state)) === 'ok' && /^somamissing==2\.0$/m.test(reqText(req2)) && /^somatestpkg==1\.0$/m.test(reqText(req2)), reqText(req2).split('\n').slice(2).join(' | '));
diff --git a/app/test/section.mjs b/app/test/section.mjs
index 0cc8b58..6d84889 100644
--- a/app/test/section.mjs
+++ b/app/test/section.mjs
@@ -57,16 +57,16 @@ try {
await domClick('btn-section');
let s = await sec();
let v = await vs();
- check('„Schnitt": Karte offen, Ebene X in der Mitte (X = 14), weggeschnitten X > 14', s.active && s.axis === 'x' && near(s.value, 14, 1e-3)
- && vecNear(v.plane?.normal, [-1, 0, 0]) && near(v.plane.constant, 14, 1e-3) && s.text.includes('Weggeschnitten: X > 14,00 mm')
+ check('„Section": Karte offen, Ebene X in der Mitte (X = 14), weggeschnitten X > 14', s.active && s.axis === 'x' && near(s.value, 14, 1e-3)
+ && vecNear(v.plane?.normal, [-1, 0, 0]) && near(v.plane.constant, 14, 1e-3) && s.text.includes('Cut away: X > 14.00 mm')
&& await ev(() => document.getElementById('btn-section').getAttribute('aria-pressed') === 'true'), JSON.stringify(v.plane));
check('Alle Bauteile geschnitten, beide mit Deckel, Kontur vorhanden', v.clipped && v.capped.length === 2 && v.contour >= 8, JSON.stringify(v));
// 2) Lage eingeben (Enter), Pfeiltasten in 1- und 10-mm-Schritten
await setValue('0');
s = await sec();
- check('Eingabe „0" + Enter: Ebene bei X = 0, das Feld zeigt danach „0,00"', near(s.value, 0) && near((await vs()).plane.constant, 0) && s.text.includes('X > 0,00 mm')
- && await ev(() => document.getElementById('section-value').value) === '0,00');
+ check('Eingabe „0" + Enter: Ebene bei X = 0, das Feld zeigt danach „0.00"', near(s.value, 0) && near((await vs()).plane.constant, 0) && s.text.includes('X > 0.00 mm')
+ && await ev(() => document.getElementById('section-value').value) === '0.00');
await ev(() => {
const i = document.getElementById('section-value');
i.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowUp', bubbles: true }));
@@ -74,15 +74,17 @@ try {
});
s = await sec();
check('Pfeil hoch: +1 mm, mit Umschalt +10 mm', near(s.value, 11), String(s.value));
- await setValue('−2,5');
- check('Eingabe mit Minuszeichen und Komma: „−2,5" ergibt X = −2.5', near((await sec()).value, -2.5), String((await sec()).value));
+ await setValue('−2.5');
+ check('Eingabe mit Minuszeichen und Punkt: „−2.5" ergibt X = −2.5', near((await sec()).value, -2.5), String((await sec()).value));
+ await setValue('−3,5');
+ check('Ein Komma als Dezimaltrenner geht weiter: „−3,5" ergibt X = −3.5', near((await sec()).value, -3.5), String((await sec()).value));
await setValue('0');
// 3) Blick auf den Schnitt: Kamera von der weggeschnittenen Seite (+X)
await domClick('btn-section-look');
await settle();
const dir = (await ev(() => window.__t.viewer.viewState())).dir;
- check('„Blick auf den Schnitt": Kamera blickt von +X senkrecht auf die Ebene', vecNear(dir, [1, 0, 0], 1e-3), JSON.stringify(dir));
+ check('„Look at section": Kamera blickt von +X senkrecht auf die Ebene', vecNear(dir, [1, 0, 0], 1e-3), JSON.stringify(dir));
await ev((id) => window.__t.viewer.setView('right', [id]), ids.Kasten);
await sleep(300);
await shot('schnitt-1-x');
@@ -99,8 +101,8 @@ try {
await clickAt(wall);
await waitFor('Auswahl', () => window.__t.info().startsWith('Kasten'), 5000);
let pk = await ev(() => window.__t.pick());
- check('Klick auf die Schnittfläche: Kasten gewählt, „Schnittfläche · ganzes Bauteil"', pk?.cut === true && pk.faceId == null
- && (await ev(() => window.__t.info())).includes('Schnittfläche · ganzes Bauteil'), JSON.stringify(pk));
+ check('Klick auf die Schnittfläche: Kasten gewählt, „Cut face · whole part"', pk?.cut === true && pk.faceId == null
+ && (await ev(() => window.__t.info())).includes('Cut face · whole part'), JSON.stringify(pk));
await clickAt(hollow);
await waitFor('Fläche gewählt', () => window.__t.pick()?.faceId != null, 5000);
pk = await ev(() => window.__t.pick());
@@ -115,26 +117,26 @@ try {
await clickAt(wall);
await sleep(300);
m = await ev(() => window.__t.measure());
- check('Klick auf die Schnittfläche selbst: Hinweis, die Messung bleibt', !!m.a && !m.b && m.text.includes('Schnittfläche selbst lässt sich nicht messen'), m.text.slice(0, 120));
+ check('Klick auf die Schnittfläche selbst: Hinweis, die Messung bleibt', !!m.a && !m.b && m.text.includes('section face itself cannot be measured'), m.text.slice(0, 120));
await clickAt(await screen([0, 11, 10]));
await waitFor('Messung A–B', () => !!window.__t.measure().result?.pair, 60000);
m = await ev(() => window.__t.measure());
- check('Innere Schnittkontur: Abstand der Ebenen 4,00 mm (Wandstärke)', near(m.result?.pair?.planes?.value ?? 0, 4, 1e-6) && m.text.includes('4,00 mm'), m.error || m.text.replace(/\s+/g, ' ').slice(0, 120));
+ check('Innere Schnittkontur: Abstand der Ebenen 4.00 mm (Wandstärke)', near(m.result?.pair?.planes?.value ?? 0, 4, 1e-6) && m.text.includes('4.00 mm'), m.error || m.text.replace(/\s+/g, ' ').slice(0, 120));
await shot('schnitt-2-messen');
await domClick('btn-measure');
// 7) Seite wechseln
await domClick('btn-section-flip');
v = await vs();
- check('„Seite wechseln": jetzt fällt X < 0 weg', vecNear(v.plane.normal, [1, 0, 0]) && near(v.plane.constant, 0) && (await sec()).text.includes('X < 0,00 mm'));
- check('Text für den Agenten nennt Ebene und weggeschnittene Seite', (await sec()).agent === 'Schnittansicht bei X = 0.000 mm, weggeschnitten ist X < 0.000', (await sec()).agent);
+ check('„Flip side": jetzt fällt X < 0 weg', vecNear(v.plane.normal, [1, 0, 0]) && near(v.plane.constant, 0) && (await sec()).text.includes('X < 0.00 mm'));
+ check('Text für den Agenten nennt Ebene und weggeschnittene Seite', (await sec()).agent === 'section view at X = 0.000 mm, X < 0.000 is cut away', (await sec()).agent);
// 8) An einer Fläche ausrichten: erst die Bohrung (nicht eben), dann die Oberseite des Blocks
await ev(() => window.__t.viewer.setView('iso'));
await sleep(300);
await ev(() => document.querySelector('#section-axes [data-axis="face"]').click());
s = await sec();
- check('„Fläche": wartet auf einen Klick, Hinweis in der Karte', s.picking && (await vs()).picking && s.text.includes('Ebene Fläche im Modell anklicken'));
+ check('„Face": wartet auf einen Klick, Hinweis in der Karte', s.picking && (await vs()).picking && s.text.includes('Click a planar face in the model'));
await ev(() => window.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape' })));
s = await sec();
check('Escape bricht das Anklicken ab, die Ebene bleibt bei X', !s.picking && !(await vs()).picking && s.axis === 'x');
@@ -142,23 +144,23 @@ try {
await clickAt(await screen([40, 3, 9]));
await sleep(200);
s = await sec();
- check('Klick in die Bohrung: „keine ebene Fläche", wartet weiter', s.picking && s.text.includes('keine ebene Fläche'), s.text.slice(0, 120));
+ check('Klick in die Bohrung: „not a planar face", wartet weiter', s.picking && s.text.includes('not a planar face'), s.text.slice(0, 120));
await clickAt(await screen([44, -4, 10]));
await sleep(200);
s = await sec();
v = await vs();
check('Oberseite des Blocks: Ebene parallel dazu, mitten durch den Block (z = 5, Tiefe 5 mm)', !s.picking && s.axis === 'face' && vecNear(s.face?.normal, [0, 0, 1])
- && vecNear(v.plane.normal, [0, 0, -1]) && near(v.plane.constant, 5, 1e-3) && near(s.shown, 5, 1e-3) && s.text.includes('Tiefe') && s.text.includes('„Block“'), JSON.stringify({ v: v.plane, s: s.face }));
+ && vecNear(v.plane.normal, [0, 0, -1]) && near(v.plane.constant, 5, 1e-3) && near(s.shown, 5, 1e-3) && s.text.includes('Depth') && s.text.includes('“Block”'), JSON.stringify({ v: v.plane, s: s.face }));
await setValue('2');
v = await vs();
check('Tiefe 2 mm: Ebene bei z = 8', near(v.plane.constant, 8, 1e-6), JSON.stringify(v.plane));
- check('Text für den Agenten: Ebene durch einen Punkt, Fläche, Richtung', /^Schnittansicht, Ebene durch \(40\.000, 0\.000, 8\.000\) mm parallel zu einer Fläche von "Block", weggeschnitten ist die Seite in Richtung \(0, 0, 1\)$/.test((await sec()).agent ?? ''), (await sec()).agent);
+ check('Text für den Agenten: Ebene durch einen Punkt, Fläche, Richtung', /^section view, plane through \(40\.000, 0\.000, 8\.000\) mm parallel to a face of "Block", the side towards \(0, 0, 1\) is cut away$/.test((await sec()).agent ?? ''), (await sec()).agent);
await shot('schnitt-3-flaeche');
// 9) Ebene Z
await ev(() => document.querySelector('#section-axes [data-axis="z"]').click());
v = await vs();
- check('Ebene Z: mitten durch das Modell (z = 10), oben fällt weg', vecNear(v.plane.normal, [0, 0, -1]) && near(v.plane.constant, 10, 1e-3) && (await sec()).text.includes('Z > 10,00 mm'), JSON.stringify(v.plane));
+ check('Ebene Z: mitten durch das Modell (z = 10), oben fällt weg', vecNear(v.plane.normal, [0, 0, -1]) && near(v.plane.constant, 10, 1e-3) && (await sec()).text.includes('Z > 10.00 mm'), JSON.stringify(v.plane));
// 10) Neuer Build: Der Schnitt bleibt, Deckel und Kontur passen zum neuen Modell
fs.writeFileSync(path.join(proj.dir, 'model.py'), MODEL(14));
@@ -173,7 +175,7 @@ try {
await domClick('btn-section');
v = await vs();
s = await sec();
- check('„Schnitt" aus: keine Ebene, keine Deckel, keine Kontur, Karte zu', !s.active && !v.plane && !v.capped.length && !v.contour
+ check('„Section" aus: keine Ebene, keine Deckel, keine Kontur, Karte zu', !s.active && !v.plane && !v.capped.length && !v.contour
&& await ev(() => document.getElementById('section-card').hidden), JSON.stringify(v));
await ev((id) => { window.__t.viewer.setVisible(id, false); }, ids.Block); // stünde sonst vor der Wand
await ev((id) => window.__t.viewer.setView('right', [id]), ids.Kasten);
diff --git a/app/test/skills.mjs b/app/test/skills.mjs
index 542c018..fbe0dd9 100644
--- a/app/test/skills.mjs
+++ b/app/test/skills.mjs
@@ -68,9 +68,9 @@ try {
let s = await st();
const ORDER = 'konstruktionsablauf,cadquery,3d-druck,harz-pulver,cnc,laser,blech,toleranzen,verbindungen,normteile,festigkeit,baugruppen,analyse,animation,fem';
const heads = await ev(() => [...document.querySelectorAll('#skills-list .sk-cat')].map((h) => h.textContent).join(','));
- check('Panel „Skills": Überschriften Arbeitsweise, Fertigungsverfahren, Konstruktionswissen, Prüfen und Zeigen, darunter die Skills nach `order`',
- s.skills.map((x) => x.id).join(',') === ORDER && heads === 'Arbeitsweise,Fertigungsverfahren,Konstruktionswissen,Prüfen und Zeigen'
- && s.text.includes('3D-Druck (FDM)') && s.text.includes('Laserschneiden'), `${heads} | ${s.skills.map((x) => x.id).join(',')}`);
+ check('Panel „Skills": Überschriften Way of working, Manufacturing, Design knowledge, Check and present, darunter die Skills nach `order`',
+ s.skills.map((x) => x.id).join(',') === ORDER && heads === 'Way of working,Manufacturing,Design knowledge,Check and present'
+ && s.text.includes('3D printing (FDM)') && s.text.includes('Laser cutting'), `${heads} | ${s.skills.map((x) => x.id).join(',')}`);
await shot('skills-1-panel');
// Neues Modell (E46, E48, E55): Arbeitsweise und Normteile immer, alle übrigen bei Bedarf, schon im Startcommit
@@ -96,8 +96,8 @@ try {
check('Zeile mit Stufen-Schalter, Klick auf die Zeile öffnet die Karte mit drei Stufen, die eingestellte gewählt', await ev(() => {
document.querySelector('#skills-list .sk-row[data-id="3d-druck"] .sk-open').click();
const row = document.querySelector('#skills-list .sk-row[data-id="3d-druck"]'); // die Liste wird neu gezeichnet
- const ok = [...document.querySelectorAll('#skill-detail .sk-mode button')].map((b) => `${b.textContent}:${b.getAttribute('aria-checked')}`).join(',') === 'Aus:false,Bei Bedarf:true,Immer:false'
- && row.classList.contains('demand') && row.classList.contains('sel') && row.querySelector('.sk-lvl').textContent === 'Bei Bedarf'
+ const ok = [...document.querySelectorAll('#skill-detail .sk-mode button')].map((b) => `${b.textContent}:${b.getAttribute('aria-checked')}`).join(',') === 'Off:false,On demand:true,Always:false'
+ && row.classList.contains('demand') && row.classList.contains('sel') && row.querySelector('.sk-lvl').textContent === 'On demand'
&& document.querySelector('#skills-list .sk-row[data-id="cadquery"] .sk-lvl').classList.contains('always');
row.querySelector('.sk-open').click();
return ok && document.getElementById('skill-detail').hidden;
@@ -107,7 +107,7 @@ try {
await setMode('laser', 'off');
check('Laserschneiden aus: Kopie weg, ohne Sicherung, nicht mehr in project.json und AGENTS.md', read('.soma/skills/laser.md') === null && !fs.existsSync(bdir)
&& !(pj().skills_on_demand ?? []).includes('laser') && !(block() ?? '').includes('laser.md') && !(await skill('laser')).problems.length
- && (await ev(() => window.__t.toast())).text.includes('ist aus'), JSON.stringify(pj().skills_on_demand));
+ && (await ev(() => window.__t.toast())).text.includes('is off'), JSON.stringify(pj().skills_on_demand));
// Bei Bedarf → Immer: Kopie ohne Hinweis, project.json (und App-Kopie), Liste „Immer“ in AGENTS.md, als Änderung sichtbar
await setMode('3d-druck', 'always');
@@ -122,14 +122,14 @@ try {
&& JSON.stringify(JSON.parse(fs.readFileSync(path.join(ud, 'projects', `${proj.id}.json`), 'utf8')).skills_on_demand) === JSON.stringify(pj().skills_on_demand));
check('AGENTS.md führt ihn unter „Always follow“ (Pfad und englischer Name), der Rest der Datei bleibt', always().includes('- `.soma/skills/3d-druck.md`: 3D printing (FDM)')
&& !demand().includes('3d-druck') && (read('AGENTS.md') ?? '').startsWith('# Instructions for the coding agent') && (read('AGENTS.md') ?? '').includes('## Version history (git)'), String(block()));
- check('Meldung: gilt immer, steht in AGENTS.md, Hinweis auf laufenden Agenten', (await ev(() => window.__t.toast())).text.includes('gilt jetzt immer und steht in AGENTS.md'));
+ check('Meldung: gilt immer, steht in AGENTS.md, Hinweis auf laufenden Agenten', (await ev(() => window.__t.toast())).text.includes('now always applies and is listed in AGENTS.md'));
await waitFor('ungespeichert', () => window.__t.saveState()?.dirtyFiles >= 3, 10000).catch(() => {});
check('Zählt als ungespeicherte Änderung (Kopie, project.json, AGENTS.md)', (await ev(() => window.__t.saveState())).dirtyFiles >= 3, String((await ev(() => window.__t.saveState())).dirtyFiles));
// 3) Ansehen (nur lesen) und An Agent geben
await ev(() => window.__t.openSkill('3d-druck'));
await shot('skills-2-aktiv');
- await ev(() => [...document.querySelectorAll('#skill-detail .sk-actions button')].find((b) => b.textContent.includes('ansehen')).click());
+ await ev(() => [...document.querySelectorAll('#skill-detail .sk-actions button')].find((b) => b.textContent.includes('View file')).click());
await waitFor('Code-Panel', () => window.__t.editor.state().file === '.soma/skills/3d-druck.md', 10000);
const ed = await ev(() => window.__t.editor.state());
check('„Ansehen": Kopie im Code-Panel, nur lesen, mit Grund', ed.readOnly && ed.text.includes('# Skill: 3D printing (FDM)') && (ed.locked ?? '').includes('Skill'), JSON.stringify({ ro: ed.readOnly, locked: ed.locked }));
@@ -137,14 +137,14 @@ try {
await waitFor('Karte noch offen', () => document.querySelector('#skill-detail')?.dataset.id === '3d-druck' && !document.getElementById('skill-detail').hidden, 10000);
// Eingefügten Text mitschneiden (im Terminal bricht die lange Eingabezeile um)
await ev(() => { const tm = window.__t.terminals; const orig = tm.insert.bind(tm); tm.insert = (x) => { window.__inserted = x; return orig(x); }; });
- await ev(() => [...document.querySelectorAll('#skill-detail .sk-actions button')].find((b) => b.textContent.includes('An Agent')).click());
+ await ev(() => [...document.querySelectorAll('#skill-detail .sk-actions button')].find((b) => b.textContent.includes('Send to agent')).click());
await sleep(300);
- check('„An Agent geben" fügt [Skill: .soma/skills/3d-druck.md] ein', (await ev(() => window.__t.toast())).text.includes('In die Eingabe von')
+ check('„Send to agent" fügt [Skill: .soma/skills/3d-druck.md] ein', (await ev(() => window.__t.toast())).text.includes('Added to the input of')
&& await ev(() => window.__inserted) === '[Skill: .soma/skills/3d-druck.md] ', await ev(() => window.__inserted));
// 3b) Einstellungen: Max. Überhang auf 50° (Wunsch des Nutzers), Werte landen in project.json und in der Kopie
- check('Aufgeklappt: Einstellungen mit Standardwerten (Max. Überhang 45°, Düse 0,4 mm, Material PLA)', await ev(() =>
- document.getElementById('sk-3d-druck-overhang')?.value === '45' && document.getElementById('sk-3d-druck-nozzle')?.value === '0,4' && document.getElementById('sk-3d-druck-material')?.value === 'PLA'));
+ check('Aufgeklappt: Einstellungen mit Standardwerten (Max. overhang angle 45°, Nozzle 0.4 mm, Material PLA)', await ev(() =>
+ document.getElementById('sk-3d-druck-overhang')?.value === '45' && document.getElementById('sk-3d-druck-nozzle')?.value === '0.4' && document.getElementById('sk-3d-druck-material')?.value === 'PLA'));
await setVar('3d-druck', 'overhang', '50');
await waitFor('Überhang 50', () => window.__t.skills().skills.find((x) => x.id === '3d-druck')?.vars.overhang === 50, 10000);
let c3 = read('.soma/skills/3d-druck.md') ?? '';
@@ -152,13 +152,13 @@ try {
&& c3.includes('Overhangs up to 50° from vertical') && c3.includes('| Max. overhang without support | 50° from vertical |') && c3.includes('var overhang: 50 |') && c3.includes('MAX_OVERHANG = 50')
&& !(await skill('3d-druck')).changed, JSON.stringify(settings()));
s = await st();
- check('Kurzbeschreibung „Überhänge bis 50°", die Zeile nennt „50° · angepasst", Rücksetzknopf in der Karte', s.skills.find((x) => x.id === '3d-druck').summary.includes('Überhänge bis 50°')
- && s.text.includes('50° · angepasst') && s.detail.includes('1 angepasst')
+ check('Kurzbeschreibung „overhangs up to 50°", die Zeile nennt „50° · customized", Rücksetzknopf in der Karte', s.skills.find((x) => x.id === '3d-druck').summary.includes('overhangs up to 50°')
+ && s.text.includes('50° · customized') && s.detail.includes('1 customized')
&& await ev(() => !document.querySelector('#skill-detail .sk-var[data-var="overhang"] .sk-reset').hidden && document.querySelector('#skill-detail .sk-var[data-var="nozzle"] .sk-reset').hidden), s.skills[0].summary);
- check('Meldung nennt Wert und Datei', (await ev(() => window.__t.toast())).text.includes('Max. Überhangwinkel 50°. Steht in .soma/skills/3d-druck.md'), (await ev(() => window.__t.toast())).text);
+ check('Meldung nennt Wert und Datei', (await ev(() => window.__t.toast())).text.includes('Max. overhang angle 50°. Written to .soma/skills/3d-druck.md'), (await ev(() => window.__t.toast())).text);
await setVar('3d-druck', 'overhang', '95');
await waitFor('Fehlermeldung', () => window.__t.toast().error, 5000).catch(() => {});
- check('95° außerhalb des Bereichs: abgelehnt mit Grund, 50° bleibt', (await ev(() => window.__t.toast())).text.includes('erlaubt sind 10 bis 85°')
+ check('95° außerhalb des Bereichs: abgelehnt mit Grund, 50° bleibt', (await ev(() => window.__t.toast())).text.includes('must be between 10 and 85°')
&& await varOf('3d-druck', 'overhang') === 50 && JSON.stringify(settings()) === '{"3d-druck":{"overhang":50}}'
&& await ev(() => document.getElementById('sk-3d-druck-overhang').value) === '50', (await ev(() => window.__t.toast())).text);
await setVar('3d-druck', 'material', 'PETG');
@@ -167,21 +167,21 @@ try {
await waitFor('Düse', () => window.__t.skills().skills.find((x) => x.id === '3d-druck')?.vars.nozzle === 0.6, 10000);
c3 = read('.soma/skills/3d-druck.md') ?? '';
check('Auswahl (PETG) und Zahl mit Komma (0,6): in der Kopie mit Punkt', c3.includes('| Material | PETG |') && c3.includes('| Nozzle | 0.6 mm |') && c3.includes('NOZZLE = 0.6')
- && await ev(() => document.getElementById('sk-3d-druck-nozzle').value) === '0,6');
- await ev(() => [...document.querySelectorAll('#skill-detail .sk-actions button')].find((b) => b.textContent.includes('An Agent')).click());
+ && await ev(() => document.getElementById('sk-3d-druck-nozzle').value) === '0.6');
+ await ev(() => [...document.querySelectorAll('#skill-detail .sk-actions button')].find((b) => b.textContent.includes('Send to agent')).click());
await sleep(300);
- check('„An Agent geben" nennt die geänderten Einstellungen (Zahlen mit Punkt)', await ev(() => window.__inserted)
- === '[Skill: .soma/skills/3d-druck.md, Einstellungen: Material = PETG, Düse = 0.6 mm, Max. Überhangwinkel = 50°] ', await ev(() => window.__inserted));
+ check('„Send to agent" nennt die geänderten Einstellungen (Zahlen mit Punkt)', await ev(() => window.__inserted)
+ === '[Skill: .soma/skills/3d-druck.md, settings: Material = PETG, Nozzle = 0.6 mm, Max. overhang angle = 50°] ', await ev(() => window.__inserted));
await ev(() => document.querySelector('#skill-detail .sk-var[data-var="nozzle"] .sk-reset').click());
await waitFor('Düse zurück', () => window.__t.skills().skills.find((x) => x.id === '3d-druck')?.vars.nozzle === 0.4, 10000);
- check('Zurück auf den Standard: Düse 0,4 mm, aus project.json entfernt, Kopie wieder 0.4', settings()['3d-druck']?.overhang === 50 && settings()['3d-druck']?.material === 'PETG' && !('nozzle' in (settings()['3d-druck'] ?? {}))
+ check('Zurück auf den Standard: Düse 0.4 mm, aus project.json entfernt, Kopie wieder 0.4', settings()['3d-druck']?.overhang === 50 && settings()['3d-druck']?.material === 'PETG' && !('nozzle' in (settings()['3d-druck'] ?? {}))
&& (read('.soma/skills/3d-druck.md') ?? '').includes('| Nozzle | 0.4 mm |'), JSON.stringify(settings()));
// Ausgeschalteter Skill: Werte lassen sich vorab einstellen und gelten beim Einschalten
await ev(() => window.__t.openSkill('laser'));
await setVar('laser', 'thickness', '4');
await waitFor('Platte 4', () => window.__t.skills().skills.find((x) => x.id === 'laser')?.vars.thickness === 4, 10000);
check('Laserschneiden (aus): Plattenstärke 4 mm gespeichert, keine Datei angelegt, Hinweis „gilt, sobald nicht mehr aus"', settings().laser?.thickness === 4 && read('.soma/skills/laser.md') === null
- && (await ev(() => window.__t.toast())).text.includes('Gilt, sobald der Skill nicht mehr aus ist'));
+ && (await ev(() => window.__t.toast())).text.includes('Applies as soon as the skill is no longer off'));
await shot('skills-3-einstellungen');
// Einstellung bei Bedarf: Der Hinweis nennt den gesetzten Wert, die übrigen bleiben Standard der App
await ev(() => window.__t.openSkill('festigkeit'));
@@ -190,7 +190,7 @@ try {
const fest = read('.soma/skills/festigkeit.md') ?? '';
check('Festigkeit (bei Bedarf), Sicherheit 3: Kopie mit SAFETY = 3, Hinweis nennt `safety` als vom Nutzer gesetzt, „An Agent geben“ da', fest.includes('`SAFETY = 3`')
&& fest.includes('The user set `safety` in the app.') && !(await skill('festigkeit')).changed
- && await ev(() => [...document.querySelectorAll('#skill-detail .sk-actions button')].some((b) => b.textContent.includes('An Agent'))), fest.slice(0, 400));
+ && await ev(() => [...document.querySelectorAll('#skill-detail .sk-actions button')].some((b) => b.textContent.includes('Send to agent'))), fest.slice(0, 400));
// 4) Zweiter Skill auf Immer: in AGENTS.md in der Reihenfolge des Einschaltens
await setMode('toleranzen', 'always');
@@ -201,7 +201,7 @@ try {
await setMode('normteile', 'demand');
check('Normteile bei Bedarf: Kopie mit Hinweis, Liste „Bei Bedarf“, ohne Sicherung, Meldung „nur noch bei Bedarf“', (read('.soma/skills/normteile.md') ?? '').includes('> **On demand:**')
&& demand().includes('- `.soma/skills/normteile.md`: Standard parts. Read when') && !always().includes('normteile') && !fs.existsSync(bdir)
- && (await ev(() => window.__t.toast())).text.includes('gilt nur noch bei Bedarf'), (await ev(() => window.__t.toast())).text);
+ && (await ev(() => window.__t.toast())).text.includes('now only applies on demand'), (await ev(() => window.__t.toast())).text);
// 5) Kopie geändert (etwa vom Agenten): gemeldet, beim Ausschalten in die Sicherung
fs.appendFileSync(path.join(dir, '.soma', 'skills', '3d-druck.md'), '\n- Use PETG only.\n');
@@ -209,20 +209,20 @@ try {
await ev(() => window.__t.showPanel('skills'));
await waitFor('geändert erkannt', () => window.__t.skills().skills.find((x) => x.id === '3d-druck')?.changed === true, 10000);
await ev(() => window.__t.openSkill('3d-druck'));
- check('Geänderte Kopie: „weicht ab" in der Zeile und in der Karte', (await st()).text.includes('Kopie weicht von der Fassung der App ab') && ((await st()).detail ?? '').includes('weicht von der Fassung dieser App ab'));
+ check('Geänderte Kopie: „weicht ab" in der Zeile und in der Karte', (await st()).text.includes('The copy differs from the app’s version') && ((await st()).detail ?? '').includes('differs from this app’s version'));
await setVar('3d-druck', 'overhang', '55');
await waitFor('Überhang 55', () => window.__t.skills().skills.find((x) => x.id === '3d-druck')?.vars.overhang === 55, 10000);
let backups = fs.existsSync(bdir) ? fs.readdirSync(bdir) : [];
check('Einstellung an geänderter Kopie: Kopie in die Sicherung, neu geschrieben mit 55°', backups.length === 1 && fs.readFileSync(path.join(bdir, backups[0]), 'utf8').includes('Use PETG only.')
&& !(read('.soma/skills/3d-druck.md') ?? '').includes('Use PETG only.') && (read('.soma/skills/3d-druck.md') ?? '').includes('up to 55°') && !(await skill('3d-druck')).changed
- && (await ev(() => window.__t.toast())).text.includes('Sicherung'), backups.join(','));
+ && (await ev(() => window.__t.toast())).text.includes('backup'), backups.join(','));
await setMode('3d-druck', 'off');
backups = fs.existsSync(bdir) ? fs.readdirSync(bdir) : [];
check('Ausschalten: Kopie weg, unveränderte Kopie ohne neue Sicherung, Einstellungen bleiben', read('.soma/skills/3d-druck.md') === null && backups.length === 1
&& settings()['3d-druck']?.overhang === 55, backups.join(','));
check('AGENTS.md und project.json ohne 3D-Druck, Toleranzen bleibt', !(block() ?? '').includes('3d-druck') && always().includes('toleranzen.md')
&& JSON.stringify(pj().skills) === '["konstruktionsablauf","cadquery","toleranzen"]' && !(pj().skills_on_demand ?? []).includes('3d-druck'));
- check('Meldung nennt den laufenden Agenten', /ist aus\..*Sag ihm Bescheid/.test((await ev(() => window.__t.toast())).text), (await ev(() => window.__t.toast())).text);
+ check('Meldung nennt den laufenden Agenten', /is off\..*tell it/.test((await ev(() => window.__t.toast())).text), (await ev(() => window.__t.toast())).text);
// 6) Datei eines aktiven Skills fehlt: gemeldet, nicht neu angelegt (E28)
fs.rmSync(path.join(dir, '.soma', 'skills', 'toleranzen.md'));
@@ -230,7 +230,7 @@ try {
await ev(() => window.__t.showPanel('skills'));
await waitFor('Problem gemeldet', () => window.__t.skills().skills.find((x) => x.id === 'toleranzen')?.problems.length > 0, 10000);
const info = await ev(() => window.soma.project.current());
- check('Fehlende Kopie: Hinweis in der Karte und im Projekt-Check, nichts neu angelegt', (await skill('toleranzen')).problems[0].includes('fehlt')
+ check('Fehlende Kopie: Hinweis in der Karte und im Projekt-Check, nichts neu angelegt', (await skill('toleranzen')).problems[0].includes('missing')
&& info.problems.some((p) => p.includes('toleranzen')) && read('.soma/skills/toleranzen.md') === null, JSON.stringify(info.problems));
await setMode('toleranzen', 'off');
check('Ausschalten räumt auf: kein Problem mehr, nicht mehr in AGENTS.md und project.json', !(await skill('toleranzen')).problems.length && !(block() ?? '').includes('toleranzen')
@@ -252,12 +252,12 @@ try {
await setMode('3d-druck', 'always');
check('Wieder an: Kopie mit den gespeicherten Einstellungen (55°, PETG)', (read('.soma/skills/3d-druck.md') ?? '').includes('up to 55°') && (read('.soma/skills/3d-druck.md') ?? '').includes('| Material | PETG |'));
check('Ohne AGENTS.md: Skill an, Warnung, keine neue AGENTS.md', read('AGENTS.md') === null && read('.soma/skills/3d-druck.md') !== null
- && (await ev(() => window.__t.toast())).text.includes('AGENTS.md fehlt') && (await ev(() => window.__t.toast())).error, (await ev(() => window.__t.toast())).text);
+ && (await ev(() => window.__t.toast())).text.includes('AGENTS.md is missing') && (await ev(() => window.__t.toast())).error, (await ev(() => window.__t.toast())).text);
fs.writeFileSync(path.join(dir, 'AGENTS.md'), keep);
await ev(() => window.__t.showPanel('files'));
await ev(() => window.__t.showPanel('skills'));
await waitFor('Problem AGENTS.md', () => window.__t.skills().skills.find((x) => x.id === '3d-druck')?.problems.length > 0, 10000);
- check('AGENTS.md ohne Eintrag eines aktiven Skills: gemeldet', (await skill('3d-druck')).problems.some((p) => p.includes('AGENTS.md nennt')), JSON.stringify((await skill('3d-druck')).problems));
+ check('AGENTS.md ohne Eintrag eines aktiven Skills: gemeldet', (await skill('3d-druck')).problems.some((p) => p.includes('AGENTS.md does not name')), JSON.stringify((await skill('3d-druck')).problems));
await setMode('3d-druck', 'off');
await setMode('3d-druck', 'always');
check('Aus und wieder an trägt ihn ein', !(await skill('3d-druck')).problems.length && always().includes('3d-druck.md') && demand().includes('laser.md'));
@@ -266,7 +266,7 @@ try {
await ev(() => window.__t.showPanel('files'));
await ev(() => window.__t.showPanel('skills'));
await waitFor('falsche Liste', () => window.__t.skills().skills.find((x) => x.id === 'laser')?.problems.length > 0, 10000);
- check('AGENTS.md führt einen Skill unter der falschen Stufe: gemeldet', (await skill('laser')).problems.some((p) => p.includes('unter „Immer“, eingestellt ist „Bei Bedarf“')),
+ check('AGENTS.md führt einen Skill unter der falschen Stufe: gemeldet', (await skill('laser')).problems.some((p) => p.includes('under “Always”, but it is set to “On demand”')),
JSON.stringify((await skill('laser')).problems));
await setMode('festigkeit', 'off');
check('Nächstes Umstellen schreibt den Abschnitt neu: Meldung weg', !(await skill('laser')).problems.length && demand().includes('laser.md'));
@@ -291,9 +291,9 @@ try {
};
const before = JSON.stringify(pj());
await setDefault('3d-druck', 'always');
- check('Stufe bei neuen Modellen „Immer“ (3D-Druck): in state.json, Meldung, das offene Modell unverändert', JSON.stringify(appState().skill_defaults) === '{"3d-druck":"always"}'
+ check('Stufe bei neuen Modellen „Always“ (3D-Druck): in state.json, Meldung, das offene Modell unverändert', JSON.stringify(appState().skill_defaults) === '{"3d-druck":"always"}'
&& JSON.stringify(pj()) === before && !(await ev(() => window.__t.saveState())).unsaved
- && (await ev(() => window.__t.toast())).text.includes('steht bei neuen Modellen auf „Immer“. Dieses Modell bleibt, wie es ist.'), JSON.stringify(appState().skill_defaults));
+ && (await ev(() => window.__t.toast())).text.includes('is set to “Always” for new models. This model stays as it is.'), JSON.stringify(appState().skill_defaults));
await setDefault('konstruktionsablauf', 'demand');
await setDefault('laser', 'off');
await setDefault('cadquery', 'off');
diff --git a/app/test/smoke.mjs b/app/test/smoke.mjs
index a237332..0fa0cd2 100644
--- a/app/test/smoke.mjs
+++ b/app/test/smoke.mjs
@@ -32,11 +32,11 @@ try {
const appVersion = JSON.parse(fs.readFileSync(path.join(APP, 'package.json'), 'utf8')).version;
const versionUi = await ev(() => ({ start: document.getElementById('start-version').textContent, logo: document.getElementById('btn-home').title }));
check('Version (E68): in project.json, auf der Startseite und am Logo', JSON.parse(fs.readFileSync(path.join(proj.dir, '.soma', 'project.json'), 'utf8')).app_version === appVersion
- && versionUi.start === appVersion && versionUi.logo === `Startseite · SOMA ${appVersion}`, `${appVersion} ${JSON.stringify(versionUi)}`);
+ && versionUi.start === appVersion && versionUi.logo === `Start page · SOMA ${appVersion}`, `${appVersion} ${JSON.stringify(versionUi)}`);
check('Erster Build automatisch, 2 Bauteile in der Bauteilkarte', JSON.stringify(await ev(() => window.__t.treeNames())) === '["Body","Lid"]');
check('Nach dem Build kein Fehlerhinweis', (await status()).viewerMsg === '', (await status()).text);
const okStatus = await status();
- check('Build-Anzeige oben: „Gebaut · 2 Bauteile"', okStatus.text === 'Gebaut' && okStatus.detail.startsWith('2 Bauteile'), `${okStatus.text} ${okStatus.detail}`);
+ check('Build-Anzeige oben: „Built · 2 parts"', okStatus.text === 'Built' && okStatus.detail.startsWith('2 parts'), `${okStatus.text} ${okStatus.detail}`);
// 2) Klick im Viewer -> Bauteil, Fläche, Code
const lidFace = await ev(() => {
@@ -48,10 +48,10 @@ try {
await waitFor('Info nach Klick', () => window.__t.info().includes('Lid'));
const info = await ev(() => window.__t.info());
const hl = await ev(() => window.__t.codeHighlight());
- check('Klick auf Deckel-Oberseite: Auswahlkarte mit Bauteil, Fläche, Codezeile', info.startsWith('Lid') && info.includes('Fläche · eben') && /model\.py\s*Zeile \d+/.test(info), info.replace(/\s+/g, ' ').slice(0, 60));
+ check('Klick auf Deckel-Oberseite: Auswahlkarte mit Bauteil, Fläche, Codezeile', info.startsWith('Lid') && info.includes('Face · plane') && /model\.py\s*Line \d+/.test(info), info.replace(/\s+/g, ' ').slice(0, 60));
check('Codeausschnitt: add_part("Lid") ist markiert', hl.some((l) => l.includes('add_part("Lid"')), String(hl[0]).trim().slice(0, 40));
const selText = await ev(() => window.__t.selectionText());
- check('Text für den Agenten nennt Bauteil, Datei, Zeile und Fläche', /^\[Auswahl: Bauteil "Lid", model\.py Zeile \d+.*angeklickte Fläche: eben/.test(selText), selText.slice(0, 70));
+ check('Text für den Agenten nennt Bauteil, Datei, Zeile und Fläche', /^\[Selection: part "Lid", model\.py line \d+.*clicked face: plane/.test(selText), selText.slice(0, 70));
await shot('1-arbeitsbereich');
@@ -67,7 +67,7 @@ try {
await ev(() => window.__t.showPanel('files'));
await waitFor('Dateiliste', () => window.__t.fileRows().includes('model.py'), 10000).catch(() => {});
const rows = await ev(() => window.__t.fileRows());
- check('Dateien: model.py sichtbar, AGENTS.md eingeklappt unter „Vom Programm verwaltet"', rows.includes('model.py') && rows.includes('Vom Programm verwaltet') && !rows.includes('AGENTS.md'), rows.slice(0, 6).join(','));
+ check('Dateien: model.py sichtbar, AGENTS.md eingeklappt unter „Managed by the app"', rows.includes('model.py') && rows.includes('Managed by the app') && !rows.includes('AGENTS.md'), rows.slice(0, 6).join(','));
check('Dateien und Code gleichzeitig offen, die offene Datei ist im Baum hervorgehoben', await ev(() => !document.getElementById('editor').hidden && !document.getElementById('panel-files').hidden
&& document.querySelector('#tab-files .frow.sel')?.dataset.path === 'model.py'));
await shot('3-dateien');
@@ -87,16 +87,16 @@ try {
await app.answers([path.join(expDir, 'Deckel.step')]);
const one = await ev(() => window.__t.exportAs('step', 'sel'));
const deckel = path.join(expDir, 'Deckel.step');
- check('„Exportieren" in der Auswahlkarte: Menü mit „Nur Lid“, STEP am gewählten Ort, nichts in exports/', expMenu.open && expMenu.sel === 'Nur Lid' && one.ok
+ check('„Export" in der Auswahlkarte: Menü mit „Only Lid“, STEP am gewählten Ort, nichts in exports/', expMenu.open && expMenu.sel === 'Only Lid' && one.ok
&& fs.existsSync(deckel) && fs.readFileSync(deckel, 'utf8').startsWith('ISO-10303-21') && !fs.existsSync(path.join(proj.dir, 'exports')), JSON.stringify(one).slice(0, 120));
fs.writeFileSync(path.join(expDir, 'Body.stl'), 'alt');
await app.answers([expDir, 1]);
const keptExp = await ev(() => window.__t.exportAs('stl', 'all'));
- check('Alle Bauteile in einen Ordner: vorhandene Datei nur nach Rückfrage, „Abbrechen“ schreibt nichts', keptExp.cancelled && fs.readFileSync(path.join(expDir, 'Body.stl'), 'utf8') === 'alt'
+ check('Alle Bauteile in einen Ordner: vorhandene Datei nur nach Rückfrage, „Cancel“ schreibt nichts', keptExp.cancelled && fs.readFileSync(path.join(expDir, 'Body.stl'), 'utf8') === 'alt'
&& !fs.existsSync(path.join(expDir, 'Lid.stl')), JSON.stringify(keptExp).slice(0, 100));
await app.answers([expDir, 0]);
const all = await ev(() => window.__t.exportAs('stl', 'all'));
- check('„Ersetzen“: beide Bauteile als STL im Ordner, Meldung nennt den Ordner', all.ok && all.files.length === 2 && fs.statSync(path.join(expDir, 'Body.stl')).size > 200
+ check('„Replace“: beide Bauteile als STL im Ordner, Meldung nennt den Ordner', all.ok && all.files.length === 2 && fs.statSync(path.join(expDir, 'Body.stl')).size > 200
&& fs.existsSync(path.join(expDir, 'Lid.stl')) && (await ev(() => window.__t.toast())).text.includes(expDir), JSON.stringify(all).slice(0, 120));
await app.answers([null]);
const none = await ev(() => window.__t.exportAs('step', 'all'));
@@ -114,10 +114,10 @@ try {
check('Terminal startet im Projektordner', (await ev((id) => window.__t.termText(id), tid)).includes('workspaces'));
// Übergabe an den Agenten: Text landet in der Eingabezeile, abgeschickt wird nicht (E11)
await ev((t) => window.__t.insert(t), selText);
- await waitFor('eingefügter Text', (id) => window.__t.termText(id).includes('[Auswahl: Bauteil "Lid"'), 10000, tid).catch(() => {});
+ await waitFor('eingefügter Text', (id) => window.__t.termText(id).includes('[Selection: part "Lid"'), 10000, tid).catch(() => {});
const afterInsert = await ev((id) => window.__t.termText(id), tid);
- check('„An Agent geben" fügt den Text in die Eingabezeile ein, ohne abzuschicken', afterInsert.includes('[Auswahl: Bauteil "Lid"') && !/Auswahl:.*\n.*(nicht erkannt|not recognized)/.test(afterInsert));
- check('Bestätigung „In die Eingabe von Terminal eingefügt"', (await ev(() => window.__t.toast())).text.includes('In die Eingabe von Terminal eingefügt'));
+ check('„Send to agent" fügt den Text in die Eingabezeile ein, ohne abzuschicken', afterInsert.includes('[Selection: part "Lid"') && !/Selection:.*\n.*(nicht erkannt|not recognized)/.test(afterInsert));
+ check('Bestätigung „Added to the input of Terminal"', (await ev(() => window.__t.toast())).text.includes('Added to the input of Terminal'));
await ev((id) => window.soma.term.write(id, '\x03'), tid); // Zeile verwerfen
// Markierung (E16): Viewer-Bild einfrieren, zeichnen, als PNG nach .soma/feedback/, Pfad in die Eingabe
@@ -127,7 +127,7 @@ try {
await waitFor('Zeichenfläche offen', () => window.__t.markup().active, 5000).catch(() => {});
const hiddenUi = await ev(() => ['vtop', 'cube', 'cards'].every((id) => getComputedStyle(document.getElementById(id)).display === 'none'));
const mk0 = await ev(() => window.__t.markup());
- check('„Markieren": Zeichenfläche offen, Werkzeuge, Würfel und Karten treten zurück', mk0.active && !mk0.blank && hiddenUi && mk0.pixels[0] > 0, `${mk0.pixels.join('x')} px`);
+ check('„Mark up": Zeichenfläche offen, Werkzeuge, Würfel und Karten treten zurück', mk0.active && !mk0.blank && hiddenUi && mk0.pixels[0] > 0, `${mk0.pixels.join('x')} px`);
const [bgPx, lidPx] = await ev((p) => [window.__t.markPixel(3, 3), window.__t.markPixel(p[0], p[1])], lidPos);
// Die angeklickte Fläche leuchtet im Viewer orange. Im Bild fehlt die Auswahl, sonst verschluckt sie die orange Markierung.
check('Das eingefrorene Bild zeigt das Modell ohne Auswahlfarbe', bgPx[3] === 255 && lidPx.slice(0, 3).reduce((s, v, i) => s + Math.abs(v - bgPx[i]), 0) > 40
@@ -159,7 +159,7 @@ try {
await domClick('btn-mark-blank');
const blankPx = await ev((p) => window.__t.markPixel(p[0] + 30, p[1] + 30), lidPos);
await shot('7c-markieren-leer');
- check('„Leere Fläche": Hintergrund ohne Modell, Zeichnung bleibt', (await ev(() => window.__t.markup())).blank && blankPx.slice(0, 3).join() === '27,30,35'
+ check('„Blank canvas": Hintergrund ohne Modell, Zeichnung bleibt', (await ev(() => window.__t.markup())).blank && blankPx.slice(0, 3).join() === '27,30,35'
&& (await ev(() => window.__t.markup())).shapes.length === 4, blankPx.slice(0, 3).join(','));
await domClick('btn-mark-blank');
@@ -192,12 +192,12 @@ try {
await shot('7d-markieren-auswahl');
await key('Delete');
st = await mk();
- check('Entf löscht die ausgewählte Form', JSON.stringify(st.shapes) === '["pen","arrow","text"]' && st.selected === -1, st.shapes.join(','));
+ check('Del löscht die ausgewählte Form', JSON.stringify(st.shapes) === '["pen","arrow","text"]' && st.selected === -1, st.shapes.join(','));
await domClick('btn-mark-undo');
st = await mk();
check('Rückgängig holt sie zurück, mit Drehung, Größe und Farbe', st.shapes.length === 4 && st.items[2].color === '#5ea8ff' && Math.abs(st.items[2].rot - Math.PI / 2) < 0.01 && st.items[2].sx > 1.2);
await key('y', { ctrlKey: true });
- check('Strg+Y wiederholt das Löschen', (await mk()).shapes.length === 3);
+ check('Ctrl+Y wiederholt das Löschen', (await mk()).shapes.length === 3);
await domClick('btn-mark-undo');
const tx = (await mk()).items[3];
await drag([[tx.x, tx.y]]); await drag([[tx.x, tx.y]]);
@@ -224,7 +224,7 @@ try {
check('Raster wieder aus: Bild ohne Raster', !(await mk()).grid && (await ev(() => window.__t.markPixel(600, 10))).slice(0, 3).join() === gridOff.slice(0, 3).join());
await ev(() => document.body.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true })));
- check('Escape mit Zeichnung verwirft nicht sofort (erst beim zweiten Mal)', (await ev(() => window.__t.markup())).active && (await ev(() => window.__t.toast())).text.includes('Noch einmal Escape'));
+ check('Escape mit Zeichnung verwirft nicht sofort (erst beim zweiten Mal)', (await ev(() => window.__t.markup())).active && (await ev(() => window.__t.toast())).text.includes('Press Escape again'));
const px = (await ev(() => window.__t.markup())).pixels;
await domClick('btn-mark-send');
await waitFor('Markierung gespeichert', () => !window.__t.markup().active, 10000).catch(() => {});
@@ -232,12 +232,12 @@ try {
const fbFiles = fs.existsSync(fbDir) ? fs.readdirSync(fbDir) : [];
const png = fbFiles.length === 1 ? fs.readFileSync(path.join(fbDir, fbFiles[0])) : Buffer.alloc(0);
if (process.env.SMOKE_SHOTS && png.length) fs.writeFileSync(path.join(APP, 'test', 'shots', '7b-markierung-bild.png'), png); // so sieht der Agent es
- check('„An Agent geben": PNG in .soma/feedback/, so groß wie der Viewer in Gerätepixeln', /^markierung-\d{8}-\d{4}\.png$/.test(fbFiles[0] ?? '') && png.length > 2000
+ check('„Send to agent": PNG in .soma/feedback/, so groß wie der Viewer in Gerätepixeln', /^markup-\d{8}-\d{4}\.png$/.test(fbFiles[0] ?? '') && png.length > 2000
&& png.readUInt32BE(16) === px[0] && png.readUInt32BE(20) === px[1], `${fbFiles.join(',')} ${png.length > 24 ? `${png.readUInt32BE(16)}x${png.readUInt32BE(20)}` : ''}`);
- await waitFor('Pfad im Terminal', (id) => window.__t.termText(id).includes('[Markierung: .soma/feedback/markierung-'), 10000, tid).catch(() => {});
- check('Pfad steht in der Eingabe des Terminals, nicht abgeschickt', (await ev((id) => window.__t.termText(id), tid)).includes(`[Markierung: .soma/feedback/${fbFiles[0]}]`));
+ await waitFor('Pfad im Terminal', (id) => window.__t.termText(id).includes('[Markup: .soma/feedback/markup-'), 10000, tid).catch(() => {});
+ check('Pfad steht in der Eingabe des Terminals, nicht abgeschickt', (await ev((id) => window.__t.termText(id), tid)).includes(`[Markup: .soma/feedback/${fbFiles[0]}]`));
const tst = await ev(() => window.__t.toast());
- check('Meldung nennt Datei und Ziel, die Werkzeuge sind zurück', tst.text.includes(`Markierung gespeichert: .soma/feedback/${fbFiles[0]}`) && tst.text.includes('In die Eingabe von Terminal eingefügt')
+ check('Meldung nennt Datei und Ziel, die Werkzeuge sind zurück', tst.text.includes(`Markup saved: .soma/feedback/${fbFiles[0]}`) && tst.text.includes('Added to the input of Terminal')
&& await ev(() => getComputedStyle(document.getElementById('vtop')).display !== 'none'), tst.text.replace(/\s+/g, ' ').slice(0, 70));
await ev((id) => window.soma.term.write(id, '\x03'), tid);
check('Markierung zählt nicht als ungespeicherte Änderung (nicht in Git, E11)', (await ev(() => window.soma.project.saveState())).dirtyFiles === dirtyBefore);
@@ -257,32 +257,32 @@ try {
pane.dispatchEvent(new DragEvent('drop', { dataTransfer: dt, bubbles: true, cancelable: true }));
return over;
});
- await waitFor('Verweis im Terminal', (id) => window.__t.termText(id).includes('[Auswahl: Bauteil "Body"'), 10000, tid).catch(() => {});
+ await waitFor('Verweis im Terminal', (id) => window.__t.termText(id).includes('[Selection: part "Body"'), 10000, tid).catch(() => {});
check('Bauteil ins Terminal gezogen: Hinweis beim Darüberziehen, Verweis in der Eingabe, keine Übergabeleiste mehr', dropOver && !(await ev(() => document.getElementById('handoff')))
- && (await ev((id) => window.__t.termText(id), tid)).includes('[Auswahl: Bauteil "Body"'));
+ && (await ev((id) => window.__t.termText(id), tid)).includes('[Selection: part "Body"'));
await ev((id) => window.soma.term.write(id, '\x03'), tid);
// Dateibaum: Markierungen sichtbar, anlegen, umbenennen, löschen über Menü und Tasten
await ev(() => window.__t.showPanel('files'));
await waitFor('Markierungen im Dateibaum', (f) => window.__t.fileRows().includes(f), 10000, fbFiles[0]).catch(() => {});
const rows2 = await ev(() => window.__t.fileRows());
- check('Dateibaum: Gruppe „Markierungen“ mit dem Bild aus .soma/feedback/, sonst nichts aus .soma', rows2.includes('Markierungen') && rows2.includes(fbFiles[0]) && !rows2.includes('project.json'), rows2.slice(-6).join(','));
+ check('Dateibaum: Gruppe „Markups“ mit dem Bild aus .soma/feedback/, sonst nichts aus .soma', rows2.includes('Markups') && rows2.includes(fbFiles[0]) && !rows2.includes('project.json'), rows2.slice(-6).join(','));
const ctx = (rel) => ev((rel) => {
const row = document.querySelector(`#tab-files .frow[data-path="${CSS.escape(rel)}"]`);
if (!row) return null;
const r = row.getBoundingClientRect();
row.dispatchEvent(new MouseEvent('contextmenu', { bubbles: true, cancelable: true, clientX: r.left + 20, clientY: r.top + 5 }));
- return [...document.querySelectorAll('#menu-ctx .mi')].map((b) => (b.disabled ? '-' : '') + b.textContent.replace(/(F2|Entf)$/, ''));
+ return [...document.querySelectorAll('#menu-ctx .mi')].map((b) => (b.disabled ? '-' : '') + b.textContent.replace(/(F2|Del)$/, ''));
}, rel);
const menuItemClick = (label) => ev((l) => [...document.querySelectorAll('#menu-ctx .mi')].find((b) => b.textContent.startsWith(l))?.click(), label);
const typeName = (name) => ev((n) => { const t = document.querySelector('#tab-files .fedit'); if (!t) return false; t.value = n; t.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter', bubbles: true })); return true; }, name);
const fbRel = `.soma/feedback/${fbFiles[0]}`;
const imgMenu = await ctx(fbRel);
- await menuItemClick('Markieren');
+ await menuItemClick('Mark up');
await waitFor('Bild als Zeichenfläche', () => window.__t.markup().active, 5000).catch(() => {});
const mkImg = await ev(() => ({ ...window.__t.markup(), hint: document.getElementById('mark-hint').textContent }));
await shot('7g-markieren-bild');
- check('Bild im Dateibaum: „Markieren“ öffnet es als Hintergrund der Zeichenfläche', imgMenu?.includes('Markieren') && mkImg.active && mkImg.source === fbRel && !mkImg.blank
+ check('Bild im Dateibaum: „Mark up“ öffnet es als Hintergrund der Zeichenfläche', imgMenu?.includes('Mark up') && mkImg.active && mkImg.source === fbRel && !mkImg.blank
&& mkImg.hint.includes(fbRel) && mkImg.pixels[0] >= px[0], `${imgMenu?.join(',')} ${mkImg.source} ${mkImg.pixels}`);
await ev(() => document.body.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true })));
check('Escape ohne Zeichnung schließt das Bild wieder, keine neue Datei', !(await ev(() => window.__t.markup().active)) && fs.readdirSync(fbDir).length === 1);
@@ -308,26 +308,26 @@ try {
await clickRow(fbRel);
await waitFor('Wechsel nach Verwerfen', (r) => window.__t.markup().source === r, 5000, fbRel).catch(() => {});
const swapped = await ev(() => window.__t.markup());
- check('Mit Zeichnung: Rückfrage, „Abbrechen“ behält sie, „Verwerfen und wechseln“ öffnet das andere Bild', kept.source === 'skizze-b.png' && kept.shapes.length === 1
+ check('Mit Zeichnung: Rückfrage, „Cancel“ behält sie, „Discard and switch“ öffnet das andere Bild', kept.source === 'skizze-b.png' && kept.shapes.length === 1
&& swapped.source === fbRel && swapped.shapes.length === 0, `${kept.source}/${kept.shapes.length} → ${swapped.source}/${swapped.shapes.length}`);
await ev(() => document.body.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true })));
fs.rmSync(imgB);
const modelMenu = await ctx('model.py');
- check('Menü auf model.py: kein „Markieren“ (kein Bild)', !modelMenu?.includes('Markieren'));
- check('Menü auf model.py: Öffnen, Explorer, Pfad, Anlegen; Umbenennen und Löschen gesperrt', ['Öffnen', 'Im Explorer zeigen', 'Pfad an Agent geben', 'Pfad kopieren', 'Neue Datei', '-Umbenennen', '-Löschen'].every((x) => modelMenu?.includes(x)), modelMenu?.join(','));
+ check('Menü auf model.py: kein „Mark up“ (kein Bild)', !modelMenu?.includes('Mark up'));
+ check('Menü auf model.py: Öffnen, Explorer, Pfad, Anlegen; Umbenennen und Löschen gesperrt', ['Open', 'Show in Explorer', 'Send path to agent', 'Copy path', 'New file', '-Rename', '-Delete'].every((x) => modelMenu?.includes(x)), modelMenu?.join(','));
await ev(() => document.body.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true })));
await domClick('btn-file-new');
await sleep(50);
const typed = await typeName('notiz.txt');
const notiz = path.join(proj.dir, 'notiz.txt');
await waitFor('Datei angelegt und offen', () => window.__t.editor.state().file === 'notiz.txt', 5000).catch(() => {});
- check('„Neue Datei“: Namensfeld im Baum, Enter legt sie an und öffnet sie im Editor', typed && fs.existsSync(notiz) && (await ev(() => window.__t.editor.state())).file === 'notiz.txt');
+ check('„New file“: Namensfeld im Baum, Enter legt sie an und öffnet sie im Editor', typed && fs.existsSync(notiz) && (await ev(() => window.__t.editor.state())).file === 'notiz.txt');
await ev(() => window.__t.showPanel('files'));
await waitFor('notiz.txt im Baum', () => window.__t.fileRows().includes('notiz.txt'), 5000).catch(() => {});
- await ctx('notiz.txt'); await menuItemClick('Umbenennen'); await sleep(50);
+ await ctx('notiz.txt'); await menuItemClick('Rename'); await sleep(50);
await typeName('model.py'); await sleep(300);
const dupErr = await ev(() => ({ toast: window.__t.toast().text, open: !!document.querySelector('#tab-files .fedit') }));
- check('Umbenennen auf vorhandenen Namen: Meldung, Feld bleibt offen, nichts überschrieben', dupErr.open && dupErr.toast.includes('gibt es dort schon') && fs.existsSync(notiz)
+ check('Umbenennen auf vorhandenen Namen: Meldung, Feld bleibt offen, nichts überschrieben', dupErr.open && dupErr.toast.includes('already exists there') && fs.existsSync(notiz)
&& fs.readFileSync(path.join(proj.dir, 'model.py'), 'utf8').includes('add_part'), dupErr.toast.slice(0, 60));
await typeName('skizze.txt');
const skizze = path.join(proj.dir, 'skizze.txt');
@@ -339,11 +339,11 @@ try {
await ev(() => { const r = document.querySelector('#tab-files .frow[data-path="skizze.txt"]'); r.focus(); r.dispatchEvent(new KeyboardEvent('keydown', { key: 'Delete', bubbles: true })); });
await waitFor('gelöscht', () => !window.__t.fileRows().includes('skizze.txt'), 5000).catch(() => {});
const bin = path.join(ud, 'test-papierkorb');
- check('Entf mit Rückfrage: in den Papierkorb, Reiter zu', !fs.existsSync(skizze) && fs.existsSync(bin) && fs.readdirSync(bin).some((f) => f.endsWith('skizze.txt'))
+ check('Del mit Rückfrage: in den Papierkorb, Reiter zu', !fs.existsSync(skizze) && fs.existsSync(bin) && fs.readdirSync(bin).some((f) => f.endsWith('skizze.txt'))
&& !(await ev(() => window.__t.editor.state())).files.includes('skizze.txt'), fs.existsSync(bin) ? fs.readdirSync(bin).join(',') : 'kein Papierkorb');
- await ctx(`.soma/feedback/${fbFiles[0]}`); await menuItemClick('Pfad an Agent geben');
- await waitFor('Pfad der Markierung im Terminal', (f) => window.__t.termText(f[0]).includes(`[Datei: .soma/feedback/${f[1]}]`), 5000, [tid, fbFiles[0]]).catch(() => {});
- check('Markierung: Rechtsklick „Pfad an Agent geben“ fügt den Pfad ein', (await ev((id) => window.__t.termText(id), tid)).includes(`[Datei: .soma/feedback/${fbFiles[0]}]`));
+ await ctx(`.soma/feedback/${fbFiles[0]}`); await menuItemClick('Send path to agent');
+ await waitFor('Pfad der Markierung im Terminal', (f) => window.__t.termText(f[0]).includes(`[File: .soma/feedback/${f[1]}]`), 5000, [tid, fbFiles[0]]).catch(() => {});
+ check('Markierung: Rechtsklick „Send path to agent“ fügt den Pfad ein', (await ev((id) => window.__t.termText(id), tid)).includes(`[File: .soma/feedback/${fbFiles[0]}]`));
await ev((id) => window.soma.term.write(id, '\x03'), tid);
await shot('3b-dateien-menue');
await ev(() => window.__t.showPanel(null));
@@ -360,10 +360,10 @@ try {
fs.writeFileSync(modelPy, original + third + 'def kaputt(:\n');
await waitFor('Fehlerstatus', () => window.__t.status().state === 'error');
const err = await status();
- check('Syntaxfehler: Anzeige oben „Build fehlgeschlagen" mit Datei und Zeile', err.text === 'Build fehlgeschlagen' && /model\.py, Zeile \d+/.test(err.detail), err.detail.slice(0, 70));
- check('Fehlerkarte im Viewer, letzter guter Stand (3 Bauteile) bleibt', err.viewerMsg.includes('Build fehlgeschlagen') && await ev(() => window.__t.partCount()) === 3);
+ check('Syntaxfehler: Anzeige oben „Build failed" mit Datei und Zeile', err.text === 'Build failed' && /model\.py, line \d+/.test(err.detail), err.detail.slice(0, 70));
+ check('Fehlerkarte im Viewer, letzter guter Stand (3 Bauteile) bleibt', err.viewerMsg.includes('Build failed') && await ev(() => window.__t.partCount()) === 3);
const errText = await ev(() => window.__t.errorText());
- check('Fehlertext für den Agenten nennt Datei und Zeile', /^\[Build-Fehler: model\.py Zeile \d+: /.test(errText), errText.slice(0, 60));
+ check('Fehlertext für den Agenten nennt Datei und Zeile', /^\[Build error: model\.py line \d+: /.test(errText), errText.slice(0, 60));
await shot('4-fehler');
await sleep(300);
check('App reagiert weiter (Terminal aktiv, kein Absturz)', await ev(() => window.__t.terminals.count) === 1);
@@ -380,10 +380,10 @@ try {
check('Auto-Build aus: keine Änderung im Viewer nach 3,5 s', await ev(() => window.__t.partCount()) === 2);
await domClick('btn-build');
await waitFor('Knopf-Build', () => window.__t.partCount() === 3 && window.__t.status().state === 'ok');
- check('Knopf „Bauen" baut trotzdem (3 Bauteile)', true);
+ check('Knopf „Build now" baut trotzdem (3 Bauteile)', true);
fs.writeFileSync(modelPy, original);
- await waitFor('veraltet gemeldet', () => window.__t.status().text === 'Code geändert', 10000).catch(() => {});
- check('Auto-Build aus: Anzeige meldet „Code geändert"', (await status()).text === 'Code geändert', (await status()).text);
+ await waitFor('veraltet gemeldet', () => window.__t.status().text === 'Code changed', 10000).catch(() => {});
+ check('Auto-Build aus: Anzeige meldet „Code changed"', (await status()).text === 'Code changed', (await status()).text);
await domClick('chk-auto');
await waitFor('Auto an baut nach', () => window.__t.partCount() === 2 && window.__t.status().state === 'ok', 60000).catch(() => {});
check('Auto-Build wieder an: veralteter Stand wird gleich gebaut', await ev(() => window.__t.partCount()) === 2);
@@ -399,7 +399,7 @@ try {
await page.click(...Object.values(await ev(() => window.__t.viewer.cubeScreen([0, -1, 0]))));
await settle();
let v1 = await vs();
- check('Würfel „Vorne" anklicken: Ansicht von vorne, Drehpunkt und Abstand bleiben', near(v1.dir, [0, -1, 0]) && near(v1.target, v0.target) && Math.abs(v1.dist - v0.dist) < 1e-6, v1.dir.map((x) => x.toFixed(3)).join(','));
+ check('Würfel „FRONT" anklicken: Ansicht von vorne, Drehpunkt und Abstand bleiben', near(v1.dir, [0, -1, 0]) && near(v1.target, v0.target) && Math.abs(v1.dist - v0.dist) < 1e-6, v1.dir.map((x) => x.toFixed(3)).join(','));
await page.click(...Object.values(await ev(() => window.__t.viewer.cubeScreen([0.85, -1, 0.85]))));
await settle();
v1 = await vs();
@@ -424,7 +424,7 @@ try {
`${v3.target.map((x) => x.toFixed(2)).join(',')} statt ${corner.c.join(',')}`);
check('Zoom zur Mausposition an, vordere Schnittebene folgt dem Abstand', v3.zoomToCursor && Math.abs(v3.near - v3.dist / 200) < 1e-9 && v3.far > v3.dist, `near ${v3.near.toFixed(3)}, Abstand ${v3.dist.toFixed(1)}`);
await ev(() => document.querySelector('#menu-display [data-view="back"]').click());
- check('Ansicht „Hinten" im Menü Darstellung', near((await vs()).dir, [0, 1, 0]));
+ check('Ansicht „Back" im Menü Display', near((await vs()).dir, [0, 1, 0]));
await domClick(await ev(() => { const b = document.querySelector('.vbtns [data-view="iso"]'); b.id ||= 'btn-view-iso'; return b.id; }));
check('Standardansicht setzt den Drehpunkt zurück in die Mitte des Modells', near((await vs()).target, v0.target, 1e-6));
// Zum Ansehen: Zeiger über der Ecke oben vorne rechts (Felder in Orange)
@@ -445,14 +445,14 @@ try {
await sleep(2500);
await ev(() => window.__t.insert('[Test nach Wechsel] '));
const afterSwitch = await ev(() => window.__t.toast());
- check('Nach dem Wechsel: Einfügen ins neue Terminal geht', !afterSwitch.error && afterSwitch.text.includes('In die Eingabe von Terminal eingefügt'), afterSwitch.text.slice(0, 60));
+ check('Nach dem Wechsel: Einfügen ins neue Terminal geht', !afterSwitch.error && afterSwitch.text.includes('Added to the input of Terminal'), afterSwitch.text.slice(0, 60));
await ev(() => window.soma.term.write(window.__t.terminals.activeId, '\x03'));
// Aktives Terminal beendet, ein anderes läuft noch: Der Text geht dorthin, und dieses kommt nach vorn
const firstTid = await ev(() => window.__t.terminals.activeId);
const secondTid = await ev(() => window.__t.terminals.add({ title: 'Zweites' }));
await sleep(1500);
await ev((id) => window.soma.term.write(id, 'exit\r'), secondTid);
- await waitFor('zweites Terminal beendet', (id) => window.__t.termText(id).includes('Prozess beendet'), 10000, secondTid).catch(() => {});
+ await waitFor('zweites Terminal beendet', (id) => window.__t.termText(id).includes('Process ended'), 10000, secondTid).catch(() => {});
await ev(() => window.__t.insert('[Test Ersatzterminal] '));
const fallback = await ev(() => window.__t.toast());
await waitFor('Text im ersten Terminal', (id) => window.__t.termText(id).includes('[Test Ersatzterminal]'), 5000, firstTid).catch(() => {});
diff --git a/app/test/unit.mjs b/app/test/unit.mjs
index fb2bccd..1d077b5 100644
--- a/app/test/unit.mjs
+++ b/app/test/unit.mjs
@@ -70,9 +70,9 @@ try {
const png = new Uint8Array([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 1, 2, 3]);
const when = new Date(2026, 8, 30, 14, 5);
const f1 = saveFeedbackImage(proj, png, when), f2 = saveFeedbackImage(proj, png, when);
- check('Markierung landet als markierung-JJJJMMTT-HHMM.png in .soma/feedback/', f1.ok && f1.path === '.soma/feedback/markierung-20260930-1405.png'
+ check('Markierung landet als markup-JJJJMMTT-HHMM.png in .soma/feedback/', f1.ok && f1.path === '.soma/feedback/markup-20260930-1405.png'
&& fs.readFileSync(path.join(proj, f1.path)).equals(Buffer.from(png)), f1.path ?? f1.error);
- check('Zweite Markierung in derselben Minute: neuer Name mit -2, erste bleibt', f2.ok && f2.path === '.soma/feedback/markierung-20260930-1405-2.png'
+ check('Zweite Markierung in derselben Minute: neuer Name mit -2, erste bleibt', f2.ok && f2.path === '.soma/feedback/markup-20260930-1405-2.png'
&& fs.existsSync(path.join(proj, f1.path)), f2.path ?? f2.error);
const bad = saveFeedbackImage(proj, new TextEncoder().encode('kein Bild'), when);
check('Kein PNG: abgelehnt, nichts geschrieben', !bad.ok && fs.readdirSync(path.join(proj, '.soma', 'feedback')).length === 2, bad.error);
@@ -99,7 +99,7 @@ try {
&& o2.ok && fs.statSync(path.join(ops, 'skizzen')).isDirectory(), `${o.path} ${o2.path}`);
fs.writeFileSync(path.join(ops, 'parts', 'deckel.py'), 'INHALT');
o = createEntry(ops, 'parts', 'deckel.py', false);
- check('Neue Datei mit vorhandenem Namen: abgelehnt, Inhalt bleibt', !o.ok && /schon/.test(o.error) && fs.readFileSync(path.join(ops, 'parts', 'deckel.py'), 'utf8') === 'INHALT', o.error);
+ check('Neue Datei mit vorhandenem Namen: abgelehnt, Inhalt bleibt', !o.ok && /already exists/.test(o.error) && fs.readFileSync(path.join(ops, 'parts', 'deckel.py'), 'utf8') === 'INHALT', o.error);
const badNames = ['', ' x', 'a/b', 'a:b', 'con', 'NUL.txt', 'x.', '..'].map((n) => createEntry(ops, '', n, false));
check('Ungültige Namen (leer, Leerzeichen, / : , reservierte Namen, Punkt am Ende) abgelehnt', badNames.every((x) => !x.ok), badNames.map((x) => x.error).join(' | ').slice(0, 90));
const blockedCreate = [createEntry(ops, 'output', 'x.step', false), createEntry(ops, '.soma', 'x', false), createEntry(ops, '.soma/feedback', 'x.png', false), createEntry(ops, '', 'AGENTS.md', false), createEntry(ops, '../draussen', 'x', false)];
@@ -125,7 +125,7 @@ try {
check('Löschen geht in den Papierkorb, model.py, App-Dateien und .soma gesperrt', o.ok && !fs.existsSync(path.join(ops, 'skizzen')) && JSON.stringify(binned) === '["skizzen"]'
&& !o3.ok && !o4.ok && !o5.ok && fs.existsSync(path.join(ops, 'model.py')), binned.join(','));
o = await trashEntry(ops, 'parts/body.py', async () => { throw new Error('Papierkorb nicht erreichbar'); });
- check('Papierkorb klappt nicht: nichts gelöscht, Meldung', !o.ok && fs.existsSync(path.join(ops, 'parts', 'body.py')) && /nichts gelöscht/.test(o.error), o.error?.slice(0, 80));
+ check('Papierkorb klappt nicht: nichts gelöscht, Meldung', !o.ok && fs.existsSync(path.join(ops, 'parts', 'body.py')) && /nothing was deleted/.test(o.error), o.error?.slice(0, 80));
fs.writeFileSync(path.join(ops, 'start.bat'), '@echo off');
fs.writeFileSync(path.join(ops, 'parts', 'foto.png'), 'P');
@@ -180,14 +180,14 @@ try {
check('Eingesetzt: Text mit Werten, Kopf mit Werten statt Standard, Unbekanntes bleibt', rs.includes('Up to 50° in PETG, {{unknown}} stays.') && rs.includes('var angle: 50 | °') && rs.includes('var mat: PETG |'), rs);
check('Ohne Einstellungen: die Standardwerte', renderSkill(SRC, {}).includes('Up to 45° in PLA'));
const cv = [checkValue(ps.vars[0], '52,5'), checkValue(ps.vars[0], 95), checkValue(ps.vars[0], 'abc'), checkValue(ps.vars[1], 'ABS')];
- check('Werte geprüft: Komma geht, außerhalb des Bereichs, keine Zahl und fremde Auswahl abgelehnt', cv[0].value === 52.5 && cv[1].error?.includes('10 bis 80°') && cv[2].error && cv[3].error, JSON.stringify(cv));
+ check('Werte geprüft: Komma geht, außerhalb des Bereichs, keine Zahl und fremde Auswahl abgelehnt', cv[0].value === 52.5 && cv[1].error?.includes('must be between 10 and 80°') && cv[2].error && cv[3].error, JSON.stringify(cv));
check('Gespeicherte Werte bereinigt: Ungültiges und Standard fallen weg', JSON.stringify(cleanValues(ps.vars, { angle: 45, mat: 'XYZ', other: 1 })) === '{}'
&& JSON.stringify(cleanValues(ps.vars, { angle: '60' })) === '{"angle":60}');
const shipped = [...bundledSkills(path.join(APP, 'resources', 'skills')).values()];
const leftover = shipped.map((s) => renderSkill(s.text, {})).filter((x) => /\{\{/.test(x));
// Einstellungen sind freiwillig (etwa „Normteile“ hat keine), der Kopf aber nicht
check('Mitgelieferte Skills: Kopf vollständig, jeder Platzhalter hat eine Variable, Standardwerte gültig', shipped.length >= 12
- && shipped.every((s) => s.title !== s.id && s.name !== s.title && s.summary && s.topics.length && s.order < 100 && s.when && !s.when.endsWith('.'))
+ && shipped.every((s) => s.title !== s.id && s.name && s.summary && s.topics.length && s.order < 100 && s.when && !s.when.endsWith('.'))
&& shipped.every((s) => s.vars.every((v) => 'value' in checkValue(v, v.default))) && !leftover.length, shipped.map((s) => `${s.id}:${s.vars.length}`).join(','));
// Kategorien und Stufe für neue Modelle (E46, E55)
const kp = parseSkill('k', '---\ntitle: K\ncategory: Arbeitsweise\ndefault: always\nwhen: the user asks.\n---\n# K\n');
@@ -236,10 +236,10 @@ try {
put('model.py', 'x = 1\n');
put('.gitignore', '__pycache__/\n'); // Stand vor E58
const repo = new GitRepo(old);
- await repo.init('Neues Modell angelegt');
+ await repo.init('New model created');
// So hat es der Agent in älteren Projekten mit `git add -A` committet
put('.soma/results/thickness.glb', 'GROSS');
- put('renders/ansicht-iso.png', 'PNG');
+ put('renders/view-iso.png', 'PNG');
await repo.run(['add', '-A'], true);
await repo.run(['commit', '-q', '-m', 'Agent'], true);
await repo.ensureIgnored();
@@ -252,15 +252,15 @@ try {
put('.soma/anim/deckel.glb', 'ANIM');
check('Neues Ergebnis zählt nicht als ungespeicherte Änderung', !(await repo.status()).dirty);
put('model.py', 'x = 2\n');
- await repo.snapshot('Automatischer Snapshot beim Speichern');
+ await repo.snapshot('Automatic snapshot on save');
const tracked = (await repo.run(['ls-files'])).out;
check('Snapshot nimmt Ergebnis und Bilder aus dem Verlauf, die Dateien bleiben', tracked.includes('model.py') && !tracked.includes('.soma/results')
&& !tracked.includes('renders/') && fs.existsSync(path.join(old, '.soma', 'results', 'thickness.glb')), tracked);
const zip = path.join(tmp, 'altprojekt.zip');
await saveProjectZip(old, zip, { savedAt: '', head: null, id: 'x', name: 'x' });
- const inZip = await readZipTexts(zip, ['model.py', '.soma/results/thickness.glb', '.soma/anim/deckel.glb', 'renders/ansicht-iso.png']);
+ const inZip = await readZipTexts(zip, ['model.py', '.soma/results/thickness.glb', '.soma/anim/deckel.glb', 'renders/view-iso.png']);
check('ZIP: ohne .soma/results und .soma/anim, mit Bildern und Modell', inZip['model.py'] === 'x = 2\n' && inZip['.soma/results/thickness.glb'] === null
- && inZip['.soma/anim/deckel.glb'] === null && inZip['renders/ansicht-iso.png'] === 'PNG', JSON.stringify(inZip));
+ && inZip['.soma/anim/deckel.glb'] === null && inZip['renders/view-iso.png'] === 'PNG', JSON.stringify(inZip));
} finally {
fs.rmSync(gz, { force: true });
}
diff --git a/app/test/versions.mjs b/app/test/versions.mjs
index 3b50d23..15949fb 100644
--- a/app/test/versions.mjs
+++ b/app/test/versions.mjs
@@ -43,7 +43,7 @@ try {
// ---- 1) Neues Projekt hat einen Git-Verlauf, mitgeliefertes Git im Terminal ----
await waitFor('Verlauf geladen', () => window.__t.versions().count === 1);
- check('Neues Projekt: Git-Repository mit Startcommit', (await g('log', '--format=%s')) === 'Neues Modell angelegt');
+ check('Neues Projekt: Git-Repository mit Startcommit', (await g('log', '--format=%s')) === 'New model created');
check('Startcommit enthält output/model.step (Vorschau des ersten Standes möglich)', (await g('ls-files', 'output/model.step')) === 'output/model.step');
check('Nach dem ersten Build gilt der Stand als sauber (output/ zählt nicht)', (await versions()).dirtyFiles === 0);
check('Git-Identität ist gesetzt (Agent kann committen)', (await g('config', 'user.name')).length > 0 && (await g('config', 'user.email')).length > 0);
@@ -70,8 +70,12 @@ try {
&& cmap.parts.every((x) => x.role !== 'basic' && !('file' in x) && !('line' in x)) && fs.existsSync(path.join(cached(head2), 'geometry', `${cmap.build}.brep`)));
const kinds = (await versions()).byApp;
check('Leiste unterscheidet App-Stand (Start) und Agenten-Stand', kinds[0] === true && kinds[1] === false, JSON.stringify(kinds));
- check('App-Commits tragen den Trailer „Erstellt-von: SOMA"', (await g('log', '--format=%(trailers:key=Erstellt-von,valueonly)', 'HEAD~1')).includes('SOMA'));
+ check('App-Commits tragen den Trailer „Created-by: SOMA"', (await g('log', '--format=%(trailers:key=Created-by,valueonly)', 'HEAD~1')).includes('SOMA'));
check('Commit enthält die STEP-Datei des gebauten Standes', (await g('show', '--stat', '--format=', 'HEAD')).includes('output/model.step'));
+ // Ältere Projekte (vor E73): Der deutsche Trailer zählt weiter als Stand der App, auch bei einem Betreff, den die App nicht kennt
+ await g('commit', '--allow-empty', '--no-verify', '-q', '-m', 'Alter Stand der App', '--trailer', 'Erstellt-von: SOMA');
+ await waitFor('dritter Stand im Verlauf', () => window.__t.versions().count === 3, 20000);
+ check('Alter Trailer „Erstellt-von: SOMA“ gilt weiter als App-Stand', (await versions()).byApp[2] === true, JSON.stringify((await versions()).byApp));
// ---- 3) Speichern: Snapshot + ZIP ----
fs.appendFileSync(path.join(dir, 'NOTES.md'), '\nWunsch: Deckel mit Lippe\n');
@@ -84,20 +88,20 @@ try {
const names = await listZip(zipPath);
check('ZIP enthält Modell, .git, Projektdaten und Marker', ['model.py', '.git/HEAD', '.soma/project.json', '.soma/zip-info.json', 'AGENTS.md'].every((n) => names.includes(n)));
check('ZIP enthält keine Caches (GLB, Mapping, build.json, __pycache__)', !names.some((n) => /model\.glb|model\.map\.json|build\.json|__pycache__/.test(n)));
- await waitFor('Meldung und Name', () => window.__t.toast().text.startsWith('Gespeichert') && window.__t.project().name === 'Testmodell', 20000);
- check('Auto-Snapshot beim Speichern hat die Notiz gesichert', (await g('log', '-1', '--format=%s')) === 'Automatischer Snapshot beim Speichern');
+ await waitFor('Meldung und Name', () => window.__t.toast().text.startsWith('Saved') && window.__t.project().name === 'Testmodell', 20000);
+ check('Auto-Snapshot beim Speichern hat die Notiz gesichert', (await g('log', '-1', '--format=%s')) === 'Automatic snapshot on save');
check('Modellname folgt dem Dateinamen der ZIP', (await ev(() => window.__t.project())).name === 'Testmodell');
- check('Nach dem Speichern: sauber, Anzeige „Gespeichert · Uhrzeit"', (await saveState()).dirtyFiles === 0 && /^Gespeichert · \d\d:\d\d$/.test(await ev(() => document.getElementById('save-badge').textContent)), await ev(() => document.getElementById('save-badge').textContent));
+ check('Nach dem Speichern: sauber, Anzeige „Saved · Uhrzeit"', (await saveState()).dirtyFiles === 0 && /^Saved · \d\d:\d\d$/.test(await ev(() => document.getElementById('save-badge').textContent)), await ev(() => document.getElementById('save-badge').textContent));
await waitFor('grüner Punkt', () => document.querySelectorAll('#vdots .vdot.saved').length === 1, 10000).catch(() => {});
check('Verlaufsleiste markiert den gespeicherten Stand', await ev(() => document.querySelectorAll('#vdots .vdot.saved').length) === 1);
- check('Meldung „Gespeichert" erscheint', (await ev(() => window.__t.toast())).text.startsWith('Gespeichert'));
+ check('Meldung „Saved" erscheint', (await ev(() => window.__t.toast())).text.startsWith('Saved'));
const commitsBefore = (await g('rev-list', '--count', 'HEAD'));
await app.domClick('btn-save');
await sleep(2500);
check('Zweites Speichern ohne Änderung legt keinen leeren Snapshot an', (await g('rev-list', '--count', 'HEAD')) === commitsBefore);
// ---- 4) Vorschau alter Stände ----
- const first = await g('rev-parse', 'HEAD~2');
+ const first = await g('rev-list', '--max-parents=0', 'HEAD');
check('Erster Stand liegt schon als Vorschau bereit (beim Anlegen abgelegt)', fs.existsSync(path.join(cached(first), 'model.glb')));
// Ohne Cache entsteht die Vorschau wie bisher aus der STEP-Datei des Standes
fs.rmSync(cached(first), { recursive: true, force: true });
@@ -108,7 +112,7 @@ try {
const smap = JSON.parse(fs.readFileSync(path.join(cached(first), 'model.map.json'), 'utf8'));
check('Ohne Cache: Vorschau aus der STEP-Datei des Standes erzeugt (Basismodus)', smap.parts.length === 2 && smap.parts.every((x) => x.role === 'basic'));
const bn = (await ev(() => window.__t.banner())).text.replace(/\s+/g, ' ').trim();
- check('Banner zeigt „Vorschau · Stand 1 von …, nur ansehen"', bn.includes('Vorschau · Stand 1 von') && bn.includes('nur ansehen') && bn.includes('Arbeitsstand bleibt unverändert'), bn.slice(0, 60));
+ check('Banner zeigt „Preview · version 1 of …, view only"', bn.includes('Preview · version 1 of') && bn.includes('view only') && bn.includes('current work stays unchanged'), bn.slice(0, 60));
check('Viewer hat den Vorschau-Rahmen', await ev(() => document.getElementById('viewer').classList.contains('preview')));
await sleep(800); // capturePage liefert bei unsichtbaren Fenstern sonst ein etwas älteres Bild
const shot = await app.screenshot(path.join(import.meta.dirname, 'versions.png')).catch((e) => ({ error: String(e) }));
@@ -125,18 +129,18 @@ try {
await waitFor('Zeichenfläche', () => window.__t.markup().active, 30000).catch(() => {});
await domClick('btn-mark-send');
const firstShort = await g('rev-parse', '--short', first);
- await waitFor('Markierung im Terminal', (i) => window.__t.termText(i).includes('[Markierung: .soma/feedback/'), 30000, await term()).catch(() => {});
- check('Markierung in der Vorschau nennt den alten Stand', (await termText()).includes(`zeigt den älteren Stand ${firstShort} "Neues Modell angelegt"]`), (await termText()).match(/\[Markierung:[^\]]*\]/)?.[0]?.slice(0, 90) ?? '');
+ await waitFor('Markierung im Terminal', (i) => window.__t.termText(i).includes('[Markup: .soma/feedback/'), 30000, await term()).catch(() => {});
+ check('Markierung in der Vorschau nennt den alten Stand', (await termText()).includes(`shows the older version ${firstShort} "New model created"]`), (await termText()).match(/\[Markup:[^\]]*\]/)?.[0]?.slice(0, 90) ?? '');
check('Nach der Markierung läuft die Vorschau weiter', !!(await versions()).previewing && await ev(() => document.getElementById('viewer').classList.contains('preview')));
await ev((i) => window.soma.term.write(i, '\x03'), await term()); // Zeile verwerfen
// ---- 5) Wiederherstellen als neuer Commit ----
await app.answers([0]);
await domClick('btn-restore');
- await waitFor('wiederhergestellt', () => !window.__t.versions().previewing && window.__t.versions().subjects.some((s) => s.startsWith('Stand wiederhergestellt')), 60000);
+ await waitFor('wiederhergestellt', () => !window.__t.versions().previewing && window.__t.versions().subjects.some((s) => s.startsWith('Restored version')), 60000);
// Vorher lud die Ansicht hier den vorherigen Build (Body 80) und zeigte ihn, bis der neue fertig war
check('Gleich nach dem Wiederherstellen ist der wiederhergestellte Stand zu sehen (Body 60, nicht 80)', (await ev(() => window.__t.partSize('Body')))[0] === 60);
- check('Wiederherstellen legt einen NEUEN Commit an', (await g('log', '-1', '--format=%s')).startsWith('Stand wiederhergestellt: Neues Modell angelegt'));
+ check('Wiederherstellen legt einen NEUEN Commit an', (await g('log', '-1', '--format=%s')).startsWith('Restored version: New model created'));
check('Verlauf blieb vollständig (alter Startcommit unverändert vorhanden)', (await g('cat-file', '-t', first)) === 'commit' && (await g('rev-list', '--count', 'HEAD')) > commitsBefore);
check('Dateien sind zurück: model.py mit 60, Notiz-Wunsch entfernt', fs.readFileSync(modelPy, 'utf8').includes('LENGTH = 60.0') && !fs.readFileSync(path.join(dir, 'NOTES.md'), 'utf8').includes('Wunsch'));
await waitFor('Build nach Wiederherstellung', () => window.__t.status().state === 'ok' && (window.__t.partSize('Body') || [0])[0] === 60);
@@ -146,16 +150,16 @@ try {
// ---- 6) Störfall: .git verschwindet (Agent hat es gelöscht/verschoben) ----
await app.domClick('btn-save');
await waitFor('gespeichert nach Restore', () => !window.__t.saveState().unsaved, 60000);
- check('ZIP enthält die Markierung aus .soma/feedback/ (in Git ist sie nicht)', (await listZip(zipPath)).some((n) => /^\.soma\/feedback\/markierung-\d{8}-\d{4}\.png$/.test(n))
+ check('ZIP enthält die Markierung aus .soma/feedback/ (in Git ist sie nicht)', (await listZip(zipPath)).some((n) => /^\.soma\/feedback\/markup-\d{8}-\d{4}\.png$/.test(n))
&& (await g('ls-files', '.soma/feedback')) === '');
fs.renameSync(path.join(dir, '.git'), path.join(dir, '.git_weg'));
- await waitFor('Problem gemeldet', () => window.__t.versions().problems.some((p) => p.includes('Kein Git-Verlauf')), 20000);
- check('Ohne .git: Verlauf meldet das Problem verständlich', (await versions()).problems[0].includes('Kein Git-Verlauf'), (await versions()).problems[0].slice(0, 50));
+ await waitFor('Problem gemeldet', () => window.__t.versions().problems.some((p) => p.includes('No Git history')), 20000);
+ check('Ohne .git: Verlauf meldet das Problem verständlich', (await versions()).problems[0].includes('No Git history'), (await versions()).problems[0].slice(0, 50));
check('Ohne .git: App und Terminal laufen weiter', await ev(() => window.__t.terminals.count) === 1);
fs.appendFileSync(path.join(dir, 'NOTES.md'), '\nohne git geändert\n');
await sleep(300);
await app.domClick('btn-save');
- await waitFor('Speichern ohne Git', () => window.__t.toast().text.includes('Kein Git-Verlauf'), 60000);
+ await waitFor('Speichern ohne Git', () => window.__t.toast().text.includes('No Git history'), 60000);
check('Ohne .git: Speichern klappt trotzdem, mit Warnung', !(await ev(() => window.__t.toast())).hidden);
fs.renameSync(path.join(dir, '.git_weg'), path.join(dir, '.git'));
await waitFor('Problem weg', () => window.__t.versions().problems.length === 0, 20000);
@@ -212,7 +216,7 @@ try {
await waitFor('Fehlermeldung', () => window.__t.toast().error, 20000);
const evilToast = (await ev(() => window.__t.toast())).text;
// Zwei Schichten: yauzl lehnt ungültige Pfade schon beim Lesen ab, unsere Prüfung beim Entpacken ist die zweite
- check(`Böse ZIP („../evil.txt", ${replaced} Einträge im Archiv) wird abgelehnt`, /Unsicher|invalid relative path/.test(evilToast), evilToast.slice(0, 70));
+ check(`Böse ZIP („../evil.txt", ${replaced} Einträge im Archiv) wird abgelehnt`, /Unsafe|invalid relative path/.test(evilToast), evilToast.slice(0, 70));
check('Nichts außerhalb des Zielordners geschrieben, keine Reste', !fs.existsSync(path.join(ud, 'evil.txt')) && !fs.existsSync(path.join(ud, 'workspaces', 'evil.txt')) && !fs.readdirSync(path.join(ud, 'workspaces')).some((n) => n.startsWith('.tmp-')));
check('Keine ZIP-Datei im Weg: Projekt bleibt offen und nutzbar', (await ev(() => window.__t.project().id)) === proj.id);
@@ -252,7 +256,7 @@ try {
await h.domClick('start-new');
await h.waitFor('erstes neues Modell', () => !!window.__t.project() && window.__t.status().state === 'ok' && window.__t.partCount() === 2, 90000);
const m1 = await h.ev(() => window.__t.project());
- check('„Neues Modell“ auf der Startseite: Modell offen, Startseite zu', fs.existsSync(m1.dir) && await h.ev(() => document.getElementById('start').hidden));
+ check('„New model“ auf der Startseite: Modell offen, Startseite zu', fs.existsSync(m1.dir) && await h.ev(() => document.getElementById('start').hidden));
await h.domClick('btn-new');
await h.waitFor('zweites neues Modell', (id) => window.__t.project()?.id !== id && window.__t.status().state === 'ok' && window.__t.partCount() === 2, 90000, m1.id);
const m2 = await h.ev(() => window.__t.project());
@@ -268,7 +272,7 @@ try {
await h.ev(() => window.__t.showStart(true));
await h.waitFor('Karten', () => document.querySelectorAll('#start-recent .recent-item').length === 2, 10000).catch(() => {});
const cards = await h.ev(() => [...document.querySelectorAll('#start-recent .recent-item')].map((c) => ({ text: c.textContent, rm: !!c.querySelector('.recent-rm') })));
- check('Karten nennen „nie gespeichert“, Entfernen gibt es nur beim nicht geöffneten', cards.length === 2 && cards.every((c) => c.text.includes('nie gespeichert'))
+ check('Karten nennen „never saved“, Entfernen gibt es nur beim nicht geöffneten', cards.length === 2 && cards.every((c) => c.text.includes('never saved'))
&& cards.filter((c) => c.rm).length === 1, JSON.stringify(cards).slice(0, 120));
await h.answers([1]);
await h.ev(() => document.querySelector('#start-recent .recent-rm').click());