[MGNLDIFF-74] Diff module is not i18n aware on single site with multiple languages Created: 17/Mar/14  Updated: 23/Dec/14  Resolved: 30/Sep/14

Status: Closed
Project: Magnolia Diff Module
Component/s: None
Affects Version/s: 1.2
Fix Version/s: 1.6.1

Type: Bug Priority: Major
Reporter: Christian Ringele Assignee: Philip Mundt
Resolution: Fixed Votes: 0
Labels: support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File 01-compare_versions_with_locale_selection-light.png     PNG File 01-compare_versions_with_locale_selection.png     PNG File 02-compare_to_previous_version_with_locale_selection-light.png     PNG File 02-compare_to_previous_version_with_locale_selection.png     PNG File 03-locale_selection_from_pulse_workitem-light.png     PNG File 03-locale_selection_from_pulse_workitem.png    
Issue Links:
Cloners
clones MGNLDIFF-70 Diff module is not i18n aware on sing... Closed
Relates
relates to MGNLDIFF-82 i18n aware comparison doesn't work in... Closed
causality
dependency
depends upon MGNLUI-3177 Dialogs of RestoreVersionAction and S... Closed
depends upon MGNLUI-3175 AbstractVersionAction should not depe... Closed
is depended upon by MGNLWORKFLOW-272 Make use of new "localized" compariso... Closed
duplicate
is duplicated by MGNLDIFF-75 Diff module should add a list of loca... Closed
relation
is related to MGNLDIFF-73 Add possibility to query for changes,... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

If you setup the i18n STK mechanism for multi-language in a single tree, one can not see the content differences of other languages than the default one.

Setting up a site definition for each language defining it as default language is in most projects not an option. 3 languages on 5 sites will result in 15 SD configurations. One would have to manage 15 domains for an author and each Author would have to logout and login to all the domains for the language switch.

For the support issue SUPPORT-3211 I created a simple Snapshot for the customer he can enhance for his needs. For product readiness the implementation needs to be enhanced, for projects it can be used and easily extended for the project needs.

Situation:

  • The VersionDiffHtmlServlet is dropping two requests to the regarding page's URL.
  • Then provides both rendered outputs to the dasyDiff.
  • Also the URl for the reuests are created by the content's handle and not via the LinkUtil, therefore no language flag is added to the URL.

Solution:

  • In VersionDiffHtmlServlet set the locale into the AggregationState.
  • In VersionDiffHtmlServlet create the url via LinkUtil I18nContentSupport
  • Add functionality to dynamic dialog to be able to select the locale
  • In VersionDiffHtmlServlet react to the parameter defining the locale and set the value into the AggregationState.


 Comments   
Comment by Philip Mundt [ 07/Apr/14 ]

Commits:
https://git.magnolia-cms.com/gitweb/?p=enterprise/diff.git;a=commitdiff;h=b1ecbe0eb8069a2e0efb2552760433999838d52a
https://git.magnolia-cms.com/gitweb/?p=enterprise/workflow.git;a=commitdiff;h=aa42320c442da3e72ef48a587256b91ed2a43ecd

The commits solve the problem by adding:

  1. An additional Locale selection the the compareVersionsAction dialog (taken from the site definition of the node)
  2. Adding a new dialog to the compareToPreviousVersionAction (which didn't have such a dialog beforehand) making the language selectable (this should also be modified to only show the selection when there are mutliple languages defined)
  3. Adding a dialog to the workItemDiffAction also making the Locale selectable from the workItem message view

We are suggesting to fix this for Magnolia version 5.3 and possibly bring in some UI improvement, i.e. modalityLevel=light or integrate a languageSwitcher in the actual diff view (similar to the one in the pageEditor).

Comment by Philip Mundt [ 07/Apr/14 ]

Attached screenshots of the current implementation mapped to the above cases cases

  1. 01-compare_versions_with_locale_selection
  2. 02-compare_to_previous_version_with_locale_selection
  3. 03-locale_selection_from_pulse_workitem
Comment by Philip Mundt [ 22/Sep/14 ]

Additional changes after discussion with Andreas:

  • Use light dialogs
  • defaultLocale (of site of the relevant node) is pre-selected (no NONE)
  • Wording in the dialogs should be fixed (see: workitem dialog)
  • Action should not show dialog, when only one language is set
    • Directly to diff view

Missing:

  • Migration of everthing
Comment by Philip Mundt [ 30/Sep/14 ]

Make use of getModalityLevel() added in MGNLUI-3177.

Generated at Mon Feb 12 05:21:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.