Skip to content

Commit bece126

Browse files
committed
Fine-tune links checks and disabled notices; expand and fix tests
1 parent 9ef10ce commit bece126

10 files changed

+425
-344
lines changed

noticeList.txt

+233-225
Large diffs are not rendered by default.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "uw-content-validation",
33
"description": "Functions for Checking Door43.org Scriptural Content/Resources.",
4-
"version": "3.3.0_alpha16",
4+
"version": "3.3.0",
55
"private": false,
66
"homepage": "https://unfoldingword.github.io/uw-content-validation/",
77
"repository": {

src/__tests__/__snapshots__/book-package-check.test.js.snap

-14
Original file line numberDiff line numberDiff line change
@@ -4537,20 +4537,6 @@ Object {
45374537
"repoName": "en_tq",
45384538
"username": "unfoldingWord",
45394539
},
4540-
Object {
4541-
"C": "3",
4542-
"V": "9",
4543-
"bookID": "RUT",
4544-
"details": "left=0, right=1",
4545-
"extra": "TQ1",
4546-
"filename": "rut/03/09.md",
4547-
"location": " in unfoldingWord (master)",
4548-
"message": "Mismatched “” characters",
4549-
"priority": 162,
4550-
"repoCode": "TQ1",
4551-
"repoName": "en_tq",
4552-
"username": "unfoldingWord",
4553-
},
45544540
Object {
45554541
"C": "4",
45564542
"V": "5",

src/__tests__/__snapshots__/wrapper.test.js.snap

+14-14
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Object {
77
"noticeList": Array [
88
Object {
99
"bookID": "TIT",
10-
"filename": "",
10+
"filename": "testFile.tsv",
1111
"location": "",
1212
"message": "Note that 'disableAllLinkFetchingFlag' was set so link targets were not checked",
1313
"priority": 20,
@@ -34,7 +34,7 @@ Object {
3434
"characterIndex": 29,
3535
"excerpt": "…us chapter 01",
3636
"fieldName": "Note",
37-
"filename": "",
37+
"filename": "testFile.tsv",
3838
"lineNumber": 3,
3939
"location": "",
4040
"message": "Unexpected leading zero",
@@ -44,7 +44,7 @@ Object {
4444
},
4545
Object {
4646
"bookID": "TIT",
47-
"filename": "",
47+
"filename": "testFile.tsv",
4848
"location": "",
4949
"message": "Note that 'disableAllLinkFetchingFlag' was set so link targets were not checked",
5050
"priority": 20,
@@ -66,7 +66,7 @@ Object {
6666
"noticeList": Array [
6767
Object {
6868
"bookID": "TIT",
69-
"filename": "",
69+
"filename": "testFile.tsv",
7070
"location": "",
7171
"message": "Note that 'disableAllLinkFetchingFlag' was set so link targets were not checked",
7272
"priority": 20,
@@ -161,7 +161,7 @@ Object {
161161
"characterIndex": 60,
162162
"excerpt": "…e: [[rc://*/ta/man/t…",
163163
"fieldName": "Note",
164-
"filename": "",
164+
"filename": "testFile.tsv",
165165
"lineNumber": 3,
166166
"location": "",
167167
"message": "tC cannot yet process '*' language code",
@@ -171,7 +171,7 @@ Object {
171171
},
172172
Object {
173173
"bookID": "TIT",
174-
"filename": "",
174+
"filename": "testFile.tsv",
175175
"location": "",
176176
"message": "Note that 'disableAllLinkFetchingFlag' was set so link targets were not checked",
177177
"priority": 20,
@@ -197,7 +197,7 @@ Object {
197197
"bookID": "TIT",
198198
"details": "should Occurrence be zero instead of ",
199199
"fieldName": "Quote",
200-
"filename": "",
200+
"filename": "testFile.tsv",
201201
"lineNumber": 2,
202202
"location": "",
203203
"message": "Missing Quote field",
@@ -211,7 +211,7 @@ Object {
211211
"bookID": "TIT",
212212
"details": "should Occurrence be zero instead of ",
213213
"fieldName": "Quote",
214-
"filename": "",
214+
"filename": "testFile.tsv",
215215
"lineNumber": 3,
216216
"location": "",
217217
"message": "Missing Quote field",
@@ -225,7 +225,7 @@ Object {
225225
"bookID": "TIT",
226226
"details": "should Occurrence be zero instead of ",
227227
"fieldName": "Quote",
228-
"filename": "",
228+
"filename": "testFile.tsv",
229229
"lineNumber": 4,
230230
"location": "",
231231
"message": "Missing Quote field",
@@ -239,7 +239,7 @@ Object {
239239
"bookID": "TIT",
240240
"details": "should Occurrence be zero instead of ",
241241
"fieldName": "Quote",
242-
"filename": "",
242+
"filename": "testFile.tsv",
243243
"lineNumber": 5,
244244
"location": "",
245245
"message": "Missing Quote field",
@@ -253,7 +253,7 @@ Object {
253253
"bookID": "TIT",
254254
"details": "should Occurrence be zero instead of ",
255255
"fieldName": "Quote",
256-
"filename": "",
256+
"filename": "testFile.tsv",
257257
"lineNumber": 6,
258258
"location": "",
259259
"message": "Missing Quote field",
@@ -267,7 +267,7 @@ Object {
267267
"bookID": "TIT",
268268
"details": "should Occurrence be zero instead of ",
269269
"fieldName": "Quote",
270-
"filename": "",
270+
"filename": "testFile.tsv",
271271
"lineNumber": 7,
272272
"location": "",
273273
"message": "Missing Quote field",
@@ -277,7 +277,7 @@ Object {
277277
},
278278
Object {
279279
"bookID": "TIT",
280-
"filename": "",
280+
"filename": "testFile.tsv",
281281
"location": "",
282282
"message": "Note that 'disableAllLinkFetchingFlag' was set so link targets were not checked",
283283
"priority": 20,
@@ -311,7 +311,7 @@ Object {
311311
"noticeList": Array [
312312
Object {
313313
"bookID": "1JN",
314-
"filename": "",
314+
"filename": "testFile.tsv",
315315
"location": "",
316316
"message": "Note that 'disableAllLinkFetchingFlag' was set so link targets were not checked",
317317
"priority": 20,

src/__tests__/wrapper.test.js

+12-6
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,12 @@ describe('checkTN_TSV7Table() - ', () => {
5353
const username = 'unfoldingWord';
5454
const languageCode = 'en';
5555
const bookID = 'TIT';
56+
const filename = 'testFile.tsv';
5657
const tableText = `Reference\tID\tTags\tSupportReference\tQuote\tOccurrence\tNote
5758
1:3\tb22h\t\t\tκαιροῖς ἰδίοις\t1\t“at the proper time”
5859
1:3\txy18\t\trc://*/ta/man/translate/figs-exclusive\tἡμῶν\t1\tThis includes Paul, Titus, and all Christians. (See: [[rc://*/ta/man/translate/figs-exclusive]])
5960
`;
60-
const rawResults = await checkTN_TSV7Table(username, languageCode, bookID, tableText, optionalCheckingOptions);
61+
const rawResults = await checkTN_TSV7Table(username, languageCode, bookID, filename, tableText, optionalCheckingOptions);
6162
// console.log(`Test took ${rawResults.elapsedSeconds} seconds`);
6263
expect(rawResults.noticeList.length).toBeGreaterThan(0);
6364
const filteredResults = {
@@ -135,14 +136,15 @@ describe('checkSN_TSV7Table() - ', () => {
135136
const username = 'unfoldingWord';
136137
const languageCode = 'en';
137138
const bookID = 'TIT';
139+
const filename = 'testFile.tsv';
138140
const tableText = `Reference\tID\tTags\tSupportReference\tQuote\tOccurrence\tNote
139141
front:intro\tm2jl\t\t\t\t\t# Introduction to Titus\\n\\nThis is the introduction to the book of Titus
140142
1:intro\tc7me\t\t\t\t\t# Introduction to Titus chapter 01\\n\\nPaul begins his letter by reminding Titus who Paul is to God, and who Titus is to Paul. He then instructs Titus about the kind of man that Titus must appoint as elders. These elders are necessary for the health of the new believers because there were so many people in Crete who are teaching things that were not true about God, and turning people away from God.
141143
1:1\trtc9\t\t\tδοῦλος Θεοῦ\t1\tPaul said that he was a servant or a slave of God because he did only what he knew that God, his master, wanted him to do. Other servants of God were Moses, David, and the other prophets.
142144
1:1\txyz8\t\t\tδοῦλος\t1\tPeople who speak some modern languages think that slave is different from servant, because slaves suffer in ways that servants do not. However, the Greek word **servant** means both slave and servant. It means anyone who must obey his master. This is why Paul said he was a slave or servant of God, because he wanted to obey God in every way.
143145
1:1\tabc8\t\t\tἐκλεκτῶν Θεοῦ\t1\tThese people were the Christians. God chose them to know him. They did this by believing in Christ. This is why they were different from all other people. Paul became a servant and apostle of God so that they would trust in Christ and know God increasingly well.
144146
`;
145-
const rawResults = await checkSN_TSV7Table(username, languageCode, bookID, tableText, optionalCheckingOptions);
147+
const rawResults = await checkSN_TSV7Table(username, languageCode, bookID, filename, tableText, optionalCheckingOptions);
146148
// console.log(`Test took ${rawResults.elapsedSeconds} seconds`);
147149
expect(rawResults.noticeList.length).toBeGreaterThan(0);
148150
const filteredResults = {
@@ -166,6 +168,7 @@ describe('checkTQ_TSV7Table() - ', () => {
166168
const username = 'unfoldingWord';
167169
const languageCode = 'en';
168170
const bookID = 'TIT';
171+
const filename = 'testFile.tsv';
169172
const tableText = `Reference\tID\tTags\tQuote\tOccurrence\tQuestion\tResponse
170173
1:2\tkowp\t\t\t\tWho were the “eyewitnesses” that Luke mentions?\tThe “eyewitnesses” were the ones who were with the apostles from the beginning of Jesus’ ministry.
171174
1:2\tgjx5\t\t\t\tWhat did some of the eyewitnesses do after they saw what Jesus did?\tThey wrote down an account or story of what Jesus did.
@@ -174,7 +177,7 @@ describe('checkTQ_TSV7Table() - ', () => {
174177
1:7\tlyss\t\t\t\tWhy did Zechariah and Elizabeth have no children?\tThey did not have children because Elizabeth was unable to bear a child. Now she and Zechariah were very old.
175178
1:8\tndy2\t\t\t\tWhat work was Zechariah doing before God?\tZechariah was serving as a priest.
176179
`;
177-
const rawResults = await checkTQ_TSV7Table(username, languageCode, bookID, tableText, optionalCheckingOptions);
180+
const rawResults = await checkTQ_TSV7Table(username, languageCode, bookID, filename, tableText, optionalCheckingOptions);
178181
// console.log(`Test took ${rawResults.elapsedSeconds} seconds`);
179182
expect(rawResults.noticeList.length).toBeGreaterThan(0);
180183
const filteredResults = {
@@ -198,13 +201,14 @@ describe('checkSQ_TSV7Table() - ', () => {
198201
const username = 'unfoldingWord';
199202
const languageCode = 'en';
200203
const bookID = 'TIT';
204+
const filename = 'testFile.tsv';
201205
const tableText = `Reference\tID\tTags\tQuote\tOccurrence\tQuestion\tResponse
202206
front:intro\tgtn1\t\t\t\t# Titus Study Questions\\n\\nThe Apostle Paul left Titus in Crete and gave him the responsibility to teach the new believers there, and to appoint elders in the local churches. Titus was a godly man, but he was not have as much experience as Paul did in guiding the formation of the new churches. In this letter, therefore, Paul counsels Titus concerning:\\n\\n* How Titus should fulfil his task\\n* The kind of men he should appoint as elders\\n* The type of threats that existed that could damage the new believers\\n* How believers should act in their daily lifes\\n* What is the hope that the believers look forward to\\n* How believers should interact with secular authorities and those who do not believe in Jesus\\n* The precise message that we should believe and teach\\n* How to deal with division within the church\\n\\nYou can discover Paul’s teaching concerning each of these things by carefully reading each chapter of the letter. Ask yourself questions about what you read, and pray to God that he will open your eyes to see clearly.\t
203207
1:1\tx3em\t\tδοῦλος Θεοῦ, ἀπόστολος δὲ Ἰησοῦ Χριστοῦ\t1\tHow did Paul describe himself to Titus?\t
204208
1:1\tv5b9\t\tδοῦλος & ἀπόστολος\t1\tWhy do you think Paul described himself as a **servant** before he described himself as an **apostle**?\t
205209
1:1\tsg88\t\tδοῦλος Θεοῦ\t1\tIn what ways was Paul **a servant of God**?\t
206210
`;
207-
const rawResults = await checkSQ_TSV7Table(username, languageCode, bookID, tableText, optionalCheckingOptions);
211+
const rawResults = await checkSQ_TSV7Table(username, languageCode, bookID, filename, tableText, optionalCheckingOptions);
208212
// console.log(`Test took ${rawResults.elapsedSeconds} seconds`);
209213
expect(rawResults.noticeList.length).toBeGreaterThan(0);
210214
const filteredResults = {
@@ -228,14 +232,15 @@ describe('checkTWL_TSV6Table() - ', () => {
228232
const username = 'unfoldingWord';
229233
const languageCode = 'en';
230234
const bookID = '1JN';
235+
const filename = 'testFile.tsv';
231236
const tableText = `Reference\tID\tTags\tOrigWords\tOccurrence\tTWLink
232237
1:1\te6vb\t\tχεῖρες\t1\trc://*/tw/dict/bible/other/hand
233238
1:1\tndps\tkeyterm\tζωῆς\t1\trc://*/tw/dict/bible/kt/life
234239
1:2\tx9aq\tkeyterm\tζωὴ\t1\trc://*/tw/dict/bible/kt/life
235240
1:2\tbtym\tkeyterm\tμαρτυροῦμεν\t1\trc://*/tw/dict/bible/kt/testimony
236241
1:2\tch2n\t\tἀπαγγέλλομεν\t1\trc://*/tw/dict/bible/other/declare
237242
`;
238-
const rawResults = await checkTWL_TSV6Table(username, languageCode, bookID, tableText, optionalCheckingOptions);
243+
const rawResults = await checkTWL_TSV6Table(username, languageCode, bookID, filename, tableText, optionalCheckingOptions);
239244
// console.log(`Test took ${rawResults.elapsedSeconds} seconds`);
240245
expect(rawResults.noticeList.length).toBeGreaterThan(0);
241246
const filteredResults = {
@@ -346,6 +351,7 @@ describe('checkDeprecatedTN_TSV9Table() - ', () => {
346351
const username = 'unfoldingWord';
347352
const languageCode = 'en';
348353
const bookID = 'TIT';
354+
const filename = 'testFile.tsv';
349355
const tableText = `Book\tChapter\tVerse\tID\tSupportReference\tOrigQuote\tOccurrence\tGLQuote\tOccurrenceNote
350356
TIT\tfront\tintro\tm2jl\t\t\t0\t\t# Introduction to Titus<br><br><br>## Part 1: General Introduction<br><br>### Outline of the book of Titus<br><br>1. Paul instructs Titus to appoint godly leaders. (1:1-16)<br>2. Paul instructs Titus to train people to live godly lives. (2:1-3:11)<br>3. Paul ends by sharing some of his plans and sending greetings to various believers. (3:12-15)<br><br>### Who wrote the book of Titus?<br><br>Paul wrote the book of Titus. Paul was from the city of Tarsus. He had been known as Saul in his early life. Before becoming a Christian, Paul was a Pharisee. He persecuted Christians. After he became a Christian, he traveled several times throughout the Roman Empire telling people about Jesus.<br><br>### What is the book of Titus about?<br><br>Paul wrote this letter to Titus, his fellow worker, who was leading the churches on the island of Crete. Paul instructed him about selecting church leaders. Paul also described how the believers should behave towards each other. He also encouraged them all to live in a way that pleases God.<br><br>### How should the title of this book be translated?<br><br>Translators may choose to call this book by its traditional title, “Titus.” Or they may choose a clearer title, such as “Paul’s Letter to Titus” or “A Letter to Titus.” (See: [[rc://en/ta/man/translate/translate-names]])<br><br>## Part 2: Important Religious and Cultural Concepts<br><br>### In what roles can people serve within the church?<br><br>There are some teachings in the book of Titus about whether a woman or divorced man can serve in positions of leadership within the church. Scholars disagree about the meaning of these teachings. Further study on these issues may be necessary before translating this book.<br><br>## Part 3: Important Translation Issues<br><br>### Singular and plural **you**<br><br>In this book, the word **I** refers to Paul. Also, the word **you** is almost always singular and refers to Titus. The exception to this is 3:15. (See: [[rc://en/ta/man/translate/figs-exclusive]] and [[rc://en/ta/man/translate/figs-you]])<br><br>### What is the meaning of **God our Savior**?<br><br>This is a common phrase in this letter. Paul meant to make the readers think about how God forgave them in Christ for sinning against him, and by forgiving them he saved them from being punished when he judges all people. A similar phrase in this letter is **our great God and Savior Jesus Christ**.
351357
TIT\t1\tintro\tc7me\t\t\t0\t\t# Titus 1 General Notes<br><br>## Structure and formatting<br><br>Paul formally introduces this letter in verses 1-4. Writers often began letters in this way in the ancient Near East.<br><br>In verses 6-9, Paul lists several qualities that a man must have if he is to be an elder in the church. (See: rc://en/ta/man/translate/figs-abstractnouns) Paul gives a similar list in 1 Timothy 3.<br><br>## Special concepts in this chapter<br><br>### Elders<br><br>The church has used different titles for church leaders. Some titles include overseer, elder, pastor, and bishop.<br><br>## Other possible translation difficulties in this chapter<br><br>### Should, may, must<br><br>The ULT uses different words that indicate requirements or obligations. These verbs have different levels of force associated with them. The subtle differences may be difficult to translate. The UST translates these verbs in a more general way.
@@ -357,7 +363,7 @@ TIT\t1\t2\txyz9\t\tἐπ’ ἐλπίδι ζωῆς αἰωνίου\t1\twith the
357363
TIT\t1\t2\tr2gj\t\tπρὸ χρόνων αἰωνίων\t1\tbefore all the ages of time\t“before time began”
358364
TIT\t1\t3\tb22h\t\tκαιροῖς ἰδίοις\t1\tat the right time\t“at the proper time”
359365
`;
360-
const rawResults = await checkDeprecatedTN_TSV9Table(username, languageCode, bookID, tableText, optionalCheckingOptions);
366+
const rawResults = await checkDeprecatedTN_TSV9Table(username, languageCode, bookID, filename, tableText, optionalCheckingOptions);
361367
// console.log(`Test took ${rawResults.elapsedSeconds} seconds`);
362368
expect(rawResults.noticeList.length).toBeGreaterThan(0);
363369
const filteredResults = {

0 commit comments

Comments
 (0)