platform-bible-utils
    Preparing search index...

    Type Alias LegacyComment

    Represents a single comment/note in a scripture text

    This is the C# Comment type from Paratext.Data.ProjectComments

    type LegacyComment = {
        acceptedText?: string;
        assignedUser?: string;
        biblicalTermId?: string;
        conflictResolutionAction?: "replaced" | "merged";
        conflictType?: string;
        contents: string;
        contextAfter?: string;
        contextBefore?: string;
        date: string;
        deleted: boolean;
        extraHeadingInfo?: string;
        hideInTextWindow: boolean;
        id: string;
        isRead: boolean;
        language: string;
        mergedText?: string;
        rejectedResultText?: string;
        rejectedText?: string;
        replyToUser?: string;
        resultText?: string;
        selectedText?: string;
        shared?: string;
        startPosition: number;
        status?: CommentStatus;
        tagAdded?: string;
        tagRemoved?: string;
        thread: string;
        type?: string;
        user: string;
        verse?: string;
        verseRef: string;
    }
    Index

    Properties

    acceptedText?: string

    Only present on the ROOT comment of a verseText conflict thread: HTML diff of the accepted (winning) side (same <u>/<s> markup as rejectedText). Also absent for verseText conflicts that have no common ancestor (two translators independently drafted the same previously-absent verse, so no accepted-side diff exists), and when the accepted-side diff has no visible content. Never present on replies. Consumers must treat this field as optional even on verseText conflict notes.

    assignedUser?: string

    Present in a note when it has been assigned to a particular user

    biblicalTermId?: string

    Present when there is a Biblical Term Id associated with the note

    conflictResolutionAction?: "replaced" | "merged"

    The conflict-resolution action recorded on a conflict thread's resolution comment, present only when text was written into the verse:

    • 'replaced' — the conflict was rejected, so the previously-rejected side was written into the text (replacing what Paratext had accepted).
    • 'merged' - the conflict was resolved via PT10's merge action, which writes PT9's auto-merged (both-sides) text into the verse; data synced from a PT9 three-way merge may also carry it.

    Absent means the conflict was accepted (no text write) or this is not a resolution comment. Unlike the four verseText decode fields, this is NOT gated on conflictType: the resolution comment has type Conflict but no conflictType, so it must be read directly from this field.

    conflictType?: string

    Type of conflict. Only applicable for conflict notes and it used to give a more specific message when displaying the note. Only meaningful on a thread's ROOT comment (not necessarily comments[0] — see LegacyCommentThread.comments); never present on replies.

    contents: string

    Contents of the comment, represented in HTML that includes some Paratext 9 specific tags

    contextAfter?: string

    If SelectedText is not empty, some optional context of the selected text occurs immediately after the selection.

    contextBefore?: string

    If SelectedText is not empty, some optional context of the selected text occurs immediately before the selection.

    date: string

    Date the comment was created (format like 2008-04-10T06:30:00.0000000-07:00)

    deleted: boolean

    True if the comment has been deleted

    extraHeadingInfo?: string

    Additional information for the note header, added for Biblical Term notes.

    hideInTextWindow: boolean

    Present in a comment to hide the note when showing notes in teh Scripture text windows.

    id: string

    Unique id of the comment, unchanged by subsequent editing

    isRead: boolean

    Whether the comment has been read (by the current user)

    language: string

    Language of note

    mergedText?: string

    The PT9 "merge all changes" diff preview (same markup as acceptedText/ rejectedText); present only when the two changes are independent.

    rejectedResultText?: string

    Only present on the ROOT comment of a verseText conflict thread (never on replies): the resulting verse USFM (plain, no diff markup) if the change is REJECTED — i.e. the losing side. Pairs with resultText (the accepted outcome) to drive a dynamic result preview. Absent when the reject outcome decodes to an empty verse (e.g. the losing side deleted the verse) or the note carries no decodable diff. May be absent even when rejectedText is present — the two are independently optional.

    rejectedText?: string

    Only present on the ROOT comment of a verseText conflict thread, and only when the rejected (losing) side's rendered diff has visible content: HTML diff of the rejected side, using Paratext 9's <u> (inserted) and <s> (deleted) markup. This is full HTML, <blockquote>-wrapped like contents. Coloring is applied by the UI, not carried in the markup. Absent for normal notes, non-verseText conflicts, replies, and conflicts whose rejected-side diff body is empty.

    replyToUser?: string

    Present in a note when it has been assigned to reply-to a particular user

    resultText?: string

    Only present on the ROOT comment of a verseText conflict thread when the merged result verse USFM is non-empty: the resulting verse USFM (plain, no diff markup) already written into the text at merge time. Equals the accepted side in v1. Absent otherwise. On a verseText conflict ROOT this value equals the serialized verse field, but the two are deliberately distinct: verse is ungated per-comment verse-history data whose meaning varies by position (on a reply it is the verse text captured at reply time, possibly stale), while resultText is root-only conflict metadata. Conflict-card consumers must read resultText, never verse.

    selectedText?: string

    Text which was selected in comment, or "" for none

    shared?: string

    Present in a note when it has been marked to be shared in teh Global Consultant Notes

    startPosition: number

    Approximate position where the comment begins. Zero for attached to a verse.

    status?: CommentStatus

    Can be "todo", "done", or "deleted." Empty string falls back to previous status in thread.

    tagAdded?: string

    Tags added in this note, joined with (',')

    tagRemoved?: string

    Tags removed in this note, joined with (',')

    thread: string

    Guid of the thread of comments

    type?: string

    Type of note. Normal notes have no type (""), but conflicts that are stored as notes have type "conflict."

    user: string

    Name of the user who created this comment

    verse?: string

    The verse USFM captured on this comment. Per-comment history data, present on replies too: Paratext 9 stores the current verse text on any comment written after the verse changed. Only on a conflict thread's ROOT comment does it hold the merged result — conflict-card consumers should read resultText instead of this field.

    verseRef: string

    Verse reference in which comment appears