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

Multi-language fields, erroneous diff #17

Open
happy-kaseem opened this issue Apr 18, 2017 · 1 comment
Open

Multi-language fields, erroneous diff #17

happy-kaseem opened this issue Apr 18, 2017 · 1 comment
Milestone

Comments

@happy-kaseem
Copy link
Contributor

The more I explore the module VersionControl, the more I discover great features like the little clock icon next to the input in the admin module for fields included for version control (see screenshot below).

version-control-history

Hovering over the clock icon reveals the list of revisions for the field which then in turn can be compared with the latest revision of the field.

Whereas this feature seems to produce correct results for standard input fields, it produces some erroneous results for multi-language fields.

Since there is only one icon for a multi-language field (see screenshot above) it is not possible to have separate revision histories for the different languages.

Currently the result is a mixture of diffs between languages depending on the languages modified per revisions. So it can be that a change to the German version is compared with the latest English version. A comparison with the latest German version does not seem possible.

For a correct implementation of this feature with multi-language fields, we would probably need to have a clock icon for each language and create a history for each language separately.

A really helpful feature in the context of multi-language fields might be a function which allows to compare two languages and show the differences applied to one language since the last time the other language has been updated. This would help the translator to know what he needs to change without having to read the whole text again in both languages.

@happy-kaseem
Copy link
Contributor Author

I have worked out a suggestion on how to address the issue above. The screenshot below shows a preview of this. Unfortunately I have not found a simple solution but rather a number of changes to the following files (see this commit):

  • ProcessVersionControl.module (diff requests with additional "property" parameter; error message when revision to compare with is not available)
  • VersionControl.css (to allow for modified layout of revision history for multi-language fields)
  • VersionControl.js (to pull everything together client-side)

There is a number of things I was not able to do:

  • no pull request available at this point
  • minified versions of "VersionControl.css" and "VersionControl.js" are not available
  • no solution for the correct placement of the window "Compare with current" for multi-language fields (this pop-up needs to be placed next to the corresponding language field, not to the left of the revision history pop-up as seen in the screenshot below).
  • a proper solution should be found for the case (see screenshot below) when for a language no revision is available for the active (clicked) reference revision (top line in this case - German does not have a revision for this line, so diff for German will fail in this configuration).

versioncontrol

@teppokoivula teppokoivula added this to the 2.0 milestone Dec 6, 2017
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

2 participants