Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ All notable changes to Tolk are documented in this file.

- **Translate from origin** is a button in the field's header (the book icon) instead of an item in the field's actions menu, so one field takes one click. It asks first only when the field holds text of its own: an empty field, or one that still shows the origin's text, is translated at once. While a translation runs, the buttons are disabled instead of hidden.

### Fixed

- On Statamic 6.36, which keeps each entry's whole family of localizations in memory for the rest of a request, planning and estimating a run over a large collection kept every entry it had read in memory instead of one batch at a time. Tolk now forgets that cache between batches too.
- On Statamic 6.36, a model select that takes a typed model (in the translation options and the settings, for users who may edit Tolk's settings) no longer opens its list as soon as it gets the keyboard focus. The open list kept taking the focus back, so Tab could not leave the field, and in the translation options Esc closed the whole dialog; the list also covered the options below it. It opens on a click, an arrow key or typing, as before 6.36.
- On Statamic 6.36, the descriptions under the checkboxes of the translation options, **Translate into…** and the site profile's terms are readable in dark mode again.

## 1.0.0 - 2026-10-15

### Added
Expand Down
2 changes: 2 additions & 0 deletions TASKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2566,3 +2566,5 @@ Owner decision 2026-10-14 (reproduced by failing tests first): a run went on thr
Owner decision 2026-10-14 (D5 kept, reproduced by failing tests first): a copy of the origin's text saved over a field Tolk translated (a form that still held it, saved after a run or an automatic update translated the field, or an inherited Bard field set back to inherit that rewrote itself) read manual with an unchanged source, so its item read up to date while the field was in the source language, and nothing pointed to it. `StatusResolver` now flags such a field `FieldStatusInfo::$sameAsOrigin` (manual, a machine record, `T == C` with text; `C` is walked only for those fields), which `needsAttention()` counts, so the item reads **attention** on the Overview, in `tolk:status` and in the origin's list; Translate and Update still leave it alone (D5). `editor/status` sends `same_as_origin` per field, and the banner names the fields ("Title holds the text of the origin again. Translate it, or mark it as up to date to keep it.") with **Translate it** / **Translate them** (`translations.translate()` with `mode: all`, those fields and `overwriteManual`, so a field typed into is still skipped and Undo restores the copy); "Mark manual fields as up to date" writes a baseline, which is no machine record, and clears the flag. §A6 rule 3 and the item status amended; `docs/statuses.md` ("Needs attention", item statuses, "A copy saved over a translation"), `docs/troubleshooting.md`, `docs/editor.md`, `docs/cli.md` (`tolk:baseline`) and the changelog. Tests: `StatusResolverTest` +1 (failed before), `EditorStatusTest` +1 (the payload key; failed before), the pinning test in `TargetTranslatorTest` now expects attention, `statuses.test.js` +1, `EditorBanner.test.js` +2.
Owner decision 2026-10-15: the repository is public, so `docs/research/` was removed from every commit with `git filter-repo` before tagging 1.0.0 and is git-ignored; the reports stay in the owner's working copy. The commits of pull requests #1 and #2 still hold it on GitHub until GitHub Support removes them.
T11.7 done 2026-10-20: at the owner's request, "Translate from origin" is a quick action, a `dictionary-language-book` icon button in the field's header with the title as tooltip and `aria-label`, disabled instead of hidden while a translation runs (`disabled()`, `BUSY`); `run` asks first only when the form's value has text that is not the origin's (`replacesText()`: `textsOf()` and `sameText()` with `originValues`) and otherwise translates at once (`start()`); Cancel and Esc give the focus back to the header's button with that `aria-label`, and a focus the disabled button lost moves into the banner. Tests: `fieldActions.test.js` 34 (5 new, 4 changed: quick with the icon; disabled, not hidden, in each phase and through a computed; enabled without a base form; at once on '', null, an empty Bard paragraph and the origin's text; asks on the localization's own and on typed text; asks without a base form and reports it; the focus into the banner after a direct translation, back to the button on Cancel), 9 mutations each fail a test; `tests/Browser/field-action.spec.js` (3: the button in the same headers as before and in none of the others, typed title with the confirmation, both buttons disabled during the translation, the untranslated Bard field without a dialog, the focus in the banner after it). Docs: `docs/editor.md`, README, `docs/marketplace-listing.md`, `CHANGELOG.md`; the docs site's editor page, introduction and `field-action` screenshots. Vitest 772 passed, Pest 4,008 passed, Pint clean, `npm run cp:build` committed; browser 69 passed, 4 skipped, 2 failed in `editor-push.spec.js`: "Update translations changes only the edited paragraph" (a Bard image stored wrapped in a paragraph) fails on 1.0.0 too whenever the spec runs after `editor-options.spec.js` and passes alone, and "Translate into…" (the button not disabled after typing) failed only in the full run and passed in four reruns; neither is caused by this task, both left open. Sandbox restored.
Review fix 2026-10-20 (found by CI on the merge of T11.7, which `composer update` ran on Statamic 6.36.0; reproduced locally by updating Statamic first): 6.36 memoizes `Entry::descendants()` per request under `entry-all-descendants-{id}` (statamic/cms#15645), next to `directDescendants()`'s `entry-descendants-{id}`, and `in()` and `existsIn()` read it. `EntryMemo`'s pattern did not know the key, so `RunPlanner` planning and estimating a large collection held every listed family again (`RunPlannerTest`'s two memory tests: 49 and 11 entries alive instead of at most 1). `EntryMemo::KEYS` now matches `entry-(all-)?descendants-`, and `Target::fresh()`'s comment names the key. `StacheRefreshTest` planted only the old key, which 6.36's `existsIn()` no longer reads; it plants both, and so do `RunTranslateTest`'s stale worker, `StateWriterTest`, `EntryFamiliesTest` and `TranslateCommandTest`'s check, so each still holds what it says on 6.35 and 6.36. `ContentWriter::refreshStache()` drops the whole Blink instance and needed no change. `composer.lock` moves to Statamic 6.36.0 (with Laravel 13.38), so the local suite runs what CI and new installs get. Pest 4,008 passed on 6.36; the six changed files pass on 6.35 from the old lock; the planner tests fail again with the old pattern.
Review fix 2026-10-20 (the browser suite on Statamic 6.36.0, six scenarios failing that pass on 6.35.0; each traced in core's diff of the two tags): (1) since statamic/cms#15249 a taggable `Combobox` opens its list when it gains the focus without a pointer from outside it, and the list's `unmount-auto-focus` puts the focus back into the field when the list closes, which opens it again: Tab never leaves the field, and in a `Modal` Esc closes the modal with the list. A Statamic bug, to be reported. In the translation options the list opened over the checkboxes for users who may type a model (the keyboard pass never reached Close, and the click on Overwrite manual edits never landed). `resources/js/combobox.js` `shouldOpenDropdown()`, passed to the three model selects (the options' model and reviewer, the settings' `ModelSelect`), refuses an opening while a `focus` event is dispatched (`globalThis.event`), so the list opens on a click, a key or typing as before; core's prop exists in 6.35 too. 6.36's `Modal` `autofocus` prop was tried and dropped: the trap stays once Tab reaches the field. (2) #14667 dropped the checkbox description's `dark:text-gray-200`, so in dark mode it fails axe's contrast check (another Statamic bug to report): the six checkboxes with a description (the options, Translate into…, the site profile's terms) pass `dark:[&_p]:text-gray-400!` (core's `Description` colour), which core's `Checkbox` merges into its container, keeping its `aria-describedby`. (3) #14336 keeps a disabled quick field action focusable (`aria-disabled`), so after a translation without the confirmation the focus stays on the button instead of moving into the banner: `field-action.spec.js` accepts either, and the comment in `fieldActions.js` says so. (4) #15249 offers typed text as `Add "…"`: `editor-options.spec.js` accepts both wordings; picking it still commits the model. (5) 6.36's build shortens class names, so core's `PipelineStopped` logs as `pq`: `settings.spec.js` reads the name from `__STATAMIC__.savePipeline`. Vitest 775 passed (`combobox.test.js` 3), Pest 4,008 passed, the four specs 23 passed on 6.36; Tab passes through the settings' and the options' model selects with their lists closed, and Arrow Down opens them.
Loading
Loading