Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-26428

Allow PlatformUI extensions to be translated

    Details

      Description

      With the current implementation, the translations for a given context have to be added manually in the main PlatformUI template (shell.html.twig, see https://github.com/ezsystems/PlatformUIBundle/blob/master/Resources/views/PlatformUI/shell.html.twig#L55), as a result, PlatformUI extension can not be translated.

        Issue Links

          Activity

          Hide
          Bertrand Dunogier added a comment -

          How many domains would a PlatformUI extension require ?

          Also, where do the ones hardcoded in shell come from ? Are they manual conventions you came up with ?

          Show
          Bertrand Dunogier added a comment - How many domains would a PlatformUI extension require ? Also, where do the ones hardcoded in shell come from ? Are they manual conventions you came up with ?
          Hide
          Damien Pobel (Inactive) added a comment -

          > How many domains would a PlatformUI extension require ?

          I would say that an extension can have many. For instance, I guess StudioUI would be translated with several domains. But I guess your question was more, "does an extension need several domains ?", so the answer is yes

          > Also, where do the ones hardcoded in shell come from ? Are they manual conventions you came up with ?

          yes it's how we decided to split the translations (more or less in big component "families")

          Show
          Damien Pobel (Inactive) added a comment - > How many domains would a PlatformUI extension require ? I would say that an extension can have many. For instance, I guess StudioUI would be translated with several domains. But I guess your question was more, "does an extension need several domains ?", so the answer is yes > Also, where do the ones hardcoded in shell come from ? Are they manual conventions you came up with ? yes it's how we decided to split the translations (more or less in big component "families")
          Show
          Bertrand Dunogier added a comment - PR https://github.com/ezsystems/PlatformUIBundle/pull/719 .
          Hide
          Bertrand Dunogier added a comment -

          QA: this can be tested by writing a custom bundle, and making the bundle's extension implement the interface, as described in the PR's description.

          [~damien.pobel@ez.no] should a markdown doc be added / modified with this doc in PlatformUI ?

          Show
          Bertrand Dunogier added a comment - QA: this can be tested by writing a custom bundle, and making the bundle's extension implement the interface, as described in the PR's description. [~damien.pobel@ez.no] should a markdown doc be added / modified with this doc in PlatformUI ?
          Hide
          Damien Pobel (Inactive) added a comment -

          Bertrand Dunogier good point indeed can you write a short markdown document in https://github.com/ezsystems/PlatformUIBundle/tree/master/docs explaining what to add to a custom bundle so that its custom translations are available ?

          Show
          Damien Pobel (Inactive) added a comment - Bertrand Dunogier good point indeed can you write a short markdown document in https://github.com/ezsystems/PlatformUIBundle/tree/master/docs explaining what to add to a custom bundle so that its custom translations are available ?
          Hide
          Bertrand Dunogier added a comment -

          Actually, [~damien.pobel@ez.no], shouldn't PlatformUI i18n in general be documented in extensibility.md as well ?

          Show
          Bertrand Dunogier added a comment - Actually, [~damien.pobel@ez.no] , shouldn't PlatformUI i18n in general be documented in extensibility.md as well ?
          Hide
          Bertrand Dunogier added a comment -

          [~rui.silva@ez.no] If you do what’s described in the PR (bundle + extension with the said method), it will load extra items from PlatformUI. Open the network tab of the browser’s inspector, load PlatformUI, and look for a request with an URL like /translations/<domain>?locales=fr_FR,fr,en_US,en.

          Any domain you register as documented in the PR will trigger an extra request of that type.

          Show
          Bertrand Dunogier added a comment - [~rui.silva@ez.no] If you do what’s described in the PR (bundle + extension with the said method), it will load extra items from PlatformUI. Open the network tab of the browser’s inspector, load PlatformUI, and look for a request with an URL like /translations/<domain>?locales=fr_FR,fr,en_US,en. Any domain you register as documented in the PR will trigger an extra request of that type.
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA for master.
          Thank you Bertrand, for the insight on this.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA for master. Thank you Bertrand, for the insight on this.
          Hide
          Bertrand Dunogier added a comment -

          Merged to master@811e219.

          Show
          Bertrand Dunogier added a comment - Merged to master@811e219 .

            People

            • Assignee:
              Unassigned
              Reporter:
              Damien Pobel (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: