Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Re-translate to Dolfin

Re-translate to Dolfin regenerates the Dolfin files from the current Turtle. Use it after you edited the origin Turtle by hand, or after adding a class there that has no Dolfin declaration yet.

Video 6.1 · Turtle projects, chapter “Re-translate” (1:12–1:42). Watch on PeerTube

It overwrites Dolfin files, so it always shows a preview first and never touches a file you did not tick.

Start it from the Re-translate to Dolfin… button in the origin Turtle’s toolbar, or from ⟳ Re-translate to Dolfin… in the origin file’s context menu in the file tree.

In a project with several Turtle sources, it acts on one source: the .ttl you started it from. Only the Dolfin files that source generated are compared, plus any existing file with the name of a file it produces. A file it writes joins that source’s files.

The dialog

The Turtle is translated exactly as at import, then compared with your current Dolfin files. Each file gets a status:

StatusMeaningTicked by default
addedThe Turtle now produces a file you do not have.yes
modifiedThe generated file differs from yours.yes
only in dolfinYou have a file the Turtle does not produce. Kept unless ticked (ticking deletes it).no
unchangedIdentical. Listed collapsed.no

package.dlf is never ticked by default: your version, author and description are only overwritten if you tick it.

Shared files

A shared file also holds declarations from other sources. Re-translating one source must never remove them. If the file would lose a declaration that another source’s Turtle makes, its row cannot be ticked, and its note names the other source and the declarations:

shared with b.ttl: re-translating would drop its declarations (Person). Edit this file by hand instead

A declaration that both sources make is written as the source you re-translate makes it. If a shared file does not parse, its row is refused too.

Click a file name to see a side-by-side diff: current Dolfin on the left, after re-translate on the right.

The footer says how many files will be replaced. Confirm with Replace N file(s).

If the Turtle has a syntax error, the dialog shows it with its line and column and does nothing.

Safety

  • Previous contents stay restorable from each file’s version history.
  • Afterwards the project’s sync reference is set to the new Dolfin files, so the automatic sync that follows finds nothing to do and does not write anything back.
  • Edits you saved in the last three seconds in files you did not tick are treated as already synced.
  • If something fails halfway, the chip shows error: partial re-translate — run Re-translate again and automatic sync is switched off. Run Re-translate again: files already written show as unchanged, and it finishes the rest.
  • The file limit still applies to added files (the origin Turtles and package.dlf are not counted).