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

Offline work when bugfixing #1195

Open
marcperrin opened this issue Aug 22, 2016 · 2 comments
Open

Offline work when bugfixing #1195

marcperrin opened this issue Aug 22, 2016 · 2 comments
Labels
enhancement Adding or requesting a new feature. undecided These features might not be implemented. Can be prioritized by sponsorship.

Comments

@marcperrin
Copy link
Contributor

marcperrin commented Aug 22, 2016

Hello,

Let's imagine a component is 0% translated and we have translator T1 working online and translator T2 working offline (using translation download & upload). It works fine I guess.
But now let's say the component is 100% translated and T1 and T2 are both bugfixing: in that case I think the workflow is broken, because when T2 chooses whether to check the "Overwrite" checkbox at upload, he actually chooses between discarding his work (upload does nothing) or discarding T1's work.

I think it would be useful to have a third choice which would yield a kind of auto-diff at upload, to upload only what's changed.
This could probably be achieved by conveying a git hash in the translation header at download (@samhocevar's suggestion) (not sure how that would work for other vcs, but hopefully similarly) (it would force a commit during download I guess)
Thanks!

@nijel nijel added enhancement Adding or requesting a new feature. undecided These features might not be implemented. Can be prioritized by sponsorship. labels Aug 22, 2016
@marcperrin
Copy link
Contributor Author

marcperrin commented Aug 29, 2016

I've done something about this issue, my code is still very sketchy / incomplete (e.g. about vcs flavour or downloaded file format), but basically the outline is:

  • convey the last_revision vcs property in the downloaded file header (NB: download must trigger a commit_pending, or that won't reflect the true state at download time)
  • [vcs] write a retrieve_revision method (e.g. for git: git show some_hash:my_file.txt)
  • add an option at upload to activate or not the feature
  • if said option is on, and last_revision is found in header, then during upload, what I've done is to load an old_store based on retrieve_revision, and look into it within iterate_merge to skip when translation is unchanged w/r/t old_store

@nijel
Copy link
Member

nijel commented Aug 29, 2016

This pretty much makes sense, the commit will be needed anyway in this case to be sure you have revision to retrieve on upload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature. undecided These features might not be implemented. Can be prioritized by sponsorship.
Projects
None yet
Development

No branches or pull requests

2 participants