Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimport Existing Project with Updated Text From USFM #3559

Closed
jag3773 opened this issue Jan 2, 2018 · 34 comments
Closed

Reimport Existing Project with Updated Text From USFM #3559

jag3773 opened this issue Jan 2, 2018 · 34 comments

Comments

@jag3773
Copy link
Contributor

jag3773 commented Jan 2, 2018

Story

As a checker, I want to be able to export a tC project as USFM, load it into another app, export from that app as USFM, and reimport into the same tC project so that I can make use of features in other apps without redoing work in tC.

As an aligner, I want to be able to make changes to my translation in a separate tool and then reimport the text from a USFM2/3 file so that I can realign the text that I changed.

Notes

  • Existing check data should be preserved, only the text should be updated
    • For a USFM3 import with alignment data, the imported alignments should overwrite existing alignments in the project, but the importer should preserve any existing alignments which the new file does not have alignments for.
    • For a USFM2 import, the alignment data should not be affected except where the text is overwritten.
  • User should be prompted to "recheck" any previous check that may have been modified by changes to the text
  • Import/Export testing should happen against Paratext
  • If a USFM3 is imported (not reimported) then it should also work
  • Make sure "invalidated checks" are calculated during the reimport process.

Related to #3086 & #3763

@benjore benjore changed the title Ability to Reimport Existing Project with Updated Text Reimport Existing Project with Updated Text Jan 17, 2018
@jag3773 jag3773 changed the title Reimport Existing Project with Updated Text Reimport Existing Project From USFM File From USFM Feb 9, 2018
@jag3773 jag3773 changed the title Reimport Existing Project From USFM File From USFM Reimport Existing Project with Updated Text From USFM Feb 9, 2018
@benjore
Copy link

benjore commented Feb 9, 2018

image

image

image

image

@benjore
Copy link

benjore commented May 8, 2018

  • If the user tries to reimport a project, prepopulate the language field. If they change the language, then create it as a new project, not a reimport.
  • Do a Git commit (so that eventually this merge can be undone).

@richmahn richmahn self-assigned this May 8, 2018
@benjore benjore added this to the tC Sprint #57 milestone May 9, 2018
@richmahn richmahn added the Epic label May 9, 2018
@richmahn
Copy link
Member

richmahn commented May 9, 2018

@richmahn
Copy link
Member

richmahn commented May 10, 2018

@benjore Is the "import" icon ok for this? The add file to folder icon is a bit misleading, plus doesn't exist in Bootstrap's icons. Here's an actual screenshot using bootstrap:

screenshot

@benjore
Copy link

benjore commented May 14, 2018

@richmahn I don't like that. Are there any other options?

@richmahn
Copy link
Member

@benjore Easiest is to use the Bootstrap3 Glyphicons, but we could try to make another svg icon like we did for invalidate. https://getbootstrap.com/docs/3.3/components/

@richmahn
Copy link
Member

@benjore I think the glyphicon-level-up is kind of similar to what you have, and has a nice "re"import feel to it (search for that icon name in the page)

@benjore
Copy link

benjore commented May 14, 2018

@richmahn What I used was font awesome. I still like that one best.

@richmahn
Copy link
Member

@benjore What I finally realize I need are how various prompts and warnings should look, from size of window, to buttons, to verbiage, and when in the process one can cancel the re-import due to them realizing things aren't quite right. Off the top of my head, realizing how much more "noisy" the reimport process is:

  1. What to say when importing a bad file (not USFM) [I assume like in the import process]
  2. Importing a USFM file but it isn't the same book as the project
  3. Should there be a stepper like in a new project import (this is what I was originally making it to be like but now canning that):
    • Verses missing (just like with new import?)
    • how to show missing alignments and and checks for each tool (sectioned, each its own page?)
    • Anything else that needs to be displayed if wrong?

@richmahn
Copy link
Member

@benjore Never mind about the first one, I already run the USFM validator which throws the proper message.

@benjore
Copy link

benjore commented May 22, 2018

@richmahn I apologize for this, but I'm gonna change things slightly. It think it will improve the reimport process and hopefully will lessen your work.

When a user clicks "Reimport", the process should be the same as a regular import (e.g. don't automatically fill in (c) info, project info, etc.). The user should fill in the "Stepper" info as if it were a regular Import.

Currently, the user is only informed that the project is a duplicate after the whole "Stepper" is completed. This needs to change. When the user clicks "Continue" on the "Project Information" step of the "Stepper", tC should check to see if it is a reimport. That is when the reimport warning should be thrown. If I was trying to reimport an en_1th project, but accidentally select an en_2th project (and import it as such), then it should be imported as normal.

image

@benjore benjore modified the milestones: tC Sprint #57, tC Sprint # 58 May 22, 2018
@richmahn
Copy link
Member

richmahn commented Jul 9, 2018

I didn't even know we could delete projects. How does one go about doing that?

@richmahn
Copy link
Member

richmahn commented Jul 9, 2018

Ah, you meaning manually from the File browser? Interesting...

@cckozie
Copy link

cckozie commented Jul 9, 2018

Going to fail this while doing further investigation.

@cckozie cckozie added the QA/Fail label Jul 9, 2018
@PhotoNomad0 PhotoNomad0 self-assigned this Jul 10, 2018
@PhotoNomad0
Copy link
Contributor

@cckozie - this may not make a difference, but are you doing "move to trash" or "delete immediately"?

@cckozie
Copy link

cckozie commented Jul 10, 2018

@PhotoNomad0 - I'm doing a 'move to trash'

@benjore benjore modified the milestones: tC Sprint #60, tC Sprint #61 Jul 10, 2018
PhotoNomad0 pushed a commit that referenced this issue Jul 17, 2018
* Fixes for qaFail and other bugs

* Do all import deleting in Workflow

* Quick fix to update save location after overwrite merge.

* Fixes lint error
@cckozie
Copy link

cckozie commented Jul 18, 2018

0.10.1 (ee3f8f5)

  1. I have a local project named en_ult_act_book
    I did an online import of https://git.door43.org/tc02/en_act
    On the project details screen I set the Translation Identifier to 'ULT'
    Instead of being warning on that screen that a project with that name already exists, it lets me continue the import and at the end gives me this message:
    image

  2. When the user selects the 'Reimport' option on the 3dot menu, they should not be allowed to import a project that has a different language and/or book than the one selected on the project menu. Currently it works like a normal import with no messages other than the 'Project has been named..' one, and both projects now show on the projects page. (I am going to contact @benjore about moving this to a new issue that we'll deal with in the future)

  3. When the user selects the 'Reimport' option on the 3dot menu, the project details screen should be pre-populated based on the meta data (language, book, translation id, nickname) for the project being reimported. (I am going to contact @benjore about moving this to a new issue that we'll deal with in the future)

  4. Imported a good usfm file. Reimported the file again choosing the overwrite option, then loaded in tW. Same error encountered if changes were made to the original file before the reimport. Same error in wA. Same in 0.10.1 (b411d84) Looks like this may not be a problem on Win64 57-TIT.usfm.zip

image

  1. Error: ** I AM NOT SEEING THIS PROBLEM IN 0.10.1 (b411d84) **

Overwrite/merge of usfm project fails when not in developer mode

Steps to reproduce

switch out of developer mode
import Titus USFM file to create new project
make a couple alignments
export as USFM3 file
reimport the USFM3 file just exported
set project details that same and click overwrite
select overwrite project
will see message that only New Testament projects are supported even though this is a Titus project.

@richmahn
Copy link
Member

richmahn commented Jul 20, 2018

@cckozie Yes, #2 is because in Ben's diagram of this whole workflow, reimport isn't really known about until the user has selected a project and renamed it, then knowing it is a reimport. I think Ben spoke about removing it, but in my opinion it helps the user know he/she can reimport a project, yet this button only does local import, not both local and online. Probably best to do away with it. The menu "Reimport Project" simply does what the FAB does for "Import Local"

@richmahn
Copy link
Member

richmahn commented Jul 20, 2018

@cckozie Understand all your issues on repopulating project details and such, as I brought all those up with Ben. Yet this has actually become more of an "overwrite" or "merge" feature (rather than a "reimport" feature) where the user should just go through the regular import of a local or online project, but once they give it an identifier/book/language which generates a project name, and that name exists, then they are prompted if they want to overwrite, and if they do, we keep alignment/selections as needed (importing new alignments if there is alignment data in the new import). So we really shouldn't have the "Reimport Project" option as that seem to be misleading and also what you base your expectation on as I did.

@benjore We probably need this to be considered "Overwrite" concept of imports with the same given project name. There is so much we don't know until they finally name the project and specify the book and language in the Project Details page to be able to force them to select the right book/language as Koz (and I) wanted for a reimport feature. All that is really needed is to do away with the "Reimport Project" context menu for projects and be told/prompted when existing project will be overwritten/merged.

@cckozie
Copy link

cckozie commented Jul 20, 2018

Recreate on 0.10.0 (db8cd53) with Hindi project.
image

@PhotoNomad0
Copy link
Contributor

@richmahn - it looks like a timing problem. @RoyalSix doesn’t see the problem when he has debug tools open, but sees a crash when he doesn’t. Looks like the project is is not being deleted from the projects folder before trying to copy the new one from imports. Maybe try Spidel's fix of renaming the old project before deleting it and after that moving from imports? that way you shouldn't see any collisions when moving. And then if the renamed old project is still around, you could see if there was a permissions problem like a file/folder was locked.

screen shot 2018-07-20 at 5 13 30 pm

@benjore
Copy link

benjore commented Jul 21, 2018

Sorry to be late to the party!

  1. When the user selects the 'Reimport' option on the 3dot menu, they should not be allowed to import a project that has a different language and/or book than the one selected on the project menu. Currently it works like a normal import with no messages other than the 'Project has been named..' one, and both projects now show on the projects page. (I am going to contact @benjore about moving this to a new issue that we'll deal with in the future)
  2. When the user selects the 'Reimport' option on the 3dot menu, the project details screen should be pre-populated based on the meta data (language, book, translation id, nickname) for the project being reimported. (I am going to contact @benjore about moving this to a new issue that we'll deal with in the future)

Let's not do these for this release. We can move them into a new issue. @cckozie Seeing that this won't be possible, would you rather that we hide the "Reimport" option from the 3-dot menu?

Created #4756 to add back the Reimport option

@cckozie
Copy link

cckozie commented Jul 23, 2018

@richmahn As suggested above, please remove the 'Reimport' option from the 3 dot menu.

mannycolon added a commit that referenced this issue Jul 23, 2018
QA Fail/Fix - #3559 - Removes 'Reimport Project' from project context menu
@cckozie
Copy link

cckozie commented Jul 25, 2018

0.10.0 (9b04f29) Using project 55-1TI.usfm.zip

The problem noted '5 days ago' above still exists and is possibly worse.
image

  1. Import a Titus usfm2 project
  2. Import the same usfm2 project giving it the same language and translation id as the previous import
  3. Click the Overwrite button
  4. Click the Overwrite Project button
  5. Open the project in tW, see the error
    NOTE: This error occurs regardless of whether or not the second usfm2 file is identical to the first or if it has changes. It also does not matter if the first project imported is opened in tW before the second import is performed.

@cckozie
Copy link

cckozie commented Jul 25, 2018

On Win64 it did work when I imported the file a second time. However, when I imported it a third time I got the error again.
image

@cckozie
Copy link

cckozie commented Jul 26, 2018

0.10.0 (4566b9d)
I did a successful import, then overwrite multiple times, all with usfm2 files. Then I got this. It comes up after clicking the Overwrite button. I now get this message every time, even after restarting tC.
After deleting the Projects folder it does again work correctly.
Could this be tied to my being unable to delete the project's folder so I am renaming it?

image

bspidel added a commit that referenced this issue Jul 27, 2018
QA Fail - #3559 - targetBible missing when reimporting
@cckozie cckozie added QA/Pass and removed QA/Fail labels Aug 9, 2018
@benjore benjore closed this as completed Aug 10, 2018
PhotoNomad0 added a commit that referenced this issue Aug 16, 2018
* tW Rewrite QA Fail Fixes (#4662)

* added tc-ui-toolkit version

* Merge branch 'develop' of https://github.com/unfoldingWord-dev/translationCore into feature-jay-4318

# Conflicts:
#	package-lock.json
#	package.json

* added code to improve check invalidation detection

* removed console logs

* Working on unit tests.

* path cleanup.

* loaded entire bibles

* removed unused code

* added tests

* fixed bug in loading book resource

* Initial User Story Template

* Fix for overwrite button on usfm import.

* simplified.

* simplified - undo.

* Fix to update project name when stepper is finished.

* fix to wait on promise.

* Working on tests.

* Fix for already imported projects.

* fix unit tests.

* fix unit tests.

* more work on online import.

* tweaking comments.

* updated feedback api endpoint (#4666)

* fix to handle double validate on online import.

* exposed more apis from tc

* fix to handle double validate on local import.

* comment fixes.

* more work on online import.

* renaming repo

* fixed deleting project file

* updated group menu when deleting project file

* working implementation without passing project repo name

* removed bad code from tc api

* added api documentation

* Addressed QA fail issues for 3670 (#4663)

* Added tc-ui-toolkit 0.9.13

* added new package-lock.json

* added new version of tc-ui-toolkit

* fixed case of Overwrite for consistancy.

* moved git functions to corresponding file

* Update repos via translationCore Submodule Updater

* added documentation and tests

* Update repos via translationCore Submodule Updater

* removed white space changes

* added small fixes

* added git mock tests

* added more tests

* Updated English udt references to ust

* Bumped version number

* Fix - #4613 - Removes the unneeded %language% file from the locale dir

* Adds test to make sure we only have two locale files

* Changes test to just make sure no file names contain %

* Fix syntax error breaking local project rename.

* Update repos via translationCore Submodule Updater

* separate out prompting from renaming.

* Update repos via translationCore Submodule Updater

* merging fixes.

* bumped tc-ui-toolkit version number to 0.9.15

* updated package-lock.json

* Feature - #3559 - Reimport and full-project invalidation check (#4562)

* progress

* Adding file handling

* Update to USFM3 import

* Fixes to reimport

* Work before reverting back

* Revert back to upstream to implement differently

* Changes to allow reimport

* Work on invalidations of all tools

* Work on invalidations of all tools

* Finalization of reimport code

* Code cleanup

* Code cleanup

* Invalidation of WA from import works

* Invalidation of WA from import works

* Update to tests

* Adds tests

* Tests

* Tests

* Fix to tests

* Fix onlineimport tests

* Fix linting issues

* After merge

* More fixes

* Fixes to import

* Fixes alignment from USFM3

* Fixed unit tests

* Fixes WA reimport

* Fix to Local Import test

* Refactors reimport functions to merge functions

* Reverts ProjectActions

* update

* test fixes

* Removed invalidation code

* Updates to workflow

* Update to tests

* Update tests

* Updated to work with the Overwrite renaming feature

* Adds hindi translations for QA

* Code cleanup

* fixes to leave merge project in imports folder.

* fixes for unit tests.

* fixes for project locations on overwrite/merge.

* fixes for online import.

* Removed test of en hi comparison

* Code cleanup

* fixes for online import snapshots.

* fix rename alert on selecting project.

* added delay after overwrite warning before project list is refreshed.

* New translations English-en_US.json (Hindi)

* Update repos via translationCore Submodule Updater

* adding tc-ui-toolkit 0.9.16

* New translations English-en_US.json (Hindi) (#4690)

* Update repos via translationCore Submodule Updater

* updated word-aligner to restore missing USFM tags.

* fix to initialize project details save button to enabled if fields are valid.

* USFM Export Bugfix (#4686)

* added initial fix

* fixed tests

* fixed tests

* added updated package-lock.json

* updated word-aligner to restore missing USFM tags.

* fix for Hindi duplicate keys.

* Fixes to get DCS renaming working.  Happy path working now.

* removed invalidated check/alignment count from tool cards

* added create new repo support.

* updated snapshots

* changed some console errors to warnings

* Fix syntax error breaking local project rename.

* Fix UI bug.

* Update repos via translationCore Submodule Updater

* fix findRepo to catch rejects.  Added some error handling

* fix findRepo to resolve results

* updated feedback to handle circular data logs correctly

* Update repos via translationCore Submodule Updater

* fixes to dialog text and button text.

* fixes to dialog text and button text.

* Fix unit test

* merge develop.

* merge develop.

* revert change.

* fix unit tests.

* Update repos via translationCore Submodule Updater

* unit test fixes.

* New translations English-en_US.json (Hindi)

* Update repos via translationCore Submodule Updater

* fixed spelling in locale

* Update repos via translationCore Submodule Updater

* Update repos via translationCore Submodule Updater

* New translations English-en_US.json (Hindi)

* New translations English-en_US.json (Hindi)

* fixes for git error handling.

* Update repos via translationCore Submodule Updater

* lint fix

* added fixes for test

* added unit tests for GogsApiHelpers.

* simplified some actions

* FeedbackDialog - fixed setting of initial message, added display on reduce state, added callback on feedback close.

* updated api docs

* updated api docs

* added reference to tool props docs

* init

* removed fs.setMockFS

* updated snapsot and return old implementation

* updated return types in docs

* updated tc-tool dependency

* worked on feedback logging

* console.log removes

* cleaned up the status bar container

* streamlined props in status bar container

* fixed feedback dialog disappearing

* bumped tc-tool version

* working on unit tests.

* working on unit tests.

* fix string.

* Added checks to make sure project belongs to current user and user is logged on.  working on unit tests.

* Update repos via translationCore Submodule Updater

* merged with develop

* updated tc-tool package

* QA Fail - #3559 - Fixes Local Reimport (#4716)

* Fixes for qaFail and other bugs

* Do all import deleting in Workflow

* Quick fix to update save location after overwrite merge.

* Fixes lint error

* fixed lint error.

* Made fixes to online import similar to local import.  Local import made fix to timing issue that would cause second project info prompt.

* working on unit tests.

* fix for not showing details page of import with valid project name.

* Fixed wrong translation key on button.

* Update repos via translationCore Submodule Updater

* New translations English-en_US.json (Hindi)

* added email to feedback and improved speed

* updated tc-ui-toolkit

* New translations English-en_US.json (Hindi) (#4726)

* Update repos via translationCore Submodule Updater

* Update repos via translationCore Submodule Updater

* working on updating origin on door43 upload.  Fix to remove remote before setting it.

* fix method name.

* New translations English-en_US.json (Hindi)

* Fix to use token to push to new repo.

* fix unit tests.

* New Crowdin translations (#4733)

* New translations English-en_US.json (Hindi)

* New translations English-en_US.json (Hindi)

* fix comment.

* Fix issue that Deleting Imports would throw an exception when folder did not exist.

* fix unit test

* fix unit test

* Made Greek info popup consistent throughout tC  (#4735)

* bumped tc-ui-toolkit version

* reduced tc app version to 0.10.0

* Update repos via translationCore Submodule Updater

* Update repos via translationCore Submodule Updater

* Update repos via translationCore Submodule Updater

* Update repos via translationCore Submodule Updater

* added timeout fix (#4739)

* fix for looking for duplicates if current project is in imports folder.

* Update repos via translationCore Submodule Updater

* fixes to handle all the project name formats and extract correct bible id.

* Fix for when project id changes on import.

* refactoring.

* lint fixes.

* updated unit tests.

* Removes 'Reimport Project' from project context menu

* Put back reimport_project to be removed automatically by crowdin

* fixed unit tests

* New translations English-en_US.json (Hindi)

* New Crowdin translations (#4762)

* New translations English-en_US.json (Hindi)

* New translations English-en_US.json (Hindi)

* New translations English-en_US.json (Hindi)

* Update repos via translationCore Submodule Updater

* Fix - #4763 - Fixes online import error

* New translations English-en_US.json (Hindi)

* Fixes test for Windows by using path.join

* New translations English-en_US.json (Hindi)

* Fixes test for Windows by using path.join

* Make the move from imports to projects sync

* Fix to clear out settings from reducers before import.

* Fix to clear out settings from reducers before import.

* Unit test fix.

* Clean up.

* revert tool

* Update repos via translationCore Submodule Updater

* Update repos via translationCore Submodule Updater

* merge latest wordAlignment

* Fix for bug that continue button on project details page started disabled on migration even though details were valid.

* Comment fix.

* updated WA

* base off release 0.10.0 and pull in changes from bugfix-klappy-4842.

* base off release 0.10.0 and pull in changes from bugfix-klappy-4842.

* Updated change log for v0.10.0 release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants