unfoldingWord / translationCore

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

[4] Bug: USFM3 shows up in edit window #6124

Open benjore opened 5 years ago

benjore commented 5 years ago

Story Explanation

In chapter 4 of this project, when the verse edit window is opened (in wA), the USFM 3 shows up (just for chapter 4) instead of straight text.

https://app.zenhub.com/files/65028237/749d77e3-6ea7-437c-8f50-67fe9ac0a232/download

Features / Specifications

Definition of Done

Additional Context

Mockups

PhotoNomad0 commented 5 years ago

@benjore - I think this issue is more about the word tokens shown in chapter 4, not about USFM in edit box. Since in the current design all USFM in text is displayed in the edit box.

We also don't strip out the word tokens on import unless they are a part of alignment data. It looks like this chapter may have come from an overwrite merge where the alignment markers were manually removed.

Up to this point we tread carefully on making changes to source content on USFM import. And many documents already have word markers in them.

Not sure I have an easy solution to remove the word markers. The way I found is manual operation: to go into expanded scripture pane. Then for each verse, selected the filtered text displayed, then edit it and paste over all the content with the filtered text - the word markers are removed and alignments don't get reset.

cckozie commented 4 years ago

Still seeing problems in 2.1.0 (ed1c32c) \c 4 \p
\v 1 \zaln-s | x-strong="c:H7489a" x-lemma="רָעַע" x-morph="He,C:Vqw3ms" x-occurrence="1" x-occurrences="1" x-content="וַ⁠יֵּ֥רַע"*\w But|x-occurrence="1" x-occurrences="1"\w \w this|x-occurrence="1" x-occurrences="1"\w \w displeased|x-occurrence="1" x-occurrences="1"\w\zaln-e* \zaln-s | x-strong="H0413" x-lemma="אֵל" x-morph="He,R" x-occurrence="1" x-occurrences="1" x-content="אֶל"*\zaln-s | x-strong="H3124" x-lemma="יוֹנָה" x-morph="He,Np" x-occurrence="1" x-occurrences="1" x-content="יוֹנָ֖ה"*\w Jonah|x-occurrence="1" x-occurrences="1"\w\zaln-e*\zaln-e* \w and|x-occurrence="1" x-occurrences="1"\w \w he|x-occurrence="1" x-occurrences="1"\w \w became|x-occurrence="1" x-occurrences="1"\w \w very|x-occurrence="1" x-occurrences="1"\w \w angry|x-occurrence="1" x-occurrences="1"\w*.

image

PhotoNomad0 commented 4 years ago

@cckozie - How is problem this created in the first place? And is this a workflow that we want to support?

How do we fix this in a way that won't cause significant effort, slow down or side effects?

cckozie commented 4 years ago

@PhotoNomad0 et al - I don't know the answer to any of those questions.

PhotoNomad0 commented 4 years ago

@cckozie @birchamp - my guess is they did an overwrite merge using USFM that had alignments - so the issue is not about the USFM3 per se, but about the alignment markers in the updated source.

We can probably remove the word and alignment spans in the case of overwrite merge, but it will be significant effort. As Ben would say, "is the juice worth the squeeze?"

birchamp commented 4 years ago

@PhotoNomad0 when you say "overwrite merge" is that something that could be done from within tC? Or is it something done by hand?

BincyJ commented 4 years ago

Blocked for now. To be reopened if issue arises post 2.2 release

cckozie commented 4 years ago

Here is another case: en_ulb_gen_book.zip

PhotoNomad0 commented 4 years ago

@birchamp - it means that someone had to do a USFM import of a file that had the USFM word markers, set the translation ID to match a project that was already on their system, and then click on overwrite. Then we show warning that this will reset your alignments, do you want to continue with overwrite?

@birchamp @cckozie - The intent of this feature was to allow users to export their USFM without alignments in order to edit the text with another editor and then reimport the text USFM after edit and keep the existing alignments for verses that have not been changed.

We presume the user knows what they are doing - always a scary assumption. But this looks like the user has exported the USFM with alignments, and then did an overwrite merge.

We have a few options for resolution:

  1. we could strip out the all USFM in the overwrite merge - but probably would upset Larry and others that are doing text cleanup by stripping out any formatting or markers. Too heavy handed.
  2. we could test for alignment data when doing the overwrite and: a. tell the user that we cannot do an overwrite with USFM that has alignment data b. warn the user that this USFM project has alignment data and that if they continue this alignment data will be removed before overwrite. If they want to preserve the alignments in the USFM file being import, they should not be doing an overwrite.
PhotoNomad0 commented 4 years ago

@birchamp - we should change the title of this issue because showing USFM3 in edit box is not an error.