unfoldingWord / translationCore

Repository for the desktop application translationCore
https://www.translationcore.com
Other
36 stars 11 forks source link

Support Verse Bridges/Spans for wA tool #4490

Open benjore opened 6 years ago

benjore commented 6 years ago

User Story

As an aligner of the UST, I want the wA tool to support verse bridges so that I can complete all the alignments.

Specs

To Consider

image

image

Per @klappy on #4543

Importance of ContextID being fixed

Context ID comes from the checking tool itself and based on the Greek versification not the target verse. So the context ID itself wouldn't include the verse bridge information. Context ID's are like direct identifiers of where in the app, checking tool, check category/group, selected menu item that the user was in when the verse was edited.

ContextID in Tools and CheckData

Any ContextID in a menu, tW tool, wA tool, edits, bookmarks, selections, etc... uses the below path structure of the verse bridges and specific verse in the reference of the context id unchanged.

We should always open the verse bridge by knowing the specific context ID. The context ID shows the edit was verse 1, even if the target language had a verse bridge of "1-2" we could know that it is the "verse" referenced.

Verse Bridge used in Paths

Due to the target language being a verse span, we would likely store the edit in a path that uses the verse bridge such as: ./.apps/translationCore/checkData/verseEdits/tit/1/1-2/timestamp.json

Verse Edit Example (unchanged):

{
  "contextId": {
    "reference": {
      "bookId": "tit",
      "chapter": 1,
      "verse": 1
    },
    "tool": "translationWords",
    "groupId": "apostle",
    "quote": "apostle, apostles, apostleship",
    "occurrence": 1
  },
  "verseBefore": "Paul, a servant of God and an apostle of Jesus Christ, for the faith of God's chosen people and the knowledge of the truth that agrees with godliness,",
  "verseAfter": "abcabc abcabc abcabc",
  "tags": [
    "other"
  ],
  "userName": "klappy",
  "modifiedTimestamp": "2018-01-12T22:38:09.844Z"
}

Since the JSON files's payload doesn't change any, but just the path structure's "reference" that includes the verse bridge, the application needs to adjust understanding that the verse bridge is an integer range that covers the verses between and including the first and end integer in the bridge. If it were "7-9", it would include 7, 8 and 9. If it were "1-10" it would be 1, 2, 3, 4, 5. 6. 7, 8, 9 and 10 inclusively.

Target Bible Structure

The folder structure of the target language Bible data would be much similar to the above. However, since the files are at chapter level, and the keys of the object in the json file are the verse numbers. The verse number keys are strings and allow for them to be a verse bridge. This would include directly from importing and directly leveraged when exporting. I believe the USFM library already supports this. @PhotoNomad0 Can you help confirm this? I know we discussed this while addressing as many use cases as we could in the USFM.js library.

Importance of ContextID being fixed

Context ID comes from the checking tool itself and based on the Greek versification not the target verse. So the context ID itself wouldn't include the verse bridge information. Context ID's are like direct identifiers of where in the app, checking tool, check category/group, selected menu item that the user was in when the verse was edited.

ContextID in Tools and CheckData

Any ContextID in a menu, tW tool, wA tool, edits, bookmarks, selections, etc... uses the below path structure of the verse bridges and specific verse in the reference of the context id unchanged.

We should always open the verse bridge by knowing the specific context ID. The context ID shows the edit was verse 1, even if the target language had a verse bridge of "1-2" we could know that it is the "verse" referenced.

Verse Bridge used in Paths

Due to the target language being a verse span, we would likely store the edit in a path that uses the verse bridge such as: ./.apps/translationCore/checkData/verseEdits/tit/1/1-2/timestamp.json

Verse Edit Example (unchanged):

{
  "contextId": {
    "reference": {
      "bookId": "tit",
      "chapter": 1,
      "verse": 1
    },
    "tool": "translationWords",
    "groupId": "apostle",
    "quote": "apostle, apostles, apostleship",
    "occurrence": 1
  },
  "verseBefore": "Paul, a servant of God and an apostle of Jesus Christ, for the faith of God's chosen people and the knowledge of the truth that agrees with godliness,",
  "verseAfter": "abcabc abcabc abcabc",
  "tags": [
    "other"
  ],
  "userName": "klappy",
  "modifiedTimestamp": "2018-01-12T22:38:09.844Z"
}

Since the JSON files's payload doesn't change any, but just the path structure's "reference" that includes the verse bridge, the application needs to adjust understanding that the verse bridge is an integer range that covers the verses between and including the first and end integer in the bridge. If it were "7-9", it would include 7, 8 and 9. If it were "1-10" it would be 1, 2, 3, 4, 5. 6. 7, 8, 9 and 10 inclusively.

Target Bible Structure

The folder structure of the target language Bible data would be much similar to the above. However, since the files are at chapter level, and the keys of the object in the json file are the verse numbers. The verse number keys are strings and allow for them to be a verse bridge. This would include directly from importing and directly leveraged when exporting. I believe the USFM library already supports this. @PhotoNomad0 Can you help confirm this? I know we discussed this while addressing as many use cases as we could in the USFM.js library.

benjore commented 6 years ago

Suggested SPIKES:

benjore commented 6 years ago

NEED: a couple projects with Verse Bridges (USFM + tStudio)

https://git.door43.org/unfoldingWord/en_ust/src/branch/master/55-1TI.usfm, https://git.door43.org/unfoldingWord/en_ust/src/branch/master/50-EPH.usfm, https://git.door43.org/unfoldingWord/en_ust/src/branch/master/43-LUK.usfm

benjore commented 6 years ago

Related to #3372

da1nerd commented 5 years ago

@klappy @benjore we need to figure how to indicate that a word comes from a verse span. @klappy you and I have discussed possibilities for words coming from a different verse, but coming from a span brings in a whole bunch of complexity.

Or could we just keep things simple and reference the first verse in the span?

mannycolon commented 5 years ago

SPIKE Results

mannycolon commented 5 years ago

@benjore could we also get a few tStudio projects with verse bridges?

benjore commented 5 years ago

@cckozie Do you have any of these ^^^?

cckozie commented 5 years ago

@benjore @mannycolon - I don't believe tS supports verse bridges.

mannycolon commented 4 years ago

@klappy @benjore we need to figure how to indicate that a word comes from a verse span. @klappy you and I have discussed possibilities for words coming from a different verse, but coming from a span brings in a whole bunch of complexity.

Or could we just keep things simple and reference the first verse in the span?

This is why this issue is blocked

birchamp commented 4 years ago

This issue needs to be re-considered and may need a new design. Align to unexpected verse #3739 has been de-prioritized by the stakeholders. Consider making a verse map of the imported USFM.