ConvertUsfmVersificationHandler doesn't merge verses correctly
Maintainers usually reply within 1 day
@Enkidu93 is already working on this.
Since Sep 24, 2026.
Assessment
This issue has not been assessed yet.
Description
The English versification has the following verse mapping for Psalm 51 which merges two verses into one:
PSA 51:0 = PSA 51:1
PSA 51:0 = PSA 51:2
PSA 51:1-19 = PSA 51:3-21
When converting Psalm 51 from Original to English Versification, the following USFM is generated:
\id PSA
\c 51
\s1 Create in Me a Clean Heart, O God
\r (2 Samuel 12:1–12)
\p
\v 0 For the choirmaster. A Psalm of David.
\v 0 When Nathan the prophet came to him after his adultery with Bathsheba.
\b
\q1
\v 1 Have mercy on me,\f + \fr 51:3 \ft Or \fqa Be gracious to me\f* O God,
\q2 according to Your loving devotion;
\q1 according to Your great compassion,
\q2 blot out my transgressions.
...
A test which recreates this scenario:
[Test]
public void GetUsfm_MergedVerses()
{
// Original vs. English
// PSA 51:1-3 = PSA 51:0-1
string usfm =
@"\id PSA
\c 51
\s1 Create in Me a Clean Heart, O God
\r (2 Samuel 12:1–12)
\p
\v 1 For the choirmaster. A Psalm of David.
\v 2 When Nathan the prophet came to him after his adultery with Bathsheba.
\b
\q1
\v 3 Have mercy on me,\f + \fr 51:3 \ft Or \fqa Be gracious to me\f* O God,
\q2 according to Your loving devotion;
\q1 according to Your great compassion,
\q2 blot out my transgressions.
";
string target = UpdateUsfm(usfm, sourceVersification: ScrVers.Original, targetVersification: ScrVers.English);
string result =
@"\id PSA
\c 51
\s1 Create in Me a Clean Heart, O God
\r (2 Samuel 12:1–12)
\p
\v 0 For the choirmaster. A Psalm of David. When Nathan the prophet came to him after his adultery with Bathsheba.
\b
\q1 \v 1 Have mercy on me,\f + \fr 51:1 \ft Or \fqa Be gracious to me\f* O God,
\q2 according to Your loving devotion;
\q1 according to Your great compassion,
\q2 blot out my transgressions.
";
AssertUsfmEquals(target, result);
}
- Dominant language
- C#
- Stars
- 29
- Forks
- 17
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 7
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sillsdev/machine
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
ConvertUsfmVersificationHandler does not move headings immediately before re-versified verses to the new chapterPossibly taken @Enkidu93 claimed this 3 days ago. Open
sillsdev/machine#518 · 1 assignee ·
Maintainers usually reply within 1 day
-
Environment matchers pay for captures they never read; key the traversal on what the caller consumesOpen
Difficulty 5/5 Over a week Newbie friendliness 45/100
sillsdev/machine#515 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
HermitCrab: Word.ExpandAlternatives discards Unify's success flag and can null the realizational FSOpen
Difficulty 5/5 Over a week Newbie friendliness 38/100
Maintainers usually reply within 1 day
All issues in sillsdev/machine
Similar issues
-
0 - Backlog Bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
BrighterCommand/Brighter#4444 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
area:frontend bug FE P3
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
klasolsson81/jobbliggaren#1915 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
microsoft/vscode-copilotstudio#431 ·
Maintainers usually reply within 2 days