Files
mantra-kmp/composeApp/src/commonMain/kotlin
Kgothatso Ngako c494cf9e11 Add per-chunk translation editor
The translation column of the chapter table is now a TextButton (with a
ChevronRight) per chunk; tapping it opens an editor for that chunk.

- TranslateChunkScreen (route + screen/ViewModel/UIState) shows the full
  original chunk and a text input prefilled with any existing translation.
  Saving persists the translation and returns to a freshly-loaded chapter
  table (popUpTo<TranslationChapterRoute>) so the update shows.
- MantraRepository.saveTranslationChunk builds a MantraTranslationChunk from
  the entered text (content-hash id, index mirrored from the source chunk),
  upserts it plus its MarmotInnerEvent rumor, and replaces any prior
  translation chunk for the same source chunk (deleting the stale row and its
  rumor) so there is exactly one per source chunk. New DAO queries getChunkById,
  MantraTranslationChunkDao.deleteById, MarmotInnerEventDao.deleteById, and
  repository getChunk.
- TranslationChapterScreen renders the translation cell as the button and
  navigates to TranslateChunkRoute with the source chunkId.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-26 02:29:58 +02:00
..
2026-07-15 01:14:46 +02:00