unfoldingWord-dev / ts-desktop

translationStudio Desktop App
http://ufw.io/ts
Other
41 stars 29 forks source link

Explore Proper use of RCs for tC Interop #1228

Open jag3773 opened 5 years ago

jag3773 commented 5 years ago

Scope out what is required to seamlessly interoperate with tC via the RC spec.

Possibly we should consider moving all of the tS data files into .apps/ and export a single USFM file at the top level when export/import/uploading/downloading (discussion about when needs to happen).

da1nerd commented 5 years ago

I agree putting the ts data in .apps an generating a usfm file at the top.

This will require:

  1. [ ] [5] migrating old ts projects to tC project structure. We already have a migration workflow. Just need to add another step (triggered in ts-dashboard.html).
    1. [ ] [2] it appears migration only happens when importing from a repo but we need to migrate when importing local projects as well.
  2. [ ] [8] Add support for generating the top level usfm file when changes are made to the translation. We already have a regular saving schedule (ts-translate.html) so we could add a usfm generator to the pipeline. We should also generate the usfm when exporting/importing.
  3. [ ] [5] We'll need to update how we read data from the projects. This quickest way would be to move everything "as is" into .apps/translationStudio/ and update applicable paths in the application (https://github.com/unfoldingWord-dev/node-resource-container).
    1. ~[8] We might also want to update how data is written to the disk. Merge conflicts have always been a big deal in tS and if we hide all of the content into .apps it will become more difficult for people to recover from complicate merge issues.~
    2. ~Spending time here switching edits to timestamped files (like in tC) will make it a lot easier for users to merge work and resolve commonly edited files.~
    3. ~[3] This will require updating how merge conflict information is gathered (gitnative.js). Note this will have the benefit of resolving most of the outstanding bugs in handling merge conflicts.~
  4. [ ] [5] we'll need to add in similar support for importing external edits as seen in tC. e.g. if the usfm content differs from the content within .apps we'll need to record those edits so that subsequent changes in the app do not overwrite the external edits. Probably we would chunk the usfm and compare the most recent chunks with what we have in the project.
  5. ~[5] Update support for importing source content. Currently tS allows importing 0.1 RCs as source content. It should be straightforward to update to 0.2 (https://github.com/unfoldingWord-dev/node-resource-container)~
  6. ~[8] Update tC to follow the RC spec.~
    1. ~This will involve adding a project migration~
    2. ~Updating how manifest files are read~
    3. ~Updating how manifest files are written.~
da1nerd commented 5 years ago

The Door43 api is handled by this module https://github.com/unfoldingWord-dev/node-door43-client. We should be able to update this to support the v3 api. Related to #1227.

This resource container spec is handled by this module https://github.com/unfoldingWord-dev/node-resource-container. tS is currently using the rc0.1 branch of the code, but there is an rc0.2 branch that may just need a few tweaks in order for us to use it.

da1nerd commented 5 years ago

@jag3773 note that in order to provide RC interop with tC we'll need to make tC support RCs (right now it's an incompatible hybrid). That should only involve updating the manifest so it shouldn't be too invasive. I've added that to the list above.

da1nerd commented 5 years ago
da1nerd commented 5 years ago

Here's a simplified list of tasks to accomplish in order to provide tC interop.

  1. [x] [5] migrate tS manifest to the tC manifest.
  2. [x] [5] Move all tS project data into .apps/translationStudio/
  3. [ ] [2] run project migration during local import in addition to DCS import.
  4. [ ] [8] generate USFM file during a save and when exporting/importing.
  5. [ ] [3] generate Markdown for obs projects.
  6. [ ] [5] Import external edits into the tS project data during an import.
da1nerd commented 5 years ago

@jag3773 :point_up:

da1nerd commented 5 years ago

Here's a proposal for how to implement the interop https://github.com/unfoldingword-dev/ts-desktop/issues/1243

jag3773 commented 5 years ago

tS 12.0 has this implemented, I'll leave this open until tC implements on it's side.