Beispiel #1
0
        private ChapterDisplayTextModel GetMergedSentence(ChapterDisplayTextModel mergedSentence, SentenceModel sentence)
        {
            if (mergedSentence == null)
            {
                return(GetTextModel(sentence));
            }

            if (CheckMergeRequired(mergedSentence, sentence))
            {
                mergedSentence.AppendText(sentence);
                return(mergedSentence);
            }

            return(GetTextModel(sentence));
        }
Beispiel #2
0
 public bool CheckMergeRequired(ChapterDisplayTextModel current, SentenceModel next)
 {
     return(CheckMergeRequired(current.Text, next.Sentence) && CheckMergeRequired(current.TextTranslation, next.SentenceTranslation));
 }