[MAGNOLIA-6498] Improve Tooling for i18n Created: 13/Jan/16  Updated: 11/Jul/19

Status: Accepted
Project: Magnolia
Component/s: i18n
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Roman Kovařík Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones MAGNOLIA-6471 Tooling for i18n 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)
Epic Link: Enhancement of i18n

 Description   

We should provide informations about translations (all possible keys for labels and mark the used one) in development mode. The comfortable solution is to provide e.g. title element to labels which would occur on hover.

  • It's easy to provide HTML with all the informations directly from TranslationServiceImpl.
  • The problem is that most of our labels in UI do not support HTML.
    • A] We'd need to support is all over the place.
    • B] post processing and inserting the title elements into a parent elements
      • We've already tried sitemesh/modify stream/javascript post processing. This works well on plain HTML page but not in admincentral since the output is json.
        <script data-name='scriptid'>
          $(document).ready(function(){
          var el = document.querySelector('script[data-name="scriptid"]');
          el.parentNode.setAttribute(\"title\", \" Arrays.asList(keys).toString().replace(keys[0], ">" +   keys[0] + "<")
          el.remove()
        });
        </script>
        translatedMessage
        
    • C] Or would it be possible to somehow attach a listener to vaadin processor????

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