unfoldingWord / tc-create-app

translationCore Create
https://create.translationcore.com/
MIT License
0 stars 5 forks source link

Prevent users from opening new TSV7s if TSV9s exist in repo #1429

Closed birchamp closed 1 year ago

birchamp commented 1 year ago

Users should be informed that their Translation Notes file is in the previous format (TSV9) and that they can not continue.

Once the en_tn source repo has been converted to TSV7 there are 3 possibilities: 1) TSV9 files exist in the target repo user or master branch and the user should be prevented from continuing (source: TSV9 ≠ target: TSV7) 2) TSV7 files exist in the target repo (user or master branch) and the user should continue as normal (source: TSV7<->target: TSV7) 3) No files are present in the target repo. Create a new TSV7 file in the target user branch (source: TSV7->target: TSV7)

"tC Create cannot continue to open this file because it is in an outdated format. Please contact your administrator to update the repository's files to the latest format."

DoD:

If a repo has TSV9 files in the top-level directory or user branch they should be informed and not be allowed to continue if the source (English) is TSV7.

mandolyte commented 1 year ago

@birchamp One small correction...

This:

Once the en_tn source repo has been converted to TSV7

Should read:

Once the en_tn source repo has been converted to TSV7 and published

The English content can be converted to TSV7 without impacting anyone but themselves. It is only when they publish TSV 7 content that GLs will be impacted.

birchamp commented 1 year ago

Check the filenames in the manifest to see if they are the new style. gE is already distinguishing between TSV9 and TSV7 so it may be helpful to see what was done there.

elsylambert commented 1 year ago

translationCore Create - v1.8 build 190-5da41d8.

  1. Works as expected. tested using translate _test which had TSV9 old format files. When user tried to open the files, error message pops up like shown below preventing the user to open the old format files: Screenshot 2022-11-29 at 8.59.40 AM.png

  2. Tested using TEST_QA es-419_tn TSV7 format. Master was in TSV7, user was able to create target file by editing and saving the file in TSV7 format. Looks good.

  3. Looks good, tested with the ^^ above org and repo. User was able to create fresh user branch in TSV7 format files.

elsylambert commented 1 year ago

PROBLEM: With point 1. When the user branch has old files in TSV9 format, even after deleting the user branch and starting over fresh with TSV7 format, we see the error message popping up after Save is done. Screenshot 2022-11-29 at 8.59.40 AM.png More information from Discord chats: The query that results in the messages is running asynchronously and so when it pops up is not predictable. Cecil : I paired with @JoelCJohnson and I could not figure out a way to do it. But then @superdav42 and @JoelCJohnson just let it run independently, which never occurred to me. So it works as expected if there is a user branch with old data. I think it is just when there isn't a user branch that the result lags until the data is "reloaded" after a save.

elsylambert commented 1 year ago

translationCore Create - v1.8 build 192-d709261. No longer seeing the problem with the warning pop-up after deleting old format branch.