Skip to content

Add free translation input to segment view#114

Merged
alex-rawlings-yyc merged 7 commits into
mainfrom
gloss-segment
Jun 22, 2026
Merged

Add free translation input to segment view#114
alex-rawlings-yyc merged 7 commits into
mainfrom
gloss-segment

Conversation

@alex-rawlings-yyc

@alex-rawlings-yyc alex-rawlings-yyc commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Devin's review of this PR: https://app.devin.ai/review/sillsdev/interlinearizer-extension/pull/114

This change is Reviewable

Summary by CodeRabbit

New Features

  • Added segment-level free translation input field with editable text per segment
  • New "Show free translation" toggle in view options to display/hide free translations beneath segments
  • Free translation input works across all display modes and automatically saves changes on blur

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Note

Reviews paused

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch gloss-segment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@alex-rawlings-yyc alex-rawlings-yyc linked an issue Jun 18, 2026 that may be closed by this pull request
@alex-rawlings-yyc alex-rawlings-yyc self-assigned this Jun 18, 2026
Base automatically changed from save-draft-project to main June 19, 2026 19:02
@alex-rawlings-yyc alex-rawlings-yyc force-pushed the gloss-segment branch 2 times, most recently from a77bd89 to e6dd6f4 Compare June 19, 2026 19:11
@alex-rawlings-yyc alex-rawlings-yyc marked this pull request as ready for review June 19, 2026 19:13
@alex-rawlings-yyc

This comment was marked as outdated.

@coderabbitai

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as outdated.

@imnasnainaec imnasnainaec left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@imnasnainaec partially reviewed 20 files and all commit messages, and made 1 comment.
Reviewable status: 19 of 25 files reviewed, 1 unresolved discussion (waiting on alex-rawlings-yyc).


src/__tests__/components/ContinuousView.test.tsx line 944 at r3 (raw file):

          tokenDocOrder={tokenDocOrder}
          wordTokenByRef={wordTokenByRef}
          viewOptions={{

Oops, I missed this one, which can be

viewOptions={{ ...allFalseViewOptions,  hideInactiveLinkButtons: true }}

@alex-rawlings-yyc alex-rawlings-yyc left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alex-rawlings-yyc resolved 1 discussion.
Reviewable status: 19 of 26 files reviewed, all discussions resolved (waiting on alex-rawlings-yyc and imnasnainaec).

* Add free translation input to segment view

* Minor adjustments

* Minor adjustment

* Reduce test

* Refine localized-strings tests

* Add all-false ViewOptions test object

---------

Co-authored-by: Alex Rawlings <alex.rawlings@wycliffe.ca>

@imnasnainaec imnasnainaec left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@imnasnainaec reviewed 6 files and all commit messages, and made 1 comment.
Reviewable status: 25 of 26 files reviewed, all discussions resolved (waiting on alex-rawlings-yyc).


src/store/analysisSlice.ts line 174 at r4 (raw file):

    (!analysis.freeTranslation ||
      Object.values(analysis.freeTranslation).every((t) => t.trim() === '')) &&
    analysis.literalTranslation === undefined

⛏️
The empty-literal-translation check, instead of === undefined, could mirror the one before it:

(!analysis.literalTranslation ||
  Object.values(analysis.literalTranslation).every((t) => t.trim() === ''))

Even better, we could add an isEmptyMultistring util function to call for both.

@imnasnainaec imnasnainaec left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@imnasnainaec made 1 comment.
Reviewable status: 25 of 26 files reviewed, all discussions resolved (waiting on alex-rawlings-yyc).


src/components/SegmentView.tsx line 82 at r4 (raw file):

   * passed through to {@link PhraseStripContextValue}; `chapterLabelInVerse` controls this segment's
   * verse label.
   */
 /** Bundled display toggles; `chapterLabelInVerse` sets the verse label, the rest pass through to {@link PhraseStripContextValue}. */

Code quote:

  /**
   * Bundled display toggles. `hideInactiveLinkButtons`, `simplifyPhrases`, and `showMorphology` are
   * passed through to {@link PhraseStripContextValue}; `chapterLabelInVerse` controls this segment's
   * verse label.
   */

@imnasnainaec imnasnainaec left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@imnasnainaec reviewed 4 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on alex-rawlings-yyc).

@alex-rawlings-yyc alex-rawlings-yyc merged commit 31ee21d into main Jun 22, 2026
14 of 15 checks passed
@alex-rawlings-yyc alex-rawlings-yyc deleted the gloss-segment branch June 22, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gloss a segment (free translation)

2 participants