Uploaded image for project: 'Module Tools'
  1. Module Tools
  2. MODTOOLS-90

usfm2osis.py - processes notes incorrectly, due to not recognising implicit closure

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Upstream Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: usfm2osis.py
    • Labels:
      None

      Description

      When a footnote contains a keyword marked to begin with \fk but with implicit end by the footnote text marker \ft, usfm2osis.py misplaces the </catchWord> at the end of the note element.

      It should be placed before the footnote text begins.

        Attachments

          Activity

          Hide
          dfh David Haslam added a comment -

          Example: Somali Bible - within Gen 16:14

          USFM: \f + \fr 16:14 \fk Bi'ir Lahayroy \ft = Ceelka kan nool oo i arka \f*

          OSIS:
          <note placement="foot"><reference type="annotateRef">16:14</reference> <catchWord>Bi'ir Lahayroy = Ceelka kan nool oo i arka</catchWord></note>

          Should be:
          <note placement="foot"><reference type="annotateRef">16:14</reference> <catchWord>Bi'ir Lahayroy</catchWord> = Ceelka kan nool oo i arka</note>

          Show
          dfh David Haslam added a comment - Example: Somali Bible - within Gen 16:14 USFM: \f + \fr 16:14 \fk Bi'ir Lahayroy \ft = Ceelka kan nool oo i arka \f* OSIS: <note placement="foot"><reference type="annotateRef">16:14</reference> <catchWord>Bi'ir Lahayroy = Ceelka kan nool oo i arka</catchWord></note> Should be: <note placement="foot"><reference type="annotateRef">16:14</reference> <catchWord>Bi'ir Lahayroy</catchWord> = Ceelka kan nool oo i arka</note>
          Hide
          dfh David Haslam added a comment -

          Other footnote markers are processed incorrectly too!

          Example: Somali Bible - within Exodus 20:5

          \f + \fr 20:5 \ft Ilaah aan aqbalanayn in ilaah kale lala caabudo \f*

          OSIS:
          <note placement="foot"><reference type="annotateRef">20:5 Ilaah aan aqbalanayn in ilaah kale lala caabudo</reference></note>

          Again because the script does not recognize implicit closure syntax, this time for the \fr REF by the \ft marker.

          Should be:
          <note placement="foot"><reference type="annotateRef">20:5</reference> Ilaah aan aqbalanayn in ilaah kale lala caabudo</note>

          Show
          dfh David Haslam added a comment - Other footnote markers are processed incorrectly too! Example: Somali Bible - within Exodus 20:5 \f + \fr 20:5 \ft Ilaah aan aqbalanayn in ilaah kale lala caabudo \f* OSIS: <note placement="foot"><reference type="annotateRef">20:5 Ilaah aan aqbalanayn in ilaah kale lala caabudo</reference></note> Again because the script does not recognize implicit closure syntax, this time for the \fr REF by the \ft marker. Should be: <note placement="foot"><reference type="annotateRef">20:5</reference> Ilaah aan aqbalanayn in ilaah kale lala caabudo</note>
          Hide
          dfh David Haslam added a comment - - edited

          What seems to be the case from both examples is a failure to parse the footnote syntax in USFM for implicit closure.
          This can probably be generalized to be a bug in processing both notes and cross-references.

          From USFM 2.4 Syntax Notes:

          The individual elements which make up the footnote or cross reference content are defined as character level markers, which means that they each define a beginning and a corresponding end marker. The Paratext translation editor will interpret the presence of a new marker as an implicit closure of any preceding character level marker. For this reason a majority of translation projects have adopted the approach of authoring footnote or cross reference content without supplying the explicit end marker.

          Show
          dfh David Haslam added a comment - - edited What seems to be the case from both examples is a failure to parse the footnote syntax in USFM for implicit closure. This can probably be generalized to be a bug in processing both notes and cross-references. From USFM 2.4 Syntax Notes: The individual elements which make up the footnote or cross reference content are defined as character level markers, which means that they each define a beginning and a corresponding end marker. The Paratext translation editor will interpret the presence of a new marker as an implicit closure of any preceding character level marker. For this reason a majority of translation projects have adopted the approach of authoring footnote or cross reference content without supplying the explicit end marker.

            People

            • Assignee:
              chrislit Chris Little
              Reporter:
              dfh David Haslam
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: