Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

ConvertUsfmVersificationHandler doesn't merge verses correctly

已关闭
#517 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@Enkidu93 已经在做这个了。

开始于 2026年9月24日。

评估

这个 Issue 还没有评估数据。

描述

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);
}
主要语言
C#
星标
29
派生
17
平均合并
4 天 15 小时
30 天内合并 PR
8

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

sillsdev/machine 的其他 Issue

查看 sillsdev/machine 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。