benwbrum / fromthepage

FromThePage is a wiki-like application for crowdsourcing transcription of handwritten documents.
http://fromthepage.com
GNU Affero General Public License v3.0
171 stars 51 forks source link

IIIF Page Status API wrong for translations with [[braces]] #1563

Open benwbrum opened 4 years ago

benwbrum commented 4 years ago

Pages that have been translated are supposed to have a pageStatus that includes hasTranslation, as in this:

            "pageStatus": [
              "hasTranscript",
              "hasTranslation",
              "hasSubjectTags"
            ]

However, if pages include wiki-markup within their translations, they are missing the hasTranslation flag, as in:

            "pageStatus": [
              "hasTranscript"
            ]

This is caused by the mark-up adding subject tags (even if subjects are disabled and hidden in the UI), which updates the page.translation_status to Status::INDEXED. The conditional for rendering the hasTranslation flag only looks for Status::TRANSLATED and Status::NEEDS_REVIEW, so it misses these pages.

benwbrum commented 1 year ago

We need to attempt to reproduce this, since the code looks like it checks whether subjects are disabled on the collection